DeepOnto: A Python Package for Ontology Engineering with Deep Learning
Yuan He, Jiaoyan Chen, Hang Dong, Ian Horrocks, Carlo Allocca, Taehun Kim, Brahmananda Sapkota
TL;DR
DeepOnto addresses the need for Python-ready, deep-learning–friendly ontology engineering by wrapping the OWL API in a Pythonic core and extending it with reasoning, verbalisation, normalisation, taxonomy, and projection. Built on PyTorch and Transformer-based LM tooling (via JPype bridging to the OWL API), it provides tools for ontology alignment and completion (e.g., BERTMap, BERTSubs) and creates DL-friendly data forms (textual verbalisations and graph projections) to enable LM-based probing (OntoLAMA). It introduces the Bio-ML dataset suite for ontology matching benchmarking and integrates OntoLAMA for prompt-based LM reasoning on ontologies, demonstrating practical use in Digital Health Coaching and OAEI 2022. The work highlights improved alignment performance, scalable evaluation, and a clear path toward richer embedding and explanation-enhanced ontology engineering, with potential to mitigate DL model hallucinations by anchoring predictions in symbolic ontologies.
Abstract
Integrating deep learning techniques, particularly language models (LMs), with knowledge representation techniques like ontologies has raised widespread attention, urging the need of a platform that supports both paradigms. Although packages such as OWL API and Jena offer robust support for basic ontology processing features, they lack the capability to transform various types of information within ontologies into formats suitable for downstream deep learning-based applications. Moreover, widely-used ontology APIs are primarily Java-based while deep learning frameworks like PyTorch and Tensorflow are mainly for Python programming. To address the needs, we present DeepOnto, a Python package designed for ontology engineering with deep learning. The package encompasses a core ontology processing module founded on the widely-recognised and reliable OWL API, encapsulating its fundamental features in a more "Pythonic" manner and extending its capabilities to incorporate other essential components including reasoning, verbalisation, normalisation, taxonomy, projection, and more. Building on this module, DeepOnto offers a suite of tools, resources, and algorithms that support various ontology engineering tasks, such as ontology alignment and completion, by harnessing deep learning methods, primarily pre-trained LMs. In this paper, we also demonstrate the practical utility of DeepOnto through two use-cases: the Digital Health Coaching in Samsung Research UK and the Bio-ML track of the Ontology Alignment Evaluation Initiative (OAEI).
