Table of Contents
Fetching ...

To Neuro-Symbolic Classification and Beyond by Compiling Description Logic Ontologies to Probabilistic Circuits

Nicolas Lazzari, Valentina Presutti, Antonio Vergari

TL;DR

The paper tackles the reliability gap in deep learning by encoding Description Logic ontologies as differentiable circuits, enabling predictions that respect domain knowledge. It introduces a tractable circuit framework, $\igC_O$, that supports data generation, deductive reasoning, and neuro-symbolic models with either hard (SPL) or soft (SL) constraints. Empirical results show the circuit-based NeSy approaches yield consistent predictions and competitive accuracy with neural baselines, while offering significant gains in reasoning speed on large inputs. The work demonstrates a cohesive pipeline from ontology compilation to synthetic data, scalable reasoning, and reliable classification, highlighting a path for closer integration of knowledge representation and deep learning in real-world settings.

Abstract

Background: Neuro-symbolic methods enhance the reliability of neural network classifiers through logical constraints, but they lack native support for ontologies. Objectives: We aim to develop a neuro-symbolic method that reliably outputs predictions consistent with a Description Logic ontology that formalizes domain-specific knowledge. Methods: We encode a Description Logic ontology as a circuit, a feed-forward differentiable computational graph that supports tractable execution of queries and transformations. We show that the circuit can be used to (i) generate synthetic datasets that capture the semantics of the ontology; (ii) efficiently perform deductive reasoning on a GPU; (iii) implement neuro-symbolic models whose predictions are approximately or provably consistent with the knowledge defined in the ontology. Results We show that the synthetic dataset generated using the circuit qualitatively captures the semantics of the ontology while being challenging for Machine Learning classifiers, including neural networks. Moreover, we show that compiling the ontology into a circuit is a promising approach for scalable deductive reasoning, with runtimes up to three orders of magnitude faster than available reasoners. Finally, we show that our neuro-symbolic classifiers reliably produce consistent predictions when compared to neural network baselines, maintaining competitive performances or even outperforming them. Conclusions By compiling Description Logic ontologies into circuits, we obtain a tighter integration between the Deep Learning and Knowledge Representation fields. We show that a single circuit representation can be used to tackle different challenging tasks closely related to real-world applications.

To Neuro-Symbolic Classification and Beyond by Compiling Description Logic Ontologies to Probabilistic Circuits

TL;DR

The paper tackles the reliability gap in deep learning by encoding Description Logic ontologies as differentiable circuits, enabling predictions that respect domain knowledge. It introduces a tractable circuit framework, , that supports data generation, deductive reasoning, and neuro-symbolic models with either hard (SPL) or soft (SL) constraints. Empirical results show the circuit-based NeSy approaches yield consistent predictions and competitive accuracy with neural baselines, while offering significant gains in reasoning speed on large inputs. The work demonstrates a cohesive pipeline from ontology compilation to synthetic data, scalable reasoning, and reliable classification, highlighting a path for closer integration of knowledge representation and deep learning in real-world settings.

Abstract

Background: Neuro-symbolic methods enhance the reliability of neural network classifiers through logical constraints, but they lack native support for ontologies. Objectives: We aim to develop a neuro-symbolic method that reliably outputs predictions consistent with a Description Logic ontology that formalizes domain-specific knowledge. Methods: We encode a Description Logic ontology as a circuit, a feed-forward differentiable computational graph that supports tractable execution of queries and transformations. We show that the circuit can be used to (i) generate synthetic datasets that capture the semantics of the ontology; (ii) efficiently perform deductive reasoning on a GPU; (iii) implement neuro-symbolic models whose predictions are approximately or provably consistent with the knowledge defined in the ontology. Results We show that the synthetic dataset generated using the circuit qualitatively captures the semantics of the ontology while being challenging for Machine Learning classifiers, including neural networks. Moreover, we show that compiling the ontology into a circuit is a promising approach for scalable deductive reasoning, with runtimes up to three orders of magnitude faster than available reasoners. Finally, we show that our neuro-symbolic classifiers reliably produce consistent predictions when compared to neural network baselines, maintaining competitive performances or even outperforming them. Conclusions By compiling Description Logic ontologies into circuits, we obtain a tighter integration between the Deep Learning and Knowledge Representation fields. We show that a single circuit representation can be used to tackle different challenging tasks closely related to real-world applications.
Paper Structure (24 sections, 22 equations, 6 figures, 4 tables, 3 algorithms)

This paper contains 24 sections, 22 equations, 6 figures, 4 tables, 3 algorithms.

Figures (6)

  • Figure 1: Knowledge Base $\mathcal{KB}$ represented in OWL2 using Graffoo. Yellow rectangles correspond to concepts, pink circles to individuals. Arrows between rectangles (resp. circles) represent constraints between concepts (resp. relations between individuals).
  • Figure 2: Circuit $\mathcal{C}_\mathcal{O}$. Input units (yellow) are labeled with their corresponding propositional variable and its corresponding negation. Each input corresponds to a part of the ontology (a concept, a role, or a role constraint). Sum units (grey) are labeled with $+$, product units (blue) with $\odot$.
  • Figure 3: Dimension of the CNF formula generated by Algorithm \ref{['alg:d0']} for ontologies generated using Algorithm \ref{['alg:generate-ontology']} varying $N_c \in \{ 5, 10, 25, 50, 100 \}$, $N_r \in \{ 5, 25, 50 \}$, $p_d,p_r \in \{ 0.3, 0.5, 0.8 \}$, and $p_c \in \{ 0.3, 0.5, 1.0 \}$. The average size of clauses refers to the average number of atoms for each clause in the CNF.
  • Figure 4: Time and number of nodes obtained by compiling $\mathcal{O}$, varying $N_c \in \{ 5, 10, 25 \}$ and $N_r \in \{ 5, 25 \}$ and averaged over all combinations of $p_d,p_r \in \{ 0.3, 0.5, 0.8 \}$, $p_c \in \{ 0.3, 0.5, 1.0 \}$. A timeout of $10$ minutes has been set on the compiler. Circuits that could not be compiled are shown as red crosses.
  • Figure 5: 2D projection of $5k$ samples for an ontology generated with $N_c = 5$, $N_r = 3$, $p_d = p_r = 0.5$ and $p_c = 1$ using UMAP mcinnes2018umap. $W$ and $W^{-1}$ refer to the Wishart distribution and its inverse.
  • ...and 1 more figures

Theorems & Definitions (2)

  • Definition 2.1: Circuit choi2020pcvergari2021compositional
  • Definition 2.2: Smoothness, decomposability, determinsm choi2020pcvergari2021compositionaldarwiche2002knowledge