Split Conformal Prediction under Data Contamination

Jase Clarkson, Wenkai Xu, Mihai Cucuringu, Yvik Swan, Gesine Reinert

TL;DR

Conformal prediction offers rigorous uncertainty guarantees, but these guarantees break down when calibration data is contaminated by outliers. This paper quantifies the exact impact of data corruption on prediction intervals and introduces Contamination Robust Conformal Prediction (CRCP), a novel method that restores coverage guarantees and delivers significantly narrower, more precise prediction sets in classification tasks.

What Problem Does This Paper Address?

Conformal prediction (CP) has become a go-to framework for uncertainty quantification in machine learning. Unlike standard heuristic prediction intervals, CP provides distribution-free, finite-sample coverage guarantees: if you ask for 90% coverage, the true label will fall within the predicted set exactly 90% of the time.

However, this guarantee relies entirely on the assumption of exchangeability—essentially, that your calibration data and future test data look like they came from the same distribution. In the real world, data is messy. Calibration sets are frequently contaminated by outliers, adversarial corruptions, or human label noise. When calibration data is corrupted but the model is evaluated on "clean" test data, standard CP fails, often leading to massive over-coverage (intervals that are too wide to be useful) or dangerous under-coverage.

The authors tackle this gap by analyzing split conformal prediction under a Huber $\epsilon$-contamination model, quantifying the theoretical damage caused by outliers, and proposing a practical fix for classification problems.

Methods

The paper approaches the problem in two stages: theoretical quantification and algorithmic remediation.

  1. Theoretical Bounds: The authors use advanced statistical distances—specifically the Kolmogorov-Smirnov distance, the squared Le Cam distance, and the Wasserstein distance—to bound how much the empirical quantiles shift under contamination. They map out exactly how the coverage probability deviates from the target $(1-\alpha)$ based on the contamination fraction ($\epsilon$).
  2. Contamination Robust Conformal Prediction (CRCP): For classification settings with label noise, the authors introduce CRCP. Instead of trying to detect and remove outliers, CRCP mathematically adjusts the calibration target. By leveraging the inverse of the noise transition matrix (which dictates how labels flip), CRCP calculates a finite-sample correction term ($C$). It then dynamically shifts the index of the sorting statistic used to define the prediction set boundary, ensuring valid coverage even when calibrating on dirty data.

Datasets

The authors evaluated their approach using both synthetic simulations and a popular real-world noisy benchmark:

  • Synthetic Data ("Logistic" & "Hypercube"): Used to simulate controlled label noise where true labels are flipped uniformly at random to other classes with a probability $\epsilon$.
  • CIFAR-10N: A human-contaminated variant of the classic CIFAR-10 image dataset. It features real-world label noise collected from Amazon Mechanical Turk workers, categorized into different patterns: Clean (ground truth), Aggregate (majority vote), three individual random submitters (R1, R2, R3), and Worst (randomly selecting an incorrect label if any worker got it wrong).

Key Insights and Ideas

  • Asymmetric Robustness to Outliers: The paper reveals that conformal prediction possesses an "inbuilt" robustness to large outliers. If the contaminating distribution stochastically dominates the clean distribution (i.e., the outliers introduce much larger errors, as is common in regression), CP safely over-covers. However, if the outliers are small or subtle, CP can easily under-cover, which is far more dangerous in safety-critical applications.
  • Quantile Shifting over Filtering: Rather than attempting the notoriously difficult task of filtering out corrupted data points, CRCP accepts the contamination and shifts the target quantile index upward or downward to compensate.
  • Tighter Bounds via Le Cam Distance: Moving beyond traditional Total Variation (TV) distance bounds, the authors show that using the squared Le Cam distance yields much tighter, more practical bounds that can be evaluated simply by estimating the contaminated score distribution.

Key Results

In a Gaussian linear regression setup, the authors demonstrated the transition between under- and over-coverage. As shown below, when the standard deviation of the contamination ($\sigma_2$) surpasses the clean data variance ($\sigma_1 = 1.0$), the model rapidly shifts into conservative over-coverage.

Figure 1: The mean and standard deviation of the coverage obtained over 100 repetitions of the regression experiment while varying ε and σ2. The mean coverage is marked by crosses; shaded regions indicate one standard deviation of the coverage; the straight horizontal line (in red) is the desired coverage level 0.9. Left: we vary the standard deviation of the corruption σ2 from 0 to 5, keeping ε = 0.2. Right: we vary the mixing proportion ε from 0 to 0.5, keeping σ2 = 3.0.

On the real-world CIFAR-10N dataset, standard Conformal Prediction (CP) suffered from severe over-coverage as the noise rate increased, ballooning the average prediction set size. CRCP successfully corrected this behavior:

  • On "Worst" Noise (40.21% noise rate): Standard CP over-covered at 99.0% (for a 90% target) with an average set size of 5.47. CRCP achieved a precise 91.7% coverage while drastically shrinking the average set size to 2.18.
  • Baseline Comparison: CRCP consistently outperformed Noise-Aware Conformal Prediction (NACP), which severely over-covered across almost all noise levels (often hitting >98% coverage with massive set sizes).

Limitations and Future Work

  • Known Noise Structure: CRCP currently assumes that the noise level ($\epsilon$) or the label transition matrix ($P$) is known beforehand or can be accurately estimated. In completely unsupervised or highly non-stationary environments, this assumption might not hold.
  • Restricted to Classification: The finite-sample correction mechanism in CRCP relies heavily on the discrete nature of classification labels. Extending a similar robust adjustment to continuous regression settings under general noise remains an open challenge.
  • Independence Assumption: The framework assumes independent observations. The authors note that extending this to non-exchangeable data structures (like time-series or spatial data) using data re-weighting is a vital direction for future work.

Summary updated

BibTeX
@misc{clarkson2024split,
  author = {Jase Clarkson and Wenkai Xu and Mihai Cucuringu and Yvik Swan and Gesine Reinert},
  title = {{Split Conformal Prediction under Data Contamination}},
  year = {2024},
  eprint = {2407.07700},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.07700},
}
Figure