Language Models as Knowledge Bases: On Entity Representations, Storage Capacity, and Paraphrased Queries

Benjamin Heinzerling, Kentaro Inui
8/20/2020
cs.CL

Official code: bheinzerling/lm-as-kb (12 stars, Python, last commit 2023-11-20).

Abstract

Pretrained language models have been suggested as a possible alternative or complement to structured knowledge bases. However, this emerging LM-as-KB paradigm has so far only been considered in a very limited setting, which only allows handling 21k entities whose single-token name is found in common LM vocabularies.

Show full abstract

Furthermore, the main benefit of this paradigm, namely querying the KB using a variety of natural language paraphrases, is underexplored so far. Here, we formulate two basic requirements for treating LMs as KBs: (i) the ability to store a large number facts involving a large number of entities and (ii) the ability to query stored facts. We explore three entity representations that allow LMs to represent millions of entities and present a detailed case study on paraphrased querying of world knowledge in LMs, thereby providing a proof-of-concept that language models can indeed serve as knowledge bases.

View on arXivView PDF

Code Implementations(1)

Code for the paper: Language Models as Knowledge Bases: On Entity Representations, Storage Capacity, and Paraphrased Queries (EACL 2021)

121PythonApr 21, 20213 years ago

Similar Papers

Cite this paper

@article{heinzerling2020language,
  title  = {Language Models as Knowledge Bases: On Entity Representations, Storage Capacity, and Paraphrased Queries},
  author = {Benjamin Heinzerling and Kentaro Inui},
  year   = {2020},
  eprint = {2008.09036},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2008.09036}
}

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

Discussion