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

Abstract

Modern convolutional neural networks (CNNs) are known to be overconfident in terms of their calibration on unseen input data. That is to say, they are more confident than they are accurate. This is undesirable if the probabilities predicted are to be used for downstream decision making. When considering accuracy, CNNs are also surprisingly robust to compression techniques, such as quantization, which aim to reduce computational and memory costs. We show that this robustness can be partially explained by the calibration behavior of modern CNNs, and may be improved with overconfidence. This is due to an intuitive result: low confidence predictions are more likely to change post-quantization, whilst being less accurate. High confidence predictions will be more accurate, but more difficult to change. Thus, a minimal drop in post-quantization accuracy is incurred. This presents a potential conflict in neural network design: worse calibration from overconfidence may lead to better robustness to quantization. We perform experiments applying post-training quantization to a variety of CNNs, on the CIFAR-100 and ImageNet datasets.

Introduction

Deploying deep learning models on edge devices requires balancing two critical factors: calibration and efficiency. Calibration ensures that a model's confidence scores accurately reflect its probability of being correct. Efficiency, often achieved through quantization, reduces the precision of model weights and activations to save memory and compute. Traditionally, these have been treated as independent optimization goals. However, this research reveals a fundamental tension: the "overconfidence" typical of modern CNNs may actually serve as a protective buffer against the noise introduced by quantization.

Methodology

The study investigates Post-Training Quantization (PTQ), where models are compressed without further fine-tuning. The researchers employed a uniform per-channel symmetric quantization for weights and per-tensor asymmetric quantization for activations. By holding activation precision at 8 bits and varying weight precision from 8 bits down to 4 bits, they observed how quantization noise impacts model behavior.

Key metrics included:

  • Swapped Predictions: Cases where quantization causes the model to change its predicted class.
  • Reliability Curves: Plots of accuracy versus confidence to measure calibration.
  • Error Rate Change: The net impact on overall accuracy.

The Calibration-Robustness Trade-off

The core insight of this work is the relationship between a model's confidence and its robustness to noise. Low-confidence predictions are inherently unstable; because the probability gap between the top class and alternatives is small, even minor quantization noise can "swap" the prediction. However, since these low-confidence samples are often already incorrect, swapping them frequently has a negligible impact on overall error rates.

Conversely, high-confidence predictions are much harder to flip. It requires significant noise to overcome a 99% confidence margin. Because high-confidence predictions are more likely to be correct, this stability preserves the model's accuracy during compression.

Reliability curves showing the overconfidence of ResNet56 on CIFAR-100 compared to the better-calibrated ResNet50 on ImageNet.

Experimental Results

Experiments were conducted on CIFAR-100 (using ResNet56) and ImageNet (using ResNet50). The results highlighted a stark difference in robustness linked to calibration:

  1. ResNet56 (CIFAR-100): This model exhibited significant overconfidence but remained remarkably robust to quantization. While many predictions swapped as precision decreased, the error rate remained stable because the swaps primarily affected low-confidence, already-incorrect samples.
  2. ResNet50 (ImageNet): Being naturally better calibrated, this model showed a sharper increase in error as quantization noise grew. With fewer "overconfident" buffers, the quantization noise more quickly impacted correct predictions.
Analysis of swapped predictions, error rate ratios, and the confidence distribution of swapped samples across varying weight precisions.

As shown in the figures, the ratio of error rate increase to swapped predictions grows as weight precision drops. Initially, "safe" swaps among low-confidence samples dominate. As noise increases (e.g., at 4-bit weights), the noise finally overcomes the confidence of correct predictions, leading to a plummet in accuracy.

Conclusion

This research identifies a "calibration paradox": improving a model's calibration to make it more trustworthy for decision-making may inadvertently make it more fragile when deployed on resource-constrained hardware. For engineers building models for mobile or edge devices, a certain degree of "arrogance" or overconfidence in the model's predictions might be a desirable trait for maintaining accuracy under heavy quantization. Future work will explore how training-time calibration techniques and logit-level noise analysis further influence this dilemma.

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},
}
Figure