TL;DR
This paper introduces "QA-calibration," a novel and more robust standard for evaluating the confidence scores of language models (LMs) in question-answering (QA) tasks. They propose new methods, QA binning and scaling QA binning, that achieve significantly better calibration across diverse question-answer groups, leading to more reliable AI systems.
What Problem Does This Paper Address?
Large language models (LLMs) are increasingly used in critical applications, but their tendency to "hallucinate" (produce incorrect answers) is a major concern. Confidence scores are meant to indicate how likely an answer is correct, but existing methods for calibrating these scores are often insufficient for generative QA. The standard "average-case" calibration assumes that a model's confidence is accurate on average across all possible questions and answers. However, this doesn't hold true when users are interested in specific domains or types of questions. For example, a model might be well-calibrated overall but poorly calibrated for questions about geography versus politics, leading to a user's trust being misplaced in certain contexts. This paper addresses this gap by proposing a new calibration standard that accounts for these specific question-answer groups.
Methods
The core contribution is the introduction of QA-calibration, a generalization of standard calibration. Instead of requiring calibration on average across all QA pairs, QA-calibration demands that confidence scores are calibrated within specific groups of QA pairs. These groups are defined by a mapping function, $\beta$, which can be instantiated in various ways.
To achieve QA-calibration, the authors propose two posthoc calibration techniques:
- QA Binning: This method adapts classical histogram binning. It first partitions the QA space using the $\beta$ function (e.g., a kd-tree based on embeddings of QA pairs) and then trains a separate calibrator (using Uniform-Mass-Double-Dipping histogram binning, UMD) for each partition. This ensures that confidence scores are calibrated within each identified group.
- Scaling QA Binning (HS-QAB): This approach builds upon QA binning by first applying a scaling step using hierarchical logistic regression. This hierarchical model allows for partial pooling of information across partitions, which helps to improve calibration, especially in partitions with limited data. This is particularly useful when the $\beta$ function creates many fine-grained partitions.
The paper also introduces a theoretical framework with distribution-free guarantees for their proposed methods, showing they can achieve approximate QA-calibration.
Datasets
The authors evaluated their methods on five commonly used QA benchmark datasets:
- TriviaQA
- SciQ
- BigBench
- OpenBookQA
- MMLU
They used two performant LLMs: Mistral and Gemma.
Key Insights and Ideas
- Average-case calibration is insufficient for generative QA: The paper convincingly demonstrates with an example (Figure 1) that a model can be well-calibrated on average but poorly calibrated for specific users or domains, undermining trust.
- QA-calibration provides a more interpretable and useful standard: By conditioning calibration on groups of QA pairs, the proposed standard offers a more nuanced and practical measure of confidence reliability.
- Groupings matter: The choice of how to group QA pairs (via the $\beta$ function) is crucial. The paper explores using kd-trees on embeddings as a principled way to create semantically cohesive groups.
- Hierarchical scaling improves robustness: The HS-QAB method, by leveraging hierarchical models, shows better performance, especially in scenarios with limited data per partition, highlighting the benefit of sharing information across related groups.
Key Results
- Both QA binning (QAB) and Hierarchical Scaling QA Binning (HS-QAB) consistently outperformed baselines (including standard histogram binning and Platt scaling) in terms of QA-calibration error (CE(h; $\beta$)). For instance, on MMLU and BigBench datasets, their methods achieved significantly lower CE(h; $\beta$) values.
- The proposed methods also led to improved performance in a downstream selective QA task, measured by the Area Under the Accuracy-Confidence Curve (AUAC). HS-QAB generally performed best among their proposed methods.
- Reliability analysis (Figure 4) showed that QA binning yielded better calibrated confidence scores within specific semantic partitions compared to both the "None" (no recalibration) baseline and standard UMD.
Limitations and Future Work
- Interpretability of $\beta$: The interpretability of the calibration guarantee depends on the choice of $\beta$. If users require very fine-grained partitions, $\beta$ needs to be constructed with appropriate depth.
- Scalability of $\beta$: The assumption that the output space of $\beta$ is fixed might be a limitation, as the "information" space of generative QA can grow indefinitely.
- Future Work: The authors plan to investigate alternative notions of calibration for groups, such as multi-calibration. They also suggest exploring different $\beta$ functions and further analyzing the impact of partition depth.
Summary updated