Evaluating Predictive Uncertainty and Robustness to Distributional Shift Using Real World Data

Kumud Lakara, Akshat Bhandari, Pratinav Seth, Ujjwal VermaarXiv 2021

Abstract

Most machine learning models operate under the assumption that the training, testing and deployment data is independent and identically distributed (i.i.d.). This assumption doesn't generally hold true in a natural setting. Usually, the deployment data is subject to various types of distributional shifts. The magnitude of a model's performance is proportional to this shift in the distribution of the dataset. Thus it becomes necessary to evaluate a model's uncertainty and robustness to distributional shifts to get a realistic estimate of its expected performance on real-world data. Present methods to evaluate uncertainty and model's robustness are lacking and often fail to paint the full picture. Moreover, most analysis so far has primarily focused on classification tasks. In this paper, we propose more insightful metrics for general regression tasks using the Shifts Weather Prediction Dataset. We also present an evaluation of the baseline methods using these metrics.

Introduction

Machine learning models are typically built on the "i.i.d. assumption," which posits that training and deployment data share the same distribution. In real-world applications—ranging from autonomous vehicles to medical diagnostics—this assumption frequently fails due to distributional shifts. When models encounter unfamiliar data, it is critical that they are not only accurate but also "self-aware"—capable of signaling high uncertainty when they are likely to be incorrect.

While uncertainty quantification is well-studied for classification tasks, regression tasks lack a standardized suite of insightful metrics. This paper addresses this gap by introducing new metrics that evaluate both predictive accuracy and the reliability of a model's uncertainty estimates under distributional shift.

Proposed Metrics for Regression Uncertainty

The authors propose four primary metrics to evaluate regression models:

  1. RMSE/RMV Ratio: Compares actual error (Root Mean Squared Error) to predicted uncertainty (Root Mean Variance). An ideal ratio of 1.0 indicates that the model's confidence is perfectly calibrated with its performance.
  2. LENCE (Logarithmic Expected Normalized Calibration Error): An improvement over standard calibration metrics, LENCE incorporates the Variation Coefficient ($C_v$) to ensure models provide diverse, case-specific uncertainty estimates rather than a single average value.
  3. LL-Fisher Uncertainty (LL-FU): A joint measure of uncertainty and robustness inspired by Fisher Information, assessing how well a prediction represents the underlying data distribution.
  4. MWSE (Mean Weighted Squared Error): Analyzes the product of squared error and uncertainty to determine if a model's uncertainty grows appropriately alongside its error during distributional shifts.
Figure 1: Retention curves for RMSE/RMV ratio (left) and MWSE (right), comparing single and ensemble models.

Experimental Setup

The metrics were validated using the Shifts Weather Prediction Dataset, a large-scale tabular dataset containing weather measurements and climate model predictions. This dataset is uniquely suited for testing distributional shift, as it includes "in-domain" training data and "shifted" test data from different geographical regions or time periods. The study compared a single Gradient Boosted Decision Tree (GBDT) model against an ensemble of ten such models.

Key Insights: Uncertainty as a Safety Signal

A primary finding is the "honesty gap" in single models, which tend to be overconfident. While their errors may increase on shifted data, their predicted uncertainty often fails to scale proportionally. In contrast, ensembles maintain a much tighter coupling between error and uncertainty, as seen in the RMSE/RMV and MWSE retention curves.

The LL-FU metric reveals that as prediction error increases on out-of-distribution data, the "lower bound" of uncertainty also rises. This suggests that high-quality uncertainty metrics can serve as reliable "red flags" for human operators, indicating when a model is operating outside its reliable domain.

Figure 6: (a) Relationship between estimated uncertainty and error; (b) F1 Score vs. Retention fraction; (c) MSE vs. Retention fraction.

Key Results

  • Calibration: The ensemble model achieved a LENCE score of 1.2968, significantly outperforming the single model's 1.6804.
  • Robustness: Using the LL-FU metric, the ensemble demonstrated superior performance in identifying potential failures, reaching an F1-AUC of 0.7009 and a low R-AUC of 0.5838.
  • Predictability: Visual analysis of retention curves showed that ensemble models produce more linear and predictable relationships between error and uncertainty, making them safer for deployment in critical systems.

Conclusion and Future Work

This work demonstrates that ensembling significantly improves the quality of uncertainty estimates and robustness to distributional shifts in regression tasks. However, the study is currently limited to tabular data and does not account for the increased computational costs of ensembling. Future research will focus on improving computational efficiency and extending these metrics to multi-modal data settings, such as those combining text and imagery.

Summary updated

BibTeX
@misc{lakara2021evaluating,
  author = {Kumud Lakara and Akshat Bhandari and Pratinav Seth and Ujjwal Verma},
  title = {{Evaluating Predictive Uncertainty and Robustness to Distributional Shift Using Real World Data}},
  year = {2021},
  eprint = {2111.04665},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.04665},
}
Figure