DeepProbLog

DeepProbLog is an extension of ProbLog that integrates Probabilistic Logic Programming with deep learning by introducing the neural predicate. The neural predicate represents probabilistic facts whose probabilites are parameterized by neural networks.


The Neural Predicate

DeepProbLog is an extension of ProbLog that integrates neural networks through the concept of the neural predicate. It allows us to combine high-level logical reasoning with the sub-symbolic power of neural networks.

_images/image1.png

Let’s say we want to solve the following problem. We get two handwritten digits (MNIST) and have to determine its sum, e.g.

_images/image2.png

This task can be easily handled in DeepProbLog:

nn(mnist_classifier,[X],Y,[0..9]) :: digit(X,Y).
addition(X,Y,Z) :- digit(X,N1), digit(Y,N2), Z is N1+N2.

Where the first line is a neural predicate that includes a neural network as a predicate inside of the logical program. This neural network can be trained. The addition predicate defines the sum of the individual digits. We can now train this DeepProbLog model and all of the neural networks inside of it using examples of additions. It’s important to note that the neural networks will, thanks to the logic, learn to recognize individual digits.

The main strengths of DeepProbLog are:

  • It combines probabilistic reasoning, logical reasoning and the power of neural networks.

  • It can train neural networks and learn probabilistic parameters from examples.

  • We retain both logic and neural networks as edge cases.

The full acticle by Robin Manhaeve about the neural predicate is available here.