Generalization and Informativeness of Weighted Conformal Risk Control Under Covariate Shift

Matteo Zecchin, Fredrik Hellström, Sangwoo Park, Shlomo Shamai, Osvaldo Simeone

TL;DR

Weighted Conformal Risk Control (W-CRC) guarantees reliable uncertainty intervals under covariate shift, but the size—and practical usefulness—of these intervals is typically unknown until deployment. This paper derives a novel theoretical bound that predicts W-CRC efficiency at training time, revealing how covariate shift, training set size, and calibration set size interact. Crucially, it demonstrates that harsher distribution shifts require allocating more data to calibration rather than model training to keep prediction sets informative.

What Problem Does This Paper Address?

Machine learning models often face covariate shift—a scenario where the distribution of input features changes between training and testing, but the underlying conditional relationship between inputs and outputs remains the same. A classic example is fingerprinting-based localization: a model might be trained when all cellular base stations are active, but deployed when some stations are dynamically powered down to save energy.

To make these models dependable, we use frameworks like Conformal Risk Control (CRC) to output prediction sets (e.g., "the user is within this geographical region") rather than simple point estimates. Weighted CRC (W-CRC) uses likelihood ratios to correct for covariate shift, mathematically guaranteeing that the true error rate won't exceed a user-defined risk threshold.

However, W-CRC only guarantees reliability, not efficiency (informativeness). If a localization model satisfies your risk threshold by telling you a user is "somewhere in Europe," the prediction is reliable but completely useless. Currently, researchers can only evaluate how tight or loose these prediction sets are at test time. This paper addresses this gap by providing a way to analyze and optimize W-CRC efficiency before deployment.

Fig. 1: In fingerprinting-based localization, received signal strength indicators (RSSI) measured by base stations are used to localize mobile devices. The base stations can be dynami- cally switched off, and their activation rates are depicted by the colored bars. A portion of the collected RSSI measurements is used to train a prediction model, while the rest are used to convert the model’s outputs into prediction regions that meet a specified target risk. Calibration is achieved by W-CRC by accounting for covariate shift due to differing activation rates during training and testing through likelihood ratios between the training and testing marginals [11], [12].

Methods

The authors derive an information-theoretic upper bound on the expected size of W-CRC prediction sets (referred to as inefficiency). The bound explicitly connects three core components:

  1. Base Predictor Generalization: The generalization gap of the underlying machine learning model (analyzed here using a Thompson sampling training framework).
  2. Covariate Shift Severity: Quantified by the maximum bound of the likelihood ratio ($\bar{W}$) between the test and training input distributions.
  3. Data Allocation Split: The fraction of data allocated to training ($n_{tr}$) versus calibration ($n_{cal}$) given a fixed total data budget ($n$).

The mathematical proof utilizes Rademacher complexity and VC dimension bounds to show how threshold estimation errors propagate when importance weights (likelihood ratios) are introduced to combat distribution shift.

Datasets

The authors validate their theoretical findings using the rural Sigfox dataset, a real-world benchmark containing Received Signal Strength Indicator (RSSI) measurements from 137 base stations across an area between Antwerp and Ghent.

To simulate covariate shift, they introduce a base station deactivation probability ($p_{off}$). During training, $p_{off}$ is fixed at 0.5. At test time, they evaluate three scenarios:

  • No Shift: $p'_{off} = 0.5$
  • Moderate Shift: $p'_{off} = 0.75$
  • Large Shift: $p'_{off} = 0.9$

Key Insights and Ideas

  • The Calibration-Training Tradeoff Shifts: In standard machine learning, the rule of thumb is to throw as much data as possible into training. This paper reveals that under severe covariate shift, the bottleneck shifts to threshold estimation. The variance introduced by importance weights means you need a larger calibration set to keep prediction intervals tight.
  • Generalization Limits Efficiency: A base model that generalizes poorly under covariate shift directly penalizes the efficiency of the conformal wrapper, forcing the system to output larger, less informative prediction sets to maintain its risk guarantees.
  • Optimal Splits are Predictable: Inefficiency follows a predictable U-shaped curve relative to how you split your data, meaning practitioners can mathematically optimize their data splits during the design phase.
Fig. 2: Inefficiency bound as a function of the fraction κ of data allocated for training under a fixed data budget n while varying the covariate shift parameter ¯W.

Key Results

  • The U-Shaped Efficiency Curve: Both the theoretical bound (Figure 2) and empirical results (Figure 4) demonstrate that setting the training data fraction ($\kappa = n_{tr}/n$) too low results in poor model generalization, while setting it too high leaves insufficient data for calibration, causing prediction sets to bloat.
  • Calibration Dominates Under Shift: As covariate shift worsens, the optimal data split shifts significantly to the left. To minimize prediction set sizes under a large shift, you must allocate a larger portion of your data budget to the calibration set (see Figure 4).
  • Impact of Calibration Set Size: When the calibration set is large ($n_{cal} = 500$), the model maintains tight, stable prediction intervals across all shift settings. When it is small ($n_{cal} = 100$), performance degrades severely under distribution shifts (see Figure 3).

Relative inefficiency vs target risk Empirical relative inefficiency vs training fraction

Limitations and Future Work

  • Dependence on Likelihood Ratios: The proposed bound relies on knowing or accurately estimating the likelihood ratios ($W$) between the training and testing distributions. In high-dimensional feature spaces, density ratio estimation itself can become a challenging bottleneck.
  • Scope of Distribution Shift: The analysis is strictly tailored to covariate shift (where the conditional distribution $P(Y|X)$ remains constant). The authors note that extending these efficiency bounds to more complex distribution shifts, such as concept drift or label shift, is a vital direction for future research.

Summary updated

Abstract

Predictive models are often required to produce reliable predictions under statistical conditions that are not matched to the training data. A common type of training-testing mismatch is covariate shift, where the conditional distribution of the target variable given the input features remains fixed, while the marginal distribution of the inputs changes. Weighted conformal risk control (W-CRC) uses data collected during the training phase to convert point predictions into prediction sets with valid risk guarantees at test time despite the presence of a covariate shift. However, while W-CRC provides statistical reliability, its efficiency -- measured by the size of the prediction sets -- can only be assessed at test time. In this work, we relate the generalization properties of the base predictor to the efficiency of W-CRC under covariate shifts. Specifically, we derive a bound on the inefficiency of the W-CRC predictor that depends on algorithmic hyperparameters and task-specific quantities available at training time. This bound offers insights on relationships between the informativeness of the prediction sets, the extent of the covariate shift, and the size of the calibration and training sets. Experiments on fingerprinting-based localization validate the theoretical results.
BibTeX
@inproceedings{zecchin2025generalization,
  author = {Matteo Zecchin and Fredrik Hellström and Sangwoo Park and Shlomo Shamai and Osvaldo Simeone},
  title = {{Generalization and Informativeness of Weighted Conformal Risk Control Under Covariate Shift}},
  booktitle = {ISIT},
  year = {2025},
}
Figure