Table of Contents
Fetching ...

Declarative Design of Neural Predicates in Neuro-Symbolic Systems

Tilman Hinnerichs, Robin Manhaeve, Giuseppe Marra, Sebastijan Dumancic

TL;DR

The paper tackles the lack of declarativeness in neuro-symbolic systems by introducing a framework for declarative neural predicates built around learned prototypes. Prototypes ground non-symbolic inputs in a latent space and enable unification over continuous domains by sampling from prototype distributions, while preserving the inference procedures of DeepProblog. The approach reduces arbitrary queries to a canonical set, supports encoder/decoder grounding, and demonstrates comparable performance to functional baselines on MNIST-based tasks, while enabling new declarative queries about neural predicates. The work lays a foundation for fully declarative neuro-symbolic reasoning, with practical implications for flexible, query-driven AI systems, though scalability and automatic prototype-count learning remain open challenges.

Abstract

Neuro-symbolic systems (NeSy), which claim to combine the best of both learning and reasoning capabilities of artificial intelligence, are missing a core property of reasoning systems: Declarativeness. The lack of declarativeness is caused by the functional nature of neural predicates inherited from neural networks. We propose and implement a general framework for fully declarative neural predicates, which hence extends to fully declarative NeSy frameworks. We first show that the declarative extension preserves the learning and reasoning capabilities while being able to answer arbitrary queries while only being trained on a single query type.

Declarative Design of Neural Predicates in Neuro-Symbolic Systems

TL;DR

The paper tackles the lack of declarativeness in neuro-symbolic systems by introducing a framework for declarative neural predicates built around learned prototypes. Prototypes ground non-symbolic inputs in a latent space and enable unification over continuous domains by sampling from prototype distributions, while preserving the inference procedures of DeepProblog. The approach reduces arbitrary queries to a canonical set, supports encoder/decoder grounding, and demonstrates comparable performance to functional baselines on MNIST-based tasks, while enabling new declarative queries about neural predicates. The work lays a foundation for fully declarative neuro-symbolic reasoning, with practical implications for flexible, query-driven AI systems, though scalability and automatic prototype-count learning remain open challenges.

Abstract

Neuro-symbolic systems (NeSy), which claim to combine the best of both learning and reasoning capabilities of artificial intelligence, are missing a core property of reasoning systems: Declarativeness. The lack of declarativeness is caused by the functional nature of neural predicates inherited from neural networks. We propose and implement a general framework for fully declarative neural predicates, which hence extends to fully declarative NeSy frameworks. We first show that the declarative extension preserves the learning and reasoning capabilities while being able to answer arbitrary queries while only being trained on a single query type.
Paper Structure (38 sections, 13 equations, 5 figures, 2 tables)

This paper contains 38 sections, 13 equations, 5 figures, 2 tables.

Figures (5)

  • Figure 1: Unification in DeepProblog breaks when tasked to generate an image. DeepProblog iteratively tries to match either the current facts with rules from the program in (a) or variables with values. After digit($\boxed{?}$,4) is generated it cannot assign a value to $\boxed{?}$, breaking the resolution algorithm.
  • Figure 2: Procedures to answer the four canonical queries. Each prototype is shown in latent space and consists of a mean $p_i$ and a distribution illustrated in a darker shade. The arrows represent different computations, as shown in the legend. (a) Both image and prototype are mapped to the latent space. The probability is their distance in latent space. (b) The image is encoded, compared to all prototypes, and the closest is used to answer the query. (c) The prototype is mapped to the latent space, an instance is sampled and decoded back to image space. (d) All possible groundings are generated. The prototype is fetched for each possible grounding, and an instance gets sampled and decoded back to image space.
  • Figure 3: Declarative neural predicate for the MNIST digit example with three digits only. (a) The first clause is an annotated disjunction modeling prototype membership of an image I. It relates it to each prototype through prototype_match/3. The predicate prototype/2 relates a particular prototype to its latent representation. The prototype_match/3 is essentially a probability fact capturing the likelihood that an image belongs to the prototype. This is achieved by comparing the latent projection of an image to the prototype space and the prototypes themselves. The prototypes are modeled as Gaussian distributions; the similarity to a prototype is computed as the likelihood of sampling a latent representation of an image from the distribution defined by the prototype. The predicates im_similar/2 and lat_similar/2 compute similarities in the image space (as 1 - mean squared error between the images) and the probability of a latent vector being sampled from the Gaussian distribution defined by the prototype, respectively. (b) During inference, the snippet marked in red is substituted by the green code snippet. As the decoder is trained already, we can shorten the decode rule and remove im_similar.
  • Figure 4: Images learned by prototypes, sorted from 0 to 9. They resemble key distinguishing features of digits but not their full appearance.
  • Figure 5: Full training program used for experiments. While during training the red snippet is used, we use the green snippet during inference.