- Introduced by
- Angelopoulos & Bates (tutorial); Xu & Xie (time-series EnbPI)
- Year
- 2021
- Type
- Distribution-free prediction interval wrapper
What does it do?
Conformal prediction is a distribution-free wrapper that turns a point forecaster, such as ARIMA, a neural network, or a machine-learning model, into prediction intervals using only that model's residuals.
The general framework is presented in the tutorial by Angelopoulos & Bates (2023), which also discusses extensions to time series. A time-series variant, EnbPI, is attributed to Xu & Xie (2021).
The intuition behind the method
Suppose your forecasting model gives a single number for tomorrow, but you also want an honest range around it. Conformal prediction looks at how large the model's errors were on held-out calibration data and uses that spread to set the width of the band around each new forecast. The method does not assume a particular error distribution, so the band reflects the observed record of misses rather than a fitted parametric shape. In the basic version the width is the same for every forecast, so the band is only as current as the calibration residuals that feed it.
History
Conformal prediction as a general framework predates the time-series literature; Angelopoulos & Bates (2023) give a tutorial introduction and discuss its extension to settings such as time series and distribution shift. The time-series variant EnbPI is attributed to Xu & Xie (2021, ICML).
When to use it
Use conformal prediction when you have a continuous time series, already have a point forecaster you trust for the mean, and need prediction intervals without committing to a Gaussian or other parametric error model. It needs a held-out calibration set large enough for the (1−α) quantile to be stable; as a rule of thumb this means at least about 1/α residuals, and considerably more in practice (for 90% coverage, well over 10, and typically many more). The formal guarantee requires exchangeable residuals. It is a reasonable choice when the base model is a black box whose native intervals are unreliable. When the series has strong autocorrelation or abrupt regime shifts, the plain version carries no formal guarantee; use a time-series-aware scheme such as EnbPI or rolling recalibration, and verify empirical coverage.
Limitations and considerations
- The formal guarantee rests on exchangeability of the residuals; autocorrelation or abrupt regime shifts can break it, and approximate exchangeability gives no formal finite-sample guarantee.
- The basic formula ŷₜ ± q̂ gives a symmetric band of constant width, so it cannot widen for an individual forecast that is expected to be harder, and it does not adapt to skewed errors.
- Requires a held-out calibration set, so it spends observations that the base model could otherwise use for training.
- Coverage is marginal: the level 1−α holds on average over forecasts, not conditionally for each input.
- When the series drifts, recalibrating on a rolling or sliding window of recent residuals and monitoring empirical coverage over time can help keep the bands current, but this does not restore the formal guarantee.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Distribution-free: the interval is built from empirical residual quantiles, so no parametric error distribution is required, and the coverage guarantee holds under exchangeability.
- Model-agnostic wrapper: it can be placed on top of ARIMA, a neural network, gradient boosting, or any other point forecaster without re-fitting the base model.
- Time-series variants such as EnbPI are designed to handle dependent data, which the plain recipe does not address.
Applications
- Placing calibrated prediction bands around a black-box demand or load forecaster.
- Adding interval estimates to ARIMA or neural-network time-series forecasts whose native intervals are not trusted.
- Forecasting in economics, energy, and finance where the reported interval must reflect observed past errors rather than an assumed error distribution.
How it works
How it works
Start from any base point forecaster f, which produces predictions ŷ for the series. For each calibration observation the nonconformity score is the residual Rₜ = |yₜ − ŷₜ|, the absolute gap between the realised value and the forecast. No distributional form is assumed for these residuals.
Formula
\hat{y}_t = f(X_t), \quad R_t = |y_t - \hat{y}_t|To target coverage 1−α with n calibration residuals, take q̂ as the ⌈(n+1)(1−α)⌉-th smallest residual, which is the finite-sample corrected empirical quantile, and report ŷₜ ± q̂ around each new forecast. The non-asymptotic coverage guarantee holds under exchangeability of calibration and future residuals. For autocorrelated or shifting series the nominal level is not guaranteed, and dependence-aware variants or empirical coverage checks are needed. Because one shared q̂ is used, the band width does not vary with the input. The time-series variant EnbPI (attributed to Xu & Xie, 2021) constructs the residuals with an ensemble and resampling scheme designed for dependent data; consult the original paper for its exact construction and assumptions.
Formula
C_{1-\alpha}(X_t) = \hat{y}_t \pm \hat{q}, \quad \hat{q} = R_{(\lceil (n+1)(1-\alpha)\rceil)}Common pitfalls
- Calibrating on data that overlaps the training set, which leaks information and yields over-optimistic, too-narrow intervals.
- Applying the plain conformal recipe to a strongly autocorrelated series and assuming the nominal level holds.
- Reading marginal coverage as conditional coverage: the band need not be calibrated for every individual forecast.
- Using too small a calibration set, leaving too few residuals to estimate the (1−α) quantile reliably.
- Not monitoring empirical coverage over time, so that drift in the error distribution goes unnoticed.
Frequently asked questions
What does it mean that conformal prediction is distribution-free?
The interval is built from the empirical quantile of the model's own residuals, so it needs no assumption that the errors are Gaussian or follow any particular distribution. The coverage guarantee holds under exchangeability of the residuals.
Can I use it with any forecasting model?
Yes. Conformal prediction is a wrapper: you supply a point forecaster such as ARIMA, a neural network, or gradient boosting, and intervals are calibrated from that model's residuals. It does not change or re-fit the base model.
Why a special version for time series?
The plain version assumes exchangeable data, which autocorrelation and drift can violate. Variants such as EnbPI (attributed to Xu & Xie, 2021) are designed for dependent data; check their assumptions in the original paper, and verify coverage empirically.
Does it guarantee the interval covers every forecast?
No. The guarantee is marginal: coverage holds on average at the chosen level (1−α), not conditionally on each specific input. A band can still miss for an individual hard-to-predict point.
Related methods
Sources
Angelopoulos, A. N. & Bates, S. (2023). Conformal Prediction: A Gentle Introduction. Foundations and Trends in Machine Learning, 16(4), 494-591.
Open DOI referenceXu, C. & Xie, Y. (2021). Conformal Prediction Interval for Dynamic Time-Series. International Conference on Machine Learning (ICML).
Open publication reference