Source-linked AI summary
Target-Aware Calibration Data Selection for Preserving Uncertainty in Quantized Language Models
Zhen Yang, Sizai Hou, Kaiwen Zheng, Yaofang Liu, Liang He, Yixuan Chen, Kangning Cui
TL;DR
Quantization can preserve top-1 accuracy while changing uncertainty behavior needed for downstream decisions. This paper formalizes target-dependent uncertainty preservation and introduces DPQ, which selects full-precision-guided calibration mixtures; experiments show that the best recipe varies by preservation target.
Problem
Calibration-data selection for quantization rarely targets preservation of full-precision confidence, margins, and answerability behavior despite their use in downstream decisions.
Method
DPQ uses full-precision predictions to select high-doubt or boundary examples, mixes them with generic anchors at target-dependent ratios, and leaves the quantizer unchanged.
Results
Across 8 language models, 9 NLP benchmarks, and 22 comparison methods, high-boundary mixtures best preserve SQUAD2 answerability boundaries, while milder or single-signal recipes better preserve broad MCQA behavior.
Takeaways & Limitations
Calibration data should be selected for the specific full-precision score behavior a deployment needs to preserve rather than treated as a fixed quantization detail.
Takeaways & Limitations
The evaluation focuses on option-scoring uncertainty and does not extend the preservation perspective to verbalized confidence or long-form generation.
Abstract
from arXiv · showhide
Quantization is widely used to deploy large language models, but its effect on uncertainty behavior, such as confidence, margins, and abstention, is rarely treated as a primary objective. We frame calibration-data selection for quantization as a target-dependent uncertainty-preservation problem. Different deployments emphasize different regions of the input distribution, yet prior work mainly optimizes accuracy-oriented compression metrics or adjusts scores after quantization. We formalize this goal with distributional and boundary preservation risks, and provide a simple mixture-mismatch argument explaining why no single calibration recipe should be expected to fit all targets. We introduce Doubt-Preserving Quantization (DPQ), a lightweight pre-quantization recipe family that uses full-precision predictions to construct target-aligned calibration mixtures of high-doubt examples and generic anchors. Across 8 language models, 9 NLP benchmarks, and 22 comparison methods, the leading fixed recipe changes with the preservation target: DPQ-r75 leads on SQuAD2 answerability-boundary preservation, while milder or single-signal variants, including DPQ-r50, confidence-only, and entropy-only, better preserve broad multiple-choice QA behavior. These results show that calibration data should be selected for the specific full-precision score behavior a deployment needs to preserve, rather than treated as a fixed quantization detail.
1 Introduction
The paper argues that quantization should preserve uncertainty behavior, not only top-1 accuracy, and introduces target-dependent calibration selection through DPQ.
- Motivation: Quantization evaluations often emphasize accuracy, perplexity, or benchmark scores, while calibration-data selection rarely targets full-precision uncertainty preservation.The gap matters for applications using confidence, margins, or answerability decisions.
- Motivation: Unchanged top-1 predictions can conceal substantial confidence-margin shifts that alter downstream uncertainty-aware decisions.The paper gives an example changing option probabilities from (0.51, 0.49) to (0.95, 0.05).
- Problem formulation: The paper frames calibration-data selection as target-dependent preservation of distributional uncertainty or low-margin decision boundaries.Broad answerable tasks emphasize probabilities and margins, whereas abstention-heavy tasks emphasize answerability boundaries.
- Method: DPQ uses full-precision predictions to select high-doubt or boundary-near examples, mixes them with generic anchors, and leaves the quantizer unchanged.This is a lightweight pre-quantization recipe family.
- Results: Across 8 language models, 9 NLP benchmarks, and 22 comparison methods, the best recipe depends on the preservation target.High-boundary mixtures perform better for answerability boundaries, while milder recipes perform better for broad MCQA.
2 Related Work
Prior quantization and calibration research largely optimizes reconstruction, accuracy, or post-hoc score calibration; this paper instead selects calibration data to preserve full-precision uncertainty behavior.
- LLM quantization: Post-training LLM quantization methods primarily optimize reconstruction or downstream accuracy, with calibration data supporting quantization but less often targeting uncertainty behavior.The related methods include weight, activation-aware, smoothing, and low-bit approaches.
- Calibration data and selection: Prior calibration-data studies show that data choice affects pruning and quantization, while self-calibration uses the model to generate calibration data.This paper studies a different objective: preserving full-precision uncertainty behavior.
- Calibration data and selection: Uncertainty sampling, core-set selection, and gradient- or representation-diversity methods provide data-efficiency controls but do not directly target quantized-versus-FP option-probability preservation.The paper includes these methods as baselines.
- Confidence calibration: Confidence-calibration and selective-prediction research mainly analyzes full-precision models, prompting, or direct tuning rather than calibration-data choice during quantization.The cited literature establishes the broader calibration and uncertainty-estimation context.
- Post-hoc calibration: Post-hoc methods intervene after quantization: temperature maps preserve the argmax, whereas flexible calibrators may change decisions while moving behavior away from the full-precision model.The paper instead studies calibration-data selection before quantization.
3 Problem Statement
The paper formalizes quantization as a target-dependent uncertainty-preservation problem, distinguishing distributional fidelity from boundary fidelity and motivating target-matched calibration mixtures.
- Problem setup: The framework compares quantized option probabilities with full-precision probabilities rather than checking only whether the top option matches the label.Answerability is represented as a two-option choice using p(answerable).
- Preservation risks: The paper defines distributional and boundary preservation risks over the target evaluation distribution.Distributional risk measures option-distribution changes; boundary risk concerns decision behavior, including weighted answerability or low-margin cases.
- Preservation risks: Distributional preservation matters for broad MCQA, reranking, or ensembling, whereas boundary preservation matters when answerability or abstention decisions are central.The two risks therefore emphasize different parts of the input space.
- Boundary fragility: Small-margin examples can flip under small perturbations, while large-margin examples are stable under sufficiently bounded quantization error.Boundary-aware calibration exposes fragile activation directions that generic-text calibration may miss.
- Mixture mismatch: A calibration recipe mixes boundary examples and generic anchors with ratio r, while each target has its own mixture weight θ.Boundary-focused targets have large θ; broad answerable MCQA targets have small θ.
- Mixture mismatch: When the component distributions have disjoint support, the mismatch bound is minimized at r*=θ, so different target weights cannot share one optimal fixed ratio.The result motivates evaluating target-dependent mixtures rather than expecting one recipe to dominate.
4 Method
DPQ selects calibration strings using full-precision uncertainty signals, combines selected boundary examples with generic anchors, and runs the unchanged quantizer.
- Method overview: DPQ is a pre-quantization calibration-data selection strategy for GPTQ-style post-training quantization.It changes calibration data rather than the quantizer itself.
- Calibration selection: The procedure scores candidate examples with the full-precision model, selects high-scoring doubt or boundary candidates, and fills the remaining budget with generic anchors.The calibration set has size s and uses mixture ratio r.
- Calibration selection: DPQ constructs selected boundary strings from the original prompt and full-precision top option or options, then unions them with anchor strings.The resulting set is passed to GPTQ unchanged.
- Calibration selection: DPQ leaves the quantizer kernel, bit-width, reconstruction objective, and inference path unchanged, modifying only calibration strings used for activation statistics.GPTQ uses the calibration set to estimate layer-wise activation statistics.
- Candidate pool: The candidate pool combines training-split ARC-Challenge examples with balanced answerable and unanswerable SQUAD2 examples, while evaluation examples remain excluded.The full-precision model scores the pool once offline, adding no inference-time overhead.
- Doubt-based selection: DPQ’s doubt score is high for low-margin examples, and controlled variants replace it with confidence, entropy, answerability, or gold-label NLL signals.The variants isolate the effect of selection signal under the same broader recipe family.
- Doubt-based selection: With budget s and ratio r, DPQ selects the top floor(sr) doubt candidates and draws the remainder from WikiText-style or RandomQA-style anchors.Higher r targets boundary-heavy settings; lower r targets broader answerable behavior.
5 Experiment Results
Across eight language models and nine benchmarks, quantization changes uncertainty behavior, and the best calibration recipe depends on whether deployment prioritizes answerability boundaries or broad option-score preservation.
- Setup: The evaluation covers 8 language models, 9 NLP datasets, and 22 comparison methods across boundary-preservation and broad-MCQA targets.SQuAD2 directly tests answerable versus unanswerable decisions, while six extra-MCQA datasets primarily test broad distributional preservation.
- Quantization-Induced Drift: Quantization frequently worsens accuracy and calibration-sensitive metrics, including ECE, NLL, and Brier score, so score behavior can drift beyond final answers.It can also compress confidence separation between correct and incorrect cases, with absolute shifts varying by task.
- Answerability Boundary: DPQ-s128-r75 is the strongest listed SQUAD2 boundary recipe, reducing boundary-accuracy deviation from 0.4553 to 0.2125 versus GPTQ-WikiText.It also reduces answerability-rate deviation from 0.2271 to 0.1000 and JSD from 0.0387 to 0.0158.
- Answerability Boundary: DPQ-r75 moves Llama-3.1-8B answerability distributions closer to full precision than generic GPTQ-WikiText calibration.The diagnostic compares p(answerable) for gold-answerable and gold-unanswerable examples, where ideal behavior is near one and zero, respectively.
- Answerability Boundary: SQUAD2 ablations favor mixed composition over larger budgets: r75 performs best, while r100 over-concentrates on boundary cases and single-signal variants fall short.Strong data-selection baselines improve over generic text calibration but remain below DPQ-r75 on the boundary-specific aggregate.
- Broad MCQA Trade-off: Broad extra-MCQA preservation favors milder or single-signal recipes, including confidence-only, entropy-only, uncertainty-only, and DPQ-r50, over DPQ-r75.Figure 4 summarizes the trade-off: no calibration recipe dominates both SQUAD2 boundary and broad-MCQA targets.
- Broad MCQA Trade-off: Post-hoc calibration and pre-quantization selection intervene at different stages: flexible score calibrators may improve MCQA accuracy while increasing drift from full-precision behavior.Adaptive temperature preserves accuracy and agreement with full precision but increases JSD and margin drift.
- Broad MCQA Trade-off: On AWQ, DPQ-r75 has mean rank 1.97, 42.9% top-1 frequency, and 73.0% top-2 frequency, but the exact recipe still depends on quantizer and metric.Per-dataset score-based metrics can favor generic calibration.
6 Conclusion
The paper frames quantization calibration-data selection as target-dependent uncertainty preservation rather than a fixed compression detail. Different preservation targets favor different recipes, with DPQ-r75 suited to answerability boundaries and milder or single-signal variants suited to broad MCQA.
- Quantization should preserve uncertainty behavior, including confidence, margins, and answerability, not only top-1 predictions.These score behaviors support downstream abstention, selective prediction, reranking, and related decisions.
- High-boundary mixtures such as DPQ-r75 better preserve SQUAD2-style answerability boundaries.
- Milder mixtures or single-signal variants better preserve broad multiple-choice QA behavior.
- Calibration data should be selected for the specific full-precision score behavior a deployment needs to preserve.
- Pre-quantization data selection, post-quantization calibration, and quantizer choice affect preservation differently.Recipes should therefore be tuned to both the target behavior and the quantization method.
Limitations
The study’s evidence is bounded by its controlled option-scoring setting, target-oriented candidate pool, quantizer and bit-width coverage, and limited analysis of interactions with post-hoc calibration. These boundaries motivate testing transfer across broader settings and deployment conditions.
- The uncertainty analysis is restricted to option scoring and answerability rather than verbalized confidence or long-form generation.Extending the perspective to generated-text uncertainty remains future work.
- The candidate pool is intentionally target-oriented toward answerable QA and answerability-style cases.Less aligned or domain-shifted pools remain to be tested, and target-specific gains should be checked against broad-preservation metrics.
- The main experiments focus on GPTQ-style calibration-data selection, with AWQ and BNB-NF4 included as quantizer-family checks.A broader sweep over quantizers and bitwidths would further refine deployment-specific recipes.
- The post-hoc analysis covers representative score-space methods but does not fully study their combination with target-aware calibration selection.The paper identifies this interaction as a direction for future work.
- The paper motivates auditing quantized models beyond accuracy because uncertainty drift can alter downstream answering and deferral decisions.
A.1 Stability and Ablations on the Answerability-Boundary Target
The answerability-boundary results remain stable across checks and support a mixed, high-boundary calibration strategy. DPQ-r75 outperforms boundary-only or single-signal alternatives on the boundary target, while broad-preservation results favor milder recipes.
- Stability of the core result: DPQ-s128-r75 remains first after removing the Llama-3.2-1B stress case, with FP agreement rising to 0.9360.
- Answerability distribution diagnostics: DPQ-r75 generally reduces quantization-induced answerability-distribution drift across Qwen2.5-7B and Mistral-7B-v0.3, though residual drift varies by model.
- Ablations on the boundary target: The boundary-ratio ablation is non-monotonic: both r0 and r100 trail r75, indicating that boundary mass should be high but not exclusive.
- Ablations on the boundary target: Generic anchors contribute to boundary preservation because boundary-only and boundary-random variants fall below DPQ-r75.
- Broad-preservation diagnostics: Confidence-only, TaskRandom, HighNLL-QA, entropy-only, and uncertainty-only sit above DPQ-r75 on the six answerable extra-MCQA datasets.BNB-NF4 leads FP agreement and JSD but not average rank, so broad preservation is a multi-metric trade-off.
A.3 Post-Hoc Calibration Analysis
Post-hoc score calibration and pre-quantization data selection optimize different objectives, while AWQ results show that the best calibration recipe depends on both quantizer and target. The appendix therefore treats metric and recipe rankings as context-dependent rather than universal.
- Post-hoc calibration: Adaptive temperature leaves accuracy and FP agreement unchanged but increases JSD and margin drift.
- Post-hoc calibration: Flexible calibrators raise accuracy, particularly on old-core, while reducing FP agreement and increasing distributional drift.
- Post-hoc calibration: Pre-quantization data selection controls which behavior is preserved, whereas post-hoc calibration reshapes scores after quantization.The two stages can therefore be complementary rather than substitutes.
- AWQ quantizer-family extension: The AWQ extension evaluates 8 models, 3 old-core datasets, and 4 recipes across 96 evaluations.It tests whether the calibration-data signal observed under GPTQ transfers to another quantizer family.
- AWQ quantizer-family extension: AWQ transfer is dataset-dependent: DPQ variants dominate ARC-Challenge, while WikiText leads most reported metrics on SQUAD2 and every metric on TruthfulQA.
B.1 Additional Broad-Preservation Diagnostics
The diagnostics show that quantization can alter confidence, margins, and correct-versus-wrong separation beyond top-1 accuracy. Preservation performance varies by dataset, metric, and calibration recipe, with DPQ variants stronger on FP-behavior metrics in aggregate.
- Post-hoc calibration: Flexible post-hoc calibrators can improve accuracy while reducing agreement with FP and increasing distributional drift.The post-hoc family summary covers old-core and extra-MCQA suites.
- Calibration-gap prevalence: Quantization changes confidence and margin behavior beyond accuracy, with generic-text calibration producing the largest mean shifts.No method eliminates degradation across all reported columns.
- Correct-vs-wrong confidence decomposition: Correct-prediction confidence can fall while wrong-prediction confidence remains high, weakening separation despite modest average-confidence changes.Table 12 separates the confidence gap on correct predictions from overconfidence on wrong predictions.
- Post-hoc calibration: Temperature scaling improves ECE and NLL deltas but leaves accuracy, FP agreement, and boundary decisions unchanged.This check uses one optimally fitted temperature per model–dataset setting.
- AWQ transfer: The preferred AWQ recipe varies by dataset and metric rather than following one fixed calibration choice.The per-dataset breakdown averages results over eight models.
- Aggregate AWQ results: Across models, WikiText or RandomQA win several score-based metrics, whereas DPQ variants are stronger on FP-behavior metrics.DPQ-r75 has the best mean rank and top-2 frequency in the aggregate summary.
C Formal Analysis and Proofs
The formal analysis characterizes boundary flips, calibration-target mismatch, finite-sample coverage, and conflicts between post-hoc accuracy repair and FP preservation. Together, these results connect uncertainty-target selection to the margin distribution and calibration mixture.
- C.2 Boundary Fragility: Low-margin examples are fragile under quantization because sufficiently large relative score perturbations can reverse the FP top-two ordering.The flip occurs when the runner-up’s perturbation exceeds the top option’s perturbation by more than the FP logit margin.
- C.2 Boundary Fragility: A perturbation bounded by γ(x)/2 preserves the FP top-1 decision against every alternative option.The result assumes the FP logit margin is positive.
- C.3 Calibration Distribution and Target Mismatch: For bounded loss, target-risk mismatch is bounded by TV(T, q), linking calibration-distribution choice to the evaluation target.Here q is the calibration-string distribution and T is the target evaluation distribution.
- C.3 Calibration Distribution and Target Mismatch: When boundary and anchor supports are disjoint, mixture mismatch equals the difference between target and calibration boundary weights, |θ − r|.The calibration mixture is q_r and the target mixture is T_θ.
- C.3 Calibration Distribution and Target Mismatch: Random QA needs n ≥ log(1/δ)/ρ samples to observe a boundary example with probability at least 1 − δ, while DPQ selects boundary examples directly.Small boundary mass ρ therefore requires many random calibration samples.
- C.4 Boundary vs Hard-Example Mining: Gold-label NLL mining and boundary mining select distinct examples because high NLL can coexist with a large margin.A confidently wrong example may have high NLL while remaining far from the decision boundary.
- C.5 Why Post-hoc Calibration Is Not Equivalent: Scalar temperature scaling preserves the decision surface and therefore cannot repair top-1 or answerability-boundary flips.Flexible mappings may alter decisions but can reduce FP agreement; accuracy repair and FP preservation can also conflict.
- C.6 Correct-vs-Wrong Decomposition: Correct-vs-wrong confidence decomposition shows that similar average calibration metrics can conceal different reliability and error-confidence profiles.The decomposition uses the confidence gap on correct predictions and overconfidence on wrong predictions.
D Reproducibility Details
The reproducibility details specify the experimental inventory, deterministic data construction, scoring pipeline, quantization settings, and retained artifacts. Calibration and evaluation data are separated, and DPQ selection uses full-precision model signals over defined candidate pools.
- Experimental inventory: The experimental inventory includes zero missing entries across 552 old-core and 1104 extra-MCQA pre-quantization rows.These counts come from the final merged result files.
- Compute infrastructure and budget: All experiments run on one NVIDIA GeForce RTX 5090 GPU with 32GB memory and use post-training quantization rather than training from scratch or instruction tuning.The dominant costs are repeated 4-bit GPTQ/AWQ quantization and deterministic option-scoring evaluation.
- Dataset sizes and splits: Calibration examples come only from training or calibration pools, while evaluation examples are excluded from DPQ calibration construction.Evaluation sizes after filtering and subsampling are reported separately.
- GPTQ and BNB settings: GPTQ uses 4-bit quantization with sequence length 512, batch size 1, and up to 128 calibration examples, while BNB uses 4-bit NF4 with double quantization.The desc_act flag is off by default, and size ablations use 64 or 256 examples.
- DPQ calibration construction: DPQ builds candidate boundary pools from ARC-Challenge and SQUAD2 training data, then ranks examples using variant-specific full-precision signals.The construction uses 512 candidates per source, with balanced SQUAD2 answerability cases and fixed seeds.
- Prompt format and option scoring: Multiple-choice options are scored as label continuations, length-normalized by default, and converted to option probabilities with a softmax.SQUAD2 answerability prompts use answerable and unanswerable options.
- Post-hoc controls: Post-hoc controls evaluate temperature and flexible score-space mappings from saved logits or probabilities, fitted per evaluation setting where applicable.Evaluated mappings include option-bias, vector, matrix, Dirichlet, and isotonic calibrators.
- Artifacts and licenses: Experiments use public checkpoints and standard benchmarks, with prediction files, summaries, reports, and derived tables retained after quantized checkpoints and caches were cleaned.The study does not redistribute original checkpoints or datasets.