Optimal and Provable Calibration in High-Dimensional Binary Classification: Angular Calibration and Platt Scaling

Yufan Li, Pragya Sur

TL;DR

In high-dimensional settings where the number of features is comparable to the number of samples, standard classifiers become notoriously overconfident and biased. This paper introduces Angular Calibration, a provably optimal method that fixes this by accounting for the geometric "misalignment" between estimated and true model weights. Crucially, the authors also provide a long-awaited theoretical justification for Platt scaling, showing it converges to their optimal solution in high dimensions.

The Challenge of High-Dimensional Calibration

When training a binary classifier, accuracy is only half the battle; the model must also be calibrated. If a model predicts a 70% chance of an event, that event should actually occur 70% of the time.

Traditional statistical theory assumes we have many more samples ($n$) than features ($d$). However, modern machine learning frequently operates in a "high-dimensional proportional regime" where $n$ and $d$ are both large and grow at a similar rate. In this regime, classical estimators like logistic regression become grossly miscalibrated. They tend to assign probabilities near 0 or 1, exhibiting extreme overconfidence even when their predictions are incorrect.

While practitioners often rely on post-hoc fixes like Platt scaling—fitting a logistic curve to a holdout set—there has been a distinct lack of rigorous proof that these methods are optimal or even well-calibrated when dimensions are high. This paper bridges that theoretical gap.

Methods: The Angular Predictor

The authors propose a novel predictor called the Angular Predictor. The core mechanism relies on a surprisingly geometric insight:

  1. The Angle of Misalignment: The degree of a model's miscalibration is directly tied to the angle $\theta_*$ between the estimated weights ($\hat{w}$) and the true underlying weights ($w_*$).
  2. Interpolation with Noise: To counteract overconfidence, the authors construct a predictor that interpolates between the model's raw output (the "logits") and a non-informative "chance" predictor (Gaussian noise).
  3. Angular Calibration: The weight of this interpolation is determined by the estimated angle $\theta_*$. If the model is poorly aligned with the truth (a large angle), the predictor injects more noise to "soften" the overconfident predictions.
  4. Consistent Estimation: Because the true weights $w_*$ are unknown, the authors leverage recent advances in high-dimensional statistics to estimate the angle $\theta_*$ directly from the training data, using a small holdout set merely to determine the sign.

The Geometry of Platt Scaling

The paper also provides a rigorous analysis of Platt Scaling, which fits a function $F(u) = \sigma(Au + B)$ to a holdout set. For years, Platt scaling was treated as a heuristic that "just worked." The authors prove that as the holdout set grows, the parameters $A$ and $B$ converge to values that make the Platt-scaled model mathematically identical to their optimal Angular Predictor.

Convergence of Platt Scaling to the Angular Predictor

Key Insights

  • Noise as a Calibration Tool: One of the most counter-intuitive findings is that to achieve perfect calibration in high dimensions, you must inject a specific amount of noise into your predictions. This noise mathematically compensates for the uncertainty introduced by the high dimensionality.
  • Bregman Optimality: The authors prove their angular predictor is "Bregman-optimal." It doesn't just calibrate the model; it does so in a way that minimizes the Bregman divergence (which encompasses KL divergence and squared error) to the true underlying label distribution.

Key Results

The authors validated their approach using a mix of synthetic data (Gaussian, Rademacher, Uniform features) and real-world high-dimensional embeddings from state-of-the-art models (ResNet-34 on CIFAR-10, MiniLM on 20 Newsgroups, and ChemBERTa on Tox21).

  • Superior Calibration: In high-dimensional simulations, uncalibrated models exhibited massive errors. The Angular Predictor, however, achieved near-perfect calibration, aligning tightly with the ideal 45-degree line in reliability diagrams.
  • Data Efficiency: While Platt scaling eventually reaches the same optimal solution, it requires a very large holdout set to do so. The Angular Predictor achieves optimal calibration much faster by estimating the geometry of the weight space directly from the training data.
Reliability Diagram: Uncalibrated vs. Angular vs. Platt Scaling
  • Universality: Even though the theory was derived assuming Gaussian features, experiments showed it works remarkably well for other distributions and real-world embeddings, suggesting the "Angular" principle is a fundamental property of high-dimensional spaces.

Limitations and Future Work

  • Covariance Knowledge: The current method assumes the feature covariance matrix $\Sigma$ is known or can be accurately estimated from a large pool of unlabeled data.
  • Estimator Stability: The "plug-in" estimator used to calculate the angle can occasionally be unstable on real-world datasets that deviate significantly from standard random matrix assumptions.
  • Beyond Binary Classification: While focused on binary classification, the authors provide a theoretical sketch for extending this to "multi-index" models (like multi-class classification or neural networks), marking an exciting open area for future research.
  • Link Function Sensitivity: The proof for Platt scaling's optimality currently relies on the link function being a "probit" (or a close approximation like the sigmoid). Exploring other link functions remains a suggested next step.

Summary updated

BibTeX
@inproceedings{li2025optimal,
  author = {Yufan Li and Pragya Sur},
  title = {{Optimal and Provable Calibration in High-Dimensional Binary Classification: Angular Calibration and Platt Scaling}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=SgQAleMecy},
}
Figure