Exploring Large Language Models for Ontology Alignment

Yuan He, Jiaoyan Chen, Hang Dong, Ian Horrocks

Introduction

Ontology alignment, the process of identifying semantic correspondences between different knowledge graphs or databases, is a cornerstone of the Semantic Web. For instance, ensuring that "Myocardial Infarction" in one medical ontology is correctly mapped to "Heart Attack" in another is vital for data interoperability. Traditionally, this task has relied on lexical matching or fine-tuned language models like BERT. However, the emergence of Large Language Models (LLMs) such as Flan-T5 and GPT-3.5 presents a new opportunity: can these massive models perform ontology alignment in a zero-shot setting?

This paper investigates the zero-shot capabilities of LLMs for ontology alignment, specifically focusing on challenging biomedical datasets where simple string matching fails.

Methodology

The authors frame the alignment task as a Concept Identification problem. Given a source concept and a target concept, the model performs binary classification to determine if they are identical.

Prompt Engineering and Context

Using GPT-4 to assist in template design, the authors developed prompts that provide the LLM with concept names and, optionally, their hierarchical context (parent and child concepts). The models were tasked with providing a strict "Yes" or "No" response.

Evaluated Models

The study focuses on:

  • Flan-T5-XXL: An 11B parameter open-source model. The authors used the generation probability of the "Yes" token as a classification score.
  • GPT-3.5-turbo: Evaluated for its generative capabilities.
  • Baselines: BERTMap (fine-tuned BERT) and BERTMapLt (edit similarity-based).

Experimental Setup

To rigorously test semantic understanding, the authors created two subsets from the OAEI Bio-ML track: NCIT-DOID and SNOMED-FMA (Body). Crucially, they excluded concept pairs with exact string matches, forcing the models to rely on deep semantic reasoning rather than lexical overlap. Each subset contains 10,000 concept pairs.

Results and Analysis

Performance on NCIT-DOID

On the NCIT-DOID dataset, Flan-T5-XXL demonstrated impressive zero-shot performance. When utilizing a confidence threshold, it achieved an F-score of 0.721, surpassing the fine-tuned BERTMap baseline of 0.628. This suggests that the scale of pre-training in LLMs can capture domain-specific semantic equivalences effectively.

Table 1: Performance metrics for the NCIT-DOID dataset.

Performance on SNOMED-FMA

The results were more nuanced for the SNOMED-FMA dataset. Here, the fine-tuned BERTMap model maintained its lead with an F-score of 0.552, while Flan-T5-XXL's best configuration reached only 0.346. This indicates that the effectiveness of zero-shot LLMs can vary significantly depending on the specific ontology domain and structure.

Table 2: Performance metrics for the SNOMED-FMA dataset.

Key Observations

  • Structural Context: Surprisingly, adding parent and child information to the prompts often degraded performance. LLMs appeared to be confused by the additional structural text, suggesting that current prompting methods are not yet optimized for graph-based data.
  • Model "Chattiness": GPT-3.5-turbo performed poorly, largely due to its tendency to provide conversational explanations instead of the requested "Yes/No" tokens. This made it difficult to derive reliable probability scores for ranking.
  • Thresholding: Implementing a confidence threshold for Flan-T5 consistently boosted precision at the cost of recall.

Conclusion and Future Directions

While LLMs show promise for ontology alignment—sometimes even outperforming fine-tuned systems—they face significant hurdles. The computational cost makes them difficult to use for initial candidate selection across large ontologies. Furthermore, representing complex hierarchical structures in natural language remains an open challenge.

Future research should explore more effective ways to inject ontology structure into prompts, investigate parameter-efficient tuning, and develop LLMs that are natively "structure-informed" for graph-based tasks.

Summary updated

BibTeX
@inproceedings{he2023exploring,
  author = {Yuan He and Jiaoyan Chen and Hang Dong and Ian Horrocks},
  title = {{Exploring Large Language Models for Ontology Alignment}},
  booktitle = {ISWC (Posters/Demos/Industry)},
  year = {2023},
  url = {https://openreview.net/forum?id=uDrEHcyR6QK},
}
Figure