AutoPrompt

Automatic Prompt Construction for Masked Language Models

Run AutoPrompt Yourself

Source Code

Read the Paper

Download PDF

Welcome to the webpage for AutoPrompt, an automated prompt discovery algorithm to get langauge models to do what you want..

The remarkable success of pretrained language models has motivated the study of what kinds of knowledge these models learn during pretraining. Reformulating tasks as fill-in-the-blanks problems (e.g., cloze tests) is a natural approach for gauging such knowledge, however, its usage is limited by the manual effort and guesswork required to write suitable prompts. To address this, we develop AutoPrompt, an automated method to create prompts for a diverse set of tasks, based on a gradient-guided search. Using AutoPrompt, we show that masked language models (MLMs) have an inherent capability to perform sentiment analysis and natural language inference without additional parameters or finetuning, sometimes achieving performance on par with recent state-of-the-art supervised models. We also show that our prompts elicit more accurate factual knowledge from MLMs than the manually created prompts on the LAMA benchmark, and that MLMs can be used as relation extractors more effectively than supervised relation extraction models. These results demonstrate that automatically generated prompts are a viable parameter-free alternative to existing probing methods, and as pretrained LMs become more sophisticated and capable, potentially a replacement for finetuning.

Paper

We published the paper at the Empirical Methods in Natural Language Processing (EMNLP).

@inproceedings{autoprompt:emnlp20,
  author = {Taylor Shin and Yasaman Razeghi and Robert L. Logan IV and Eric Wallace and Sameer Singh},
  title = { {AutoPrompt}: Eliciting Knowledge from Language Models with Automatically Generated Prompts },
  booktitle = {Empirical Methods in Natural Language Processing (EMNLP)},
  year = {2020}
}

Authors

Taylor Shin

Taylor Shin

University of California, Irvine

Yasaman Razeghi

Yasaman Razeghi

University of California, Irvine

Robert L. Logan IV

Robert L. Logan IV

University of California, Irvine

Eric Wallace

Eric Wallace

University of California, Berkeley

Sameer Singh

Sameer Singh

University of California, Irvine