[Paper Review] Learning Algorithms via Neural Logic Networks
This paper introduces Neural Logic Networks (NLNs), a differentiable neural network framework that explicitly learns Boolean logic functions using differentiable operators for conjunction, disjunction, and XOR. Unlike traditional MLPs that learn implicitly, NLNs provide interpretable, symbolic representations and outperform existing neural ILP solvers in learning complex algorithmic tasks such as decimal multiplication, sorting, and recursive predicates with minimal training data.
We propose a novel learning paradigm for Deep Neural Networks (DNN) by using Boolean logic algebra. We first present the basic differentiable operators of a Boolean system such as conjunction, disjunction and exclusive-OR and show how these elementary operators can be combined in a simple and meaningful way to form Neural Logic Networks (NLNs). We examine the effectiveness of the proposed NLN framework in learning Boolean functions and discrete-algorithmic tasks. We demonstrate that, in contrast to the implicit learning in MLP approach, the proposed neural logic networks can learn the logical functions explicitly that can be verified and interpreted by human. In particular, we propose a new framework for learning the inductive logic programming (ILP) problems by exploiting the explicit representational power of NLN. We show the proposed neural ILP solver is capable of feats such as predicate invention and recursion and can outperform the current state of the art neural ILP solvers using a variety of benchmark tasks such as decimal addition and multiplication, and sorting on ordered list.
Motivation & Objective
- To address the limitations of traditional MLPs in learning discrete-algorithmic tasks, which rely on implicit, non-interpretable weight representations.
- To develop a differentiable neural network framework that explicitly represents logical functions, enabling human verification and interpretation.
- To enable effective learning of inductive logic programming (ILP) problems, including predicate invention and recursion, using gradient-based optimization.
- To improve generalization in few-shot learning scenarios, particularly for algorithmic tasks like LDPC decoding and arithmetic operations.
Proposed method
- Proposes differentiable Boolean operators—conjunction (multiplication), disjunction (1 - (1-x)(1-y)), and XOR—using real-valued inputs in [0,1] to enable gradient-based learning.
- Designs multi-layer Neural Logic Networks (NLNs) by cascading these operators, forming a symbolic, interpretable architecture distinct from standard MLPs.
- Employs a novel differentiable formulation for XOR using a set of linear functions with alternating coefficient signs, ensuring exact computation of the XOR function via zero-crossing detection.
- Applies the NLN framework to transform ILP problems into differentiable optimization tasks, enabling end-to-end training with gradient descent.
- Uses function-based list semantics (e.g., head and tail operations) to represent ordered data structures, enabling recursive logic learning for sorting and other list-based tasks.
- Implements a recursive ILP solver that learns complex, multi-atom clauses involving variables, functions, and recursion without predefined templates.
Experimental results
Research questions
- RQ1Can a differentiable neural network architecture learn Boolean functions with explicit, interpretable symbolic representations rather than implicit weight patterns?
- RQ2How does the generalization performance of NLNs compare to MLPs in few-shot, algorithmic learning tasks such as LDPC decoding?
- RQ3Can NLNs learn complex ILP tasks like predicate invention and recursion using only positive and negative examples, without prior structural templates?
- RQ4To what extent can NLNs outperform existing neural ILP solvers in learning tasks such as decimal multiplication and sorting on ordered lists?
Key findings
- NLNs achieve exact computation of Boolean functions, including XOR, through a differentiable formulation that guarantees zero-crossing detection for correct logic output.
- The proposed NLN framework generalizes significantly better than MLPs in learning the message-passing decoding algorithm for LDPC codes over erasure channels with limited training examples.
- NLNs successfully learn recursive ILP solutions, such as sorting an ordered list using 6-atom clauses with four variables, a capability beyond current neural ILP solvers.
- The model learns complex tasks like decimal multiplication and addition with high accuracy, even when generalizing to larger input sizes, outperforming prior neural ILP approaches.
- The symbolic representations learned by NLNs are human-verifiable and can be directly translated into executable logic programs, unlike the black-box nature of standard DNNs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.