🇩🇪 Deutsche Version: Ontologie als Constraint

The integration pattern “ontology as constraint” combines symbolic and neural AI in the following way: a given ontology, logical theory, or formal rule set serves as a constraint that structures the learning or inference process of a neural model. Learning is then no longer free within an unbounded function space, but operates within the limits defined by the logic.

Representatives include in particular Logic Tensor Networks (Badreddine, Garcez, Serafini and Spranger, Artificial Intelligence Journal Vol. 303, Art. 103649, 2022), which translate first-order logic into a differentiable constraint on neural embeddings; AlphaProof (DeepMind, Nature, 12 November 2025), which uses the Lean theorem prover as a constraint on the proof-generation process; and knowledge-graph-grounded reasoning, which uses a domain ontology as a factual basis for neural inference.

In personal-ontological terms, this pattern is a special case of neuro-symbolic AI. Architecturally interesting: the pattern is closely related to the purely symbolic validation run — an OWL consistency check with HermiT or a SHACL validation follows the same basic idea. The difference is that here the ontological structure does not merely check at the end, but steers during training or inference.

Ontological classification: Superordinate concept: neuro-symbolic AI.

Methodological point

The pattern addresses a central weakness of purely neural systems: their tendency to generate plausible-sounding but inconsistent outputs — the hallucinations of large language models being the most prominent example. When the ontology runs along as a constraint, inconsistencies with the knowledge base are penalized within the learning or inference process; the system cannot move away from the knowledge structure at will.

The price is dependence on the quality and completeness of the constraint ontology. What the ontology does not represent, the system cannot learn externally through it — and false constraints narrow the learning space wrongly.

Connection to the present ontology

The pattern has a particular resonance with the personal-ontological work here: the personhood ontology is itself a constraint structure in this sense — it fixes which statements about person, substance, and act can logically coexist. Neuro-symbolic systems that use ontologies as constraints thereby make tangible what a philosophical ontology can also achieve: not only classification, but a structuring specification.

Sources: Generated by querying the Personhood ontology.

Further sources:

  • Badreddine, Samy; d’Avila Garcez, Artur; Serafini, Luciano & Spranger, Michael (2022): Logic Tensor Networks. Artificial Intelligence Vol. 303, Art. 103649. DOI 10.1016/j.artint.2021.103649.
  • DeepMind (2025): Olympiad-level formal mathematical reasoning with reinforcement learning (AlphaProof). Nature, 12 November 2025.
  • Mileo, Alessandra; Confalonieri, Roberto & Guizzardi, Giancarlo (2025): On the multiple roles of ontologies in explanations for neuro-symbolic AI. Neurosymbolic Artificial Intelligence (NAI) Journal. DOI 10.3233/NAI-240754.

See also