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
