TL;DR
When calibrating a machine learning model to output reliable uncertainty intervals, it is tempting to filter out suspicious outliers from your calibration data—hoping to "purify" it. This paper reveals that trimming actually just swaps one distribution mismatch for another, and introduces a mathematical diagnostic to tell you exactly when throwing away bad data helps and when it quietly backfires.
What Problem Does This Paper Address?
Imagine you have a trained ML model and want it to output prediction intervals guaranteed to contain the true answer 90% of the time. Split conformal prediction achieves this with minimal assumptions: you measure your model's errors ("nonconformity scores") on a fresh calibration dataset and pick the 90th percentile error as your margin of safety. This guarantee relies on exchangeability—the calibration data and future test data must come from the same probability distribution.
What if your calibration set is contaminated—say, 20% of it comes from a noisy or broken sensor ($Q$), while your test data is clean ($P$)? Exchangeability breaks. A natural engineering reflex is trimming: run an outlier detector on the calibration set, discard suspicious points above a threshold, and run conformal prediction on the survivors. Practitioners often assume this restores the mathematical guarantee. Does it? Until now, we lacked a precise theory explaining how preprocessing the calibration set interacts with conformal quantiles.
Methods
Instead of viewing trimming as "purification" back to the clean distribution $P$, the author reframes fixed-threshold trimming as statistical conditioning. Keeping points where an anomaly score $S \le t^\star$ creates a brand-new probability distribution—the retained law ($R$).
Conformal prediction on the trimmed data is mathematically exact for a test point drawn from $R$, not $P$. Therefore, clean-target validity reduces to a 1D distribution transfer problem: how far apart are the cumulative distribution functions (CDFs) of the model errors under $R$ versus $P$?
Using this lens, the author derives:
- An Exact Finite-Sample Identity & Sharp Bound: A minimax-optimal formula calculating worst-case coverage loss given only the scalar CDF gap between $R$ and $P$.
- A Componentwise Population Diagnostic: By unpacking $R$ via Bayes' rule, coverage loss splits into two competing forces:
- Clean-side covariance cost: Even without contamination, filtering can accidentally slice off hard-to-predict clean points, distorting the error distribution.
- Retained-contamination cost: Driven by the ratio of retained dirty points to retained clean points.
- Audit Certificate Templates: Because you cannot know true clean coverage from unlabelled contaminated data alone, the paper provides finite-sample mathematical certificates using either independent bounds on the mixture components or a small, clean "audit" dataset.
Datasets
No new benchmarks are introduced; the theory is tested across two controlled setups:
- Synthetic Heteroscedastic Regression: Clean 1D Gaussian inputs ($X \sim N(0,1)$) where noise scales with $|X|$, mixed with 20% contaminating outliers ($X_{\text{dirty}} \sim N(6,1)$).
- Semi-synthetic US Census Classification: Real demographic data from the 2018 American Community Survey (
ACSEmploymentvia Folktables). California serves as the clean target ($P$), while data from Texas, New York, and Florida act as realistic domain contamination ($Q$).
Key Insights and Ideas
- Trimming is conditioning, not purification: Filtering outliers doesn't recover your clean distribution; it conditions your calibration set on an event. If your anomaly detector correlates with model error on clean data (e.g., flagging valid edge cases with high uncertainty), trimming shrinks your prediction intervals too much, causing under-coverage even with zero contamination!
- Score-neutrality is key: A good anomaly detector must be selective between clean and dirty data, yet score-neutral (statistically independent of model residuals) within the clean population. Covariate-geometric scores (looking only at $X$, not $Y$) help avoid this trap.
- The Separation Dichotomy: If an anomaly detector retains clean and dirty points at roughly the same rate ($p_c \approx p_d$), trimming cannot reduce the contamination fraction—yet you still pay the penalty of distorting the clean data.
Key Results
- When trimming shines: In synthetic regression (target coverage 0.9000), contamination drops ordinary conformal coverage to 0.8709. Trimming with a Stein anomaly score at the 0.950 quantile boosts coverage to 0.8857 by wiping out dirty points. Relaxing the threshold to 0.990 pushes coverage to 0.8950—not by catching more outliers, but by reducing clean-side distortion from 0.0137 down to 0.0036.
- More data doesn't fix distribution bias: Scaling calibration size from $m=320$ to $m=10,000$ tightens audit certificates (from 0.7132 to 0.8464), but empirical coverage stays stuck at 0.8888 because sample size cannot erase the underlying gap between $R$ and $P$.
- Realistic domain overlap: On US Census data, standard outlier detectors (Isolation Forest, Mahalanobis) retained ~95% of Californians and ~95% of out-of-state points ($p_c \approx p_d$). Confirming the theory, trimming yielded virtually zero benefit—changing coverage by at most 0.0005 across 12 configurations.
Limitations and Future Work
- Covariate blind spots: Outlier scores that only inspect inputs ($X$) are powerless against label-only corruption (where $Y$ is flipped, but $X$ looks normal).
- Fixed thresholds vs. adaptive tuning: The cleanest guarantees require picking the trimming threshold on separate data before seeing the calibration set. Selecting thresholds on the calibration set itself requires looser, finite-grid mathematical penalties and does not yet allow unrestricted fitting of a brand-new anomaly detector on that same sample.
- Marginal scope: Guarantees hold on average across the clean population (marginal coverage), not for specific subgroups, and assume non-adversarial contamination. Future work could tighten bounds using distribution smoothness or richer structural assumptions.
Summary updated