Table of Contents
Fetching ...

LinSATNet: The Positive Linear Satisfiability Neural Networks

Runzhong Wang, Yunhao Zhang, Ziao Guo, Tianyi Chen, Xiaokang Yang, Junchi Yan

TL;DR

LinSATNet introduces a differentiable satisfiability layer, LinSAT, built on a generalized multi-set Sinkhorn algorithm to enforce positive linear constraints in neural networks. By extending Sinkhorn to multiple marginal sets, it provides convergence guarantees and exact gradient propagation, enabling end-to-end training for one-shot constrained decision problems. The authors demonstrate three case studies—neural routing for TSP with extra constraints, partial graph matching with outliers, and portfolio allocation with expert constraints—showing competitive performance against traditional solvers and delivering a practical, constraint-accurate one-shot solving framework. The approach offers a versatile, scalable tool for embedding complex linear constraints directly into neural architectures, with publicly available source code at the provided repository.

Abstract

Encoding constraints into neural networks is attractive. This paper studies how to introduce the popular positive linear satisfiability to neural networks. We propose the first differentiable satisfiability layer based on an extension of the classic Sinkhorn algorithm for jointly encoding multiple sets of marginal distributions. We further theoretically characterize the convergence property of the Sinkhorn algorithm for multiple marginals. In contrast to the sequential decision e.g.\ reinforcement learning-based solvers, we showcase our technique in solving constrained (specifically satisfiability) problems by one-shot neural networks, including i) a neural routing solver learned without supervision of optimal solutions; ii) a partial graph matching network handling graphs with unmatchable outliers on both sides; iii) a predictive network for financial portfolios with continuous constraints. To our knowledge, there exists no one-shot neural solver for these scenarios when they are formulated as satisfiability problems. Source code is available at https://github.com/Thinklab-SJTU/LinSATNet

LinSATNet: The Positive Linear Satisfiability Neural Networks

TL;DR

LinSATNet introduces a differentiable satisfiability layer, LinSAT, built on a generalized multi-set Sinkhorn algorithm to enforce positive linear constraints in neural networks. By extending Sinkhorn to multiple marginal sets, it provides convergence guarantees and exact gradient propagation, enabling end-to-end training for one-shot constrained decision problems. The authors demonstrate three case studies—neural routing for TSP with extra constraints, partial graph matching with outliers, and portfolio allocation with expert constraints—showing competitive performance against traditional solvers and delivering a practical, constraint-accurate one-shot solving framework. The approach offers a versatile, scalable tool for embedding complex linear constraints directly into neural architectures, with publicly available source code at the provided repository.

Abstract

Encoding constraints into neural networks is attractive. This paper studies how to introduce the popular positive linear satisfiability to neural networks. We propose the first differentiable satisfiability layer based on an extension of the classic Sinkhorn algorithm for jointly encoding multiple sets of marginal distributions. We further theoretically characterize the convergence property of the Sinkhorn algorithm for multiple marginals. In contrast to the sequential decision e.g.\ reinforcement learning-based solvers, we showcase our technique in solving constrained (specifically satisfiability) problems by one-shot neural networks, including i) a neural routing solver learned without supervision of optimal solutions; ii) a partial graph matching network handling graphs with unmatchable outliers on both sides; iii) a predictive network for financial portfolios with continuous constraints. To our knowledge, there exists no one-shot neural solver for these scenarios when they are formulated as satisfiability problems. Source code is available at https://github.com/Thinklab-SJTU/LinSATNet
Paper Structure (42 sections, 5 theorems, 40 equations, 3 figures, 11 tables, 3 algorithms)

This paper contains 42 sections, 5 theorems, 40 equations, 3 figures, 11 tables, 3 algorithms.

Key Result

Theorem 3.1

For any $\epsilon>0$, the Sinkhorn algorithm for single-set marginals returns a matrix $\mathbf{\Gamma}^{(t)}$ or $\mathbf{\Gamma}^{\prime(t)}$ with $L_1$ error $\leq \epsilon$ in time $t=\mathcal{O}\left(\frac{h^2\log(\Delta/\alpha)}{\epsilon^2}\right)$, where $\alpha={\min_{i,j:s_{i,j}>0} s_{i,j}}

Figures (3)

  • Figure 1: The use case of LinSATNet. If the last layer of the neural network is a linear layer whose output is unconstrained, LinSAT enforces the satisfiability of positive linear constraints to the final output.
  • Figure 2: Route plan cases of TSP-SE. Each row represents one instance and each column represents one method. Black points stand for starting cities and orange points stand for ending cities. The optimal tours are solved by Gruobi (MTZ).
  • Figure 3: Route plan cases of TSP-PRI. Each row represents one instance and each column represents one method. Black points stand for starting cities, orange points stand for ending cities and red points stand for priority cities that need to be visited within the first 5 steps. The optimal tours are solved by Gurobi (Sec.\ref{['sec:TSP_fml']}) without a time limit, and the running time to get the corresponding optimal solutions are listed in the titles.

Theorems & Definitions (9)

  • Theorem 3.1: See chakrabarty2021better for the proof
  • Theorem 3.2: Converge Rate for KL divergence
  • proof
  • Lemma 3.3
  • Lemma 3.4
  • Corollary 3.5: Converge Rate for $L_1$-error
  • proof
  • proof
  • proof