NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DeepProbLog: Neural Probabilistic Logic Programming

Robin Manhaeve, Sebastijan Dumancic, Angelika Kimmig, Thomas Demeester, Luc De Raedt

Introduction

The field of Artificial Intelligence has long been bifurcated into two distinct paradigms: connectionist approaches, such as Deep Learning, and symbolic approaches, such as Probabilistic Logic Programming (PLP). While Deep Learning excels at processing raw, unstructured data (e.g., pixels, audio) through "subsymbolic" representation learning, it often struggles with high-level reasoning, data efficiency, and interpretability. Conversely, PLP frameworks like ProbLog are adept at structured reasoning and handling uncertainty but are generally incapable of directly interpreting raw sensory input.

DeepProbLog bridges this "Great Divide" by introducing a neuro-symbolic framework that integrates deep learning with probabilistic logic. By extending the ProbLog language with "neural predicates," the framework enables end-to-end training of systems that can simultaneously perceive raw data and perform complex symbolic reasoning.

Methodology: The Neural Predicate

The core innovation of DeepProbLog is the Neural Predicate. In traditional probabilistic logic programming, a fact is assigned a fixed probability (e.g., 0.5::heads.). DeepProbLog replaces these static probabilities with the outputs of neural networks.

For instance, in a digit recognition task, a predicate such as digit(Image, N) would have its probability distribution over $N \in \{0, \dots, 9\}$ determined by a Convolutional Neural Network (CNN) processing the Image. This allows the logic program to treat neural network outputs as probabilistic facts within a unified logical framework.

Algebraic Inference and Gradient Descent

To facilitate learning, DeepProbLog leverages aProbLog, a generalization of ProbLog that allows logical inference to be performed over various "semirings." To make the system differentiable, the authors utilize a gradient semiring. This approach allows the system to compute the gradient of the loss function with respect to both the parameters of the logic program and the weights of the neural networks. Consequently, standard backpropagation can flow from the final logical output—such as the result of a mathematical operation—back to the initial neural input, enabling the entire system to be trained via gradient descent.

Experimental Evaluation

The authors evaluated DeepProbLog across several tasks designed to test its ability to combine perception with reasoning.

MNIST Addition

In the MNIST Addition task, the system is presented with pairs of handwritten digit images and their sum. Crucially, the model is never explicitly told which image corresponds to which digit; it only receives the final sum as a label. DeepProbLog successfully learned to recognize the digits by leveraging the logical rules of addition. Results showed that DeepProbLog trained faster and achieved higher accuracy than a pure CNN baseline, demonstrating that encoding domain knowledge (the rules of arithmetic) significantly improves learning efficiency.

Program Induction and Sorting

DeepProbLog was also applied to program induction tasks, including sorting lists of numbers. Unlike previous differentiable interpreters (such as $\partial 4$) that struggle with computational complexity as list lengths increase, DeepProbLog maintained 100% accuracy on longer lists. This scalability is attributed to the framework's ability to handle symbolic logic without "softening" it into high-dimensional vectors, which often leads to vanishing gradients or excessive memory usage in purely neural architectures.

Simultaneous Learning: The Lottery Game

To test the framework's versatility, a synthetic "Lottery Game" was used. In this experiment, the system had to simultaneously learn the neural network parameters for perception and the probabilistic parameters governing the game's rules. DeepProbLog reached 100% accuracy, proving it can learn both how to see and how the world works at the same time.

Key Insights

  1. Logic as a Structural Constraint: By defining the "rules of the game" in logic, the neural components are relieved of the burden of learning fundamental concepts (like addition) from scratch. This makes the system more data-efficient.
  2. Preservation of Symbolic Semantics: Unlike neuro-symbolic methods that map symbols to embeddings, DeepProbLog retains clear symbolic logic. The resulting programs are human-readable and interpretable, with neural networks acting as "perceptual anchors" to the physical world.

Limitations and Future Directions

Despite its strengths, DeepProbLog faces challenges common to symbolic AI. Exact probabilistic inference is NP-hard, which introduces computational overhead when scaling to massive logic programs. Furthermore, while the framework excels at "learning from entailment" (optimizing weights), "structure learning"—the ability to automatically generate the logic program itself—remains a complex area for future research. Finally, while the system handles probabilistic facts effectively, further work is needed to integrate logic with continuous variables beyond the outputs of a softmax layer.

Summary updated

BibTeX
@inproceedings{manhaeve2019deepproblog,
  author = {Robin Manhaeve and Sebastijan Dumancic and Angelika Kimmig and Thomas Demeester and Luc De Raedt},
  title = {{DeepProbLog: Neural Probabilistic Logic Programming}},
  booktitle = {BNAIC/BENELEARN},
  year = {2019},
  url = {https://openreview.net/forum?id=4YytqaGzY1},
}
Figure