αILP: thinking visual scenes as differentiable logic programs

Hikaru Shindo, Viktor Pfanschilling, Devendra Singh Dhami, Kristian KerstingMachine Learning 2023 · DOI

Introduction

Deep learning models excel at pattern recognition but often falter when faced with tasks requiring explicit logical reasoning. While a CNN can identify a cat, it struggles to reason about abstract relationships, such as whether two objects share the same shape but different colors. This lack of symbolic reasoning makes standard models data-hungry, prone to overfitting on spurious correlations (confounders), and difficult to interpret.

αILP (Alpha Inductive Logic Programming) addresses these challenges by integrating object-centric perception with a differentiable reasoning engine. It enables machines to represent visual scenes as differentiable logic programs, allowing for the end-to-end learning of human-readable rules directly from raw pixels using gradient descent.

The αILP Framework

The architecture of αILP is designed to bridge the gap between neural perception and symbolic logic. It operates through a two-phase process: learning and reasoning.

Overview of the αILP architecture, illustrating the Learning phase (top) and the Reasoning phase (bottom).

The framework consists of three primary components:

  1. Visual Perception Module: This module factorizes an input image into an object-centric representation. Using models like YOLO or Slot Attention, it identifies individual objects and extracts their continuous attribute embeddings (e.g., color, shape, position).
  2. Facts Converter: This component serves as the interface between neural outputs and symbolic logic. It transforms continuous embeddings into probabilistic facts, assigning a confidence score to predicates like color(obj1, red).
  3. Differentiable Reasoning Module: This engine performs forward-chaining inference. By implementing logical operations as tensor transformations, the system remains fully differentiable, allowing rule weights to be optimized via backpropagation.

Bridging Neural and Symbolic Representations

A critical challenge in neuro-symbolic systems is converting high-dimensional neural features into a format suitable for logic. αILP achieves this through its "Facts Converter."

Detailed view of the Facts Converter, showing how object-centric embeddings are mapped to probabilistic facts using attribute one-hot encodings.

As shown in the figure above, the system takes object-centric representations $Z$ and maps them to a vector of probabilistic facts $V^{(0)}$. This process involves comparing object features against learned or predefined attribute encodings. To maintain differentiability during reasoning, αILP employs a "softor" function (a normalized log-sum-exp), which allows the model to handle logical disjunctions without interrupting the gradient flow.

Experimental Evaluation

The authors evaluated αILP on two benchmarks designed to test logical generalization and robustness:

  • Kandinsky Patterns: These "IQ-test" style problems require identifying complex rules governing object arrangements. αILP achieved 100% accuracy across all tasks, whereas standard CNN baselines performed near random chance (~50%).
  • CLEVR-Hans: This dataset includes "confounders"—irrelevant attributes (like a specific color) that are correlated with labels in the training set but not in the test set. αILP reached 97.52% test accuracy, significantly outperforming the previous state-of-the-art NeSy-XIL model (91.31%) and standard CNNs (70.34%).

Key Insights and Future Directions

αILP represents a "Type 4" Neuro-Symbolic system, where pixels are mapped to symbols for reasoning, which in turn guides the learning process. Its symbolic nature provides several advantages:

  • Data Efficiency: The model maintains high performance even with only 10% of training data, as it learns generalizable rules rather than memorizing pixel patterns.
  • Interpretability: The output is a human-readable logic program, making the decision-making process transparent.
  • Robustness: By reasoning about objects and relations, the model naturally ignores background confounders.

Current limitations include high memory intensity for complex scenes and a dependency on "mode declarations" (user-provided hints about available predicates). Future work aims to automate predicate invention and more tightly integrate the training of the perception and reasoning modules.

Summary updated

BibTeX
@article{shindo2023ilp,
  author = {Hikaru Shindo and Viktor Pfanschilling and Devendra Singh Dhami and Kristian Kersting},
  title = {{αILP: thinking visual scenes as differentiable logic programs}},
  journal = {Machine Learning},
  year = {2023},
  doi = {10.1007/s10994-023-06320-1},
}
Figure