{"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/neural-logic-machines-1","title":"Neural Logic Machines","arxiv_id":"1904.11694","date":"2019-04-26","proceeding":"ICLR 2019 5","authors":["Honghua Dong","Jiayuan Mao","Tian Lin","Chong Wang","Lihong Li","Denny Zhou"],"abstract":"We propose the Neural Logic Machine (NLM), a neural-symbolic architecture for\nboth inductive learning and logic reasoning. NLMs exploit the power of both\nneural networks---as function approximators, and logic programming---as a\nsymbolic processor for objects with properties, relations, logic connectives,\nand quantifiers. After being trained on small-scale tasks (such as sorting\nshort arrays), NLMs can recover lifted rules, and generalize to large-scale\ntasks (such as sorting longer arrays). In our experiments, NLMs achieve perfect\ngeneralization in a number of tasks, from relational reasoning tasks on the\nfamily tree and general graphs, to decision making tasks including sorting\narrays, finding shortest paths, and playing the blocks world. Most of these\ntasks are hard to accomplish for neural networks or inductive logic programming\nalone.","url_abs":"http://arxiv.org/abs/1904.11694v1","url_pdf":"http://arxiv.org/pdf/1904.11694v1.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":"neural-logic-machines-1","repo_url":"https://github.com/ashutosh1919/neuro-symbolic-sudoku-solver","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"neural-logic-machines-1","repo_url":"https://github.com/google/neural-logic-machines","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"inductive-learning","task_name":"Inductive Learning"},{"task_slug":"inductive-logic-programming","task_name":"Inductive logic programming"},{"task_slug":"relational-reasoning","task_name":"Relational Reasoning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1904.11694","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1904.11694"}},"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/google/neural-logic-machines","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ashutosh1919/neuro-symbolic-sudoku-solver","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":7},"by_repo_kind":{"listed":{"samples":7,"ran":0,"repositories":2}},"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":"166a49c85e352315","entry":"create_grid_from_matrix","repo":"ashutosh1919/neuro-symbolic-sudoku-solver","repo_kind":"listed","path":"difflogic/envs/sudoku/grid.py","file_url":"https://github.com/ashutosh1919/neuro-symbolic-sudoku-solver/blob/HEAD/difflogic/envs/sudoku/grid.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"166a49c85e352315"}},{"code_sha256_prefix":"7e1d4ddb7478c58d","entry":"exclude_mask","repo":"google/neural-logic-machines","repo_kind":"listed","path":"difflogic/nn/neural_logic/modules/_utils.py","file_url":"https://github.com/google/neural-logic-machines/blob/HEAD/difflogic/nn/neural_logic/modules/_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7e1d4ddb7478c58d"}},{"code_sha256_prefix":"4c17a290a5446cae","entry":"get_action_mapping","repo":"ashutosh1919/neuro-symbolic-sudoku-solver","repo_kind":"listed","path":"difflogic/envs/utils.py","file_url":"https://github.com/ashutosh1919/neuro-symbolic-sudoku-solver/blob/HEAD/difflogic/envs/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4c17a290a5446cae"}},{"code_sha256_prefix":"ed243b06584f2617","entry":"get_action_mapping_blocksworld","repo":"ashutosh1919/neuro-symbolic-sudoku-solver","repo_kind":"listed","path":"difflogic/envs/utils.py","file_url":"https://github.com/ashutosh1919/neuro-symbolic-sudoku-solver/blob/HEAD/difflogic/envs/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ed243b06584f2617"}},{"code_sha256_prefix":"3f0977704c6deb0e","entry":"get_action_mapping_sudoku","repo":"ashutosh1919/neuro-symbolic-sudoku-solver","repo_kind":"listed","path":"difflogic/envs/utils.py","file_url":"https://github.com/ashutosh1919/neuro-symbolic-sudoku-solver/blob/HEAD/difflogic/envs/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3f0977704c6deb0e"}},{"code_sha256_prefix":"d3d39168de369254","entry":"mask_value","repo":"google/neural-logic-machines","repo_kind":"listed","path":"difflogic/nn/neural_logic/modules/_utils.py","file_url":"https://github.com/google/neural-logic-machines/blob/HEAD/difflogic/nn/neural_logic/modules/_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d3d39168de369254"}},{"code_sha256_prefix":"be01e30c100a91f2","entry":"monitor_saturation","repo":"ashutosh1919/neuro-symbolic-sudoku-solver","repo_kind":"listed","path":"difflogic/thutils.py","file_url":"https://github.com/ashutosh1919/neuro-symbolic-sudoku-solver/blob/HEAD/difflogic/thutils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"be01e30c100a91f2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}