How Can We Know What Language Models Know?
Written for the Research library (claude-opus-5-5) from the paper text. Original — aclanthology.org/2020.tacl-1.28.pdf
Summary
Factual probing of masked language models usually relies on a single cloze template written by hand. If the model learned a fact from text phrased differently, that template can miss it, so reported scores only give a lower bound on what the model knows. The authors try to raise this bound by generating query templates automatically. They use two approaches. The first mines Wikipedia sentences that contain known subject–object pairs and takes either the words between the two entities or the shortest dependency path linking them. The second rewrites a seed template through back-translation. Templates are ranked on a small training set, and their predictions are combined with a simple top-K average or with learned weights. On the T-REx part of the LAMA benchmark, these templates noticeably improve fact retrieval for BERT-base and BERT-large. This suggests the models hold more relational knowledge than earlier probes showed, and that the results depend heavily on wording. The prompts are released as LPAQA.
Key points
- With BERT-base on LAMA, the best single automatically found prompt raises accuracy from 31.1% to 34.1%, and ensembling several prompts reaches 39.6%.
- Mined prompts come in two kinds, middle-word and dependency-based, extracted from Wikipedia using distant supervision. Paraphrases are produced by round-trip translation and ranked by their round-trip probability.
- Hill-climbing refinement of individual prompt tokens raises oracle accuracy but slightly lowers ensemble accuracy, which suggests overfitting to T-REx-train.
- Adding backward probability, P(subject | object), barely changes results: 38.1 vs. 38.2 macro for mined prompts.
- The code and the LM Prompt And Query Archive (LPAQA) are available at github.com/jzbjyb/LPAQA.
Cited by
- In-context Examples Selection for Machine Translation
- On the Opportunities and Risks of Foundation Models
- RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learning
- Making Pre-trained Language Models Better Few-shot Learners
- Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space
- CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquing
- PPT: Pre-trained Prompt Tuning for Few-shot Learning
- Surface Form Competition: Why the Highest Probability Answer Isn't Always Right
- Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agents
- Leveraging Passage Retrieval with Generative Models for Open Domain Question Answering
- CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society
- GPT Understands, Too
- Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- Augmented Language Models: a Survey
- Noisy Channel Language Model Prompting for Few-Shot Text Classification
- Unifying Large Language Models and Knowledge Graphs: A Roadmap
- True Few-Shot Learning with Language Models
- How Context Affects Language Models' Factual Predictions
- Reasoning with Language Model Prompting: A Survey
- Learning How to Ask: Querying LMs with Mixtures of Soft Prompts
- Pre-trained Models for Natural Language Processing: A Survey
- Whose Opinions Do Language Models Reflect?
- RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval
- How many data points is a prompt worth?
- Exploiting Cloze-Questions for Few-Shot Text Classification and Natural Language Inference
- Generating Datasets with Pretrained Language Models
- It's Not Just Size That Matters: Small Language Models Are Also Few-Shot Learners
- Self-Diagnosis and Self-Debiasing: A Proposal for Reducing Corpus-Based Bias in NLP
- Toolformer: Language Models Can Teach Themselves to Use Tools
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
- Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language models
- oLMpics -- On what Language Model Pre-training Captures
- Information-Theoretic Probing with Minimum Description Length
- SPoT: Better Frozen Model Adaptation through Soft Prompt Transfer
- The Rise and Potential of Large Language Model Based Agents: A Survey
- An Explanation of In-context Learning as Implicit Bayesian Inference
- Adaptive Chameleon or Stubborn Sloth: Revealing the Behavior of Large Language Models in Knowledge Conflicts
- ZeroGen: Efficient Zero-shot Learning via Dataset Generation
- GPT3Mix: Leveraging Large-scale Language Models for Text Augmentation
- BARTScore: Evaluating Generated Text as Text Generation
- Calibrate Before Use: Improving Few-Shot Performance of Language Models
- A Survey of Large Language Models
- Factual Probing Is [MASK]: Learning vs. Learning to Recall
- Large Language Models Are Human-Level Prompt Engineers
Cite
@misc{jiang2020how,
title = {{How Can We Know What Language Models Know?}},
author = {Jiang, Zhengbao and Xu, Frank F. and Araki, Jun and Neubig, Graham},
year = {2020},
doi = {10.1162/tacl\_a\_00324},
eprint = {1911.12543},
archivePrefix = {arXiv},
url = {https://doi.org/10.1162/tacl_a_00324}
}References
- Eugene Agichtein and Luis Gravano. 2000. Snowball: Extracting relations from large plaintext collections. In Proceedings of the Fifth ACM Conference on Digital Libraries, June 2-7, 2000, San Antonio, TX, USA, pages 85–94. ACM. find
- Sungjin Ahn, Heeyoul Choi, Tanel Pärnamaa, and Yoshua Bengio. 2016. A neural knowledge language model. CoRR, abs/1608.00318v2. find
- Livio Baldini Soares, Nicholas FitzGerald, Jeffrey Ling, and Tom Kwiatkowski. 2019. Matching the blanks: Distributional similarity for relation learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2895–2905, Florence, Italy. Association for Comp… find
- Michele Banko, Michael J. Cafarella, Stephen Soderland, Matthew Broadhead, and Oren Etzioni. 2007. Open information extraction from the web. In IJCAI 2007, Proceedings of the 20th International Joint Conference on Artificial Intelligence, Hyderabad, India, January 6-12, 2007, pages 2670–2676. find our card
- Yonatan Belinkov, Nadir Durrani, Fahim Dalvi, Hassan Sajjad, and James Glass. 2017. What do neural machine translation models learn about morphology? In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 861–872, Vancouver, Canada.… find our card
- Yonatan Belinkov and James R. Glass. 2019. Analysis methods in neural language processing: A survey. Transactions of the Association for Computational Linguistics, 7:49–72. find our card
- Rahul Bhagat and Deepak Ravichandran. 2008. Large scale acquisition of paraphrases for learning surface patterns. In Proceedings This work was supported by a gift from Bosch Research and NSF award no. 1815287. We would like to thank Paul Michel, Hiroaki Hayashi, of ACL-08: HLT, pages 674–682, Columb… find
- Zied Bouraoui, Jose Camacho-Collados, and Steven Schockaert. 2020. Inducing relational knowledge from BERT. In Thirty-Fourth AAAI Conference on Artificial Intelligence (AAAI), New York, USA. find
- Michael Gamon, Anthony Aue, and Martine Smets. 2005. Sentence-level MT evaluation without reference translations: Beyond language modeling. In Proceedings of EAMT, pages 103–111. find
- Claudio Carpineto and Giovanni Romano. 2012. A survey of automatic query expansion in information retrieval. ACM, Computing Surveys, 44(1):1:1–1:50. find
- Marjan Ghazvininejad, Omer Levy, Yinhan Liu, and Luke Zettlemoyer. 2019. Mask-predict: Parallel decoding of conditional masked language models. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Pro… find our card
- Andrew M. Dai and Quoc V. Le. 2015. Semi-supervised sequence learning. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 3079–3087. find
- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies,… find
- Yoav Goldberg. 2019. Assessing BERT’s syntactic abilities. CoRR, abs/1901.05287v1. find our card
- Hiroaki Hayashi, Zecong Hu, Chenyan Xiong, and Graham Neubig. 2020. Latent relation language models. In Thirty-Fourth AAAI Conference on Artificial Intelligence (AAAI), New York, USA. find
- Javid Ebrahimi, Anyi Rao, Daniel Lowd, and Dejing Dou. 2018. HotFlip: White-box adversarial examples for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 31–36, Melbourne, Australia, Association for Comput… find our card
- John Hewitt and Christopher D. Manning. 2019. A structural probe for finding syntax in word representations. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2… find our card
- Hady ElSahar, Pavlos Vougiouklis, Arslen Remaci, Christophe Gravier, Jonathon S. Hare, Frédérique Laforest, and Elena Simperl. 2018. T-REx: A large scale alignment of natural language with knowledge base triples. In Proceedings of the Eleventh International Conference on Language Resources and Eva… find
- Cong Duy Vu Hoang, Gholamreza Haffari, and Trevor Cohn. 2017. Towards decoding as continuous optimisation in neural machine translation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 146–156, Copenhagen, Denmark. Association for Computational Lingui… find
- Anthony Fader, Stephen Soderland, and Oren Etzioni. 2011. Identifying relations for open Robert L. Logan IV, Nelson F. Liu, Matthew E. Peters, Matt Gardner, and Sameer Singh. 2019. Barack’s wife Hillary: Using knowledge graphs for fact-aware language modeling. In Proceedings of the 57th Conference o… find
- Oren Melamud, Jacob Goldberger, and Ido Dagan. 2016. context2vec: Learning generic context embedding with bidirectional LSTM. In Proceedings of the 20th SIGNLL Conference on Computational Natural Language Learning, CoNLL 2016, Berlin, Germany, August 11-12, 2016, pages 51–61. find our card
- Ganesh Jawahar, Benoı̂t Sagot, and Djamé Seddah. 2019. What does BERT learn about the structure of language? In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pages 3651–3657. find our card
- Gábor Melis, Chris Dyer, and Phil Blunsom. 2018. On the state of the art of evaluation in neural language models. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. find
- Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings. find
- Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan. 2016a. A diversity-promoting objective function for neural conversation models. In NAACL HLT 2016, The 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, S… find our card
- Stephen Merity, Nitish Shirish Keskar, and Richard Socher. 2018. Regularizing and optimizing LSTM language models. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. find our card
- Tomas Mikolov and Geoffrey Zweig. 2012. Context dependent recurrent neural network language model. In 2012 IEEE Spoken Language Technology Workshop (SLT), pages 234–239. IEEE. find
- Jiwei Li, Will Monroe, and Dan Jurafsky. 2016b. Understanding neural networks through representation erasure. CoRR, abs/1612.08220v3. — [arXiv:1612.08220](https://arxiv.org/abs/1612.08220) find
- Tal Linzen, Emmanuel Dupoux, and Yoav Goldberg. 2016. Assessing the ability of LSTMs to learn syntax-sensitive dependencies. Transactions of the Association for Computational Linguistics, 4:521–535. find our card
- Jonathan Mallinson, Rico Sennrich, and Mirella Lapata. 2017. Paraphrasing revisited with neural machine translation. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, pages 881–893, Valencia, Spain. Association for… find
- Nathan Ng, Kyra Yee, Alexei Baevski, Myle Ott, Michael Auli, and Sergey Edunov. 2019. Facebook FAIR’s WMT19 news translation task submission. In Proceedings of the Fourth Conference on Machine Translation, WMT 2019, Florence, Italy, August 1-2, 2019 -Volume 2: Shared Task Papers, Day 1, pages 314–31… find our card
- Matthew E. Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Techno… find
- Matthew E. Peters, Mark Neumann, Robert Logan, Roy Schwartz, Vidur Joshi, Sameer Singh, and Noah A. Smith. 2019. Knowledge enhanced contextual word representations. In Proceedings of the 2019 Conference Bryan McCann, Nitish Shirish Keskar, Caiming Xiong, and Richard Socher. 2018. The natural languag… find our card
- Maarten Sap, Ronan Le Bras, Emily Allaway, Chandra Bhagavatula, Nicholas Lourie, Hannah Rashkin, Brendan Roof, Noah A. Smith, and Yejin Choi. 2019. Atomic: An atlas of machine commonsense for if-then reasoning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 3027–3… find
- Fabio Petroni, Tim Rocktäschel, Sebastian Riedel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander Miller. 2019. Language models as knowledge bases? In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural… find our card
- Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Improving neural machine translation models with monolingual data. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers. find
- Xing Shi, Inkit Padhi, and Kevin Knight. 2016. Does string-based neural MT learn source syntax? In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1526–1534, Austin, Texas. Association for Computational Linguistics. find our card
- Nina Pörner, Ulli Waltinger, and Hinrich Schütze. 2019. BERT is not a knowledge base (yet): Factual knowledge vs. Name-based reasoning in unsupervised QA. CoRR, abs/1911.03681v1. find
- Noah A. Smith, Chris Dyer, Miguel Ballesteros, Graham Neubig, Lingpeng Kong, and Adhiguna Kuncoro. 2017. What do recurrent neural network grammars learn about syntax? In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2017, Valencia,… find
- Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI Blog, 1(8). find
- Nazneen Fatema Rajani, Bryan McCann, Caiming Xiong, and Richard Socher. 2019. Explain yourself! Leveraging language models for commonsense reasoning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4932–4942, Florence, Italy. Association for Computat… find our card
- Ian Tenney, Dipanjan Das, and Ellie Pavlick. 2019a. BERT rediscovers the classical NLP pipeline. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pages 4593–4601. find our card
- Deepak Ravichandran and Eduard Hovy. 2002. Learning surface text patterns for a question answering system. In Proceedings of the 40th annual meeting on association for computational linguistics, pages 41–47. Association for Computational Linguistics. find
- Lorenza Romano, Milen Kouylekov, Idan Szpektor, Ido Dagan, and Alberto Lavelli. 2006. Investigating a generic paraphrase-based approach for relation extraction. In 11th Conference of the European Chapter of the Association for Computational Linguistics, Trento, Italy. Association for Computational L… find
- Ian Tenney, Patrick Xia, Berlin Chen, Alex Wang, Adam Poliak, R. Thomas McCoy, Najoung Kim, Benjamin Van Durme, Samuel R. Bowman, Dipanjan Das, and Ellie Pavlick. 2019b. What do you learn from context? Probing for sentence structure in contextualized word representations. In 7th International Confer… find our card
- Kristina Toutanova, Danqi Chen, Patrick Pantel, Hoifung Poon, Pallavi Choudhury, and Michael Zichao Yang, Phil Blunsom, Chris Dyer, and Wang Ling. 2017. Reference-aware language models. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen,… find
- Gamon. 2015. Representing text for joint embedding of text and knowledge bases. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, EMNLP 2015, Lisbon, Portugal, September 17-21, 2015, pages 1499–1509. find
- Trieu H. Trinh and Quoc V. Le. 2018. A simple method for commonsense reasoning. CoRR, abs/1806.02847v2. find
- Zhengyan Zhang, Xu Han, Zhiyuan Liu, Xin Jiang, Maosong Sun, and Qun Liu. 2019. ERNIE: Enhanced language representation with informative entities. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Lon… find
- Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. 2019. Universal adversarial triggers for attacking and analyzing NLP. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Proce… find
- Geoffrey Zweig and Christopher J. C. Burges. 2011. The Microsoft Research sentence completion challenge. Microsoft Research, Redmond, WA, USA, Technical Report MSR-TR-2011-129. find