Deep learning models are notoriously "black boxes"—they make highly accurate predictions but cannot explain why they made them. Conversely, Inductive Logic Programming (ILP) seeks to learn explicit, human-readable rules (e.g., "If X is inside a car and wearing clothing, X is a person"). However, traditional ILP struggles with the exponential complexity of rule search, the brittleness of discrete logic on noisy data, and poor scalability.
Presented at ICLR 2020, Neural Logic Inductive Learning (NLIL) is a differentiable ILP framework designed to bridge the gap between the raw predictive power of deep learning and the clear, symbolic interpretability of formal logic. By utilizing a hierarchical, Transformer-based search strategy, NLIL finds rules that are 10x longer and 3x faster than previous state-of-the-art methods, scaling for the first time to massive datasets with over a million entities.
The Challenge of Interpretable Logic
Most differentiable ILP methods are limited to tiny datasets (fewer than 1,000 entities) and very short rules (length 3 or less). The authors of NLIL aim to create a system that is both differentiable (trainable via backpropagation) and scalable enough to handle complex visual scenes and large-scale knowledge bases.
A Divide-and-Conquer Methodology
The core innovation of NLIL is a divide-and-conquer strategy that decomposes the exponential rule search space into a manageable three-layer hierarchy:
- The Operator View: Instead of blindly searching for variables, NLIL treats predicates as "operators." For example, an "Inside" operator takes a starting object and returns a set of objects containing it.
- Primitive Statements: These operators are combined into basic statements that map inputs to a confidence score between 0 and 1.
- Logic Combination Space: Using "soft" logic (where AND is multiplication and NOT is $1-p$), the system builds complex formulas from primitive statements.
To navigate this hierarchy, NLIL employs Hierarchical Transformer Networks. These networks use attention mechanisms to select the most relevant operators and logic combinations. Crucially, these attentions are data-independent; the model learns a global rule for a category (like "Car") that applies across the entire dataset, rather than a specific explanation for just one image.
Key Insights and Results
The authors evaluated NLIL across several benchmarks, including synthetic logic tasks (Even-and-Successor), standard Knowledge Base Completion (WN18, FB15K-237), and the massive Visual Genome (VG) dataset. VG was converted into a scene-graph knowledge base with 1.4 million entities and 2,100 predicates, representing a massive leap in scale for ILP research.
- Efficiency through Hierarchy: By splitting the search into operators, statements, and logic, the search space grows logarithmically rather than exponentially. This allows NLIL to find rules of length 32 in the same time it takes previous models to find rules of length 3.
- Speed and Depth: NLIL solved a 1,000-entity synthetic task in under 0.1 minutes, while the previous state-of-the-art ($\partial$ILP) ran out of time or memory.
- Scaling to Visual Genome: NLIL is the first ILP-based method to scale to the 1M+ entities of Visual Genome. It achieved a Recall@1 of 0.51, comparable to a heavily supervised MLP+RCNN model (0.53), despite using much simpler symbolic inputs.
- Few-Shot Generalization: Logic rules are incredibly data-efficient. On the Visual Genome dataset, NLIL maintained high accuracy even when trained on less than 1% of the data.
- Interpretability: The model successfully extracted clear, "lifted" commonsense rules, such as
Car(X) ← Wheel(Y1) ∧ Of(Y1, X) ∧ Window(Y2) ∧ Of(Y2, X)(A car is an object that has wheels and windows).
Limitations and Future Work
While groundbreaking, NLIL has limitations. The "Operator View" slightly constrains the types of rules that can be learned, struggling with rules where a variable cannot be reached via a chain of operator calls from the head variable. Furthermore, for extremely large knowledge bases like FB15K-237, the authors had to manually group predicates into domains to avoid search overhead, indicating that fully automated predicate selection at that scale remains a challenge. Finally, while NLIL finds long rules, some learned rules for complex objects were overly simplistic (e.g., defining a "Bush" simply as "Not a Tree"). Refining the logic to capture more nuance remains an open area for future research.
Summary updated