AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
Written for the Research library (claude-opus-5-5) from the paper text. Original — aclanthology.org/2020.emnlp-main.346.pdf
Summary
Pretrained masked language models (MLMs) pick up a lot of knowledge, but measuring it is hard. Probing classifiers add trainable parameters, so their results can mislead. Hand-written cloze prompts take a lot of effort, and small changes in wording swing the results. The authors present AutoPrompt, which builds prompts for any task automatically. A template places each input next to a set of "trigger" tokens and a [MASK] slot, and every example uses the same triggers. A gradient-guided search over the vocabulary picks the triggers that most raise the likelihood of the correct label. For abstract classes such as NLI, a logistic classifier on the [MASK] representation also selects the label words. With no finetuning, prompted BERT and RoBERTa do well on sentiment analysis and NLI. They also recall facts on LAMA better than manual or corpus-mined prompts, and they outperform a supervised relation extraction model. This makes automatic prompting a parameter-free way to probe models. It could also be a lighter alternative to finetuning when data is scarce or when one model serves many tasks.
Key points
- RoBERTa with AutoPrompt prompts reaches about 91% accuracy on SST-2, which beats a finetuned ELMo. It reaches about 69% on a balanced version of SICK-E. With little training data, prompting beats finetuning on both average and worst-case accuracy.
- On the LAMA fact-retrieval tasks, AutoPrompt gets 43.3% precision-at-1. The best earlier single-prompt result (LPAQA, Jiang et al. 2020) was 34.1%.
- In a relation extraction setup, BERT with AutoPrompt scores 90.73 P@1, while a supervised LSTM RE model scores 57.95. When the test facts are deliberately falsified, BERT drops to 56.43. This suggests the MLMs rely mostly on facts they already know rather than reading them from the context.
- The method has limits. It needs labeled data, the triggers it finds are hard to interpret, and it struggles with imbalanced labels. On QQP and RTE, both manual and AutoPrompt prompts scored close to chance.
- Code and data are available at ucinlp.github.io/autoprompt.
Cited by
- Detecting Language Model Attacks with Perplexity
- Refusal in Language Models Is Mediated by a Single Direction
- PromptSource: An Integrated Development Environment and Repository for Natural Language Prompts
- Knowledge-Augmented Language Model Prompting for Zero-Shot Knowledge Graph Question Answering
- On the Opportunities and Risks of Foundation Models
- Extracting Training Data from Large Language Models
- Jailbreaking Black Box Large Language Models in Twenty Queries
- RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learning
- Complexity-Based Prompting for Multi-Step Reasoning
- PPT: Pre-trained Prompt Tuning for Few-shot Learning
- Surface Form Competition: Why the Highest Probability Answer Isn't Always Right
- Not All Languages Are Created Equal in LLMs: Improving Multilingual Capability by Cross-Lingual-Thought Prompting
- Catastrophic Jailbreak of Open-source LLMs via Exploiting Generation
- Baseline Defenses for Adversarial Attacks Against Aligned Language Models
- CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society
- 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
- Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learning
- P-Tuning: Prompt Tuning Can Be Comparable to Fine-tuning Across Scales and Tasks
- What Makes Good In-Context Examples for GPT-3?
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal
- Noisy Channel Language Model Prompting for Few-Shot Text Classification
- Recent Advances in Natural Language Processing via Large Pre-Trained Language Models: A Survey
- Unifying Large Language Models and Knowledge Graphs: A Roadmap
- True Few-Shot Learning with Language Models
- Automatic Prompt Optimization with ``Gradient Descent'' and Beam Search
- Learning How to Ask: Querying LMs with Mixtures of Soft Prompts
- Pre-trained Models for Natural Language Processing: A Survey
- SmoothLLM: Defending Large Language Models Against Jailbreaking Attacks
- Learning To Retrieve Prompts for In-Context Learning
- Language Models are Multilingual Chain-of-Thought Reasoners
- Steering Language Models With Activation Engineering
- SPoT: Better Frozen Model Adaptation through Soft Prompt Transfer
- DecodingTrust: A Comprehensive Assessment of Trustworthiness in GPT Models
- Do Prompt-Based Models Really Understand the Meaning of Their Prompts?
- Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrations
- A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT
- Large Language Models as Optimizers
- 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
- Universal and Transferable Adversarial Attacks on Aligned Language Models
Cite
@inproceedings{shin2020autoprompt,
title = {{AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts}},
author = {Shin, Taylor and Razeghi, Yasaman and IV, Robert L. Logan and Wallace, Eric and Singh, Sameer},
booktitle = {Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
year = {2020},
doi = {10.18653/v1/2020.emnlp-main.346},
eprint = {2010.15980},
archivePrefix = {arXiv},
url = {https://doi.org/10.18653/v1/2020.emnlp-main.346}
}References
- Zied Bouraoui, Jose Camacho-Collados, and Steven Schockaert. 2019. Inducing relational knowledge from BERT. In AAAI. find
- Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. 2015. A large annotated corpus for learning natural language inference. In EMNLP. find
- 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
- Alexis Conneau, Germán Kruszewski, Guillaume Lample, Loı̈c Barrault, and Marco Baroni. 2018. What you can cram into a single vector: Probing sentence embeddings for linguistic properties. In ACL. find our card
- Ido Dagan, Oren Glickman, and Bernardo Magnini. 2005. The PASCAL recognising textual entailment challenge. In Machine Learning Challenges Workshop. find
- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: pre-training of deep bidirectional transformers for language understanding. In NAACL. find
- Jesse Dodge, Gabriel Ilharco, Roy Schwartz, Ali Farhadi, Hannaneh Hajishirzi, and Noah Smith. 2020. Fine-tuning pretrained language models: Weight initializations, data orders, and early stopping. arXiv preprint arXiv:2002.06305. find
- 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 LREC. find
- John Hewitt and Percy Liang. 2019. Designing and interpreting probes with control tasks. In EMNLP. find
- Shankar Iyer, Nikhil Dandekar, and Kornel Csernai. 2017. First quora dataset release: Question pairs. find
- Sarthak Jain and Byron C Wallace. 2019. Attention is not explanation. In NAACL. find our card
- Zhengbao Jiang, Frank F Xu, Jun Araki, and Graham Neubig. 2020. How can we know what language models know? In TACL. find our card
- Sunjae Kwon, Cheongwoong Kang, Jiyeon Han, and Jaesik Choi. 2019. Why do masked neural language models still need common sense knowledge? arXiv preprint arXiv:1911.03024. — [arXiv:1911.03024](https://arxiv.org/abs/1911.03024) find
- Patrick Lewis, Ludovic Denoyer, and Sebastian Riedel. 2019. Unsupervised question answering by cloze translation. In ACL. find
- Nelson F Liu, Matt Gardner, Yonatan Belinkov, Matthew Peters, and Noah A Smith. 2019. Linguistic knowledge and transferability of contextual representations. In NAACL. find our card
- Marco Marelli, Stefano Menini, Marco Baroni, Luisa Bentivogli, Raffaella Bernardi, Roberto Zamparelli, et al. 2014. A SICK cure for the evaluation of compositional distributional semantic models. In LREC. find
- Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. Technical report. find
- Timo Schick and Hinrich Schütze. 2020. Exploiting cloze questions for few-shot text classification and natural language inference. arXiv preprint arXiv:2001.07676. find our card
- Vered Shwartz, Peter West, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. 2020. Unsupervised commonsense question answering with self-talk. arXiv preprint arXiv:2004.05483. find
- Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP. find
- Daniil Sorokin and Iryna Gurevych. 2017. Context-aware representations for knowledge base relation extraction. In EMNLP. find
- Trieu H Trinh and Quoc V Le. 2018. A simple method for commonsense reasoning. arXiv preprint arXiv:1806.02847. find
- Elena Voita and Ivan Titov. 2020. Information-theoretic probing with minimum description length. In EMNLP. find our card
- Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. 2019. Universal adversarial triggers for attacking and analyzing NLP. In EMNLP. find
- Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. 2019. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In ICLR. find our card
- Sarah Wiegreffe and Yuval Pinter. 2019. Attention is not not explanation. In EMNLP. find our card
- Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pier-ric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lh… 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 NAACL. find
- Fabio Petroni, Tim Rocktäschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H Miller, and Sebastian Riedel. 2019. Language models as knowledge bases? In EMNLP. find our card