TL;DR
DeepProofLog (DPrL) solves the notorious scalability bottleneck in neurosymbolic AI by shifting from possible-world semantics to stochastic logic programs guided by neural networks. By formally mapping the logical proof process to a Markov Decision Process (MDP), DPrL leverages reinforcement learning and dynamic programming to efficiently navigate massive reasoning spaces while remaining fully interpretable.
What Problem Does This Paper Address?
Neurosymbolic (NeSy) AI aims to combine the data-driven perception of neural networks with the structured, verifiable reasoning of symbolic logic. However, existing NeSy frameworks face a massive scalability wall. Most state-of-the-art systems rely on "possible world semantics," which requires evaluating a query across an exponential number of scenarios. Mathematically, this translates to a weighted model counting problem, which is #P-hard and computationally intractable for large datasets or complex knowledge bases.
Furthermore, existing methods often focus purely on scaling the probabilistic inference phase, completely ignoring the heavy computational cost of actually deriving the logical proofs in the first place. The authors introduce DeepProofLog to tackle both of these challenges simultaneously.
Methods
Instead of calculating truth values across possible worlds, DeepProofLog adopts the semantics of Stochastic Logic Programs (SLPs). SLPs define a probability distribution directly over derivations (the step-by-step paths taken to prove a query).
The core innovation of DPrL is goal-level parameterization. At each step of a proof, a neural network evaluates the entire current goal to dynamically guide the prover toward the most plausible next clause or variable substitution.
To train and run this system efficiently, the authors establish a formal mapping between SLD-resolution (the standard algorithm for proving logic programs) and Markov Decision Processes (MDPs):
- States: The current symbolic sub-goals.
- Actions: Selecting a logic clause and applying a unifier/substitution.
- Transitions: Deterministic logic resolution steps that yield the next sub-goal.
- Rewards: +1 for successfully proving a positive query, -1 for a negative query, and 0 for intermediate steps.
By framing theorem proving as an MDP, DPrL can utilize two powerful solution paradigms:
- Dynamic Programming (DP): Used for exact inference when the symbolic goal space is structured and manageable.
- Policy Gradient (PG): Uses Deep Reinforcement Learning (specifically Proximal Policy Optimization, or PPO) to approximate the optimal proof path when the search space is combinatorially explosive.
Datasets
The authors evaluated DPrL on two distinct types of tasks:
- MNIST Addition: A standard NeSy benchmark where the model must learn to add two numbers represented as sequences of handwritten digit images. The only supervision is the final sum. The authors drastically scaled the sequence length ($N$) from 4 up to 500 digits to test extreme scalability limits.
- Knowledge Graph (KG) Completion: Evaluated on the Family dataset (modeling familial relations) and WN18RR (a challenging link-prediction subset of WordNet) to test performance on large-scale relational reasoning.
Key Insights and Ideas
- Proving as an Agent's Journey: Viewing a logical prover as an RL agent navigating an MDP changes how we think about neurosymbolic search. Instead of blindly unrolling a combinatorial explosion of proof paths, the neural network acts as a trained policy, providing goal-directed intuition.
- Derivations over Worlds: Shifting the mathematical foundation from possible-world semantics to SLP semantics bypasses the #P-hard model counting bottleneck entirely, unlocking linear scaling relative to derivation steps in structured problems.
- Context-Aware Decisions: Unlike previous deep SLP methods (like DeepStochLog) that condition neural predictions on partial goals or require fixed output domains, DPrL embeds the full current goal dynamically. This allows it to adapt seamlessly when valid substitutions depend heavily on the specific query context.
Key Results
- Unprecedented Scaling on MNIST: On the MNIST Addition task, competing exact NeSy systems (like KLay, DeepStochLog, and DeepSoftLog) timed out or ran out of memory beyond $N=15$ or $N=100$ digits. DPrL using Dynamic Programming successfully scaled to $N=500$ digits while maintaining high accuracy.
- Efficient Knowledge Graph Search: On the Family and WN18RR datasets, DPrL matched or outperformed state-of-the-art Knowledge Graph Embedding (KGE) baselines and other NeSy methods. Crucially, on the Family test set, traditional smart grounding methods required over 181,000 groundings at depth 3, whereas DPrL's targeted policy needed just 12,334 ground evaluations.
- Explicit Interpretability: Unlike latent embedding models, DPrL generates actual multi-step proof trees, making its final predictions fully verifiable and explainable to humans.
Limitations and Future Work
- Leftmost Atom Restriction: DPrL currently restricts clause selection to the leftmost atom in the goal (inherited from standard SLD resolution). The authors note that a more flexible selection strategy could allow the agent to prune failing derivation paths even earlier.
- Suboptimal PG Convergence: While the Policy Gradient (PG) variant scales incredibly well to massive spaces, it can occasionally converge to suboptimal policies due to the sheer size of the combinatorial search space in unsupervised perception tasks.
- Future Horizons: The authors plan to explore more advanced RL architectures, extend the framework to possible-world-based NeSy methods like Markov Logic Networks, and investigate automatic logic program reformulations to further optimize the search space.
Summary updated