Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts

Prompts searched automatically can elicit knowledge from masked language models

  • Problem Cloze prompts are a natural way to test what language models know, but writing them by hand takes effort and small wording changes shift results. Probing classifiers can also reflect what the probe learns instead of the model.
  • Method AutoPrompt searches for trigger tokens inside a fixed template, swapping in words that raise the correct label's likelihood. It picks label words with a logistic classifier over the model's output embeddings.
  • Results RoBERTa with AutoPrompt reached 91.4 on SST-2, against 85.2 for a manual prompt. On the original LAMA test set, 7-trigger prompts reached 43.34 precision-at-1.

Why hand-written prompts limit probing

Probing classifiers are small models trained on top of frozen representations, so their accuracy can reflect what the probe learns rather than what the language model already encodes. Attention visualization has a related weakness, because attention scores can correlate with a target without being the cause of it. Both approaches also handle poorly any knowledge that cannot be cast as token-level or sequence-level classification.

Prompting avoids extra parameters by recasting a task as a language modeling problem, for instance as a cloze completion of a knowledge base entry. The weak point is that the context fed to the model has to be written by hand, which takes time and is hard to do for tasks such as textual entailment. Model output also depends strongly on that wording, and badly built contexts can make a model look weaker than it is.

Because prompt-based scores come from the model's own predictions, the authors treat them as a lower bound on what the model knows rather than a full measure of it.

From a template to class probabilities

Each task input is mapped through a template into a prompt that holds the input, a block of trigger slots and one prediction slot marked [P]. The prediction slot is the position where the masked model fills in a token, and the template decides where the input and the other tokens go. The trigger tokens are shared across every input of a task, so after the search they act as a fixed part of the template.

The masked model gives a distribution over the vocabulary at the prediction slot, and a class is scored by adding up the probabilities of its label tokens. Formally, the class probability is the sum over the label set \(V_y\) of \(p([\text{MASK}] = w \mid x_{\text{prompt}})\), which turns a masked language model into a classifier that can be evaluated like any other.

When a class name is already a vocabulary word, the label set can be a single token; for sentiment and NLI the label set can contain several words.

The trigger tokens start as mask tokens and are then replaced one at a time, with the goal of raising the likelihood of the correct label over batches of training examples. For each trigger position, the method estimates how much swapping in each vocabulary word would change the log-likelihood, using a first-order approximation from the gradient with respect to that trigger's input embedding.

The top-k words by this estimate form a candidate set, given by \(V_{\text{cand}} = \text{top-}k_{w \in V}\left[w_{\text{in}}^{\top} \nabla \log p(y \mid x_{\text{prompt}})\right]\), where \(w_{\text{in}}\) is the input embedding of the word \(w\). Computing the candidate set costs about as much as one forward and one backward pass, while checking each candidate requires its own forward pass, and the candidate that gives the highest probability is kept for the next step.

For abstract labels such as those in NLI, the label tokens are not obvious, so the method derives them from data in a second stage. A logistic classifier is trained on the contextual embedding of the mask position, and its learned weights are then applied to the masked model's output word embeddings to score each vocabulary word for each label.

The label set for label \(y\) is the top-k words under this score, written \(V_y = \text{top-}k_{w \in V}[s(y,w)]\), with \(s(y,w) = p(y \mid w_{\text{out}})\).

Methods that came before this one used manually written prompts to study commonsense reasoning, question answering, fact recall and summarization. Schick and Schütze combine manually constructed prompts with semi-supervised learning for few-shot classification, whereas AUTO PROMPT builds the prompts automatically for any task.

Models, search settings and cost

The experiments probe BERT BASE, which has 110M parameters, and RoBERTa LARGE, which has 355M parameters, using their pretrained weights from the transformers library. Label tokens for sentiment analysis and NLI come from the logistic-regression heuristic, while fact retrieval and relation extraction skip this step because their labels are already vocabulary entities.

For SST-2, the search grid covers candidate sets of size 10 and 100, label sets of size 1, 3 and 5, and trigger lengths from 3 to 6. The search for one configuration needed 2 days on 8 NVIDIA 2080Ti GPUs. For SICK-E the grid is wider in the label set size and narrower in the trigger length, and the best prompt is picked on development accuracy.

At the end of each search iteration the label likelihood is measured on withheld development data, and the best prompt found over the whole search is returned. Performance is then reported with a task-specific metric on a separate test set, which is accuracy for sentiment and NLI and precision at k for fact retrieval.

Sentiment and entailment without finetuning

On the SST-2 test set, RoBERTa with AUTO PROMPT reached 91.4, against 85.2 for a manually written prompt. BERT with AUTO PROMPT reached 82.3 on the same test set, compared with 63.2 for its manual prompt and 82.8 for a supervised BiLSTM. The authors describe RoBERTa as on par with finetuned BERT and ELMo models, whose reported test scores are 93.5 and 89.3 on the GLUE leaderboard.

On the standard 3-way SICK-E variant, the majority baseline is 56.7, and RoBERTa with AUTO PROMPT reached 65.0. On the balanced 2-way variant, BERT with AUTO PROMPT reached 85.7, against 95.6 for finetuned BERT, and the 2-way gap is the one the authors call comparable. On the balanced 3-way variant, RoBERTa with AUTO PROMPT reached 69.3, and BERT with AUTO PROMPT reached 55.4.

With random subsets of 10, 100 and 1000 training instances, prompts were compared with finetuned models over 10 runs, using the same finetuning recipe for the finetuned baselines. Finetuning is better on sentiment analysis, while AUTO PROMPT is better than finetuning on NLI, and it gives the best average accuracy for both BERT and RoBERTa given only 10 examples.

Finetuned runs can fail in the low-data regime, whereas RoBERTa with AUTO PROMPT is more stable across sample sizes.

On the 3-way SICK-E data, the per-label precision of BERT is 74.9 for contradiction, 54.4 for entailment and 36.8 for neutral, while RoBERTa reaches 84.9, 65.1 and 57.3. The authors link the stronger contradiction scores to label tokens that are easier to interpret for that class.

Fact retrieval on LAMA

Each LAMA relation gets one prompt with the form subject, trigger slots and a prediction slot, and the trigger tokens are chosen for that relation. Training facts come from T-REx, up to 1000 per relation across 41 relations, with the rest gathered from Wikidata, and the T-REx data is split 80-20 into training and development sets. The search excludes proper nouns and gold object tokens from the trigger vocabulary, so the prompt cannot simply contain the answers.

On the original LAMA test set, the 7-trigger-token prompts reached 43.34 precision-at-1 and 53.89 mean reciprocal rank, while the 5-trigger-token prompts reached 42.94 precision-at-1. The best LPAQA prompt reached 34.10 precision-at-1 and the original LAMA prompt reached 31.10 under the same metric. The paper reports that the gain over manual and mined prompts reaches up to 12 points at precision-at-1, and that a single searched prompt per relation is about 4 points better than the LPAQA ensemble that averages up to 30 prompts.

Changing the trigger count from 5 to 7 makes only a small difference, which the authors read as the method being stable to trigger length. The authors conclude that BERT holds more factual knowledge than earlier estimates suggested, and this reading is tied to the lower-bound view of prompting.

The RoBERTa prompts contain more irrelevant words, such as punctuation and names, which the authors note as surprising and leave for future work.

Relation extraction from sentences

Each prompt puts the context sentence in front of the subject and trigger slots, and the label token is the correct object. The supervised baseline is an LSTM relation model from prior work, and its output is evaluated by crediting predictions that give the subject and object the same relation. A prediction counts as correct if it matches the canonical object or its rendered surface form in any context sentence of the triple.

On the original T-REx sentences, BERT with AUTO PROMPT reached 90.73 precision-at-1, against 57.95 for the supervised LSTM, 69.06 for LAMA prompts and 76.55 for LPAQA prompts. The paper reports an increase of up to 33% over the supervised model with AUTO PROMPT. RoBERTa with AUTO PROMPT reached 60.33, above the supervised model but below BERT.

To test whether the masked models simply recall the objects, the authors replace each object in the test sentences with a random other object and regenerate the prompts. The LSTM moves from 57.95 to 58.81 on the perturbed data, while BERT with AUTO PROMPT falls from 90.73 to 56.43 and RoBERTa with AUTO PROMPT falls to 28.95. The authors take this drop as evidence that much of the masked models' accuracy comes from background information rather than from reading the sentence.

BERT with AUTO PROMPT still beats the LAMA and LPAQA prompts on the perturbed data, with 56.43 against 28.02 and 30.79.

Limitations

AUTO PROMPT needs labeled training data, while manual prompts depend on domain or language knowledge instead. Its prompts are harder to interpret than human-written ones, in the same way that linear probes are.

Where the training labels are heavily imbalanced, the prompts often just raise the probability of the majority label, as the NLI and fact retrieval sections show. The authors suggest rebalancing the training data as a mitigation, but did not test it. The greedy search over a large discrete space of phrases makes the method sometimes brittle, and better search techniques were left for future work.

In a preliminary evaluation on QQP and RTE, neither manual nor AUTO PROMPT prompts did considerably better than chance. The authors state that this does not show BERT lacks paraphrase or entailment knowledge, only that these probes do not reveal it. Experiments cover BERT BASE and RoBERTa LARGE on SST-2, SICK-E, LAMA and T-REx only.

Paper info

Authors
Taylor Shin, Yasaman Razeghi, Robert L. Logan, Eric Wallace, Sameer Singh
Venue
arXiv · Preprint
First published
2020-10-29
Added
2026-11-12
Updated
2020-11-7
Version
v2
arXiv
2010.15980
Category
cs.CL · cs.LG
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Taylor Shin, Yasaman Razeghi, Robert L. Logan, Eric Wallace, Sameer Singh (2020). AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts. arXiv:2010.15980v2. https://arxiv.org/abs/2010.15980v2

BibTeX
@misc{shin2020autoprompt,
  title = {{AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts}},
  author = {Taylor Shin and Yasaman Razeghi and Robert L. Logan and Eric Wallace and Sameer Singh},
  year = {2020},
  eprint = {2010.15980},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.15980v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up