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

On Computationally Efficient Multi-Class Calibration

Parikshit Gopalan, Lunjia Hu, Guy N. Rothblum

Abstract

In multi-class labeling problems where a predictor outputs a distribution over $k$ labels, achieving meaningful calibration often involves a trade-off between computational efficiency and expressivity. Existing notions either suffer from exponential sample complexity, computational intractability, or provide weak guarantees. We introduce projected smooth calibration, a robust notion for multi-class predictions that is achievable in time and sample complexities polynomial in $k$. This framework ensures that predicted probabilities for any subset of labels are close to a perfectly calibrated binary predictor for that task. We establish a tight connection between multi-class calibration and binary agnostic learning, allowing us to leverage kernel methods for efficient recalibration while identifying fundamental information-theoretic and computational barriers to stronger calibration notions.

Introduction

In binary classification, calibration is a well-understood property: if a model predicts a 70% probability of an event, that event should occur approximately 70% of the time. However, as we move to multi-class settings—such as ImageNet with 1,000 classes—defining and achieving calibration becomes significantly more complex.

Current approaches typically fall into two extremes. Class-wise calibration ensures each label is individually calibrated but fails to provide guarantees for "subset" tasks (e.g., "is this an image of an animal?" where "animal" is the union of "cat" and "dog"). Conversely, canonical calibration requires the entire probability vector to be accurate, but checking this property requires a number of samples that grows exponentially with the number of classes ($k$), making it impractical for large-scale problems.

Proposed Framework: Projected Smooth Calibration

The authors propose "Projected Smooth Calibration" as a middle ground. This notion is expressive enough to handle subset queries while remaining computationally efficient. Instead of auditing calibration against every possible subset or the entire distribution, this framework checks calibration against a class of "smooth" (Lipschitz) functions of linear projections of the prediction vector.

By focusing on projections ($a \cdot v$), the definition naturally handles subset queries. If a model is projected-smooth calibrated, it is guaranteed to be nearly calibrated for any downstream binary task involving a subset of labels. The shift from "sharp" thresholds (like "is the probability > 0.5?") to smooth Lipschitz functions is the key to achieving polynomial-time efficiency.

The Agnostic Learning Connection

A central theoretical contribution of this work is proving that auditing a model for multi-class calibration is computationally equivalent to the problem of agnostic learning in a binary setting. This connection is bidirectional:

  1. Upper Bounds: Efficient agnostic learning algorithms can be transformed into efficient calibration auditors. The authors utilize kernel methods—specifically the multinomial kernel—to design an auditor that searches for "witnesses" of miscalibration.
  2. Lower Bounds: The hardness of agnostic learning (e.g., learning halfspaces) implies the hardness of achieving stronger notions of calibration.

Algorithmic Approach and Complexity

The paper provides a post-processing recalibration algorithm. If the auditor identifies a witness of miscalibration, the algorithm applies a correction step that reduces calibration error without increasing the overall squared loss of the predictor.

Key results include:

  • Efficiency: The auditing algorithm runs in $O(k^{O(1/\alpha)})$ time, where $\alpha$ is the error tolerance. This polynomial dependency on $k$ is a significant improvement over previous exponential bounds.
  • Hardness Barriers: The authors demonstrate that "Decision Calibration" is as difficult as agnostically learning halfspaces, a problem believed to be computationally intractable.
  • Sample Complexity: They prove that distinguishing a perfectly calibrated model from a slightly miscalibrated one in the canonical sense requires $\exp(k)$ samples, justifying the relaxation to "smooth" calibration.

Conclusion and Future Work

By bridging the gap between weak and impossible calibration, Projected Smooth Calibration offers a theoretically grounded yet computationally feasible path for multi-class models. While the current dependency on the error tolerance $\alpha$ remains a challenge for high-precision applications, the link to agnostic learning provides a clear roadmap for future algorithmic improvements.

Future research may focus on improving the dependency on $\alpha$ or exploring specific function classes like sigmoids to achieve faster runtimes. Additionally, while this work is primarily theoretical, it sets the stage for practical recalibration techniques in large-scale deep learning systems where multi-class reliability is paramount.

Summary updated

BibTeX
@inproceedings{gopalan2024computationally,
  author = {Parikshit Gopalan and Lunjia Hu and Guy N. Rothblum},
  title = {{On Computationally Efficient Multi-Class Calibration}},
  booktitle = {Conference on Learning Theory},
  year = {2024},
  url = {https://openreview.net/forum?id=jV1vfAguL7},
}
Figure