Language Models as Knowledge Bases?
By Fabio Petroni, Tim Rocktaschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H. Miller, Sebastian Riedel. 2019
3,230 citations recorded by the source corpus.
Recent progress in pretraining language models on large textual corpora led to a surge of improvements for downstream NLP tasks. Whilst learning linguistic knowledge, these models may also be storing relational knowledge present in the training data, and may be able to answer queries structured as “fill-in-the-blank” cloze statements. Language models have many advantages over structured knowledge bases: they require no schema engineering, allow practitioners to query about an open class of relations, are easy to extend to more data, and require no human supervision to train. We present an in-depth analysis of the relational knowledge already present (without fine-tuning) in a wide range of state-of-the-art pretrained language models. We find that (i) without fine-tuning, BERT contains relational knowledge competitive with traditional NLP methods that have some access to oracle knowledge, (ii) BERT also does remarkably well on open-domain question answering against a supervised baseline, and (iii) certain types of factual knowledge are learned much more readily than others by standard language model pretraining approaches. The surprisingly strong ability of these models to recall factual knowledge without any fine-tuning demonstrates their potential as unsupervised open-domain QA systems. The code to reproduce our analysis is available at https://github.com/facebookresearch/LAMA.
Subfields: Artificial Intelligence, Management Science and Operations Research, Large Language Models
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Mohit Bansal
- Luke S. Zettlemoyer
- Yejin Choi
- Jianfeng Gao
- Percy Liang
- Hannaneh Hajishirzi
- Noah A. Smith
- Graham Neubig
In Management Science and Operations Research
- Hinrich Schütze
- Jonathan Berant
- Timo Schick
- Chelsea Finn
- Nora Kassner
- Minlie Huang
- Sergey Levine
- Yejin Choi
In Large Language Models
- Luke S. Zettlemoyer
- Hinrich Schütze
- Yejin Choi
- Timo Schick
- Mohit Bansal
- Hannaneh Hajishirzi
- Furu Wei
- Jonathan Berant
Citations in the corpus
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (2020, background): “Pre-trained neural language models have been shown to learn a substantial amount of in-depth knowledge from data [41].”
- Leveraging Passage Retrieval with Generative Models for Open Domain Question Answering (2020, background): “Recently, several works have shown that factual information can be extracted from large scale language models trained on vast quantities of data (Radford et al., 2019; Petroni et al., 2019; Jiang et al., 2019; Talmor et al., 2019).”
- REALM: Retrieval-Augmented Language Model Pre-Training (2020, background): “…modeling objective backpropagates all the way through the retriever, which must consider millions of documents in Z—a significant computational challenge that we address. store a surprising amount of world knowledge, acquired from the massive text corpora they are trained on (Petroni et al., 2019).”
- Toolformer: Language Models Can Teach Themselves to Use Tools (2023, methodology): “The effect of these modifications is explored in Appendix E. LAMA We evaluate our models on the SQuAD, Google-RE and T-REx subsets of the LAMA benchmark (Petroni et al., 2019).”
- How Much Knowledge Can You Pack into the Parameters of a Language Model? (2020, background): “Relatedly, Petroni et al. (2019) show that it is possible to manually convert some questions to a fill-in-the-blank format amenable to an encoder-only model (e.g. “Who developed the theory of relativity?” gets mapped to “The theory of relativity was developed by ”).”
- Exploiting Cloze-Questions for Few-Shot Text Classification and Natural Language Inference (2020, background): “Probing tasks include analyzing factual and commonsense knowledge (Petroni et al., 2019), probing the understanding of rare words (Schick and Sch¨utze, 2019), and investigating a language model’s ability to perform symbolic reasoning (Talmor et al., 2019).”
- Measuring Massive Multitask Language Understanding (2020, background): “Petroni et al. (2019) found that recent models learn enough information from pretraining that they can serve as knowledge bases.”
- Deduplicating Training Data Mitigates Privacy Risks in Language Models (2022, methodology): “Prior work using LMs for closed-book question answering shows that deduplication is not universally beneficial, as memorization of facts from the training data can be necessary for certain tasks (Petroni et al., 2019; Roberts et al., 2020).”
- OPT: Open Pre-trained Transformer Language Models (2022, background): “More recently, prompting or masked infilling has been used to probe models for knowledge (Petroni et al., 2019) or perform a variety of NLP tasks (Radford et al., 2019; Brown et al., 2020).”
- Open-Domain Conversational Agents: Current Progress, Open Problems, and Future Directions (2020, methodology): “…training, methods like BERT (Devlin et al., 2019) do train over Wikipedia and hence can be shown to condense knowledge bases into their weights (Petroni et al., 2019) we contend that this is not the same as reading sentences and learning a compressed, indexable knowledge base (a memory) that…”
- Entities as Experts: Sparse Memory Access with Entity Supervision (2020, methodology): “However, the LAMA sub-task accuracies show that the two models are actually performing very differently.”
- How Context Affects Language Models' Factual Predictions (2020, methodology): “We use the LAMA 2 probe in our experiments [Petroni et al., 2019], a collection of cloze-style questions about real world relational facts with a single token answer.”
- How Decoding Strategies Affect the Verifiability of Generated Text (2019, background): “†Equal contribution. matical correctness of text decoded from modern LMs. Additionally, recent works (Petroni et al., 2019; Logan et al., 2019; Broscheit, 2019; Roberts et al., 2020) demonstrate that beyond general linguistic capabilities, language models can also pick up factual knowledge present…”
- Autoregressive Search Engines: Generating Substrings as Document Identifiers (2022, background): “Some works have demonstrated that knowledge stored in the parameters of these models can be retrieved to some extend by directly generating evidence given a query (Petroni et al., 2019, 2020; Roberts et al., 2020).”
- You Only Need One Model for Open-domain Question Answering (2021, background): “…two new * Work done while at Samsung Research lines of approach; 1) referring to internal knowledge parameterized in the model (Brown et al., 2020; Petroni et al., 2019; Roberts et al., 2020), and 2) referring to external knowledge retrieved by matching query and knowledge in dense representation…”
- Time-Aware Language Models as Temporal Knowledge Bases (2021, background): “Petroni et al. (2019) introduced the LAMA benchmark for probing the factual knowledge mem-orized by LMs, which consists of cloze queries about facts, e.g. “Dante was born in __X__”.”