Distribution calibration for regression

Hao Song, Tom Diethe, Meelis Kull, Peter A. Flach

In machine learning, we often need more than just a single "best guess" point estimate; we need to know how certain the model is about its prediction. While calibration is well-studied for classification tasks (e.g., Platt scaling), achieving well-calibrated output distributions for continuous regression tasks is notoriously tricky.

This paper introduces distribution calibration, a strictly stronger requirement for regression models than the standard "quantile calibration." To achieve this, the authors propose GP-BETA, a post-hoc method that uses multi-output Gaussian Processes and a novel Beta link function to transform uncalibrated regression outputs into well-calibrated probability distributions.

The Problem: Marginal vs. Distribution Calibration

Traditionally, regression calibration is defined by quantiles: if a model predicts a 95% confidence interval, that interval should contain the true value 95% of the time on average across the whole dataset.

However, the authors argue this "marginal" calibration is too weak. A model could be wildly overconfident in one region of the data and underconfident in another, yet still appear perfectly "calibrated" on average.

The paper addresses this by defining distribution calibration, which requires the predicted distribution to match the actual distribution of targets for every specific prediction. This ensures that the uncertainty information is locally accurate, not just globally consistent.

The GP-BETA Method

The authors propose a post-hoc approach, meaning it can be applied to any pre-trained regression model (like a Neural Network or Random Forest) that outputs a mean and variance. The method relies on a few key components:

  1. Beta Link Function: They adapt "Beta calibration" (originally for binary classification) to the regression setting. They treat the Beta transformation as a way to warp the predicted Cumulative Distribution Function (CDF). By differentiating this warped CDF, they derive a "link function" that acts as a density ratio to adjust the original Probability Density Function (PDF).
  2. Multi-output Gaussian Process (GP): The Beta transformation is defined by three parameters. Instead of using the same parameters for every prediction, the authors use a multi-output GP to predict these parameters dynamically based on the model's current output (mean and variance).
GP predicting Beta parameters and resulting calibration curves
  1. Kernel Embedding & Scalability: To allow the GP to operate on distributions, they use a univariate Gaussian embedding with a Radial Basis Function (RBF) kernel. To handle large datasets efficiently, they employ Sparse Variational Inference with inducing points.

Key Insights and Results

The core theoretical insight of the paper is the proof that distribution calibration is a strictly stronger condition than quantile calibration. If a model is distribution-calibrated, it is automatically quantile-calibrated, but the reverse is not true.

Standard methods like Isotonic Regression provide a single "global" calibration map. GP-BETA, by contrast, provides "local" calibration maps that change depending on where the model is predicting in the input space.

Recovering Multimodality

This local flexibility shines in complex data environments. In a synthetic experiment featuring a bimodal dataset (generated from a mixture of two linear models), standard unimodal regressors like Ordinary Least Squares (OLS) naturally fail to capture the true distribution.

Comparison of True, OLR, ISO, and GPB on a synthetic bimodal dataset

As shown above, while the base OLS model could only predict a unimodal Gaussian, GP-BETA was able to "stretch" and "pull" that Gaussian to recover the true bimodal nature of the data. Simple quantile calibration (ISO) cannot achieve this structural correction.

Benchmark Performance

The method was evaluated on six standard UCI Regression Benchmarks across four different base models (OLS, Bayesian Ridge Regression, Gaussian Process Regression, and Bayesian Neural Networks).

  • Negative Log-Likelihood (NLL): GP-BETA consistently outperformed both the uncalibrated base models and standard Isotonic calibration. Because NLL is a proper scoring rule that accounts for both accuracy and uncertainty, this provides strong evidence for superior calibration.
  • Robustness: The method improved calibration without sacrificing point-estimate accuracy (MSE), and in many cases, it even slightly improved the Pinball Loss (a metric for quantile accuracy).

Limitations and Future Work

While highly effective, GP-BETA has a few limitations. On very large datasets, the performance of the sparse GP can be sensitive to the number of inducing points chosen. Additionally, while the Beta family is flexible enough to handle sigmoidal and skewed shapes, it remains a parametric family. The authors suggest that future work could explore fully non-parametric calibration maps and generalize this framework to more complex forms of conditional density estimation.

Summary updated

BibTeX
@inproceedings{song2019distribution,
  author = {Hao Song and Tom Diethe and Meelis Kull and Peter A. Flach},
  title = {{Distribution calibration for regression}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=HyZL5iZObH},
}
Figure