Language Models as Knowledge Bases?
Fabio PetroniTim RocktäschelPatrick LewisAnton BakhtinYuxiang WuAlexander H. MillerSebastian Riedel
Demonstrates that pretrained language models store substantial relational facts, enabling them to function as queryable knowledge bases for open-domain question answering without fine-tuning or schema engineering.
Recent advances in language models pretrained on large text collections have produced strong results on many natural-language tasks, yet it remains unclear how much factual and commonsense knowledge these models already contain. The paper examines whether such models can act as knowledge bases by answering fill-in-the-blank queries without any task-specific training or structured schemas.
The authors introduce the LAMA probe, which converts facts from Wikidata, ConceptNet, Google relation-extraction data, and a subset of SQuAD into simple cloze templates and measures how highly each model ranks the correct object among roughly 21,000 candidate tokens. They evaluate six publicly available models, ranging from convolutional and recurrent networks to BERT-base and BERT-large, and compare them against a frequency baseline, a supervised relation extractor with both naïve and oracle entity linking, and the DrQA open-domain question-answering system.
BERT-large emerges as the strongest model. On the T-REx subset it reaches 32 percent mean precision at one, nearly matching an oracle-aided relation extractor, and on the cloze version of SQuAD it attains 57 percent precision at ten, close to DrQA’s 64 percent. Performance is highest for one-to-one relations and lower for many-to-many relations; the model is also more stable across different phrasings of the same fact than earlier architectures. These results hold even though the language models receive no fine-tuning and no explicit retrieval step.
The findings indicate that large-scale language-model pretraining already encodes substantial relational knowledge that can be accessed simply by prompting. This capability could reduce reliance on brittle extraction pipelines and fixed schemas, while also supporting unsupervised open-domain question answering. At the same time, accuracy varies markedly by relation type, and models may partly succeed by exploiting co-occurrence patterns rather than deeper understanding.
Future work should test newer models with LAMA, explore more varied natural-language prompts, and extend evaluation to multi-token answers. Until those extensions are completed, practitioners should treat the reported figures as lower bounds and verify high-stakes facts with conventional knowledge bases.
- Paper: BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding, Jacob Devlin et al. (2019). Reading BERT provides the foundational understanding of bidirectional transformer pre-training that the source paper evaluates for relational knowledge retrieval.
- Paper: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, Patrick Lewis et al. (2020). This work directly extends the source by coupling a generative language model with a retriever to explicitly solve knowledge-intensive tasks.
