Wasserstein-regularized Conformal Prediction under General Distribution Shift

Rui Xu, Chao Chen, Yue Sun, Parvathinathan Venkitasubramaniam, Sihong Xie

Abstract

Conformal prediction yields a prediction set with guaranteed $1-\alpha$ coverage of the true target under the i.i.d. assumption, which may not hold and lead to a gap between $1-\alpha$ and the actual coverage. Prior studies bound the gap using total variation distance, which cannot identify the gap changes under distribution shift at a given $\alpha$. Besides, existing methods are mostly limited to covariate shift, while general joint distribution shifts are more common in practice but less researched. In response, we first propose a Wasserstein distance-based upper bound of the coverage gap and analyze the bound using probability measure pushforwards between the shifted joint data and conformal score distributions, enabling a separation of the effect of covariate and concept shifts over the coverage gap. We exploit the separation to design an algorithm based on importance weighting and regularized representation learning (WR-CP) to reduce the Wasserstein bound with a finite-sample error bound. WR-CP achieves a controllable balance between conformal prediction accuracy and efficiency. Experiments on six datasets prove that WR-CP can reduce coverage gaps to $3.2\%$ across different confidence levels and outputs prediction sets $37\%$ smaller than the worst-case approach on average.

Introduction

Conformal Prediction (CP) has emerged as a rigorous framework for uncertainty quantification in machine learning. Unlike point predictions, CP generates a prediction set that is guaranteed to contain the true value with a user-defined probability (e.g., $1-\alpha = 95\%$). However, this mathematical guarantee traditionally relies on the exchangeability (i.e., i.i.d.) of calibration and test data.

In real-world applications, this assumption is frequently violated by distribution shifts. These shifts generally fall into two categories: covariate shift, where the distribution of input features changes, and concept shift, where the relationship between inputs and outputs evolves. When these shifts occur simultaneously, the coverage guarantee of standard CP fails, leading to a "coverage gap." While previous research has attempted to bound this gap using Total Variation (TV) distance, such metrics are often too coarse to optimize effectively. This paper introduces Wasserstein-regularized Conformal Prediction (WR-CP), a framework designed to maintain reliable coverage under general joint distribution shifts.

The Limitations of Total Variation Distance

Existing methods for handling distribution shift in CP often rely on Total Variation (TV) distance to bound the coverage error. However, TV distance is "location-agnostic"—it measures the absolute difference between distributions without considering the underlying geometry or where the differences occur. Consequently, TV distance cannot effectively identify how the coverage gap changes at specific confidence levels ($\alpha$). This lack of sensitivity makes it a blunt instrument for optimizing prediction intervals, often resulting in "worst-case" approaches that produce excessively wide and practically useless prediction sets to ensure safety.

Proposed Methodology: WR-CP

To address these limitations, the authors propose shifting the focus to the Wasserstein distance. Unlike TV distance, the Wasserstein metric is sensitive to the geometry of the distribution and integrates the vertical gap between Cumulative Distribution Functions (CDFs).

1. Wasserstein Upper Bound

The researchers prove that the coverage gap is upper-bounded by the Wasserstein distance between the conformal score distributions of the calibration and test sets. This provides a tighter, more informative metric for optimization.

2. Disentangled Decomposition

Using probability measure pushforwards, the framework decomposes the joint distribution shift into two independent components. This allows for a "divide and conquer" strategy:

  • Covariate Shift: Addressed via importance weighting during the inference phase.
  • Concept Shift: Addressed via regularized representation learning during training.

3. The WR-CP Algorithm

The WR-CP algorithm minimizes a joint objective function during training. It combines standard Empirical Risk Minimization (ERM) with a Wasserstein regularization term. This term penalizes the discrepancy between training and calibration conformal scores, effectively training the model to be "conformal-friendly."

Experimental Evaluation

The WR-CP framework was evaluated across six diverse real-world datasets, including aeroacoustic data (Airfoil Self-Noise), traffic speed prediction (Seattle-loop, PeMSD4, PeMSD8), and epidemic forecasting (Japan-Prefectures, U.S.-States).

Key Results

  • Reduced Coverage Gaps: WR-CP successfully reduced coverage gaps to an average of 3.2% across various confidence levels.
  • Enhanced Efficiency: The method produced prediction sets that were 37% smaller on average than those generated by state-of-the-art "worst-case" (WC-CP) approaches.
  • Metric Validation: The study confirmed a strong positive monotonic relationship between Wasserstein distance and the coverage gap, validating it as a superior optimization metric compared to TV distance or KL-divergence.
  • Controllable Trade-offs: Through a hyperparameter $\beta$, users can smoothly navigate the Pareto front between prediction accuracy and the tightness of the coverage guarantee.

Conclusion

WR-CP demonstrates that it is possible to achieve robust uncertainty guarantees without sacrificing the utility of prediction sets. By leveraging the geometric sensitivity of the Wasserstein distance and decomposing joint distribution shifts, the framework provides a more nuanced and efficient approach to conformal prediction in non-stationary environments. Future work will look to address the computational overhead associated with Kernel Density Estimation (KDE) in high-dimensional spaces and explore scenarios where calibration data differs significantly from the training mixture.

Summary updated

BibTeX
@inproceedings{xu2025wasserstein,
  author = {Rui Xu and Chao Chen and Yue Sun and Parvathinathan Venkitasubramaniam and Sihong Xie},
  title = {{Wasserstein-regularized Conformal Prediction under General Distribution Shift}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=aJ3tiX1Tu4},
}
Figure