Do LLMs Dream of Ontologies?

Marco Bombieri, Paolo Fiorini, Simone Paolo Ponzetto, Marco Rospocher
1/26/2024
cs.CLcs.AI

No official code found. Best implementation: marcobombieri/do-LLM-dream-of-ontologies (1 star, CC0-1.0, last commit 2025-10-30).

Abstract

Large Language Models (LLMs) have demonstrated remarkable performance across diverse natural language processing tasks, yet their ability to memorize structured knowledge remains underexplored. In this paper, we investigate the extent to which general-purpose pre-trained LLMs retain and correctly reproduce concept identifier (ID)-label associations from publicly available ontologies. We conduct a systematic evaluation across multiple ontological resources, including the Gene Ontology, Uberon, Wikidata, and ICD-10, using LLMs such as Pythia-12B, Gemini-1.5-Flash, GPT-3.5, and GPT-4. Our findings reveal that only a small fraction of ontological concepts is accurately memorized, with GPT-4 demonstrating the highest performance. To understand why certain concepts are memorized more effectively than others, we analyze the relationship between memorization accuracy and concept popularity on the Web. Our results indicate a strong correlation between the frequency of a concept's occurrence online and the likelihood of accurately retrieving its ID from the label. This suggests that LLMs primarily acquire such knowledge through indirect textual exposure rather than directly from structured ontological resources. Furthermore, we introduce new metrics to quantify prediction invariance, demonstrating that the stability of model responses across variations in prompt language and temperature settings can serve as a proxy for estimating memorization robustness.

View on arXivView PDF

Code Implementations(1)

CC0-1.0

Repository containing code and dataset of the paper "Do LLM Dream Of Ontologies?"

11PythonFeb 26, 202411 months agoCC0-1.0
large-language-modelsmemorizationontology

Similar Papers

Cite this paper

@article{bombieri2024llms,
  title  = {Do LLMs Dream of Ontologies?},
  author = {Marco Bombieri and Paolo Fiorini and Simone Paolo Ponzetto and Marco Rospocher},
  year   = {2024},
  eprint = {2401.14931},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.14931v2}
}

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/2401.14931.svg)](https://codeofpaper.com/paper/2401.14931)

Discussion