TL;DR
Conformal prediction gives Large Language Models (LLMs) reliable safety rails by guaranteeing that their prediction sets contain the correct answer with a user-defined probability. However, this paper reveals that minor tweaks to an inference pipeline—such as changing a prompt template, decoding temperature, or quantization level—introduce a "configuration shift" that silently destroys these guarantees and leads to severe undercoverage. Fortunately, the authors provide label-free diagnostics to detect this shift and practical calibration ensembling methods to fix it.
What Problem Does This Paper Address?
Conformal prediction (CP) is a popular framework for uncertainty quantification because it offers rigorous mathematical guarantees: if you ask for 90% confidence, the prediction set generated by the model will contain the true answer at least 90% of the time. This guarantee relies fundamentally on exchangeability—the assumption that your calibration data and your test data are statistically interchangeable.
In traditional machine learning, researchers worry about distribution shift (changes in the underlying data itself). But in LLM systems, uncertainty scores are produced by an entire inference pipeline, not just a static model. If a developer changes a prompt format, adjusts the decoding temperature, or compresses the model via weight quantization between calibration and deployment, the mapping from data to scores changes. The authors term this configuration shift and demonstrate that it routinely breaks score exchangeability, invalidating the very guarantees that make conformal prediction useful.
Methods
The authors systematically evaluate configuration shift across three axes: prompt templates, decoding temperature, and weight quantization. To understand and mitigate the resulting coverage loss, they introduce:
- Score-Space and Label-Free Lower Bounds: They derive mathematical bounds on test coverage using the Kolmogorov-Smirnov (KS) distance for score distributions. Crucially, they also derive a label-free version using the Wasserstein distance ($W_1$) based on the model's internal predictor states (e.g., output token probabilities), allowing engineers to estimate coverage loss without needing ground-truth test labels.
- Empirical Diagnostics: They develop finite-sample plug-in versions of these bounds to act as early-warning systems for deployment pipelines.
- Mitigation Strategies: They evaluate six distinct mitigations. These include Recal (a gated approach that uses a tiny budget of 50 labeled test examples to recalibrate only when a significant shift is detected) and Mos-F / Anc (fragility-aware calibration ensembling methods that mix scores from multiple configurations, intentionally over-weighting the setups most prone to undercoverage).
Datasets
The empirical study spans nine open-weight LLMs (from the Llama, Gemma, and Qwen families) evaluated on four widely adopted benchmarks covering two distinct task settings:
- Multiple-Choice QA (MCQA): MMLU and MedMCQA (featuring a fixed four-option label space).
- Open-Ended QA (OEQA): Natural Questions (NQ) and TriviaQA (featuring an unbounded answer space).
No new datasets were introduced, ensuring that the findings reflect behavior on standard, well-understood AI benchmarks.
Key Insights and Ideas
- The Illusion of More Data: Surprisingly, gathering more calibration data makes the undercoverage problem worse, not better. As the calibration budget ($\rho$) grows, the conformal threshold converges tightly to the wrong quantile of the shifted test distribution, exposing the systematic bias rather than absorbing it.
- Validity Fails, Efficiency Wins: Configuration shift primarily hurts validity (causing empirical coverage to drop below the target), but it doesn't drastically inflate prediction set sizes for the runs that manage to stay valid. This makes the failure mode particularly insidious: your model returns reasonably sized, confident-looking prediction sets, but they are secretly wrong more often than allowed.
- Temperature is the Biggest Culprit: Altering the decoding temperature causes the most severe undercoverage and is the only shift axis that noticeably inflates prediction set sizes.
- Label-Free Detection is Practical: By measuring the Wasserstein distance between the model's output probabilities under different configurations, engineers can reliably diagnose shift severity before deploying a modified pipeline to users.
Key Results
- The Damage: As shown in the target-confidence and calibration-budget sweeps, configuration shift consistently erodes CP validity. At a target confidence of 90% ($1-\alpha = 0.9$), configuration shift spikes the undercoverage rate ($U_\tau$) to 0.46 for temperature shifts, 0.31 for prompt shifts, and 0.20 for quantization shifts, compared to an in-distribution baseline of at most 0.03.
- The Fixes:
- Recal emerged as the strongest overall mitigation strategy. By spending a tiny budget of $k=50$ labeled deployment examples only when the label-free gate fired, it successfully brought undercoverage rates back down to 0.06–0.09 with negligible set-size inflation.
- For "cold-start" scenarios where no test labels are available, uniform calibration ensembling (Mos-U) absorbed a significant portion of the shift damage at zero inflation cost. Upgrading this to a fragility-weighted ensemble (Mos-F) cut temperature-induced undercoverage from 0.40 to 0.20.
Limitations and Future Work
- Not Finite-Sample Certificates: The derived bounds are population-level statements. While their finite-sample plug-in estimates work well as practical diagnostics, they do not yet constitute rigorous, certified finite-sample guarantees.
- Single-Axis Focus: The empirical study isolated shifts one axis at a time. Real-world deployments often suffer from compound, multi-axis shifts (e.g., running a quantized model with a modified prompt template at a lower temperature simultaneously).
- Simple Mitigations: The proposed ensembling and recalibration methods are intentionally simple proofs-of-concept. Developing a comprehensive, robust calibration framework indexed across entire continuous configuration spaces remains an open challenge for future work.
Summary updated