Abstract
To use generative question-and-answering (QA) systems for decision-making and in any critical application, these systems need to provide well-calibrated confidence scores that reflect the correctness of their answers. Existing calibration methods aim to ensure that the confidence score is, on average, indicative of the likelihood that the answer is correct. We argue, however, that this standard (average-case) notion of calibration is difficult to interpret for decision-making in generative QA. To address this, we generalize the standard notion of average calibration and introduce QA-calibration, which ensures calibration holds across different question-and-answer groups. We then propose discretized posthoc calibration schemes for achieving QA-calibration. We establish distribution-free guarantees on the performance of this method and validate our method on confidence scores returned by elicitation prompts across multiple QA benchmarks and large language models (LLMs).
The Problem with Average Calibration
When a Large Language Model (LLM) provides a confidence score—for instance, stating it is "80% sure" about an answer—users expect that answer to be correct approximately 80% of the time. This property is known as calibration. Traditionally, calibration is measured using Expected Calibration Error (ECE), which averages performance across all questions.
However, this "average-case" approach can be misleading. A model might be perfectly calibrated on average by being overconfident in one domain (e.g., geography) and underconfident in another (e.g., politics). For a user focused solely on one of these domains, the global average is irrelevant; the confidence scores they receive are consistently unreliable.
Introducing QA-Calibration
To address this, the authors introduce QA-calibration, a framework that requires confidence scores to be reliable not just globally, but within specific "groups" of similar question-answer pairs. This ensures that if a model claims 80% confidence on a medical question, it is actually 80% accurate for medical questions specifically.
The Grouping Mechanism (β)
The core of this approach is a mapping function, β, which partitions the space of question-answer pairs into cohesive groups. The researchers use an "embed-then-bin" strategy:
- Embedding: Question-answer pairs are converted into vector embeddings using models like DistilBERT.
- Partitioning: A kd-tree—a multidimensional branching structure—is used to adaptively divide the semantic space into bins (e.g., "science," "history").
Proposed Calibration Algorithms
The paper proposes two primary posthoc calibration schemes:
- QA Binning (QAB): This method applies a specialized histogram binning technique (Uniform Mass Discretization, or UMD) to each individual semantic group.
- Hierarchical Scaling QA Binning (HS-QAB): To handle groups with limited data, this method uses hierarchical logistic regression. It allows "partial pooling," where the model learns from the specific group while "borrowing strength" from the overall population average to prevent overfitting.
Experimental Evaluation
The methods were evaluated using Mistral-7B and Gemma-7B across five diverse benchmarks: MMLU, TriviaQA, SciQ, BigBench, and OpenBookQA. Ground-truth correctness was determined using Llama 3.1 as a judge.
Key Results
- Performance Gains: QAB and HS-QAB improved QA-calibration performance by 10-40% compared to standard prompting and baseline methods.
- Enhanced Abstention: In "selective QA" tasks, where models must decide whether to answer based on confidence, the new methods improved the Area Under the Accuracy-Confidence Curve (AUAC) by up to 30%.
- Robustness: HS-QAB proved particularly effective at reducing variance in small, specific question clusters.
Conclusion and Future Work
This research demonstrates that "local" calibration is essential for reliable decision-making in LLMs. By grouping questions semantically, we can move beyond the "mirage" of average calibration. Future work will explore multi-calibration, ensuring models are calibrated across multiple overlapping groups simultaneously (e.g., by both topic and language), and investigate more dynamic ways to partition the ever-expanding information space of generative AI.
Summary updated