Abstract
Modern artificial intelligence often struggles with cumulative knowledge acquisition, typically treating each new task as an isolated learning event. This paper introduces Neuro-Logic Lifelong Learning (L2ILP), a framework designed to enable AI to learn a sequence of logical reasoning tasks by reusing and composing rules derived from previous problems. By integrating modular logic rules within a Neural Logic Machine (NLM) architecture, the authors demonstrate that AI can achieve significantly faster learning (forward transfer) and even improve performance on antecedent tasks while mastering new ones (backward transfer).
Introduction
Inductive Logic Programming (ILP) is a sub-field of AI focused on learning human-readable first-order logic rules from examples—for instance, learning the rule for "Grandparent" given "Parent" relationships. While neural-symbolic methods have improved the robustness of ILP against noise, they generally lack the ability to build upon prior knowledge. In contrast, human knowledge is inherently cumulative; understanding the concept of a "path" in a graph should naturally facilitate identifying specific network structures without relearning connectivity from scratch.
Standard neural networks frequently suffer from catastrophic forgetting, where learning new skills erases previously acquired ones. Furthermore, they lack formal mechanisms to "plug in" symbolic knowledge into new problem contexts. L2ILP addresses these challenges by treating logic rules as modular building blocks that can be shared and composed across tasks.
Methodology
The proposed Compositional Neuro-Logic Model is built upon the Neural Logic Machine (NLM) architecture. The framework consists of several key components:
- Shared Knowledge Base ($B_S$): Instead of a monolithic network, the system utilizes a series of NLM layers that function as a library of predicates. Each layer learns to compose simpler predicates into increasingly complex ones.
- Compositionality: When presented with a new task, the model leverages existing "knowledge base" layers containing previously learned logic rules. It then appends a small, task-specific NLM layer to find the solution for the current target predicate.
- Sequential Optimization: The learning process is framed as a lifelong challenge. The objective is to discover a shared set of rules that remain effective across a growing sequence of target predicates.
- Experience Replay: To mitigate catastrophic forgetting and prevent the shared knowledge base from drifting, the model incorporates a replay buffer. This buffer periodically re-trains the model on data from previous tasks, ensuring stability.
Experimental Evaluation
The framework was evaluated across four distinct domains to test its versatility:
- Arithmetic: Learning operations such as
Plus,Times, andDivisionbased on successor functions. - Tree Structures: Identifying relationships like
Root,Odd/Even Edges, andAncestor. - Graphs: Learning connectivity-based predicates including
AdjacentToRedorExactConnectivity. - BlocksWorld (Relational RL): A reinforcement learning environment using the PDDLGym benchmark, where an agent manipulates block stacks to reach target configurations.
Results and Discussion
The experiments yielded several key insights into the nature of modular logic and transfer learning:
- Forward Transfer: As the Knowledge Base expanded, the time required to solve subsequent tasks in a sequence dropped significantly. The model effectively builds a "vocabulary of reasoning" that accelerates future learning.
- Backward Transfer: Remarkably, training on later, more complex tasks sometimes improved performance on earlier, foundational tasks. In the Tree domain, learning Task 1 helped the model's loss on Task 0 drop to zero, suggesting that mastering complex concepts can refine the understanding of the base components they are built upon.
- Efficiency and Scalability: In Graph and Tree domains, lifelong learning curves were consistently steeper than those of individual training (learning from scratch). In BlocksWorld, individual training often failed on complex configurations (Tasks 3 and 4), whereas the lifelong learning agent—having mastered simpler tasks first—solved them efficiently.
Conclusion and Future Work
Neuro-Logic Lifelong Learning demonstrates that logic is inherently modular and that forcing neural networks to mirror this structure makes transfer learning a primary capability. While the model successfully mitigates forgetting and promotes transfer, some limitations remain. Future research may focus on improving the efficiency of rule discovery—specifically identifying which rules are most beneficial to retain—and developing dynamic knowledge bases that can automatically prune or add rules. Additionally, enhancing the human-readability of the internal weights within NLM layers would improve the explainability of the learned symbolic knowledge.
Summary updated