Skip to main content

Evaluating Language Models for Knowledge Base Completion

  • Conference paper
  • First Online:
The Semantic Web (ESWC 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13870))

Included in the following conference series:

Abstract

Structured knowledge bases (KBs) are a foundation of many intelligent applications, yet are notoriously incomplete. Language models (LMs) have recently been proposed for unsupervised knowledge base completion (KBC), yet, despite encouraging initial results, questions regarding their suitability remain open. Existing evaluations often fall short because they only evaluate on popular subjects, or sample already existing facts from KBs. In this work, we introduce a novel, more challenging benchmark dataset, and a methodology tailored for a realistic assessment of the KBC potential of LMs. For automated assessment, we curate a dataset called WD-Known, which provides an unbiased random sample of Wikidata, containing over 3.9 million facts. In a second step, we perform a human evaluation on predictions that are not yet in the KB, as only this provides real insights into the added value over existing KBs. Our key finding is that biases in dataset conception of previous benchmarks lead to a systematic overestimate of LM performance for KBC. However, our results also reveal strong areas of LMs. We could, for example, perform a significant completion of Wikidata on the relations nativeLanguage, by a factor of \(\sim \)21 (from 260k to 5.8M) at \(82\%\) precision, and citizenOf by a factor of \(\sim \)0.3 (from 4.2M to 5.3M) at 90% precision. Moreover, we find that LMs possess surprisingly strong generalization capabilities: even on relations where most facts were not directly observed in LM training, prediction quality can be high. We open-source the benchmark dataset and code. (https://github.com/bveseli/LMsForKBC).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    https://paperswithcode.com/task/knowledge-graph-completion.

  2. 2.

    Wikidata might broadly fall in between, as its aim is human-curated quality, but major portions are imported semi-automatically from other sources.

  3. 3.

    There is often a terminological confusion here: Automated editing is omnipresent on Wikidata, but the bots performing them typically execute meticulously pre-defined edit and insertion tasks (e.g., based on other structured sources), not based on statistical inference.

  4. 4.

    https://www.rosette.com/capability/relationship-extractor/#tech-specs.

  5. 5.

    https://en.Wikipedia.org/wiki/Final_Fantasy_VII.

  6. 6.

    https://en.Wikipedia.org/wiki/Marcus_Adams_(Canadian_football).

References

  1. Auer, S., Bizer, C., Kobilarov, G., Lehmann, J., Cyganiak, R., Ives, Z.: DBpedia: a nucleus for a web of open data. In: Aberer, K., et al. (eds.) ASWC/ISWC -2007. LNCS, vol. 4825, pp. 722–735. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-76298-0_52

    Chapter  Google Scholar 

  2. Bordes, A., Usunier, N., Garcia-Duran, A., Weston, J., Yakhnenko, O.: Translating embeddings for modeling multi-relational data. In: NeurIPS (2013)

    Google Scholar 

  3. Cao, N.D., Aziz, W., Titov, I.: Editing factual knowledge in language models. In: EMNLP (2021)

    Google Scholar 

  4. Carlson, A., Betteridge, J., Kisiel, B., Settles, B., Hruschka, E.R., Mitchell, T.M.: Toward an architecture for never-ending language learning. In: AAAI (2010)

    Google Scholar 

  5. Cohen, R., Geva, M., Berant, J., Globerson, A.: Crawling the internal knowledge-base of language models. In: Findings of EACL (2023)

    Google Scholar 

  6. Dettmers, T., Minervini, P., Stenetorp, P., Riedel, S.: Convolutional 2D knowledge graph embeddings. In: AAAI (2018)

    Google Scholar 

  7. Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: BERT: pre-training of deep bidirectional transformers for language understanding. In: NAACL (2019)

    Google Scholar 

  8. Elazar, Y., et al.: Measuring and improving consistency in pretrained language models. TACL 9, 1012–1031 (2021)

    Article  Google Scholar 

  9. Elsahar, H., Vougiouklis, P., Remaci, A., Gravier, C., Hare, J., Laforest, F., Simperl, E.: T-REx: a large scale alignment of natural language with knowledge base triples. In: LREC (2018)

    Google Scholar 

  10. Heinzerling, B., Inui, K.: Language models as knowledge bases: on entity representations, storage capacity, and paraphrased queries. In: EACL (2021)

    Google Scholar 

  11. Lenat, D.B.: CYC: a large-scale investment in knowledge infrastructure. CACM 38, 33–38 (1995)

    Article  Google Scholar 

  12. Liu, P., Yuan, W., Fu, J., Jiang, Z., Hayashi, H., Neubig, G.: Pre-train, prompt, and predict: a systematic survey of prompting methods in natural language processing. ACM CSUR 55, 1–35 (2022)

    Google Scholar 

  13. Lv, X., et al.: Do pre-trained models benefit knowledge graph completion? A reliable evaluation and a reasonable approach. In: Findings of ACL (2022)

    Google Scholar 

  14. Nickel, M., Tresp, V., Kriegel, H.P.: A three-way model for collective learning on multi-relational data. In: ICML (2011)

    Google Scholar 

  15. Paulheim, H.: How much is a triple? Estimating the cost of knowledge graph creation. In: ISWC (2018)

    Google Scholar 

  16. Petroni, F., et al.: How context affects language models’ factual predictions. In: AKBC (2020)

    Google Scholar 

  17. Petroni, F., et al.: Language models as knowledge bases? In: EMNLP (2019)

    Google Scholar 

  18. Poerner, N., Waltinger, U., Schütze, H.: E-BERT: efficient-yet-effective entity embeddings for BERT. In: Findings of EMNLP (2020)

    Google Scholar 

  19. Razniewski, S., Yates, A., Kassner, N., Weikum, G.: Language models as or for knowledge bases. In: DL4KG (2021)

    Google Scholar 

  20. Roberts, A., Raffel, C., Shazeer, N.: How much knowledge can you pack into the parameters of a language model? In: EMNLP (2020)

    Google Scholar 

  21. Safavi, T., Koutra, D.: CoDEx: a comprehensive knowledge graph completion benchmark. In: EMNLP (2020)

    Google Scholar 

  22. Shaik, Z., Ilievski, F., Morstatter, F.: Analyzing race and country of citizenship bias in wikidata (2021)

    Google Scholar 

  23. Shin, T., Razeghi, Y., Logan IV, R.L., Wallace, E., Singh, S.: AutoPrompt: eliciting knowledge from language models with automatically generated prompts. In: EMNLP (2020)

    Google Scholar 

  24. Singhania, S., Nguyen, T.P., Razniewski, S.: LM-KBC: Knowledge base construction from pre-trained language models. CEUR (2022)

    Google Scholar 

  25. Suchanek, F.M., Kasneci, G., Weikum, G.: YAGO: a core of semantic knowledge. In: WWW (2007)

    Google Scholar 

  26. Vrandečić, D., Krötzsch, M.: Wikidata: a free collaborative knowledge base. CACM 57, 78–85 (2014)

    Article  Google Scholar 

  27. Weikum, G., Dong, L., Razniewski, S., Suchanek, F.M.: Machine knowledge: creation and curation of comprehensive knowledge bases. In: FnT (2021)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Blerta Veseli or Simon Razniewski .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Veseli, B., Singhania, S., Razniewski, S., Weikum, G. (2023). Evaluating Language Models for Knowledge Base Completion. In: Pesquita, C., et al. The Semantic Web. ESWC 2023. Lecture Notes in Computer Science, vol 13870. Springer, Cham. https://doi.org/10.1007/978-3-031-33455-9_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-33455-9_14

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-33454-2

  • Online ISBN: 978-3-031-33455-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics