Evaluating language models
Abstention: when the right answer is that the documents do not say
What abstention is, how research scores refusals on unanswerable questions, and what to ask when a vendor's language system answers from a fixed set of documents.
Oct 12, 20264 min read3 sources
Why it matters
A system that answers from doctrine or manuals must refuse when they are silent, and a made-up answer reads like a sourced one.
The short version
- 1On the Stanford Question Answering Dataset 2.0, always abstaining scores 48.9 F1 on the test set, so any refusal score is read against that floor.
- 2An evaluation made only of answerable questions cannot tell a system that refuses correctly from one that never refuses.
- 3One study found a model's answer probability overconfident on out-of-domain data, a caution against using it as the refusal signal.
A language system that answers from manuals or doctrine will be asked questions those documents do not cover. The correct output then is a refusal, because a fabricated answer reads as fluently as a correct one. Research scores this behavior, called abstention, separately from answer accuracy, so an accuracy figure alone cannot show whether a system refuses when it should.
Correct answer
The goal, when it cites its source.
Over-abstention
Never wrong, and less useful.
Invented answer
The failure that matters most.
Correct refusal
Scored as a right answer.
The measures in this post score all four cells together.
What the literature counts as abstention
A survey of abstention in large language models (LLMs) by Wen and colleagues defines abstention as the refusal to answer a query. The survey organizes the field around three perspectives: the query, the model's knowledge, and human values.
The query perspective is the one a fixed document set exercises most. It covers questions that cannot be answered as posed, including cases where, in the survey's words, "there is irrelevant or insufficient context to answer." A question about something the documents never mention is such a case. The model-knowledge perspective covers questions the model is likely to get wrong. The human-values perspective covers requests a system should decline for ethical or safety reasons.
The survey also records a cost. Instruction tuning on abstention-aware data improves a model's ability to abstain but can lead to over-abstention, which means refusing questions that should have been answered. A system that refuses everything is never wrong and never useful, so the measures below all pair refusal with answering.
A benchmark built on unanswerable questions
The Stanford Question Answering Dataset (SQuAD) tests reading comprehension: given a paragraph and a question, a system extracts the answer from the paragraph. Rajpurkar, Jia, and Liang added 53,775 unanswerable questions about the same paragraphs, written by crowdworkers to look like the answerable ones, and released the result as SQuAD 2.0. For each question, the system must decide whether the paragraph supports an answer at all.
On an unanswerable question, abstaining scores 1 and any other response scores 0, under both exact match and F1. A baseline that always abstains gets 48.9 F1 on the test set, so a system's score has to be read against that floor. A different mix of questions has a different floor.
The authors report that a model scoring about 86 F1 on SQuAD 1.1 scored about 66 F1 on SQuAD 2.0. Their strongest baseline reached 66.3 F1 on the SQuAD 2.0 test set, 23.2 points below the human score of 89.5. These figures belong to the 2018 baseline models and do not describe current systems.
Scoring answers and refusals together
Kamath, Jia, and Liang study selective question answering: answer as many questions as possible while keeping accuracy high, and abstain on the rest. Their measures are:
- Coverage: the fraction of questions the system answers.
- Accuracy on answered questions: how often the answers it gave were right.
- Risk-coverage curve: error on the answered questions plotted against coverage as the confidence threshold moves.
- Coverage at an accuracy level: the largest coverage reachable while accuracy stays at a chosen level, such as 80 percent.
Their headline result has a specific setting. A BERT-base model (BERT stands for Bidirectional Encoder Representations from Transformers) trained on SQuAD 1.1 was tested on a mix of SQuAD questions and questions from five other datasets (NewsQA, TriviaQA, SearchQA, HotpotQA, and Natural Questions), with half the test questions in-domain. A trained calibrator answered 56.1 percent of questions at 80 percent accuracy. The baseline that abstains on low answer probability answered 48.2 percent at the same accuracy.
The paper finds that the answer probability gives good confidence estimates on in-domain data but is overconfident on out-of-domain data. The practical reading is a caution against using a model's own answer probability as the refusal signal when test questions differ from its training data.
The survey adds metrics that treat the refusal decision itself as a classification. Abstention precision is the proportion of abstain decisions that were correct. Abstention recall is the proportion of cases where the model abstained when it should have. Coverage is the proportion of instances the model answered.
A test set needs both kinds of question
These designs share one requirement: the test set must contain questions the source material does not answer. An evaluation made only of answerable questions cannot tell a system that refuses correctly from one that never refuses.
A test for a system answering from a fixed document set therefore pairs two kinds of question. Some are answered by the documents. Others resemble them and are not, which is how SQuAD 2.0 was built. Reporting answer accuracy, abstention precision, abstention recall, and coverage together shows both failure modes: answers invented past the edge of the documents, and refusals of questions the documents do answer.
Both benchmarks above are extractive, meaning the answer is a span of the source text. The survey is the broader reference for models that write free-form answers, where deciding what counts as a correct refusal is harder to automate.
What to ask
- Does the test set include questions the documents do not answer, and what share of the set are they?
- Are answer accuracy, abstention precision, abstention recall, and coverage reported together?
- How does the score compare with the score of a system that always refuses on the same set?
- Was the refusal signal tested on questions unlike the system's training data?
- How often does the system refuse a question the documents do answer?
Azcuna's ELLMENT, the E-2D Large Language Model Entity, was proposed to NAVAIR PMA-231 under Navy SBIR Phase I topic DON26BZ01-NV010. The prototype, built at private expense on publicly available doctrine, answers with a page-level citation and refuses when the documents do not support an answer. The proposal has been submitted. The long read on air-gapped RAG goes further.
Sources
- 1Know Your Limits: A Survey of Abstention in Large Language Models · arXiv (Wen et al.)
- 2Know What You Don't Know: Unanswerable Questions for SQuAD · arXiv (Rajpurkar, Jia, and Liang; ACL 2018)
- 3Selective Question Answering under Domain Shift · arXiv (Kamath, Jia, and Liang; ACL 2020)
