NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

An Underexplored Dilemma between Confidence and Calibration in Quantized Neural Networks

Guoxuan Xia, Sangwon Ha, Tiago Azevedo, Partha Maji

TL;DR

Modern neural networks are notoriously overconfident, but this study reveals an unexpected upside: overconfidence actually shields networks against accuracy drops during post-training quantization. This finding exposes a hidden dilemma in machine learning design, where training a better-calibrated model might inadvertently make it more fragile when compressed for deployment.

What Problem Does This Paper Address?

Modern deep neural networks, like ResNets, exhibit two well-known properties that are typically studied in isolation:

  1. Poor calibration: They tend to be overconfident—their predicted class probabilities are frequently much higher than their actual empirical accuracy.
  2. Quantization robustness: They can have their weights and activations compressed to lower bit-widths (e.g., from FP32 down to INT8) with surprisingly little loss in top-line accuracy.

While prior research has developed sophisticated post-training quantization (PTQ) techniques, few have asked why architectures are inherently robust to this quantization noise in the first place. The authors investigate how a model’s confidence and calibration directly govern its resilience to quantization.

Methods

The authors analyze post-training quantization by treating lower bit-width precision as additive noise perturbing the network's logits. To decouple the mechanics of prediction changes:

  • Controlled Quantization Scheme: They apply uniform per-channel symmetric quantization to weights and uniform per-tensor asymmetric quantization to activations (using PyTorch's histogram-based MSE minimization). Batch normalization layers are folded into preceding convolutions.
  • Noise Sweeps: While keeping activation precision constant at 8 bits (a8), they decrease weight precision progressively from 8 bits down to 4 bits (w8 down to w4) to inject increasing levels of quantization noise.
  • Tracking Metrics: They evaluate the percentage of changed ("swapped") predictions, the change in error rate ($\Delta\% \text{ error rate}$), the ratio between the two ($\frac{\Delta\% \text{ error rate}}{\% \text{ swapped}}$), and the pre-quantization confidence distribution of predictions that get swapped.

Datasets

The authors use standard computer vision benchmarks:

  • CIFAR-100 (evaluating ResNet-56 and ResNet-20)
  • ImageNet (evaluating ResNet-50 and MobileNetV2)

No new datasets were introduced. Pretrained ImageNet models were sourced directly from PyTorch's torchvision library.

Key Insights and Ideas

  • Low-confidence predictions swap first: In a classification network, a prediction flips only if quantization noise is large enough to overcome the gap between the top logit and the runner-up logits. Low-confidence predictions have small logit margins and are displaced by even modest noise.
  • Swapping low-confidence predictions is harmless: Because low-confidence predictions have lower accuracy (e.g., predictions with confidence $<0.5$ are usually already incorrect), flipping them doesn't hurt overall accuracy much. Changing an incorrect class to another incorrect class—or by chance to the correct one—does not worsen the error rate.
  • Overconfidence acts as an accuracy buffer: Overconfidence pushes correct predictions into very high confidence regimes ($>0.8$ or $0.9$), widening their logit margins and making them resistant to noise. At the same time, it leaves the few low-confidence predictions to absorb the initial quantization noise without degrading error rate.
  • The Design Dilemma: Post-hoc calibration techniques (like Temperature Scaling or Deep Ensembles) do not alter the underlying model weights and thus do not affect this behavior. However, training methods designed to improve intrinsic calibration—such as label smoothing or soft calibration loss objectives—may inadvertently destroy a network’s quantization robustness.

Key Results

  • Error-to-Swap Ratio Dynamics: Across models, as weight precision decreases (w8 $\rightarrow$ w4), the proportion of swapped predictions climbs steadily (often reaching 10–30%), but the error rate remains virtually unchanged initially. The ratio $\frac{\Delta\% \text{ error rate}}{\% \text{ swapped}}$ stays close to $0.05\text{--}0.10$ under mild noise.
  • The High-Confidence Cliff: Only when weight precision drops to lower bit-widths (w5, w4) does quantization noise become large enough to perturb predictions with confidence near $1.0$. Once these high-confidence (and high-accuracy) predictions begin swapping, the error rate spikes dramatically.
  • ResNet56 vs. ResNet50: ResNet56 on CIFAR-100 (accuracy: 70.09%) is severely overconfident compared to ResNet50 on ImageNet (accuracy: 76.13%). As predictions in the $[0.5, 1.0]$ confidence interval begin swapping, the error-to-swap ratio grows noticeably slower for ResNet56, supporting the hypothesis that stronger overconfidence offers better protection against quantization error.
  • MobileNetV2 Fragility: MobileNetV2 exhibits similar calibration characteristics to ResNet50 but suffers much higher logit noise under quantization, displaying earlier degradation while following the same underlying relationship.

Limitations and Future Work

  • Output vs. Logit Distribution: The paper analyzes behavior post-softmax and relies on intuitive assumptions about logit-level behavior, rather than fully modeling logit distributions conditioned on network inputs and quantization bit-widths.
  • Empirical Validation on Calibrated Models: The paper theorizes that training-time calibration methods (e.g., label smoothing or soft calibration objectives) will harm quantization robustness, but leaves direct experimental validation of these training regimes to future work.

Summary updated

BibTeX
@inproceedings{xia2021underexplored,
  author = {Guoxuan Xia and Sangwon Ha and Tiago Azevedo and Partha Maji},
  title = {{An Underexplored Dilemma between Confidence and Calibration in Quantized Neural Networks}},
  booktitle = {ICBINB @ NeurIPS},
  year = {2021},
  url = {https://openreview.net/forum?id=_5d0_qtXt5d},
}

Loading related content...

Figure