EXPLAIN, AGREE, LEARN: Scaling Learning for Neural Probabilistic Logic

Victor Verreet, Lennert De Smet, Luc De Raedt, Emanuele Sansone

Introduction

Neuro-symbolic (NeSy) AI represents a powerful paradigm that seeks to merge the perceptual capabilities of deep learning with the structured reasoning of formal logic. While neural networks excel at processing high-dimensional data like images and text, symbolic logic provides a framework for rigorous deduction and generalization. However, the integration of these two domains faces a significant computational hurdle: the "inference bottleneck." In probabilistic logic, calculating the exact likelihood of a logical outcome—a necessary step for training the neural components—is #P-complete. This complexity makes existing NeSy frameworks difficult to scale to real-world problems.

This paper introduces EXAL (EXPLAIN, AGREE, LEARN), a framework designed to scale neuro-symbolic learning by replacing exact inference with a theoretically grounded sampling approach. By leveraging stochastic search and importance sampling, EXAL achieves significant speedups and maintains high accuracy on complex reasoning tasks.

The EXAL Framework

The core of EXAL is an optimization strategy based on a Kullback-Leibler (KL) divergence surrogate objective. The framework operates through a three-stage process:

  1. EXPLAIN: Rather than enumerating all possible satisfying assignments for a logical formula, EXAL employs a stochastic version of the Davis-Putnam-Logemann-Loveland (DPLL) algorithm. This allows the system to sample a representative subset of "explanations"—variable assignments that satisfy the logical constraints.
  2. AGREE: Each sampled explanation is assigned an importance weight. This weight is determined by the neural network's current prediction of how likely that specific explanation is. This step creates an unbiased approximation of the data likelihood, bridging the gap between symbolic requirements and neural probabilities.
  3. LEARN: The neural network is then updated using standard gradient descent. The process effectively transforms the complex NeSy problem into a supervised learning task where the reweighted explanations serve as the target labels.

A significant advantage of this approach is that it sidesteps the need for the logic component to be differentiable. By using sampling and reweighting, EXAL can integrate with a wide variety of symbolic solvers without the constraints imposed by frameworks like DeepProbLog.

The Role of Sample Diversity

A key theoretical contribution of this work is the formalization of Sample Diversity. The authors demonstrate that the quality of the learning signal depends heavily on the variety of the sampled explanations.

In Proposition 1, the authors provide a formal proof showing that the error bound of their surrogate objective shrinks more rapidly as the set of sampled explanations becomes more diverse. To achieve this diversity in practice, EXAL incorporates a GFlowNet-inspired sampling strategy and a count-based penalty. This encourages the sampler to explore different logical paths rather than collapsing onto a few high-probability solutions, ensuring a tighter bound on the negative log-likelihood (NLL).

Experimental Evaluation

The researchers evaluated EXAL against state-of-the-art baselines on several challenging benchmarks, focusing on both accuracy and computational efficiency.

MNIST Addition

In this task, the model must learn to sum sequences of handwritten digits. While simple for small sequences, the complexity grows exponentially with the sequence length. EXAL was tested on sequences of up to $N=15$ digits. It achieved 73.27% accuracy, matching the performance of the leading competitor, A-NeSI, while being 10 times faster.

Warcraft Pathfinding

The Warcraft benchmark requires the model to predict the shortest path across a grid based on raw image data, where the underlying traversal costs are unknown. On a $30 \times 30$ grid—a scale that defeats most exact inference methods—EXAL demonstrated remarkable efficiency. It completed training in 84 minutes, compared to 2,640 minutes (44 hours) for A-NeSI, representing a 31x speedup. Furthermore, EXAL achieved 80.85% accuracy, vastly outperforming A-NeSI’s 17.13% in this high-complexity setting.

Conclusion and Future Directions

EXAL represents a significant step forward in making neuro-symbolic AI practical for large-scale applications. By replacing exact inference with diverse sampling, it provides a scalable, unbiased, and theoretically sound method for training NeSy systems.

Despite these gains, challenges remain. Sampling remains NP-hard in the worst case, particularly for "tight" logical formulas with very few satisfying assignments. Future work may explore extending EXAL to continuous variables via Satisfiability Modulo Theories (SMT) or applying the framework to "Structure Learning," where the logical rules themselves are learned from data rather than being pre-defined.

Summary updated

BibTeX
@inproceedings{verreet2024explain,
  author = {Victor Verreet and Lennert De Smet and Luc De Raedt and Emanuele Sansone},
  title = {{EXPLAIN, AGREE, LEARN: Scaling Learning for Neural Probabilistic Logic}},
  booktitle = {ECAI},
  year = {2024},
  doi = {10.3233/faia240634},
}
Figure