Scalable Utility-Aware Multiclass Calibration

Mahmoud Hegazy, Michael I. Jordan, Aymeric Dieuleveut · Submission to NeurIPS 2025 · Rejected

TL;DR

Evaluating whether a multiclass model is calibrated has historically forced practitioners to choose between brittle, bin-dependent heuristics (like top-class ECE) or computationally intractable variational measures. This paper introduces utility calibration, a framework that assesses calibration directly through downstream tasks and utility functions. By evaluating calibration over user utility distributions rather than arbitrary binning schemes, it unifies existing metrics into robust, bin-free variants and scales efficiently to problems with thousands of classes.

What Problem Does This Paper Address?

In multiclass classification, a model is perfectly calibrated if its predicted probabilities reflect ground-truth conditional event frequencies ($\mathbb{E}[Y \mid f(X)] = f(X)$). Unfortunately, measuring Mean Calibration Error (MCE) is statistically impossible without strong assumptions, and standard non-parametric estimators suffer from sample complexity that grows exponentially with the number of classes $C$.

Practitioners usually rely on two flawed workarounds:

  1. Binarized relaxations (e.g., Top-Class Error [TCE] or Class-Wise Error [CWE]): These reduce multiclass problems to one-vs-rest binary subproblems and compute Expected Calibration Error (ECE) via binning. However, binning heuristics are notoriously sensitive to hyperparameters, introduce high bias, and presume how the model will be used downstream.
  2. Variational methods (e.g., Kernel Calibration Error or Decision Calibration): While mathematically rigorous, measuring or optimizing them scales poorly or becomes NP-hard as $C$ grows.

This paper tackles the challenge of defining an evaluation framework that is theoretically sound, binning-free, actionable for downstream decision-making, and computationally scalable to high dimensions.

Methods

The authors propose Utility Calibration (UC). Instead of measuring probability errors directly, UC measures whether the expected utility computed by a downstream user matches the realized utility once true labels are observed.

  • Single Utility Formulation: Given a utility function $u(f(X), Y) \in [-1, 1]$ and predicted utility $v_u(X) = \mathbb{E}_{\hat{Y} \sim f(X)}[u(f(X), \hat{Y}) \mid X]$, the utility calibration error over worst-case intervals $I$ is: $$\text{UC}(f, u) := \sup_{I \subseteq [-1, 1]} |\mathbb{E}[(u(f(X), Y) - v_u(X)) \mathbf{1}\{v_u(X) \in I\}]|$$ Because it takes the supremum over all intervals $I$, it provides a worst-case interval guarantee without relying on fixed bins.

  • Unifying Existing Calibration Concepts: By varying the class of utility functions $\mathcal{U}$, UC recovers and generalizes:

  • Top-Class Utility ($\mathcal{U}_{\text{TCE}}$): Utility based solely on whether the top prediction was correct.
  • Class-Wise Utility ($\mathcal{U}_{\text{CWE}}$): Utility per class label indicator.
  • Top-$K$ and Rank-Based Utilities ($\mathcal{U}_{\text{Top}K}, \mathcal{U}_{\text{rank}}$): Utilities rewarding correct predictions within the top-$K$ ranks or monotonic rank valuations.
  • Decision-Theoretic Utilities ($\mathcal{U}_{\text{dec}, K}$): General $K$-action decision problems.
  • Measurability Framework:
  • Proactive Measurability (finding the worst-case utility $u \in \mathcal{U}$ in polynomial time) is computationally hard for rich continuous classes like linear utilities.
  • Interactive Measurability (statistically estimating the error across $\mathcal{U}$ uniformly) is achievable with polynomial sample complexity.
  • Scalable Evaluation via Empirical CDFs (eCDF): Instead of solving an intractable worst-case optimization over continuous utility spaces, the authors sample $M$ utility functions from a natural prior distribution $\mathcal{D}_{\mathcal{U}}$ (e.g., random payoff vectors or rank-decreasing weights) and plot the empirical Cumulative Distribution Function (eCDF) of their calibration errors.

Datasets

The authors evaluated pretrained vision backbones on standard benchmarks:

  • CIFAR-100 (100 classes) using ResNet20
  • ImageNet-1K (1,000 classes) using a Vision Transformer (ViT)
  • (CIFAR-10 is also referenced in setup/appendix benchmarks)

No new datasets were introduced; established post-hoc recalibration techniques (Temperature Scaling, Vector Scaling, Ensemble Temperature Scaling, Dirichlet Calibration, and Isotonic Regression) were benchmarked under the proposed metric.

Key Insights and Ideas

  • Binning-Free Generalization: $\text{UC}(f, \mathcal{U}_{\text{TCE}})$ and $\text{UC}(f, \mathcal{U}_{\text{CWE}})$ upper-bound standard binned ECE metrics ($m \cdot \text{UC} \ge \text{ECE}_{\text{bin}}$ for $m$ bins), completely sidestepping bin-tuning pathologies.
  • Decision-Theoretic Guarantees: A small $\text{UC}(f, u)$ guarantees that any binary decision thresholded on predicted utility cannot be meaningfully improved by monotonic post-processing (Proposition 3.1), and bounds the distance of the expected utility predictor to a perfectly calibrated utility regressor (Proposition 3.2).
  • The Blind Spot of Top-1 Metrics: A model can appear well-calibrated when looking only at its top prediction ($\mathcal{U}_{\text{TCE}}$), but remain significantly miscalibrated across downstream decisions involving ranks beyond top-1 ($\mathcal{U}_{\text{Top}K}$).
  • Failure Modes of Standard Recalibration: Some post-hoc recalibration methods (such as Isotonic Regression) actually degraded calibration on rank-based utilities compared to uncalibrated models, an issue completely invisible when reporting standard top-1 ECE.

Key Results

  • CIFAR-100 with ResNet20:
  • Uncalibrated ResNet20 had a binned TCE of $0.1600 \pm 0.008$ and $\text{UC}_{\text{TCE}}$ of $0.1590 \pm 0.015$.
  • Post-hoc methods substantially improved top-class calibration: Ensemble Temperature Scaling reduced $\text{UC}_{\text{TCE}}$ to $0.0304 \pm 0.0063$, and Vector Scaling reduced it to $0.0375 \pm 0.0148$.
  • However, $\text{UC}_{\text{Top}K}$ values were consistently higher than $\text{UC}_{\text{TCE}}$ (e.g., $0.0756$ for Isotonic Regression vs. $0.0310$ on $\text{UC}_{\text{TCE}}$), highlighting persistent miscalibration in lower-ranked classes.
  • eCDF Utility Profiles (CIFAR-100 & ImageNet-1K):
  • Evaluating eCDFs over 1,000 sampled utilities showed that on CIFAR-100, Isotonic Regression (both shared and One-vs-All) significantly underperformed the uncalibrated model under rank-based utilities ($\mathcal{U}_{\text{rank}}$).
  • On ImageNet-1K (1,000 classes), the framework computed calibration profiles efficiently without encountering the dimensional bottlenecks that break kernel or variational methods.

Limitations and Future Work

  • Distribution Choice for Utility Sampling: Evaluating continuous utility classes via eCDFs requires specifying a sampling distribution $\mathcal{D}_{\mathcal{U}}$ (e.g., uniform simplex or monotonic rank weights). In practice, this distribution may not fully reflect specific domain-dependent user utilities.
  • Worst-Case Optimization Remains Intractable: Finding the global worst-case utility over infinite continuous families is NP-hard; the paper circumvents this via distribution sampling rather than providing exact worst-case auditing for arbitrary utility classes.
  • Modality Scope: Experiments focused exclusively on standard computer vision benchmarks; investigating utility calibration in modern language models, structured prediction, or cost-sensitive medical decision pipelines remains an open direction.

Summary updated

BibTeX
@misc{hegazy2025scalable,
  author = {Mahmoud Hegazy and Michael I. Jordan and Aymeric Dieuleveut},
  title = {{Scalable Utility-Aware Multiclass Calibration}},
  year = {2025},
  eprint = {2510.25458},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.25458},
}
Figure