How Context Affects Language Models' Factual Predictions
Open accessThe DOI matches its DataCite record; 49 of the 49 references it cites were found in a registry or an index.
Abstract
When pre-trained on large unsupervised textual corpora, language models are able to store and retrieve factual knowledge to some extent, making it possible to use them directly for zero-shot cloze-style question answering. However, storing factual knowledge in a fixed number of weights of a language model clearly has limitations. Previous approaches have successfully provided access to information outside the model weights using supervised architectures that combine an information retrieval system with a machine reading component. In this paper, we go a step further and integrate information from a retrieval system with a pre-trained language model in a purely unsupervised way. We report that augmenting pre-trained language models in this way dramatically improves performance and that the resulting system, despite being unsupervised, is competitive with a supervised machine reading baseline. Furthermore, processing query and context with different segment tokens allows BERT to utilize its Next Sentence Prediction pre-trained classifier to determine whether the context is relevant or not, substantially improving BERT's zero-shot cloze-style question-answering performance and making its predictions robust to noisy contexts.
Overview
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“a method that has also been shown to be effective in prompt-based learning [99].”
From Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing (2023) · cites this paper as [99]
Citations
Cites
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019) · Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) · doi:10.18653/v1/n19-1423 · Cited by 54,325 · cited 9×
“Among the constellation of language models that have been proposed in recent years we consider BERT [Devlin et al., 2019] since it is one of the post popular and widely used at the time of writing.4 Moreover, the large cased version of the BERT model is the best performing LM on the LAMA probe among those considered i…”
BackgroundMethodInfluentialRoBERTa: A Robustly Optimized BERT Pretraining Approach
Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., & Stoyanov, V. (2019) · arXiv · doi:10.48550/arxiv.1907.11692 · Cited by 16,515 · cited 5×
“For the generative case, taking inspiration from the study of Massarelli et al. [2019], we consider a 1.4B parameters autoregressive language model trained on CC-NEWS [Liu et al., 2019].”
BackgroundMethodInfluentialExploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer
Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., & Liu, P. J. (2019) · arXiv · doi:10.48550/arxiv.1910.10683 · Cited by 10,929 · cited 1×
“Language Models and Probes With the recent success of pre-trained language models like BERT [Devlin et al., 2019] and its variants [Liu et al., 2019, Seo et al., 2019, Raffel et al., 2019, Lewis et al., 2019a], it becomes increasingly important to understand what these models learn.”
MethodLewis, M., Liu, Y., Goyal, N., Ghazvininejad, M., Mohamed, A., Levy, O., Stoyanov, V., & Zettlemoyer, L. (2020) · Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/2020.acl-main.703 · Cited by 8,821 · cited 1×
“Language Models and Probes With the recent success of pre-trained language models like BERT [Devlin et al., 2019] and its variants [Liu et al., 2019, Seo et al., 2019, Raffel et al., 2019, Lewis et al., 2019a], it becomes increasingly important to understand what these models learn.”
MethodXLNet: Generalized Autoregressive Pretraining for Language Understanding
Yang, Z., Dai, Z., Yang, Y., Carbonell, J., Salakhutdinov, R., & Le, Q. V. (2019) · arXiv · doi:10.48550/arxiv.1906.08237 · Cited by 6,687 · cited 3×
“Pre-trained language models have also been fine-tuned and adapted to be used as information retrieval systems [Yang et al., 2019b, Yilmaz et al., 2019, Seo et al., 2019].”
BackgroundMethodSQuAD: 100,000+ Questions for Machine Comprehension of Text
Rajpurkar, P., Zhang, J., Lopyrev, K., & Liang, P. (2016) · Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/d16-1264 · Cited by 6,208 · cited 9×
“1 [Rajpurkar et al., 2016].”
BackgroundMethodInfluentialALBERT: A Lite BERT for Self-supervised Learning of Language Representations
Lan, Z., Chen, M., Goodman, S., Gimpel, K., Sharma, P., & Soricut, R. (2019) · arXiv · doi:10.48550/arxiv.1909.11942 · Cited by 4,308 · cited 1×
“Re-examining NSP The Next Sentence Prediction task has been extensively explored [Devlin et al., 2019, Liu et al., 2019, Yang et al., 2019c, Lan et al., 2019] with the apparent consensus that it is not helpful for downstream fine-tuning accuracy.”
BackgroundGLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding
Wang, A., Singh, A., Michael, J., Hill, F., Levy, O., & Bowman, S. (2018) · Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP · doi:10.18653/v1/w18-5446 · Cited by 4,222 · cited 3×
“…2017, Wang et al., 2018b,c, Lin et al., 2018, Min et al., 2018, Lee et al., 2018, 2019, Das et al., 2019, Xiong et al., 2019], improving answer aggregation [Clark and Gardner, 2018, Wang et al., 2018c, Lee et al., 2018, Pang et al., 2019], and accelerating the whole pipeline [Seo et al., 2019].”
BackgroundMethodLanguage Models as Knowledge Bases?
Petroni, F., Rocktäschel, T., Riedel, S., Lewis, P., Bakhtin, A., Wu, Y., & Miller, A. (2019) · Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) · doi:10.18653/v1/d19-1250 · Cited by 1,834 · cited 5×
“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.”
BackgroundMethodInfluentialReading Wikipedia to answer open-domain questions
Chen, D., Fisch, A., Weston, J., & Bordes, A. (2017) · Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/p17-1171 · Cited by 1,546 · cited 8×
“2 Baselines We consider DrQA [Chen et al., 2017], a popular system for open-domain question answering.”
BackgroundMethodInfluential
Cited by
Liu, P., Yuan, W., Fu, J., Jiang, Z., Hayashi, H., & Neubig, G. (2023) · ACM Computing Surveys · doi:10.1145/3560815 · Cited by 4,361
“Prompt augmentation is closely related to retrieval-based methods that provide more textual context to the model to improve performance [37], a method that has also been shown to be effective in prompt-based learning [99].”
BackgroundMethodLost in the Middle: How Language Models Use Long Contexts
Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., & Liang, P. (2024) · Transactions of the Association for Computational Linguistics · doi:10.1162/tacl_a_00638 · Cited by 1,612
Liu, P., Yuan, W., Fu, J., Jiang, Z., Hayashi, H., & Neubig, G. (2021) · arXiv · doi:10.48550/arxiv.2107.13586 · Cited by 4,352
Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
Lu, Y., Bartolo, M., Moore, A., Riedel, S., & Stenetorp, P. (2022) · Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/2022.acl-long.556 · Cited by 610
Abstraction Alignment: Comparing Model-Learned and Human-Encoded Conceptual Relationships
Boggust, A., Bang, H., Strobelt, H., & Satyanarayan, A. (2025) · CHI Conference on Human Factors in Computing Systems · doi:10.1145/3706598.3713406 · Cited by 17
“Following the benchmarking procedure in Huang et al. [63], we compare pretrained bert-base [34], bert-large [34], roberta-base [88], roberta-large [88], and gpt-2 [117] models from the LAMA benchmark [112, 113].”
Hang, T., Liu, S., Feng, J., Djigal, H., & Huang, J. (2025) · ACM Computing Surveys · doi:10.1145/3746281 · Cited by 11
“Traditional RE methods are categorized into supervised [160], semi-supervised [139], weakly-supervised [120], and unsupervised [116] approaches.”
Source-Aware Training Enables Knowledge Attribution in Language Models
Khalifa, M., Wadden, D., Strubell, E., Lee, H., Wang, L., Beltagy, I., & Peng, H. (2024) · arXiv · doi:10.48550/arxiv.2404.01019 · Cited by 1
ConceptFormer: Towards Graph-Native Grounding of Large Language Models via Latent Concept Injection
Barmettler, J., Bernstein, A., & Rossetto, L. (2026) · International World Wide Web Conference (WWW) · doi:10.1145/3774905.3794653
“By contrast, our datasets provide explicit structures that facilitate both knowledge injection and retrieval-based LLM evaluations, addressing key limitations of T-REx and its LAMA-based extensions [33, 34].”
ConceptFormer: Towards Efficient Use of Knowledge-Graph Embeddings in Large Language Models
Barmettler, J., Bernstein, A., & Rossetto, L. (2025) · arXiv · doi:10.48550/arxiv.2504.07624 · Cited by 3
“By contrast, our datasets provide explicit structures that facilitate both knowledge injection and retrieval-based LLM evaluations, addressing key limitations of T-REx and its LAMA-based extensions [33, 34].”
Metadata
- Authors
- Fabio Petroni, P. L.
- Venue
- Automated Knowledge Base Construction (AKBC)
- Publisher
- Automated Knowledge Base Construction (AKBC)
- Published
- 2020
- OpenAlex
- W6964124353
- Cited by
- 4
- References
- 49
- Citations by year
- 2026: 1 · 2025: 2 · 2022: 1
- FWCI
- 0.10
- Type
- journal article
- Language
- en
- Open access
- green
- doi.org
- Locations
- UC Irvine
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Multimodal Machine Learning Applications
- Keywords
- language models, context effects, factual knowledge, large language models, factual reasoning
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.