Paper commentary
Large Language Models Must Be Taught to Know What They Don’t Know
Fine-tuning teaches language models to estimate whether their own answers are correct
- Problem Confidence from likelihoods or prompting stays poorly calibrated for open-ended answers. Probability spreads across many phrasings, so a correct answer can get a low score.
- Method The authors fine-tune LLaMA-2 and Mistral on graded answers to learn P(correct) for their own outputs.
- Results On open-ended MMLU, about 1000 graded examples already beat simpler baselines, and gains continue to 5000 examples.
Why likelihood breaks down in open-ended answers
An answer delivered without a confidence is hard to act on, and a confidently wrong answer can be dangerous. The open question is whether a model can report how likely its own answers are to be correct.
On a multiple-choice question the answer is one token, so the next-token distribution over the options is a usable probability.
The authors compare AUROC for maximum softmax probability on multiple choice with AUROC for perplexity on open-ended answers, across LLaMA-2, LLaMA-3 and Mistral 7B. Softmax probability improves as the base model gets stronger, whereas perplexity does not follow the same trend in open-ended generation.
Prompted confidence on open-source models
The Zero-Shot Classifier asks whether the answer is true and turns the relative probabilities of the affirmative and negative answer tokens into a confidence. Verbalized elicitation asks the model to state a probability that its answer is correct, then parses that number from the generated text.
On open-ended MMLU, prompting methods stay poorly calibrated by ECE, and that ECE does not improve as the base model gets stronger. AUROC rises only slightly with model strength, and even the best prompted model stays well behind the weakest fine-tuned model.
The authors argue that people are poorly calibrated on tasks they don't know well, and pretraining text isn't all written by experts. From this they conclude that expecting calibration from language modeling alone is optimistic, and that an intervention such as fine-tuning on graded data is likely needed.
Training a correctness classifier on model answers
The model answers each question by greedy decoding, and each answer is graded to produce a correctness label. The classifier then learns P(correct) from these labeled question, answer and correctness tuples.
The Probe parameterization keeps the base LLM frozen and trains a small feed-forward network on its last-layer features for the prompt, question and proposed answer. LoRA adds low-rank adapters to the base model, so the intermediate features can change to improve the correctness prediction. LoRA + Prompt instead poses correctness as a two-option multiple-choice response, scoring the target tokens for no and yes.
The training mixture draws about 20,000 samples from 16 benchmark datasets, and 2000 points are held out for temperature scaling. The default LoRA settings are rank 8, alpha 32 and dropout 0.1, with 8-bit quantization.
A Jensen-Shannon divergence term between the base and tuned distributions is applied only to the logits of the target answer tokens. Without this term, mean ECE over six base models is 29.9%, and with it ECE falls to 10.8%, while AUROC moves from 70.2% to 71.6%. The authors chose this divergence after finding that forward and reverse KL were insufficient for the best calibration-tuned model.
The sampling baseline is much more expensive, since it draws K = 10 samples and compares them pairwise with an auxiliary model.
How much labeled data is enough
On multiple-choice MMLU, frozen Probe features already beat the baselines. On open-ended MMLU, the gains need training through the model with a prompt, as in LoRA + Prompt. Sampling gives good calibration but weak discrimination, while verbal elicitation discriminates reasonably well but stays poorly calibrated even after temperature scaling.
The smallest run uses 200 labeled examples, and performance grows with the amount of data. Around 1000 labels are enough to beat the simpler baselines, and gains continue to 5000 examples with diminishing returns. The authors note that 1000 points are almost as useful as 20,000 points.
Does the signal survive shifts in subject and format
The training data has far more STEM and humanities questions than MMLU and almost no social science questions. Even so, LoRA + Prompt estimates perform similarly across the MMLU supercategories.
Models trained on one format and tested on the other transfer less well from MC to OE than from OE to MC. Probe does not transfer from MC to OE, while LoRA + Prompt keeps nearly its in-distribution performance and even beats a Probe trained on OE data.
On SelfAware questions with no known answer, fine-tuned models assign lower confidence than black-box methods. Their probabilities stay calibrated on the answerable questions.
On 62 LeetCode easy questions, LoRA + Prompt raised AUROC over the Zero-Shot Classifier for all three base models. For LLaMa-2-7B the AUROC rose from 56.9% to 80.0%, and for Mistral-7B from 66.2% to 85.1%. ECE for LLaMa-2-7B got slightly worse, 46.4% against 41.0%, so calibration gains were not uniform.
What the estimators are actually learning
The authors frame two possibilities: the model judges whether an answer is correct, or it learns that some topics often produce wrong answers. To separate them, the authors swap the model's answers for incorrect options while keeping the correctness labels.
The model trained on incorrect answers performs close to Probe but clearly below the model trained on the original answers. The authors conclude that question content explains only part of the LoRA + Prompt estimates.
Mistral 7B reaches higher AUROC when it estimates the correctness of LLaMA-2 7B answers than LLaMA-2 7B reaches on its own answers. Generic sentence embeddings from sBERT and OpenAI are competitive with Probe, which suggests that the uncertainty signal is not tied to one model.
Does confidence change how people rely on the model
The study had 181 participants who answered a multiple-choice exam with Mistral 7B Instruct, and each question showed a model confidence. Each confidence variant had 20 participants.
With the zero-shot prompt, the confidence values bunch together and carry little signal. With LoRA + Prompt, participants relied more on the model for confident answers and less for uncertain ones. A random confidence display did not change reliance, and the variants were compared at about the same average accuracy.
The confidence scores mattered most for the lowest-performing users rather than for average accuracy. The authors call this a preliminary result and say the effects of calibration are not yet separated from how people use uncertainty.
Limitations
Fine-tuning currently uses two separate models, one for answering and one for uncertainty estimation. The authors expect a single model would need an uncertainty-aware training phase, which would be a difficult online learning problem.
The sampling baselines scale as O(K^2) pairwise comparisons, and their scores depend on the sampling parameters.
The user study is preliminary, and the coding test uses only 62 questions and three base models.
Paper info
- Authors
- Kapoor, Sanyam, Gruver, Nate, Roberts, Manley, Collins, Katherine, Pal, Arka, Bhatt, Umang, Weller, Adrian, Dooley, Samuel, Goldblum, Micah, Wilson, Andrew
- Venue
- Advances in Neural Information Processing Systems · Published
- First published
- 2024-12-16
- Added
- 2026-11-25
- DOI
- 10.52202/079017-2729
- Original paper terms
- Check in the original ↗
- 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
Kapoor, Sanyam, Gruver, Nate, Roberts, Manley, Collins, Katherine, Pal, Arka, Bhatt, Umang, Weller, Adrian, Dooley, Samuel, Goldblum, Micah, Wilson, Andrew (2024). Large Language Models Must Be Taught to Know What They Don’t Know. Advances in Neural Information Processing Systems. https://doi.org/10.52202/079017-2729
BibTeX
@article{sanyam2024large,
title = {{Large Language Models Must Be Taught to Know What They Don’t Know}},
author = {Kapoor, Sanyam and Gruver, Nate and Roberts, Manley and Collins, Katherine and Pal, Arka and Bhatt, Umang and Weller, Adrian and Dooley, Samuel and Goldblum, Micah and Wilson, Andrew},
year = {2024},
journal = {Advances in Neural Information Processing Systems},
doi = {10.52202/079017-2729},
url = {https://papers.nips.cc/paper_files/paper/2024/hash/9c20f16b05f5e5e70fa07e2a4364b80e-Abstract-Conference.html}
}