Papers
Topics
Authors
Recent
Search
2000 character limit reached

γILP: Visual Logic Rule Learning

Updated 5 July 2026
  • γILP is a fully differentiable framework for learning first-order logic rules from images, uniting visual perception with symbolic reasoning.
  • It integrates image and relation encoders, differentiable clustering, and a neural ILP module to induce rules without relying on predefined symbolic labels.
  • The approach addresses predicate invention and generalizes across tasks, from classic ILP benchmarks to complex visual datasets like Kandinsky patterns.

Searching arXiv for the target paper and a few related methods named in the provided data. γILP, spelled yILP in the paper, is a framework for learning first-order logic rules directly from images without relying on symbolic labels for objects or relations, while also addressing predicate invention when relations are not explicitly defined (Gao et al., 9 Apr 2026). It is presented as a fully differentiable pipeline from image constant substitution to rule structure induction, designed to bridge visual perception and conceptual rule induction in a unified setting spanning symbolic relational datasets, relational image datasets, and pure image datasets such as Kandinsky patterns (Gao et al., 9 Apr 2026). Its core formulation combines image and relation encoders, differentiable clustering, a latent knowledge base, differentiable ground substitution, and a neural inductive logic programming module that extracts first-order rules from trained parameters (Gao et al., 9 Apr 2026).

1. Definition and problem formulation

The framework is situated in inductive rule learning over a first-order language L=(R,F,C,V)L = (R, F, C, V) with predicate symbols RR, function symbols FF, constants CC, and variables VV (Gao et al., 9 Apr 2026). A term is a constant, variable, or f(t1,,tn)f(t_1,\ldots,t_n), an atom is p(t1,,tn)p(t_1,\ldots,t_n) with pRp \in R, and a rule is a definite clause of the form Q0Q1,,QnQ_0 \leftarrow Q_1,\ldots,Q_n (Gao et al., 9 Apr 2026). A logic program PP is a set of rules; RR0 denotes all ground instances of RR1, the Herbrand base is RR2, and the immediate consequence operator is

RR3

The learning objective is to induce a logic program RR4 such that RR5 entails positive examples and not negative ones (Gao et al., 9 Apr 2026).

The paper identifies two obstacles for this setting when the input is visual rather than symbolic. The first is symbol grounding without label leakage: visual inputs must be mapped to logical constants and predicates without supervised labels for those symbols. The second is predicate invention: the system must discover new relational concepts that are not explicitly provided in the data (Gao et al., 9 Apr 2026). FO rules are described as more expressive than propositional rules and essential for interpreting relations between objects in images (Gao et al., 9 Apr 2026).

The rule space is represented through generic Horn clauses,

RR6

with example clauses such as

RR7

For binary targets, the paper also uses a forward-chaining bias of the form

RR8

to reduce search complexity (Gao et al., 9 Apr 2026).

2. Architecture and data flow

γILP is defined by a visual-to-logical pipeline in which raw inputs are first embedded and then transformed into latent logical structures (Gao et al., 9 Apr 2026). The encoders map images and, when available, textual relations to embeddings. For image constants, the experiments use ViT or VAE encoders producing RR9; for textual relations, the system uses VAE/BERT-like encoders producing relation embeddings in the same latent space (Gao et al., 9 Apr 2026).

A differentiable clustering module, denoted by the generalization function FF0, maps constant embeddings to FF1 latent centroids FF2 that serve as variables or abstract constants (Gao et al., 9 Apr 2026). The clustering objective is given as

FF3

with

FF4

where FF5 is the encoder, FF6 is a distance such as squared Euclidean distance, and FF7 controls the soft or hard character of the assignment (Gao et al., 9 Apr 2026). In effect, constants are generalized to centroids in a way that remains differentiable.

The latent knowledge base depends on whether relations are defined. If the relations are provided, the knowledge base is

FF8

where FF9 denotes concatenation (Gao et al., 9 Apr 2026). If relations are undefined, as in pure image settings, the knowledge base becomes

CC0

that is, a set of centroids for the constants present in the instance (Gao et al., 9 Apr 2026).

Differentiable substitution then constructs batches of ground substitutions by replacing variables with centroid embeddings and generates inputs CC1 encoding body-atom truth values together with labels CC2 (Gao et al., 9 Apr 2026). The labels represent target atom truth values in relational tasks and instance-level class labels in pure image tasks. The neural rule learner receives these tensors and induces first-order rules over unary and binary predicates, including placeholder predicates when relations are not defined (Gao et al., 9 Apr 2026).

3. Differentiable semantics and rule induction

The rule learning component is a multi-layer fuzzy-logic network that learns the analogue of CC3 and supports program extraction through thresholding (Gao et al., 9 Apr 2026). Truth values are continuous, with CC4 for atoms computed by lookup functions from the latent knowledge base (Gao et al., 9 Apr 2026). The target truth value is predicted by

CC5

where fuzzy disjunction is implemented as

CC6

Each intermediate layer is

CC7

with trainable matrix CC8 and fixed bias CC9 controlling the activation threshold (Gao et al., 9 Apr 2026).

A row-softmax normalization is imposed on the trainable matrices:

VV0

This ensures that each row forms a convex combination over inputs, which the paper describes as a soft selection of body atoms (Gao et al., 9 Apr 2026). Conjunction is therefore approximated by a linear mixture followed by thresholding,

VV1

while disjunction is implemented by the product VV2-norm (Gao et al., 9 Apr 2026). Implication and negation are not explicitly parameterized; instead, clause evaluation is modeled by composition of mixtures and thresholds (Gao et al., 9 Apr 2026).

The global loss combines predictive fit and clustering quality:

VV3

The parameter VV4, called VV5 in the paper’s ablation and denoted here as VV6, controls the trade-off between rule satisfaction and generalization quality (Gao et al., 9 Apr 2026). Larger VV7 emphasizes cluster assignments and smaller VV8 prioritizes fitting rule semantics. The paper states that fixed values are used in experiments and ablations, although scheduling such as warm-up or annealing is possible (Gao et al., 9 Apr 2026).

After training, clause extraction proceeds through the program tensor

VV9

Each row corresponds to a clause, and entries above a threshold determine which body atoms belong to that clause (Gao et al., 9 Apr 2026). Rule precision and recall are then computed over induced substitutions. The paper gives

f(t1,,tn)f(t_1,\ldots,t_n)0

and

f(t1,,tn)f(t_1,\ldots,t_n)1

as the clause-scoring routine (Gao et al., 9 Apr 2026).

4. Predicate invention and weakly supervised grounding

A central feature of γILP is predicate invention from percepts rather than from predefined symbolic vocabularies (Gao et al., 9 Apr 2026). When relations are undefined, the system attaches placeholder predicates to term lists, unary for f(t1,,tn)f(t_1,\ldots,t_n)2 and binary for f(t1,,tn)f(t_1,\ldots,t_n)3, while constraining the number of variables to equal the number of clusters and associating each variable f(t1,,tn)f(t_1,\ldots,t_n)4 with centroid f(t1,,tn)f(t_1,\ldots,t_n)5 (Gao et al., 9 Apr 2026). The semantics of these predicates are then inferred post hoc by analyzing the constants assigned to the corresponding variables and, for binary placeholders, their order (Gao et al., 9 Apr 2026).

The paper explicitly distinguishes learning from translation. LLMs are used only to translate inferred semantics into natural language; they are not used for learning the predicates themselves (Gao et al., 9 Apr 2026). This design is presented as a way to avoid label leakage while still allowing human-readable interpretation of the induced program (Gao et al., 9 Apr 2026).

For undefined relations, truth lookup is defined by conjunction over variable assignments:

f(t1,,tn)f(t_1,\ldots,t_n)6

In other words, all variable-centroid assignments for the atom’s variables must be present in the knowledge base (Gao et al., 9 Apr 2026). This differs from the relational case, where lookup is based on whether a grounded atom belongs to the latent knowledge base.

The paper provides an explicit semantics-induction routine. For binary atoms f(t1,,tn)f(t_1,\ldots,t_n)7, the procedure retrieves constants associated with the variables and issues the query “What is the relation between the two ordered sets of images?” For unary atoms f(t1,,tn)f(t_1,\ldots,t_n)8, it queries “What is the common property of the set of images?” The resulting descriptions are then used to generalize the constrained logic program by replacing placeholders with induced predicates (Gao et al., 9 Apr 2026). A plausible implication is that interpretability is produced in two stages: a latent structural stage during optimization and a linguistic stage after rule induction.

5. Experimental scope and reported results

The experimental evaluation spans three regimes: classical symbolic ILP datasets, relational image datasets, and pure image datasets (Gao et al., 9 Apr 2026). The symbolic tasks include arithmetic problems such as Predecessor, Odd, Even, Lessthan, Fizz, and Buzz; list tasks such as Member and Length; family-tree tasks such as Son, Grandparent, Husband, Uncle, Relatedness, and Father; and graph tasks such as Undirected Edge, Adjacent to Red, Two Children, Graph Coloring, Connectedness, and Cyclic (Gao et al., 9 Apr 2026).

On the symbolic relational task Predecessor, γILP learns

f(t1,,tn)f(t_1,\ldots,t_n)9

with precision p(t1,,tn)p(t_1,\ldots,t_n)0 and recall p(t1,,tn)p(t_1,\ldots,t_n)1 according to the paper’s appendix table (Gao et al., 9 Apr 2026). More broadly, the paper states that yILP matches DFORL across most classical ILP tasks, while struggling with Fizz and Buzz because they require p(t1,,tn)p(t_1,\ldots,t_n)2–p(t1,,tn)p(t_1,\ldots,t_n)3 variables and therefore produce a search-space explosion without templates (Gao et al., 9 Apr 2026).

For relational image datasets, the setup replaces symbolic constants with MNIST images while keeping relations defined as text embeddings and hiding image labels from the learner (Gao et al., 9 Apr 2026). The atom embedding is written as

p(t1,,tn)p(t_1,\ldots,t_n)4

with lookup p(t1,,tn)p(t_1,\ldots,t_n)5 if the atom is in the knowledge base and p(t1,,tn)p(t_1,\ldots,t_n)6 otherwise (Gao et al., 9 Apr 2026). The paper reports that yILP learns complete rules in most tasks and gives examples from temporal MNIST sequences:

p(t1,,tn)p(t_1,\ldots,t_n)7

and

p(t1,,tn)p(t_1,\ldots,t_n)8

It also states that LLMs degrade if relation semantics are obfuscated, whereas yILP still induces rules, which the paper attributes to the absence of label leakage (Gao et al., 9 Apr 2026).

For pure image datasets, the paper studies Kandinsky patterns under the tasks two-pair (TP), one-red (OR), and one-triangle (OT) (Gao et al., 9 Apr 2026). In the TP setting, placeholder rules

p(t1,,tn)p(t_1,\ldots,t_n)9

are interpreted via cluster analysis and LLM translation as approximately “same shape, different color,” yielding the generalized rule

pRp \in R0

For OR, the induced rule

pRp \in R1

is translated and generalized to

pRp \in R2

and for OT,

pRp \in R3

(Gao et al., 9 Apr 2026). Reported accuracies are yILP-ViT pRp \in R4 on OR and OT and pRp \in R5 on TP, and yILP-VAE pRp \in R6 on OR and OT and pRp \in R7 on TP (Gao et al., 9 Apr 2026).

The paper summarizes these results as strong performance on symbolic ILP benchmarks, relational image datasets, and pure image datasets, and specifically notes that RIPPER and C4.5 perform worse and are less interpretable on Kandinsky patterns (Gao et al., 9 Apr 2026).

6. Optimization, implementation, and computational characteristics

The optimization procedure is end-to-end and uses AdamW (Gao et al., 9 Apr 2026). Gradients propagate from the MSE term at the rule-network output through the differentiable substitution-generated inputs and then into encoders and cluster centroids through the clustering term (Gao et al., 9 Apr 2026). No explicit sparsity or length penalties are imposed; instead, structure sparsity arises from the ReLU thresholds and row-softmax mixtures (Gao et al., 9 Apr 2026). Predicate invention is regularized only implicitly, through variable constraints equating the number of variables and the number of clusters (Gao et al., 9 Apr 2026).

The design choices reported for the experiments are specific. Constant encoders are ViT or VAE; textual relations are encoded by VAE; clustering uses differentiable pRp \in R8-means with learnable centroids and a hardness parameter pRp \in R9; and the rule network is layered linear-ReLU with row-softmax normalization and final fuzzy disjunction (Gao et al., 9 Apr 2026). The paper explicitly states that no GNNs or slot attention are used and that integration proceeds through concatenation and tensorized lookups (Gao et al., 9 Apr 2026).

Typical hyperparameters are also provided. The number of clusters Q0Q1,,QnQ_0 \leftarrow Q_1,\ldots,Q_n0 is Q0Q1,,QnQ_0 \leftarrow Q_1,\ldots,Q_n1–Q0Q1,,QnQ_0 \leftarrow Q_1,\ldots,Q_n2 for Kandinsky and Q0Q1,,QnQ_0 \leftarrow Q_1,\ldots,Q_n3 in MNIST-digit experiments; rule-network learning rates are Q0Q1,,QnQ_0 \leftarrow Q_1,\ldots,Q_n4–Q0Q1,,QnQ_0 \leftarrow Q_1,\ldots,Q_n5; clustering learning rates are Q0Q1,,QnQ_0 \leftarrow Q_1,\ldots,Q_n6–Q0Q1,,QnQ_0 \leftarrow Q_1,\ldots,Q_n7; Q0Q1,,QnQ_0 \leftarrow Q_1,\ldots,Q_n8; and Q0Q1,,QnQ_0 \leftarrow Q_1,\ldots,Q_n9 lies in the range PP0–PP1 in the ablations (Gao et al., 9 Apr 2026). The bias PP2 is fixed per layer, and training continues until convergence or a time limit, with symbolic ILP experiments using, for example, PP3 minutes (Gao et al., 9 Apr 2026).

The input dimension for predefined relations is described by

PP4

so the dimensionality grows quadratically in the number of variables PP5 and linearly in the number of predicates (Gao et al., 9 Apr 2026). Batch substitution and tensorized lookup are described as GPU-friendly, and training times on A100 are said to be practical, although they increase with PP6 and knowledge-base size (Gao et al., 9 Apr 2026).

The pseudocode in the paper makes the training regime explicit. Differentiable substitution first updates clustering, obtains PP7 for all constant embeddings, and then samples positive and negative substitutions either from known target facts or from image instances (Gao et al., 9 Apr 2026). The training loop constructs PP8 by knowledge-base lookup, sets PP9, computes

RR00

updates encoders, centroids, and rule parameters using AdamW, and finally extracts rules from RR01 through thresholding (Gao et al., 9 Apr 2026).

7. Position in the literature, limitations, and open directions

The paper positions γILP against several strands of ILP and neurosymbolic research (Gao et al., 9 Apr 2026). Classical ILP systems such as FOIL and Aleph are described as symbolic and non-differentiable, whereas yILP is presented as end-to-end and GPU-based through differentiable substitution (Gao et al., 9 Apr 2026). SILP/OILP are characterized as differentiable rule-template methods over symbolic inputs, and yILP is described as extending this style of induction to images without label leakage and with predicate invention from percepts (Gao et al., 9 Apr 2026). NeuralILP, DeepProbLog, and SATNet are said to combine neural perception with symbolic reasoning but typically require symbolic labels for constants or predicates, while yILP operates in latent space with clustering-based grounding (Gao et al., 9 Apr 2026). NeurRL is described as extending differentiable rule induction to raw sequences, whereas yILP focuses on images and relations, adding predicate invention and LLM-based translation (Gao et al., 9 Apr 2026).

The paper’s qualitative analysis states that invented predicates often correspond to consistent, human-meaningful concepts, such as same shape and different color (Gao et al., 9 Apr 2026). It also notes that many rules reach precision RR02, although in the two-pair Kandinsky task precision can drop when only a subset of required pairs is captured (Gao et al., 9 Apr 2026).

Several failure modes are identified. The approach is sensitive to detection and segmentation errors because poor encodings or unstable clustering degrade grounding (Gao et al., 9 Apr 2026). Spurious correlations may arise when clustering groups objects by nuisance features rather than semantically relevant ones, making RR03 tuning important (Gao et al., 9 Apr 2026). The method can also overfit or underfit on long-chain tasks such as Fizz and Buzz when stronger language bias or templates are absent (Gao et al., 9 Apr 2026). This suggests that, despite the differentiable design, search control remains a significant issue in higher-arity or longer-range rule induction.

Future directions listed in the paper include richer quantifiers and longer rules through stronger language bias or meta-interpretive priors, temporal and spatial rules with explicit relation grounding, multimodal integration of text and images, coupling with LLMs for promptable rule priors and constrained search, and extensions to GNNs or relational transformers for structured perception (Gao et al., 9 Apr 2026). In that sense, γILP is presented not as a replacement for symbolic ILP or perception-heavy architectures, but as a framework for unifying differentiable symbol grounding, rule induction, and post hoc predicate semantics within a single visual-relational learning system (Gao et al., 9 Apr 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to γILP.