Enhancing Ontologies with LLMs

Ontologies bring symbolic AI and neural AI together: they provide the explicit, curated structure that large language models lack, and language models can in turn help ontologies keep pace with a changing field. This project explores that second direction.

The challenge

Illustration of a researcher overwhelmed by stacks of papers

Ontologies describe the types of objects in a domain, their characteristics and how they relate. Examples range from SNOMED CT in medicine, with more than 357,000 concepts, to the Gene Ontology in biology and the Information Systems Ontology, which covers the theories, topics, technologies and research methods of the IS discipline.

But domain knowledge is dynamic and new terms appear constantly. Keeping an ontology up to date is traditionally manual, error-prone and time-consuming: experts analyse the ontology, identify gaps and add new entities and relations by hand. Aligning and merging ontologies automatically still requires substantial manual validation.

Our research question: How effectively can large language models support the enrichment of ontologies?

A semi-automated approach

Enriching an ontology with a new term involves two decisions: is the term a synonym of an existing entity, or a new concept? And if it is new, where does it belong in the hierarchy? We combine fine-tuned language models for both decisions with a final expert review:

Synonym identification

Determine whether a new term is synonymous with an existing entity or a potential new entity.

Parent-child identification

Find the correct position for new candidate entities within the ontology's hierarchy.

Human review

Experts review the model outputs and make the final decisions.

All experiments use data from the Information Systems Ontology: 389,139 synonym pairs and 3,864 parent-child pairs. The pair participant → individual participant, for example, encodes a hierarchical relation, while individual participant ≈ worker encodes a synonym.

Excerpt of the IS Ontology hierarchy: methodological entity, research method, data collection method, experiment, survey and their subtypes
An excerpt of the IS Ontology's hierarchy of methodological entities.

Step 1: Synonym identification

Calculate semantic similarity

A fine-tuned Sentence Transformer (all-mpnet-base-v2) embeds the new term and every existing entity in the ontology.

Find the most similar entity

The entity with the highest cosine similarity to the new term is selected.

Compare with the threshold

Score above 0.61: the term is classified as a synonym. Below: it is flagged as a candidate for a new entity.

The model was fine-tuned with a Multiple Negatives Ranking loss, in which every other pair in a training batch serves as a negative example. The threshold was chosen on a validation set across the full range from 0 to 1. Fine-tuning made the decisive difference: the base model mapped only about 11% of the terms correctly.

Two charts of synonym-class accuracy and candidate-class F1 score across thresholds, for the base model (left) and the fine-tuned model (right)
Synonym accuracy (blue) and candidate F1 score (red) across thresholds: base model (left) versus fine-tuned model (right).

Step 2: Parent-child relationship identification

Because a whole ontology does not fit into a language model’s context window, placement is framed as a binary classification: given two entities, is the first a child (“is-a”) of the second? As negative examples we used nephew-uncle pairs, entities that share a grandparent without being parent and child, so the model learns subtle distinctions. We fine-tuned BERT and MPNet sequence classifiers.

MetricBERTMPNet
Accuracy0.6940.754
Precision0.7700.731
Recall0.5660.793
F1 score0.6500.759

MPNet is the more balanced choice when missing true relations is costly; BERT’s higher precision suits applications where every proposed relation must be correct.

Results

98%accuracy in mapping new terms to existing entities (synonym identification, test set)
75%accuracy in identifying parent-child relationships (MPNet)

Language models are highly effective at matching synonyms. Recognising genuinely new concepts is harder (42% in our tests), and hierarchy placement reaches a moderate level. This is why we propose a hybrid workflow: LLMs match synonyms automatically and flag candidate terms, which experts then review. Adjustable thresholds let curators tune the balance to their priorities.

Example sentence annotated with ontology entities: survey as data collection method, 234 senior executives as participants, investment bank as sector, UTAUT as theory, PLS-SEM as data analysis method
Why it matters: an up-to-date ontology lets annotation pipelines recognise methods, theories, samples and sectors in research articles.

Better-maintained ontologies directly improve tools such as SemanticIS and the knowledge synthesis dashboard. Next steps include richer, domain-specific training data, context for entity pairs, and a broader range of language models.

Joint work with Anh T. V. Pham and Sebastian Hüttemann (HWR Berlin), presented at the 58th Hawaii International Conference on System Sciences (HICSS 2025).