{"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/logical-neural-networks","title":"Logical Neural Networks","arxiv_id":"2006.13155","date":"2020-06-23","proceeding":null,"authors":["Ryan Riegel","Alexander Gray","Francois Luus","Naweed Khan","Ndivhuwo Makondo","Ismail Yunus Akhalwaya","Haifeng Qian","Ronald Fagin","Francisco Barahona","Udit Sharma","Shajith Ikbal","Hima Karanam","Sumit Neelam","Ankita Likhyani","Santosh Srivastava"],"abstract":"We propose a novel framework seamlessly providing key properties of both neural nets (learning) and symbolic logic (knowledge and reasoning). Every neuron has a meaning as a component of a formula in a weighted real-valued logic, yielding a highly intepretable disentangled representation. Inference is omnidirectional rather than focused on predefined target variables, and corresponds to logical reasoning, including classical first-order logic theorem proving as a special case. The model is end-to-end differentiable, and learning minimizes a novel loss function capturing logical contradiction, yielding resilience to inconsistent knowledge. It also enables the open-world assumption by maintaining bounds on truth values which can have probabilistic semantics, yielding resilience to incomplete knowledge.","url_abs":"https://arxiv.org/abs/2006.13155v1","url_pdf":"https://arxiv.org/pdf/2006.13155v1.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":"logical-neural-networks","repo_url":"https://github.com/IBM/LNN","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":null},{"paper_slug":"logical-neural-networks","repo_url":"https://github.com/ibm/torchlogic","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"automated-theorem-proving","task_name":"Automated Theorem Proving"},{"task_slug":"logical-reasoning","task_name":"Logical Reasoning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2006.13155","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2006.13155"}},"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/IBM/LNN","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ibm/torchlogic","reach":null}],"summary":{"ran_violates":2,"unverified":13},"by_repo_kind":{"official":{"samples":14,"ran":2,"repositories":1},"listed":{"samples":1,"ran":0,"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":"9469f676588b9dae","entry":"tensorise","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9469f676588b9dae"}},{"code_sha256_prefix":"8620647772af6e0d","entry":"val_clamp","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8620647772af6e0d"}},{"code_sha256_prefix":"a414e494c28e8b53","entry":"Bound","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"a414e494c28e8b53"}},{"code_sha256_prefix":"9cd1417770609993","entry":"Direction","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"9cd1417770609993"}},{"code_sha256_prefix":"ccc83f56566983c4","entry":"Fact","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"ccc83f56566983c4"}},{"code_sha256_prefix":"550a53b2c8bb092f","entry":"LukasiewiczCore","repo":"ibm/torchlogic","repo_kind":"listed","path":"torchlogic/nn/base/_core.py","file_url":"https://github.com/ibm/torchlogic/blob/HEAD/torchlogic/nn/base/_core.py","link_basis":"first_harvest_node","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":"550a53b2c8bb092f"}},{"code_sha256_prefix":"e2478de9c6a50e03","entry":"World","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"e2478de9c6a50e03"}},{"code_sha256_prefix":"53fb477a4312f8da","entry":"_AutoName","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"53fb477a4312f8da"}},{"code_sha256_prefix":"556cd4e7b9148784","entry":"_NeuronActivation","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"556cd4e7b9148784"}},{"code_sha256_prefix":"32d9abf50ba946c7","entry":"_NeuronParameters","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"32d9abf50ba946c7"}},{"code_sha256_prefix":"73b4875866816be7","entry":"_NodeActivation","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"73b4875866816be7"}},{"code_sha256_prefix":"d5b3cf2c88214d88","entry":"_NodeParameters","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"d5b3cf2c88214d88"}},{"code_sha256_prefix":"5481e5e04cffed09","entry":"bool_and","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"5481e5e04cffed09"}},{"code_sha256_prefix":"266c294a99762150","entry":"bool_or","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"266c294a99762150"}},{"code_sha256_prefix":"8136d8c3c05c97ff","entry":"bool_tensor","repo":"IBM/LNN","repo_kind":"official","path":"lnn/neural/activations/neuron/neuron.py","file_url":"https://github.com/IBM/LNN/blob/HEAD/lnn/neural/activations/neuron/neuron.py","link_basis":"first_harvest_node","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":"8136d8c3c05c97ff"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}