Abstract
Safety-critical applications require machine learning models that output accurate and calibrated probabilities. While uncalibrated deep networks are known to make over-confident predictions, it is unclear how model confidence is impacted by the variations in the data, such as label noise or class size. In this paper, we investigate the role of the dataset quality by studying the impact of dataset size and the label noise on the model confidence. We theoretically explain and experimentally demonstrate that, surprisingly, label noise in the training data leads to under-confident networks, while reduced dataset size leads to over-confident models. We then study the impact of dataset heterogeneity, where data quality varies across classes, on model confidence. We demonstrate that this leads to heterogenous confidence/accuracy behavior in the test data and is poorly handled by the standard calibration algorithms. To overcome this, we propose an intuitive heterogenous calibration technique and show that the proposed approach leads to improved calibration metrics (both average and worst-case errors) on the CIFAR datasets.
Introduction
In safety-critical domains like autonomous driving or medical diagnostics, a model's ability to quantify its own uncertainty is as vital as its raw accuracy. This property, known as calibration, ensures that a model's predicted probability (confidence) aligns with the actual likelihood of being correct. For instance, if a model predicts a 70% probability for a specific outcome, that outcome should occur 70% of the time across many such predictions.
While it is well-documented that modern deep neural networks tend to be over-confident, the specific drivers of this behavior—and its potential reversals—remain under-explored. This research investigates how dataset quality, specifically sample size and label noise, dictates model confidence.
The Impact of Data Quality: Over-confidence vs. Under-confidence
The researchers identify two primary factors influencing calibration: dataset size and label noise. Their findings reveal a striking dichotomy in how these factors affect a model's "ego."
The Arrogance of Small Data
When trained on small datasets, models tend toward extreme over-confidence. With fewer samples, a high-capacity neural network can easily "memorize" or interpolate the training data, achieving near 100% training accuracy. This leads the model to output very high confidence scores that do not hold up when faced with unseen test data.
The Hesitation of Noisy Data
Conversely, the study reveals a counter-intuitive trend: label noise leads to under-confidence. When training data contains incorrect labels, the model encounters contradictory signals. It cannot perfectly fit the noise, preventing it from reaching the "arrogant" state of 100% training certainty. Consequently, the model remains "hesitant" or under-confident, even when its predictions are actually correct.
Addressing Heterogeneity: Class-wise Temperature Scaling
Real-world datasets are rarely uniform; they are "heterogeneous." Some classes may be well-represented with clean labels, while others are rare or noisy. Standard calibration methods like Temperature Scaling (TS) apply a single global correction factor. This "one-size-fits-all" approach is insufficient when a model is simultaneously over-confident in some classes and under-confident in others.
To solve this, the authors propose Class-wise Temperature Scaling (CTS). Instead of a single global parameter, CTS learns a unique "temperature" for each class. This allows for granular adjustments, softening probabilities for over-confident classes and sharpening them for under-confident ones.
To prevent overfitting in classes with very few samples, the authors include a multi-task regularization term ($\Gamma$), allowing rare classes to "borrow" calibration information from the global average while still allowing for class-specific adjustments.
Experimental Results
The proposed CTS method was evaluated on CIFAR-10 and CIFAR-100 datasets with induced noise and size imbalances.
- Improved Calibration: CTS consistently outperformed standard TS. On CIFAR-100 with noisy classes, CTS reduced the Max-ECE (the error of the most poorly calibrated class) from approximately 33% to 24%.
- Decision Preservation: Unlike other methods like Vector Scaling, CTS changes only the confidence scores, not the final predictions. This ensures that the model's underlying logic and accuracy remain intact while its self-awareness improves.
Conclusion
Understanding the relationship between data quality and model confidence is crucial for deploying reliable AI. By recognizing that noise and size affect confidence in opposite ways, developers can better diagnose calibration issues. Class-wise Temperature Scaling offers a robust, intuitive solution for the heterogeneous data challenges inherent in real-world applications, ensuring that models are neither too arrogant nor too hesitant.
Summary updated