{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/glinsat-the-general-linear-satisfiability","title":"GLinSAT: The General Linear Satisfiability Neural Network Layer By Accelerated Gradient Descent","arxiv_id":"2409.17500","date":"2024-09-26","proceeding":null,"authors":["Hongtai Zeng","Chao Yang","Yanzhen Zhou","Cheng Yang","Qinglai Guo"],"abstract":"Ensuring that the outputs of neural networks satisfy specific constraints is crucial for applying neural networks to real-life decision-making problems. In this paper, we consider making a batch of neural network outputs satisfy bounded and general linear constraints. We first reformulate the neural network output projection problem as an entropy-regularized linear programming problem. We show that such a problem can be equivalently transformed into an unconstrained convex optimization problem with Lipschitz continuous gradient according to the duality theorem. Then, based on an accelerated gradient descent algorithm with numerical performance enhancement, we present our architecture, GLinSAT, to solve the problem. To the best of our knowledge, this is the first general linear satisfiability layer in which all the operations are differentiable and matrix-factorization-free. Despite the fact that we can explicitly perform backpropagation based on automatic differentiation mechanism, we also provide an alternative approach in GLinSAT to calculate the derivatives based on implicit differentiation of the optimality condition. Experimental results on constrained traveling salesman problems, partial graph matching with outliers, predictive portfolio allocation and power system unit commitment demonstrate the advantages of GLinSAT over existing satisfiability layers. Our implementation is available at \\url{https://github.com/HunterTracer/GLinSAT}.","url_abs":"https://arxiv.org/abs/2409.17500v2","url_pdf":"https://arxiv.org/pdf/2409.17500v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"glinsat-the-general-linear-satisfiability","repo_url":"https://github.com/huntertracer/glinsat","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"graph-matching","task_name":"Graph Matching"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2409.17500","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.17500"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/huntertracer/glinsat","reach":{"status":"ok"}}],"summary":{"ran":3},"by_repo_kind":{"official":{"samples":3,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":3,"samples":[{"code_sha256_prefix":"99a67d62a0d131c9","entry":"cg_batch","repo":"huntertracer/glinsat","repo_kind":"official","path":"GraphMatch_exp/cg_batch.py","file_url":"https://github.com/huntertracer/glinsat/blob/HEAD/GraphMatch_exp/cg_batch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"99a67d62a0d131c9"}},{"code_sha256_prefix":"5bb4178e9a29cf93","entry":"cg_batch","repo":"huntertracer/glinsat","repo_kind":"official","path":"GraphMatch_exp/cg_batch_new.py","file_url":"https://github.com/huntertracer/glinsat/blob/HEAD/GraphMatch_exp/cg_batch_new.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5bb4178e9a29cf93"}},{"code_sha256_prefix":"e95804c2449810a7","entry":"cg_block","repo":"huntertracer/glinsat","repo_kind":"official","path":"GraphMatch_exp/cg_block.py","file_url":"https://github.com/huntertracer/glinsat/blob/HEAD/GraphMatch_exp/cg_block.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e95804c2449810a7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}