Elamur Research
☰
home / papers / 2020 / AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts

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.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Natural language processing

Cited by

645 papers of our library cite it (of the 140673 whose bibliographies we read); 46 of them have a page here, 599 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2020.emnlp-main.346 · arXiv 2010.15980

@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

29 references, 10 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Zied Bouraoui, Jose Camacho-Collados, and Steven Schockaert. 2019. Inducing relational knowledge from BERT. In AAAI. find
  2. Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. 2015. A large annotated corpus for learning natural language inference. In EMNLP. find
  3. 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
  4. 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
  5. Ido Dagan, Oren Glickman, and Bernardo Magnini. 2005. The PASCAL recognising textual entailment challenge. In Machine Learning Challenges Workshop. find
  6. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: pre-training of deep bidirectional transformers for language understanding. In NAACL. find
  7. 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
  8. 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
  9. John Hewitt and Percy Liang. 2019. Designing and interpreting probes with control tasks. In EMNLP. find
  10. Shankar Iyer, Nikhil Dandekar, and Kornel Csernai. 2017. First quora dataset release: Question pairs. find
  11. Sarthak Jain and Byron C Wallace. 2019. Attention is not explanation. In NAACL. find our card
  12. Zhengbao Jiang, Frank F Xu, Jun Araki, and Graham Neubig. 2020. How can we know what language models know? In TACL. find our card
  13. 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
  14. Patrick Lewis, Ludovic Denoyer, and Sebastian Riedel. 2019. Unsupervised question answering by cloze translation. In ACL. find
  15. 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
  16. 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
  17. Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. Technical report. find
  18. 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
  19. 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
  20. 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
  21. Daniil Sorokin and Iryna Gurevych. 2017. Context-aware representations for knowledge base relation extraction. In EMNLP. find
  22. Trieu H Trinh and Quoc V Le. 2018. A simple method for commonsense reasoning. arXiv preprint arXiv:1806.02847. find
  23. Elena Voita and Ivan Titov. 2020. Information-theoretic probing with minimum description length. In EMNLP. find our card
  24. Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. 2019. Universal adversarial triggers for attacking and analyzing NLP. In EMNLP. find
  25. 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
  26. Sarah Wiegreffe and Yuval Pinter. 2019. Attention is not not explanation. In EMNLP. find our card
  27. 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
  28. Matthew E. Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word representations. In NAACL. find
  29. 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