Abstract
Probabilistic forecasting requires models to produce uncertainty estimates that accurately reflect reality. However, existing calibration techniques are often fragmented across tasks or rely on post-hoc adjustments that degrade forecast sharpness. We present a unified framework that views calibration as a distribution matching problem. By employing differentiable Maximum Mean Discrepancy (MMD) as a training regularizer, models can optimize for calibration directly. Our results across regression and classification benchmarks demonstrate that this approach yields superior calibration while preserving predictive sharpness.
Introduction
In probabilistic forecasting, the goal is not just to provide a point estimate but to output a probability distribution over possible outcomes. A model is considered calibrated if its predicted probabilities match observed frequencies—for example, if a model predicts an 80% chance of rain, it should rain on approximately 80% of the days that prediction is made.
Despite its importance, model calibration faces two primary challenges. First, the field is fragmented; classification and regression tasks often utilize entirely different metrics and algorithms. Second, practitioners frequently rely on "post-hoc" recalibration methods like Isotonic Regression or Temperature Scaling. While these methods improve calibration, they often do so at the cost of "sharpness"—the precision and usefulness of the forecasts—effectively making the model more vague to avoid being wrong.
A Unified View of Calibration
The core insight of this work is that nearly all forms of calibration can be viewed as requiring the matching of two distributions. The authors provide a "Rosetta Stone" that unifies disparate calibration definitions—ranging from individual to group calibration—by showing they are simply different ways of choosing conditioning variables in a distribution matching problem.
By leveraging the Maximum Mean Discrepancy (MMD), a popular tool in kernel methods, the authors derive a way to measure the distance between the distribution of model forecasts and the true empirical distribution.
Trainable Calibration via MMD
The authors derive unbiased, differentiable sample estimates for MMD-based calibration. This allows the metric to be integrated directly into the training process as a regularizer:
$$Loss = \text{Proper Scoring Rule (e.g., NLL)} + \lambda \cdot \text{MMD}$$
This approach offers significant flexibility. By varying the "kernel" function within the MMD, researchers can recover existing calibration notions (like Quantile or Marginal calibration) or design new ones tailored to specific downstream tasks. For instance, a tanh kernel can be used for decision-making tasks involving thresholds, prioritizing calibration around the decision boundary rather than the entire distribution.
Experimental Evaluation
The method was evaluated across 10 tabular tasks, including standard regression benchmarks (CRIME, BLOG, MEDICAL-EXPENDITURE, SUPERCONDUCTIVITY, FB-COMMENT) and classification benchmarks. Additionally, the authors introduced a CROP-YIELD dataset to demonstrate "local calibration," ensuring models are not overconfident in specific geographic regions.
Results and Discussion
The experimental results confirm that MMD-regularized models consistently outperform standard models and post-hoc methods.
Key findings include:
- Superior Calibration: MMD-regularized models achieved lower Quantile Calibration Error (QCE) and Expected Calibration Error (ECE) across nearly all datasets.
- Preserved Sharpness: Unlike post-hoc methods that "blur" predictions, optimizing for calibration alongside the likelihood (NLL) during training allows the model to remain precise.
- Decision-Making Utility: Tailored kernels led to lower Decision Calibration Error (DCE), indicating more reliable uncertainty estimates for utility-maximizing actions.
Limitations and Future Work
While promising, the method has some limitations. It requires differentiable samples from the forecast distribution, which may necessitate techniques like the reparameterization trick for complex distributions. Additionally, MMD has an $O(n^2)$ computational cost relative to batch size, and performance can be sensitive to kernel hyperparameter selection. For mission-critical systems, the authors suggest a hybrid approach: using MMD regularization during training followed by a post-hoc fix for maximum safety.
Summary updated