TL;DR
This paper investigates the crucial problem of "calibration" in large language models (LLMs) for question answering (QA). They find that even highly accurate LLMs are often overconfident in their incorrect answers. The authors propose and evaluate several methods, including fine-tuning and post-hoc adjustments, to make LLM confidence scores better reflect the actual probability of correctness, demonstrating significant improvements in calibration.
What Problem Does This Paper Address?
Modern large language models (LLMs) have demonstrated remarkable capabilities in capturing factual and commonsense knowledge, performing complex tasks through simple prompting. However, these models are not infallible and can produce incorrect answers, especially for less common facts or complex reasoning. A critical challenge arises when deploying these models in real-world applications, particularly in safety-critical domains like healthcare or finance: how can we trust their outputs? This paper addresses this by focusing on the calibration of LLMs. Calibration refers to the property of a probabilistic model where its predicted probabilities accurately reflect the true likelihood of an event occurring. In simpler terms, if an LLM predicts an answer with 80% confidence, it should be correct 80% of the time. The paper highlights that current state-of-the-art LLMs, despite their high accuracy, are poorly calibrated, often exhibiting overconfidence in wrong answers, making their confidence scores untrustworthy.
Methods
The authors propose two main categories of methods to improve LLM calibration for QA:
- Fine-tuning-based Calibration: This involves modifying the LLM's parameters during training. They introduce two objective functions:
- Softmax-based: This method normalizes the confidence of candidate answers using a softmax function and aims to maximize the probability of the correct candidate.
- Margin-based: This approach focuses on maximizing the confidence margin between the correct answer and incorrect ones, inspired by support vector machine principles.
- Post-hoc Calibration: These methods keep the LLM fixed and adjust confidence scores or inputs after the initial prediction. They explore:
- Temperature-based Scaling: A common technique that adjusts the "sharpness" of the probability distribution.
- Feature-based Decision Trees: Using a gradient boosted decision tree regressor that considers not only the raw confidence but also features like model uncertainty (entropy of candidate distribution), input uncertainty (perplexity), and input/output statistics (length).
- LM-Specific Methods: * Candidate Output Paraphrasing: Leveraging the sensitivity of LMs to language variation, they use round-trip translation to generate paraphrases of candidate answers, which can improve confidence estimation.
- Input Augmentation: Similar to retrieval-augmented models, they augment the input with relevant text (e.g., from Wikipedia) to provide more evidence and potentially improve confidence.
Datasets
The paper evaluates their methods on a diverse range of question answering datasets, categorized into:
- Multiple-choice QA: ARC (easy), AI2 Science Question, OpenbookQA, Winogrande, CommonsenseQA, PhysicalIQA, MCTest, PIQA, SIQA, RACE, QASC, MT-test.
- Extractive QA: SQuAD 1.1, SQuAD 2, NewsQA, Quoref, ROPES.
They split these datasets into training (MC-train, Ext-train) and testing (MC-test, Ext-test) sets to evaluate generalization.
Key Insights and Ideas
- The Calibration-Accuracy Trade-off is Not Inevitable: The study demonstrates that it's possible to improve calibration without sacrificing accuracy, and in some cases, even slightly improving it.
- LLMs are Over-Confident: A consistent finding is that LLMs tend to be over-confident, assigning probabilities very close to 0 or 1, regardless of whether the answer is correct. This is a fundamental issue that calibration methods aim to address.
- Extractive QA is Harder to Calibrate: The paper notes that calibrating extractive QA models is more challenging than multiple-choice QA. This is partly attributed to the larger and more complex candidate set generated by span-based decoding in extractive tasks, leading to higher entropy in confidence distributions.
- Calibration Methods are Complementary: Combining multiple calibration techniques (fine-tuning, paraphrasing, augmentation) yields the best results, suggesting that these methods address different facets of the calibration problem.
- Larger Models are Generally Better Calibrated (and More Calibratable): Contrary to some findings in image classification, larger LLMs tend to be both more accurate and better calibrated, and also show greater improvement from calibration methods.
Key Results
- Significant ECE Reduction: The "Combo" method (combining margin-based fine-tuning, temperature scaling, paraphrasing, and input augmentation) achieved a substantial reduction in Expected Calibration Error (ECE) from 0.095 to 0.044 (over 53% improvement) on MC-test datasets.
- Improved Calibration Across Models: The proposed methods were shown to be effective across different LLMs (T5, BART, GPT-2) and architectures, indicating their general applicability.
- Post-hoc Methods are Universally Helpful: Techniques like temperature scaling and feature-based decision trees consistently improved calibration across various datasets.
- Paraphrasing Benefits Shorter Questions: Paraphrasing candidate answers was particularly effective for shorter questions, suggesting it helps disambiguate and clarify intended meanings.
Limitations and Future Work
- Domain Shift Challenges: While methods generalize to some extent, calibration performance on out-of-domain datasets was slightly lower than on in-domain datasets, highlighting the challenge of domain shift.
- Fine-tuning for Extractive QA: Fine-tuning methods showed less improvement on extractive QA compared to multiple-choice QA, suggesting further research is needed in this area.
- Oracle Temperature: The study notes that using an "oracle temperature" (learned on the evaluation set) leads to near-perfect alignment in reliability diagrams, but this is not practical in real-world scenarios. This points to the difficulty of finding a single temperature that works across diverse domains.
- Fine-grained Calibration: The authors suggest exploring more fine-grained calibration levels beyond dataset-wide averages, potentially considering model behavior on specific data subsets or reflecting dataset biases.
- User Interaction and Downstream Tasks: Future work could investigate how model confidences influence user decisions and how calibration thresholds might be adjusted for critical domains.
Summary updated