TL;DR
Quantizing Large Language Models (LLMs) often severely distorts their confidence and uncertainty scores, breaking downstream tasks like abstention, verification, and ensembling even when top-1 accuracy remains unchanged. This paper introduces Doubt-Preserving Quantization (DPQ), a lightweight pre-quantization calibration strategy that curates target-specific data mixtures of "high-doubt" examples and generic anchors to preserve the original model's uncertainty behavior.
What Problem Does This Paper Address?
Post-training quantization (PTQ) methods like GPTQ and AWQ are standard tools for compressing LLMs to fit on smaller hardware. However, standard compression pipelines evaluate success using accuracy, perplexity, or raw benchmark scores. They overlook uncertainty drift—the phenomenon where a quantized model drastically shifts its probability distributions compared to its full-precision (FP) counterpart.
For instance, an FP model might assign option probabilities of (0.51, 0.49) for a difficult question, signaling high uncertainty. After quantization, it might output (0.95, 0.05) for the exact same top-1 answer.
This artificial inflation or deflation of confidence breaks downstream modules that consume these scores, such as selective prediction thresholds, verifiers, safety filters, or ensembling systems. The authors address this gap by framing calibration data selection as a target-dependent uncertainty preservation problem.
Methods
The authors propose Doubt-Preserving Quantization (DPQ), a lightweight data-selection framework executed before running standard quantizers. Rather than treating calibration data as a static text corpus (like WikiText or C4), DPQ dynamically selects data based on the full-precision model's own predictions.
The pipeline follows these steps:
-
Doubt Scoring: A candidate pool of data is evaluated by the FP model. For each example, a "doubt score" is computed based on the margin between the top two predicted options: $$b(x) = 1 - (p_{0,(1)}(x) - p_{0,(2)}(x))$$ High scores isolate examples near decision boundaries where the model is most insecure.
-
Target-Aligned Mixing: Based on the deployment goal, DPQ selects a mixture ratio ($r$). It samples the top $\lfloor sr \rfloor$ high-doubt examples and fills the rest of the calibration budget ($s$) with generic text anchors.
- Quantization: The curated dataset is passed to an unchanged, standard quantizer (e.g., GPTQ). No new quantization kernels or inference-time overheads are introduced.
Datasets
The candidate pool for calibration data selection was built using training splits from:
- ARC-Challenge: Providing structured multiple-choice QA data.
- SQuAD2: Providing balanced answerable and unanswerable boundary cases.
For evaluation, the authors tested 8 language models across 9 NLP benchmarks, categorized by their preservation targets:
- Boundary Preservation Target: SQuAD2 answerability (testing answer vs. abstain decisions).
- Broad Distributional Preservation Target (Extra-MCQA suite): ARC-Easy, ARC-Challenge, BoolQ, PIQA, HellaSwag, OpenBookQA, CommonsenseQA, and TruthfulQA.
Key Insights and Ideas
- Boundary Fragility: Uncertainty behavior is highly fragile near decision boundaries. Small quantization perturbations easily flip the relative ordering of low-margin options, turning minor reconstruction errors into major behavioral shifts.
- The Mixture Mismatch Principle: There is no "one-size-fits-all" calibration dataset. Applications focused on abstention or safety filtering require boundary-heavy calibration data (high $r$), while broad multiple-choice tasks require milder mixtures to preserve overall probability shapes.
- Pre-Quantization vs. Post-Hoc Calibration: Post-hoc adjustments (like temperature scaling) can smooth out scores but cannot repair decision flips or boundary distortions that have already been baked into the model weights during quantization. Pre-quantization data selection controls what behavior is preserved in the first place.
Key Results
The authors evaluated DPQ against 22 comparison methods across multiple model families (Qwen2.5, Llama-3, Mistral).
- SQuAD2 Answerability Boundary: High-doubt mixtures excelled here. DPQ-s128-r75 (using 75% high-doubt data) emerged as the strongest recipe. Compared to standard GPTQ-WikiText calibration, it slashed boundary-accuracy deviation from 0.4553 to 0.2125 and reduced Jensen-Shannon Divergence (JSD) to the FP model from 0.0387 to 0.0158.
- Broad MCQA Preservation: When evaluating tasks that require broad distributional preservation rather than strict boundary decisions, the optimal recipe shifted. Milder or single-signal variants like DPQ-r50 or confidence-only selection outperformed the boundary-heavy r75 recipe, validating the target-dependent design principle.
Limitations and Future Work
- Option-Scoring Focus: The study operationalizes uncertainty strictly through multiple-choice option scoring and classification. Extending this framework to long-form generation and verbalized confidence (e.g., models literally typing "I am 80% sure") remains an open challenge.
- Target-Oriented Calibration Pool: The candidate pool was intentionally aligned with QA structures. Future work needs to explore how well these selection principles transfer to domain-shifted or unaligned calibration pools.
- Quantizer Scope: While tested successfully on GPTQ and AWQ, a broader sweep across varying bit-widths and newer quantization methods would help refine deployment-specific recipes.
Summary updated