Neuro-symbolic learning over OWL 2 DL via consequence-based compilation to differentiable circuits

Olga Mashkova, Asaad Mohammedsaleh, Fernando Zhapa-Camacho, Robert Hoehndorf
8/18/2026
cs.AI

Official code: bio-ontology-research-group/baobab (0 stars, Lean, Apache-2.0, last commit 2026-06-16).

Abstract

OWL 2 DL ontologies, grounded in the description logic $\mathcal{SROIQ}$, express large knowledge bases in biomedicine and the Semantic Web. Neuro-symbolic (NeSy) learners over description logics either embed the ontology in a continuous space, abandoning classical entailment, or restrict to the Horn fragment $\mathcal{EL}^{++}$, which has a single canonical model.

Show full abstract

We present Baobab, which compiles a $\mathcal{SROIQ}$ ontology with a finite ABox into a Sentential Decision Diagram (SDD): it saturates a propositional core under a consequence-based calculus and instantiates the remaining $\mathcal{SROIQ}$ features (nominals, number restrictions, and the role axioms) over the active domain. The SDD's evidence-conditioned weighted model count then trains a perception network to recognize real images under partial ABox supervision: on an ontology that exercises every distinctive $\mathcal{SROIQ}$ feature, a CNN learns to read MNIST digits coupled by a successor relation and recovers latent ontology concepts that an independent perception leaves at chance. When the supervision admits several ontology-consistent completions, an independent perception collapses onto one, a reasoning shortcut: we show that a mixture indexed by the query's justifications can represent the calibrated posterior no independent perception can, and that seeding it from the circuit's enumerated completions attains the Bayes-optimal posterior on a real-image MNIST task where single-WMC and learned mixtures (the BEARS-ensemble hypothesis class) do not: to our knowledge the first to characterize and mitigate reasoning shortcuts in a non-Horn description logic. Soundness of the compiler and the representation result are machine-checked in Lean 4. Code is available at https://github.com/bio-ontology-research-group/baobab.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Baobab: neuro-symbolic learning over OWL 2 DL via consequence-based compilation of SROIQ to differentiable SDD circuits

00Lean, PythonMay 31, 20265 months agoApache-2.0

Similar Papers

Cite this paper

@article{mashkova2026neurosymbolic,
  title  = {Neuro-symbolic learning over OWL 2 DL via consequence-based compilation to differentiable circuits},
  author = {Olga Mashkova and Asaad Mohammedsaleh and Fernando Zhapa-Camacho and Robert Hoehndorf},
  year   = {2026},
  eprint = {2608.17741},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.17741v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2608.17741.svg)](https://codeofpaper.com/paper/2608.17741)

Discussion