AI Glossary / Statistics and probability / Intermediate

Conformal prediction

Definition

Conformal prediction is a framework for constructing prediction sets or intervals with finite-sample coverage guarantees under specified conditions, commonly exchangeability of calibration and future examples. It can wrap around many prediction models. The output is a set of plausible outcomes rather than only a point prediction. Its standard guarantee concerns marginal coverage, not a promise of the same coverage for every individual input or subgroup.

What it means

A regression model might predict demand as one number. A conformal procedure can turn that prediction into an interval using information about errors on calibration data. In classification, it can return a set of candidate labels.
Distribution-free means the basic guarantee does not require a particular parametric distribution for the data. It does not mean assumption-free. The way data are split, the comparability of calibration and future cases, and the construction of the procedure matter. A weak predictor may still yield valid coverage by producing very wide or large sets.

How it works

In split conformal prediction, fit a model on training data and keep a separate calibration sample. Choose a nonconformity score that measures how poorly a candidate outcome agrees with the model. For simple regression intervals, absolute prediction error is a common score.
Calculate scores for n calibration examples and select a finite-sample-adjusted quantile. For target miscoverage alpha, a standard choice is the score at rank ceiling[(n + 1)(1 - alpha)] in ascending order. If this rank exceeds n, the conservative construction uses an infinite threshold rather than pretending an unavailable quantile exists.
For a new input, include candidate outcomes whose score does not exceed the threshold. With absolute residual scores, this gives the point prediction plus or minus the selected value. More adaptive scores can produce intervals that vary with estimated difficulty.
Under the required exchangeability and proper separation from model fitting, the standard method achieves at least 1 - alpha marginal coverage. That probability averages over calibration and future examples, conditional on the separately fitted model when appropriate. It is not generally conditional coverage at every feature value. Evaluate set size and subgroup behavior as well as overall coverage, and use methods justified for the setting when time dependence or distribution shift breaks the basic assumptions.

Three practical examples

  • A demand forecaster adds conformal intervals to point forecasts using a suitable held-out calibration sample.
  • A document classifier returns several possible categories when the evidence does not support a small prediction set.
  • An equipment-monitoring team studies whether prediction intervals remain useful across operating conditions, checking both coverage and width.

Think of it this way

Think of conformal prediction as sizing a protective envelope using a separate collection of past prediction errors. The ranking of a new error among comparable calibration errors provides the coverage logic. If future errors come from a different process, the old envelope may no longer have the promised protection.

Worked example

Consider an original split-conformal regression example. A model has already been fitted without using nine calibration observations. Their absolute residual scores, sorted from smallest to largest, are 1, 2, 2, 3, 3, 4, 5, 6, and 8.
Choose target coverage 80%, so alpha=0.20. The corrected rank is ceiling[(9 + 1) times 0.80]=8. The eighth score is six. For a new input with point prediction 24, the conformal interval is [24 - 6, 24 + 6]=[18,30]. Its width is 12.
A realized outcome of 29 falls inside; an outcome of 31 falls outside. Neither one result establishes or disproves the method's long-run coverage property. The guarantee relies on exchangeability and correct construction, not on the interval's appearance.
Notice that eight of the nine calibration scores are at most six, a fraction of 88.9%. This does not make the target coverage 88.9%; the n + 1 correction accounts for the new score's rank among calibration and future scores. The small example illustrates the calculation, not a recommendation to use only nine calibration cases in a real application.

Illustrative case study

In a fictional company, Northgate Supply adds intervals around an AI demand model. The team initially considers using the same data to fit the model and choose the residual threshold. An analyst explains that ordinary training errors are too optimistic for the standard split-conformal argument.
The team reserves calibration data and evaluates the resulting intervals on later held-out cases. It examines widths and coverage by product group, while recognizing that overall validity does not guarantee each group's coverage. A major change in customer demand prompts a review of whether the original calibration assumptions remain credible.
This fictional case illustrates implementation and monitoring, not a claim of observed coverage or business savings.

Common misconceptions and mistakes

Conformal prediction is not a guarantee that every individual prediction is correct. Marginal coverage is not universal conditional coverage. Distribution-free does not remove exchangeability or other method-specific assumptions. Prediction intervals concern future outcomes, unlike confidence intervals for parameters. Narrow intervals are not necessarily valid, and valid intervals are not necessarily useful. Reusing calibration data to tune many choices can invalidate a naive guarantee unless the procedure accounts for that reuse.

Business use

Businesses use conformal prediction when a decision needs a set or range of plausible outcomes with a clear statistical target. Applications include capacity planning, classification review, and forecasting. Assess the cost of wide sets, missed outcomes, and deferred decisions alongside coverage. State the calibration design, target level, score, and assumptions so that a nominal percentage does not become an unconditional operational promise.

People also ask

Does conformal prediction require a particular AI model?

No; many methods can work with diverse fitted predictors.

Will it always return a narrow interval?

No. Poor predictive information or a demanding coverage target can produce wide intervals.

Can it handle time series?

Specialized approaches exist, but applying the ordinary exchangeable-data guarantee directly to dependent sequences is not automatically justified.

Check your understanding

What rank is used in the worked example?

Answer: Eight. What interval follows from prediction 24 and threshold six? [18,30].

Does 80% marginal coverage guarantee 80% coverage for every product category?

Answer: No.

Why keep calibration data separate from ordinary model fitting?

Answer: The validity argument requires the appropriate relationship between calibration scores and future scores.

Related terms

  • Prediction interval
  • Quantile
  • prediction set
  • calibration sample
  • exchangeability
  • nonconformity score
  • marginal coverage
  • conditional coverage
  • distribution shift
  • selective prediction

Learn next

Learn prediction intervals and exchangeability, then implement split conformal on a small regression example. Study how the finite-sample quantile correction works before using software defaults. Next compare score choices and examine limitations of marginal coverage, especially for heterogeneous groups and changing data.

  • Quantile

More in Statistics and probability

  • Conditional probability table - A conditional probability table, or CPT, is a tabular representation of a discrete variable's probability distribution for each specified combination of...
  • Confidence interval - A confidence interval is a range calculated from data by a procedure designed to cover an unknown population quantity at a stated rate over repeated...
  • Confidence values - Confidence values are scores that an AI or statistical system attaches to predictions, extracted information, or other outputs to express estimated...
  • Confounded - Variables or effects are confounded when their contributions cannot be distinguished adequately in the comparison or design being used.
  • Confounding - Confounding is a source of bias that can distort the interpretation of an observed association as a causal effect.
  • Conjoint analysis - Conjoint analysis is a family of methods for studying how people evaluate alternatives described by several attributes.

Sources

Ryan Tibshirani, Conformal Prediction, author lecture notes: https://www.stat.berkeley.edu/~ryantibs/statlearn-s24/lectures/conformal.pdf Angelopoulos and Bates, A Gentle Introduction to Conformal Prediction and Distribution-Free Uncertainty Quantification: https://arxiv.org/abs/2107.07511

Previous: Conflict set Next: Conformalized quantile regression

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer