Visual Perceptual to Conceptual First-Order Rule Learning Networks
Authors: Kun Gao, Davide Soldà, Thomas Eiter, Katsumi Inoue
Organizations: Zhongguancun Academy, Beijing, China · Vienna University of Technology (TU Wien), Vienna, Austria · National Institute of Informatics, Tokyo, Japan
Learning rules plays a crucial role in deep learning, particularly in explainable artificial intelligence and enhancing the reasoning capabilities of large language models. While existing rule learning methods are primarily designed for symbolic data, learning rules from image data without supporting image labels and automatically inventing predicates remains a challenge. In this paper, we tackle these inductive rule learning problems from images with a framework called γILP, which provides a fully differentiable pipeline from image constant substitution to rule structure induction. Extensive experiments demonstrate that γILP achieves strong performance not only on classical symbolic relational datasets but also on relational image data and pure image datasets, such as Kandinsky patterns.
Figures & tables
Figure 1: The pipeline of the learning framework. E and E′ indicate the encoder function for image and text, respectively.
Model
Predecessor
Odd
Even
Lessthan
Fizz
Buzz
Gemini 2.5 Pro
1.00
1.00
0.00
0.20
0.00
0.00
GPT-o3
1.00
0.00
1.00
1.00
0.00
1.00
GPT-5
1.00
1.00
1.00
1.00
1.00
1.00
γ ILP-ViT
1.00
1.00
1.00
1.00
-
-
γ ILP-VAE
1.00
1.00
1.00
1.00
-
-
Table 1: Recall of the learned logic program on relational image datasets. Best results are shown in bold. A ‘–’ indicates that the rules were learned correctly but incompletely.
Figure 2: Kandinsky patterns for tasks (a) two-pair (TP), (b) one-red (OR), and (c) one-triangle (OT). Constants represented by variables in the learned rules for TP are shown in (d).
Task
CNN
ViT
YL
GM
G-o4
G-4.1
G-o3
G-5
γ ILP-VAE
γ ILP-ViT
Types
VM
VM
VM
LLM
LLM
LLM
LLM
LLM
RM
RM
TP
0.50
0.63
0.40
0.46
0.56
0.47
0.50
0.67
0.64
0.75
OR
0.50
0.80
0.80
1.00
0.31
0.52
0.63
0.38
0.77
1.00
OT
0.50
0.90
0.80
1.00
0.53
0.40
0.37
0.78
0.77
1.00
Table 2: Classification accuracy on Kandinsky tasks: Two-pair (TP), one-red (OR), and one-triangle (OT). VM, RM, GM, YL, G, and G-o4 refer to vision models, reasoning models, Gemini 2.5 Pro, YOLO, GPT, and GPT-o4-mini.
Figure 3: Constants represented by clusters for the one-red and one-triangle patterns.
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
Domain
Task
# Constant
# Relation
Arithmetic
Predecessor
10
3
Odd
10
3
Even
10
3
Lessthan
10
3
Fizz
7
3
Buzz
10
3
Appendix
Table 3: The statistical information of ILP datasets.
Domain
Task
∂ ILP
DFORL
GPT-5
Gemini
γ ILP
RT
Arithmetic
Pre
1.00
1.00
1.00
1.00
1.00
6.57
Odd
1.00
1.00
1.00
1.00
1.00
6.98
Even
1.00
1.00
1.00
1.00
1.00
6.47
Lessthan
1.00
1.00
1.00
1.00
1.00
12.09
Fizz
1.00
-
1.00
1.00
-
35.55
Buzz
1.00
-
1.00
1.00
-
133.03
Appendix
Table 4: The recall of the learned rules on the ILP datasets. For GPT and Gemini, we use the latest reasoning model GPT-5 and Gemini 2.5 Pro, respectively. “Pre”, “GP”, ”Rel”, “UE”, “AdjR”, “TC”, “GC”, “Con”, and “RT” denote Predecessor, Grandparent, Relatedness, Undirected Edge, Adjacent to Red, Two Children, Graph Coloring, Connectedness, and the average running time in second for γ ILP when it reaches its maximum accuracy, respectively. The best results are in bold if some models fail to achieve the top recall. The notation “–” indicates that the model achieves a recall between 0 and 1.
Figure 4: The MNIST sequence with label 0,5,1,5,2,5,3,5,4,5,5,5…
Figure 5: The image constants represented by the clusters R , X , and Y .
Figure 6: The constants represented by the clusters T , Y , and Z .
Tasks
GPT-5
GPT-3o
Gemini 2.5 Pro
Two-pair
Cluster R and Cluster V represent the same shape category, but differ in color.
Everything about the paired images is identical—shape, size, cropping, background—except for the hue of the triangle.
The relationship is one of contrast in the color dimension, while maintaining consistency in the shape and overall format.
One-red
They are all solid red geometric shapes.
Every item in that set is filled with the same solid red colour; the hue is the property they all share.
color (red) is the property they all possess in an identical state, making it the primary commonality.
One-triangle
All the objects in the image share one clear common property: They are all triangles.
Every one of the thumbnails shows the same basic geometric shape: an upright, isosceles (appearance-wise almost equilateral) triangle. Color, slight aliasing and exact position vary, but the common property is simply that they are all triangles pointing upward inside the square frame.
Based on the provided image, the most immediate and common property of all the distinct triangular objects shown is that they are all isosceles triangles.
Appendix
Table 5: The semantics translation results from LLMs
Task
RIPPER-ViT
C4.5-ViT
γ ILP-VAE
γ ILP-ViT
Types
RM
RM
RM
RM
Two-pair
0.70
0.65
0.64
0.75
One-red
1.00
1.00
0.77
1.00
One-triangle
1.00
1.00
0.77
1.00
Appendix
Table 6: Classification accuracy on Kandinsky tasks: Two-pair, one-red, and one-triangle.
Figure 7: The constants represented by the cluster centroids #3, #6, and #7.
Figure 8: The constants represented by the cluster centroids #6 and #7.
Figure 9: The constants represented by the cluster centroids #0, #1, #6, #7, and #8.
Figure 10: The constants represented by the cluster centroids #1, #2, #6, #7, and #8.
Figure 11: The accuracies under different hyperparameters. DCM and LR indicate the differentiable clustering method and learning rate, respectively.
Figure 12: The stability of γ ILP in Kandinsky patterns.
Inductive Logic Programming (ILP) aims to learn interpretable first-order rules from data, but existing symbolic and neuro-symbolic approaches struggle to scale to noisy and probabilistic settings. Classical ILP relies on discrete combinatorial rule search and is brittle under uncertainty, while differentiable ILP methods typically depend on predefined rule templates or inaccurate fuzzy operators that suffer from vanishing gradients or poor approximation of logical structure when reasoning over probabilistic predicate valuations. This paper proposes an Attention-based Neuro-symbolic Differentiable Rule Extractor (ANDRE), a novel ILP framework that learns first-order logic programs by optimizing over a continuous rule space with attention-based logical operators. ANDRE replaces both rule templates and logical operators with fully differentiable, attention-driven conjunction and disjunction operators that approximate logical min-max semantics, enabling accurate, stable, and interpretable reasoning over probabilistic data. By softly selecting, negating, or excluding predicates within each rule, ANDRE supports flexible rule induction while preserving symbolic structure. Extensive experiments on classical ILP benchmarks, large-scale knowledge bases, and synthetic datasets with probabilistic predicates and noisy supervision demonstrate that ANDRE achieves competitive or superior predictive performance while reliably recovering correct symbolic rules under uncertainty. In particular, ANDRE remains robust to moderate label noise, substantially outperforming existing differentiable ILP methods in both rule extraction quality and stability.
Iman Sharifi, Peng Wei, Saber Fallah
Dept. of Mechanical and Aerospace Engineering, George Washington University, USA · Dept. of Mechanical Engineering Sciences, University of Surrey, UK
Inductive Logic Programming (ILP) learns interpretable logical rules from data. Existing methods are transductive: their learned parameters are bound to specific predicates and require retraining for each new task. We introduce Neural Rule Inducer (NRI), a pretrained model for zero-shot rule induction. Rather than encoding literal identities, NRI represents literals using domain-agnostic statistical properties such as class-conditional rates, entropy, and co-occurrence, which generalize across variable identities and counts without retraining. The model consists of a statistical encoder and a parallel slot-based decoder. Parallel decoding preserves the permutation invariance of logical disjunction; an autoregressive decoder would instead impose an arbitrary clause order. Product T-norm relaxation makes rule execution differentiable, allowing end-to-end training on prediction accuracy alone. We evaluate NRI on rule recovery, robustness to label noise and spurious correlations, and zero-shot transfer to real-world benchmarks, and we believe this work opens up the possibility of foundation models for symbolic reasoning. Code and the reference checkpoint are available at https://github.com/phuayj/neural-rule-inducer.
Large Language Models (LLMs) can propose rules in natural language, sidestepping the need for a predefined predicate space in traditional rule learning. Yet many LLM-based approaches ignore interactions among rules, and the opportunity to couple LLMs with probabilistic rule learning for robust inference remains underexplored. We present RLIE, a unified framework that integrates LLMs with probabilistic modeling to learn a set of weighted rules. RLIE has four stages: (1) Rule generation, where an LLM proposes and filters candidates; (2) Logistic regression, which learns probabilistic weights for global selection and calibration; (3) Iterative refinement, which updates the rule set using prediction errors; and (4) Evaluation, which compares the weighted rule set as a direct classifier with methods that inject rules into an LLM. We evaluate multiple inference strategies on real-world datasets. Applying rules directly with their learned weights yields superior performance, whereas prompting LLMs with the rules, weights, and logistic-model outputs surprisingly degrades accuracy. This supports the view that LLMs excel at semantic generation and interpretation but are less reliable for precise probabilistic integration. RLIE clarifies the potential and limitations of LLMs for inductive reasoning and couples them with classic probabilistic rule combination methods to enable more reliable neuro-symbolic reasoning.
Yang Yang, Hua XU, Zhangyi Hu +1
The Hong Kong University of Science and Technology (Guangzhou), Guangzhou 511400, China · Institute of Deep Perception Technology, JITRI, Wuxi 214000, China