Variable-Based Calibration for Machine Learning Classifiers

Markelle Kelly, Padhraic Smyth

The Calibration Blind Spot

In high-stakes domains such as medicine or criminal justice, the reliability of a machine learning model's confidence scores is as critical as its raw accuracy. A model is considered calibrated if its predicted probability of an outcome matches the actual frequency of that outcome. For instance, if a model predicts a 70% chance of a disease, it should be correct exactly 70% of the time.

The industry standard for measuring this is Expected Calibration Error (ECE). However, ECE is an aggregate metric that averages performance across the entire dataset. This paper identifies a significant "blind spot": a model can achieve a near-perfect ECE while remaining dangerously overconfident or underconfident for specific subgroups, such as certain age ranges. These local errors often cancel each other out in the global average, masking systematic biases.

Figure 2: A standard reliability diagram (a) can hide significant miscalibration that is revealed by a variable-based plot (b) across a feature like Age.

Variable-Based Expected Calibration Error (VECE)

To address this, the authors introduce Variable-Based Expected Calibration Error (VECE). This new metric quantifies miscalibration relative to a specific continuous variable of interest ($V$), such as Age or Income. It measures the discrepancy between a model's average accuracy and its average confidence across different values of $V$.

To visualize these discrepancies, the authors propose Variable-Based Calibration Plots. Unlike standard reliability diagrams that plot accuracy against confidence, these plots use LOESS smoothing to show how actual error and predicted error diverge across the range of a continuous variable. This allows practitioners to identify specific "problem zones" where the model's confidence is untrustworthy.

Methods: Split-and-Calibrate

The authors propose a "split-and-calibrate" framework to mitigate these biases. The approach involves:

  1. Partitioning: Using decision trees to segment the data based on the variable $V$.
  2. Local Calibration: Applying standard calibration techniques (such as Beta or Dirichlet calibration) to each resulting segment (leaf node).

This granular approach allows the model to adjust its confidence scores differently for different segments of the population, effectively "unmasking" and correcting the hidden miscalibration.

Experimental Results

The framework was evaluated across four domains: Adult Census Income, Yelp Reviews, Bank Marketing, and CIFAR-10H. The results demonstrate that standard calibration methods often fail to address variable-specific bias.

Figure 4: Comparison of (a) an uncalibrated model, (b) standard Beta calibration, and (c) the proposed Variable-based calibration. Standard methods often fail to align predicted error with actual error across the variable range.

Key findings include:

  • Standard Methods Fall Short: Techniques like Platt scaling or Beta calibration can drastically reduce global ECE (making the model appear "fixed") while leaving VECE high. For example, on the Adult Income dataset, Beta calibration reduced ECE to 1.65% but left a VECE of 9.59% relative to age.
  • Simultaneous Improvement: The proposed variable-based calibration was the only method to consistently reduce both ECE and VECE. In the Bank Marketing task, it achieved an ECE of 2.10% and a VECE of 0.52%, significantly outperforming all baselines.

Conclusion and Future Work

Variable-Based Calibration provides a necessary lens for auditing and improving model reliability beyond aggregate metrics. While the current work focuses on single-variable calibration, future research is needed to address intersectional biases involving multiple variables simultaneously. Developing automated methods that balance global and local calibration remains a key challenge for building truly trustworthy AI systems.

Summary updated

BibTeX
@inproceedings{kelly2023variable,
  author = {Markelle Kelly and Padhraic Smyth},
  title = {{Variable-Based Calibration for Machine Learning Classifiers}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i7.25991},
}
Figure