Factual Probing Is [MASK]: Learning vs. Learning to Recall
Written for the Research library (claude-opus-5-5) from the paper text. Original — aclanthology.org/2021.naacl-main.398.pdf
Summary
Factual probing tries to measure how much world knowledge a pre-trained language model like BERT stores, usually by having it fill cloze-style templates from the LAMA benchmark. Earlier studies read the resulting accuracy as a lower bound and tried to raise it by tuning prompts on additional Wikidata triples. Zhong, Friedman and Chen make two contributions.
First, they introduce OptiPrompt. Rather than searching over discrete vocabulary tokens, it learns real-valued input vectors for each relation and can start from the embeddings of a hand-written template. The method is cheap to train and beats AutoPrompt and LPAQA on the T-REx part of LAMA.
Second, they challenge the lower-bound reading. Wikidata training facts do not overlap with the test set, but they still contain distributional regularities such as dominant object classes and lexical cues. Prompt-search methods can exploit these, and optimized prompts even recover "facts" from a BERT with random weights. Using such controls, the authors split test items into easy and hard subsets. OptiPrompt leads on both.
The work shows that probing scores mix knowledge stored in the model with patterns learned from the probe's training data.
Key points
- With BERT-base-cased, OptiPrompt initialized from manual prompts reaches 48.6% top-1 accuracy on LAMA, compared with 42.2% for AutoPrompt (+6.4 points), 34.1% for LPAQA and 31.1% for the original manual LAMA prompts. On LAMA-UHN it rises from 31.3% to 38.4%.
- The evaluation uses the T-REx split: 41 Wikidata relation types with up to 1000 triples each, grouped into 1-1, N-1 and N-M relations. Objects are restricted to single tokens.
- Always predicting the majority class already gives 22.0% overall accuracy (23.8% on UHN), which shows how skewed the fact distribution is.
- The control experiments include a randomly initialized model. All data-driven prompt methods, OptiPrompt among them, learn from training-set regularities.
- OptiPrompt needs white-box gradient access to the model. The authors frame it as a tool for diagnosis rather than as a means of turning BERT into a knowledge base. Code is available at github.com/princeton-nlp/OptiPrompt.
Cited by
- Adapting Language Models to Compress Contexts
- Making Pre-trained Language Models Better Few-shot Learners
- PPT: Pre-trained Prompt Tuning for Few-shot Learning
- GPT Understands, Too
- P-Tuning v2: Prompt Tuning Can Be Comparable to Fine-tuning Universally Across Scales and Tasks
- Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing
- Noisy Channel Language Model Prompting for Few-Shot Text Classification
- Recent Advances in Natural Language Processing via Large Pre-Trained Language Models: A Survey
- True Few-Shot Learning with Language Models
- Pre-trained Models for Natural Language Processing: A Survey
- Learning To Retrieve Prompts for In-Context Learning
- Explainability for Large Language Models: A Survey
Cite
@inproceedings{zhong2021factual,
title = {{Factual Probing Is [MASK]: Learning vs. Learning to Recall}},
author = {Zhong, Zexuan and Friedman, Dan and Chen, Danqi},
booktitle = {Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies},
year = {2021},
doi = {10.18653/v1/2021.naacl-main.398},
url = {https://doi.org/10.18653/v1/2021.naacl-main.398}
}References
- Yonatan Belinkov, Nadir Durrani, Fahim Dalvi, Hassan Sajjad, and James Glass. 2017. What do neural machine translation models learn about morphology? In Association for Computational Linguistics (ACL), pages 861–872. find our card
- Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. arXiv preprint arXiv:2005.14165. find
- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In North American Chapter of the Association for Computational Linguistics (NAACL), pages 4171–4186. find
- Hady Elsahar, Pavlos Vougiouklis, Arslen Remaci, Christophe Gravier, Jonathon Hare, Frederique Laforest, and Elena Simperl. 2018. T-REx: A large scale alignment of natural language with knowledge base triples. In Eleventh International Conference on Language Resources and Evaluation (LREC). find
- Tianyu Gao, Adam Fisch, and Danqi Chen. 2020. Making pre-trained language models better few-shot learners. arXiv preprint arXiv:2012.15723. find our card
- Samuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi, and Noah A Smith. 2020. Realtoxicityprompts: Evaluating neural toxic degeneration in language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings, pages 3356–3369. find our card
- Robert Geirhos, Jörn-Henrik Jacobsen, Claudio Michaelis, Richard Zemel, Wieland Brendel, Matthias Bethge, and Felix A Wichmann. 2020. Shortcut learning in deep neural networks. arXiv preprint arXiv:2004.07780. find
- Adi Haviv, Jonathan Berant, and Amir Globerson. 2021. BERTese: Learning to speak to BERT. In European Chapter of the Association for Computational Linguistics (EACL). find
- John Hewitt and Percy Liang. 2019. Designing and interpreting probes with control tasks. In Empirical Methods in Natural Language Processing (EMNLP), pages 2733–2743. find
- Zhengbao Jiang, Frank F Xu, Jun Araki, and Graham Neubig. 2020. How can we know what language models know? Transactions of the Association of Computational Linguistics (TACL). find our card
- Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2019. ALBERT: A lite BERT for self-supervised learning of language representations. In International Conference on Learning Representations (ICLR). find
- Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. arXiv preprint arXiv:2101.00190. find
- Yongjie Lin, Yi Chern Tan, and Robert Frank. 2019. Open sesame: Getting inside bert’s linguistic knowledge. In Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 241–253. find our card
- Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. 2021. GPT understands, too. arXiv preprint arXiv:2103.10385. find our card
- Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. RoBERTa: A robustly optimized BERT pretraining approach. arXiv preprint arXiv:1907.11692. find
- Tom McCoy, Ellie Pavlick, and Tal Linzen. 2019. Right for the wrong reasons: Diagnosing syntactic heuristics in natural language inference. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3428–3448. find our card
- Moin Nadeem, Anna Bethke, and Siva Reddy. 2020. StereoSet: Measuring stereotypical bias in pre-trained language models. ArXiv, abs/2004.09456. find our card
- Fabio Petroni, Tim Rocktäschel, Sebastian Riedel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander Miller. 2019. Language models as knowledge bases? In Empirical Methods in Natural Language Processing (EMNLP), pages 2463–2473. find our card
- Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. 2019. Universal adversarial triggers for attacking and analyzing NLP. In Empirical Methods in Natural Language Processing and International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), page 2153–2162. find
- Tiago Pimentel, Josef Valvoda, Rowan Hall Maudslay, Ran Zmigrod, Adina Williams, and Ryan Cotterell. 2020. Information-theoretic probing for linguistic structure. In Association for Computational Linguistics (ACL), pages 4609–4622. find our card
- Thomas Wolf, Julien Chaumond, Lysandre Debut, Victor Sanh, Clement Delangue, Anthony Moi, Pier-ric Cistac, Morgan Funtowicz, Joe Davison, Sam Shleifer, et al. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Langu… find our card
- Nina Poerner, Ulli Waltinger, and Hinrich Schütze. 2019. BERT is not a knowledge base (yet): Factual knowledge vs. name-based reasoning in unsupervised qa. arXiv preprint arXiv:1911.03681. find
- Zining Zhu and Frank Rudzicz. 2020. An information theoretic view on selecting linguistic probes. In Empirical Methods in Natural Language Processing (EMNLP), pages 9251–9262. find
- Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100,000+ questions for machine comprehension of text. In Empirical Methods in Natural Language Processing (EMNLP), pages 2383–2392. find our card
- Anna Rogers, Olga Kovaleva, and Anna Rumshisky. 2020. A primer in bertology: What we know about how bert works. Transactions of the Association of Computational Linguistics (TACL), 8:842–866. find our card
- Timo Schick and Hinrich Schütze. 2020. It’s not just size that matters: Small language models are also few-shot learners. arXiv preprint arXiv:2009.07118. find our card
- Taylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace, and Sameer Singh. 2020. AutoPrompt: Automatic prompt construction for masked language models. In Empirical Methods in Natural Language Processing (EMNLP), pages 4222–4235. find
- Robyn Speer and Catherine Havasi. 2012. Representing general relational knowledge in conceptnet 5. In LREC, pages 3679–3686. find
- Saku Sugawara, Kentaro Inui, Satoshi Sekine, and Akiko Aizawa. 2018. What makes reading comprehension questions easier? In Empirical Methods in Natural Language Processing (EMNLP), pages 4208–4219. find
- Ian Tenney, Patrick Xia, Berlin Chen, Alex Wang, Adam Poliak, R Thomas McCoy, Najoung Kim, Benjamin Van Durme, Samuel Bowman, Dipanjan Das, et al. 2019. What do you learn from context? probing for sentence structure in contextualized word representations. In International Conference on Learning Repr… find our card
- Elena Voita and Ivan Titov. 2020. Information-theoretic probing with minimum description length. In Empirical Methods in Natural Language Processing (EMNLP), pages 183–196. find our card