Abstract
The ability to ensure that a classifier gives reliable confidence scores is essential to ensure informed decision-making. To this end, recent work has focused on miscalibration, i.e., the over or under confidence of model scores. Yet calibration is not enough: even a perfectly calibrated classifier with the best possible accuracy can have confidence scores that are far from the true posterior probabilities. This is due to the grouping loss, created by samples with the same confidence scores but different true posterior probabilities. Proper scoring rule theory shows that given the calibration loss, the missing piece to characterize individual errors is the grouping loss. While there are many estimators of the calibration loss, none exists for the grouping loss in standard settings. Here, we propose an estimator to approximate the grouping loss. We show that modern neural network architectures in vision and NLP exhibit grouping loss, notably in distribution shifts settings, which highlights the importance of pre-production validation.
The Problem: Calibration is Not Enough
In machine learning, we often strive for "calibrated" probabilities. If a model predicts a 70% chance of an event, that event should occur 70% of the time across many such predictions. However, calibration is a weak guarantee because it only ensures reliability on average. A model can be perfectly calibrated while being wildly inaccurate for specific subgroups.
Consider a medical AI that assigns a 60% risk score for a disease to every patient. If 60% of the total population actually develops the disease, the model is perfectly calibrated. However, if the population actually consists of two hidden groups—one with a 100% risk and another with a 20% risk—the model fails both groups by ignoring their specific characteristics. This discrepancy between the model's score and the true underlying probability for a subgroup is known as grouping loss.
Until now, estimating grouping loss was difficult because we lack access to the "true" posterior probabilities (the ground truth "oracle" risk). This research provides a formal framework and a practical estimator to measure this hidden risk in modern neural networks.
Methodology: Estimating the Hidden Loss
The authors leverage the theory of proper scoring rules (such as the Brier score or Log-loss), which can be mathematically decomposed into three distinct components:
- Calibration Loss: Measures if the scores are correct on average.
- Grouping Loss: Measures if the model ignores variations within groups that share the same score.
- Irreducible Loss: Represents the inherent randomness of the problem itself.
To estimate the grouping loss without knowing the true probabilities, the authors propose a lower-bound estimator ($GL_{LB}$). The process involves partitioning the feature space using a decision tree based on the model's internal representations (the penultimate layer). Within each "bin" of confidence scores, they analyze whether these partitioned regions have significantly different actual outcomes. If one region shows a much higher success rate than another despite identical confidence scores, grouping loss is detected. A novel debiasing technique is applied to ensure the measured loss reflects true model behavior rather than finite sample noise.
Key Results: The Persistence of Grouping Loss
The researchers evaluated their method on benchmarks including ImageNet-1K, ImageNet-R (renditions), and Yahoo Answers. The results reveal that grouping loss is a significant factor in modern architectures, particularly under distribution shifts.
One of the most critical findings is the "blind spot" of standard recalibration. Techniques like Isotonic Regression or Platt Scaling are designed to fix calibration, but they do nothing to address grouping loss. They merely shift labels without improving the granularity of the model's features.
As shown in the figure above, even when the average calibration curve (the black line) is perfectly aligned with the diagonal after recalibration, the individual subgroups (colored dots) remain widely scattered. This scatter represents the grouping loss that calibration metrics fail to capture.
Insights and Future Directions
- OOD Triggers Grouping Loss: In NLP tasks, models showed minimal grouping loss on in-distribution data but experienced significant spikes when encountering out-of-distribution (unseen) topics.
- Architectural Variance: Different architectures, such as ConvNeXt and ViT, exhibit varying levels of grouping loss even when achieving similar accuracy, suggesting some models are inherently better at capturing subgroup nuances.
- Pre-production Validation: The authors argue that grouping loss should be a standard metric for validating models in high-stakes fields like medicine or law, where individual reliability is paramount.
While the current estimator provides a lower bound, it marks a significant step toward more granular AI evaluation. Future work may involve developing "grouping-aware" training objectives to actively minimize this loss during the learning phase, rather than just measuring it post-hoc.
Summary updated