{"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/logic-gate-neural-networks-are-good-for","title":"Logic Gate Neural Networks are Good for Verification","arxiv_id":"2505.19932","date":"2025-05-26","proceeding":null,"authors":["Fabian Kresse","Emily Yu","Christoph H. Lampert","Thomas A. Henzinger"],"abstract":"Learning-based systems are increasingly deployed across various domains, yet the complexity of traditional neural networks poses significant challenges for formal verification. Unlike conventional neural networks, learned Logic Gate Networks (LGNs) replace multiplications with Boolean logic gates, yielding a sparse, netlist-like architecture that is inherently more amenable to symbolic verification, while still delivering promising performance. In this paper, we introduce a SAT encoding for verifying global robustness and fairness in LGNs. We evaluate our method on five benchmark datasets, including a newly constructed 5-class variant, and find that LGNs are both verification-friendly and maintain strong predictive performance.","url_abs":"https://arxiv.org/abs/2505.19932v1","url_pdf":"https://arxiv.org/pdf/2505.19932v1.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":"logic-gate-neural-networks-are-good-for","repo_url":"https://github.com/HyberionBrew/difflogic_verify","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"fairness","task_name":"Fairness"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2505.19932","atlas_url":"https://app.syntology.ai/?focus=2505.19932","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.19932"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/HyberionBrew/difflogic_verify","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":8,"unverified":10},"by_repo_kind":{"official":{"samples":18,"ran":8,"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":0,"samples":[{"code_sha256_prefix":"6c29c7bb5251a6a9","entry":"compute_probabilities","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/utils/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c29c7bb5251a6a9"}},{"code_sha256_prefix":"c895d0d9856ef9e9","entry":"compute_verified_accuracy","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"utils/sat_encoding.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/utils/sat_encoding.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c895d0d9856ef9e9"}},{"code_sha256_prefix":"43fbaec6134684f1","entry":"count_preds_vs_truth","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"train_model.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/train_model.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"43fbaec6134684f1"}},{"code_sha256_prefix":"28be885b82ae0053","entry":"encode_numeric","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"datasets_neus/datasets_neus/encoding.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/datasets_neus/datasets_neus/encoding.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"28be885b82ae0053"}},{"code_sha256_prefix":"db7f2c73ccce434f","entry":"eval_model","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"train_model.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/train_model.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"db7f2c73ccce434f"}},{"code_sha256_prefix":"2ad2ca097626d616","entry":"produce_categorical_map","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"datasets_neus/datasets_neus/encoding.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/datasets_neus/datasets_neus/encoding.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2ad2ca097626d616"}},{"code_sha256_prefix":"61c71f1b5ede94ad","entry":"produce_min_max_map","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"datasets_neus/datasets_neus/encoding.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/datasets_neus/datasets_neus/encoding.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"61c71f1b5ede94ad"}},{"code_sha256_prefix":"c9d259cd59abf3c7","entry":"train","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"train_model.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/train_model.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c9d259cd59abf3c7"}},{"code_sha256_prefix":"f850b645eec1edf1","entry":"bin_op_vectorized_base","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"utils/difflogic.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/utils/difflogic.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f850b645eec1edf1"}},{"code_sha256_prefix":"5045131c75cabbc9","entry":"bin_op_vectorized_invert","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"utils/difflogic.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/utils/difflogic.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5045131c75cabbc9"}},{"code_sha256_prefix":"07514cc9628cb53f","entry":"bin_op_vectorized_not","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"utils/difflogic.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/utils/difflogic.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"07514cc9628cb53f"}},{"code_sha256_prefix":"af0f3880640daca0","entry":"build_model","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"utils/exp_setup.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/utils/exp_setup.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"af0f3880640daca0"}},{"code_sha256_prefix":"9472ecfd2d5ea169","entry":"get_int","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"datasets_neus/datasets_neus/mnist_dataset.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/datasets_neus/datasets_neus/mnist_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9472ecfd2d5ea169"}},{"code_sha256_prefix":"e9c6c578ae892897","entry":"get_model_infos","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/utils/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e9c6c578ae892897"}},{"code_sha256_prefix":"4da25fa9b8bf598b","entry":"parse_counterexample","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/utils/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4da25fa9b8bf598b"}},{"code_sha256_prefix":"8c947dbac76cd1ab","entry":"read_label_file","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"datasets_neus/datasets_neus/mnist_dataset.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/datasets_neus/datasets_neus/mnist_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8c947dbac76cd1ab"}},{"code_sha256_prefix":"bffc681cd2395ae9","entry":"read_sn3_pascalvincent_tensor","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"datasets_neus/datasets_neus/mnist_dataset.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/datasets_neus/datasets_neus/mnist_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bffc681cd2395ae9"}},{"code_sha256_prefix":"cf8d9421df197eea","entry":"split_and_encode_dataset","repo":"HyberionBrew/difflogic_verify","repo_kind":"official","path":"datasets_neus/datasets_neus/dataset.py","file_url":"https://github.com/HyberionBrew/difflogic_verify/blob/HEAD/datasets_neus/datasets_neus/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf8d9421df197eea"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}