← Back to list
AI & Data
#불확실성 정량화#예측 집합#커버리지 보증#분포 무관#CQR
Last updated · 2026-11-18

Conformal Prediction

1. Overview

A. Definition

A model-agnostic, distribution-free uncertainty-quantification framework that converts the point prediction of any model into a prediction set (classification) or prediction interval (regression) that mathematically guarantees a user-specified confidence level $1-\alpha$ even in finite samples, under the assumption of exchangeability.

The core idea of conformal prediction is to wrap a model so that, instead of flatly asserting "the answer is 7," it answers "the answer lies within this range (or this candidate set) with 95% probability," while guaranteeing coverage. The crucial point is that this guarantee holds regardless of the shape of the data distribution (normality, etc.) or whether the model is correct. No matter how crude the model, coverage itself is preserved; the better the model, the narrower the prediction set, raising efficiency. In other words, conformal prediction is not a technique for improving accuracy but a post-processing (wrapper) layer that overlays a reliable error guarantee onto the outputs of an existing model.

B. Background and Necessity

Deep-learning models emit softmax probabilities, but these values often diverge from the true probability of correctness. Modern neural networks in particular tend toward overconfidence, frequently being wrong with 0.99 confidence. In high-cost-of-error domains such as medical diagnosis, autonomous driving, credit scoring, and drug screening, what is demanded is not "how confident the model is" but a verifiable guarantee of "whether that confidence can be trusted." Existing uncertainty techniques such as Bayesian neural networks or MC Dropout rely on prior and approximation assumptions and cannot mathematically guarantee coverage. Conformal prediction, by contrast, can be applied post-hoc to any model given only calibration data, and rigorously guarantees $\Pr(Y_{n+1} \in \hat{C}(X_{n+1})) \ge 1-\alpha$ in finite samples. As the LLM hallucination problem and the Trustworthy AI regulatory trend have converged, it has rapidly risen in academia and industry as a means of "producing an answer while presenting the risk of being wrong in a controllable form."

C. Characteristics

The nature of conformal prediction is summarized by four keywords. First, distribution-free: it assumes nothing about which distribution the data follow and requires only exchangeability. Second, model-agnostic: anything from linear regression to gradient boosting, giant neural networks, and even LLMs can be wrapped as long as there is an output. Third, finite-sample guarantee: coverage holds at the current calibration-set size without the asymptotic caveat "if the sample is infinitely large." Fourth, post-hoc: it can be thinly attached after inference without retraining an already-deployed model. The combination of these four traits positions conformal prediction as a practical layer that "leaves accuracy untouched while adding reliability after the fact."

2. Operating Principle and Core Concepts

flowchart LR
  TR["Train model f on training data"] --> CAL["Calibration Set"]
  CAL --> SC["Compute nonconformity score s=score(x,y)"]
  SC --> Q["Estimate (1-α) quantile q"]
  Q --> TEST["New input x_new"]
  TEST --> SET["Build prediction set C(x_new): collect y with s(x_new,y)≤q"]
  SET --> OUT["Set/interval with guaranteed 1-α coverage"]

The backbone of conformal prediction consists of two things: the nonconformity score and the quantile threshold. First, model $f$ is trained on the training data. Next, for each sample $(x_i, y_i)$ of a calibration set not used in training, a nonconformity score $s_i = s(x_i, y_i)$ is computed, measuring "how poorly this sample fits the model's prediction." For classification one commonly uses $s = 1 - \hat{p}(y\mid x)$ (the lower the softmax probability of the true class, the larger the score). From the empirical distribution of these calibration scores, the $\lceil (n+1)(1-\alpha)\rceil / n$ quantile $q$ is obtained. Finally, for a new input $x_{new}$, among all possible labels $y$ only those satisfying $s(x_{new}, y) \le q$ are gathered to form the prediction set $\hat{C}(x_{new})$.

Step Content Output
1 Train base model $f$ on the training set Prediction model
2 Compute nonconformity scores $s_i$ on the calibration set Score distribution
3 Estimate the $(1-\alpha)$ empirical quantile $q$ Threshold $q$
4 Collect labels/values with $s\le q$ on new input Prediction set/interval

The reason this procedure guarantees coverage lies in exchangeability. If the calibration samples and the future test sample are exchangeable (the joint distribution is invariant to reordering), then the rank that the test sample's nonconformity score occupies among the calibration scores follows a uniform distribution. Hence "the probability that the test score falls beyond the top $\alpha$ of the calibration scores" is controlled at exactly $\alpha$, and coverage holds without any distributional assumption. Numerically, with a calibration set of $n=1000$ and $\alpha=0.1$, one takes roughly the 901st-largest score as the threshold to secure 90% coverage.

To aid understanding, consider a concrete numerical example. Suppose there is a 10-species animal image classifier and we set $\alpha=0.1$ (target coverage 90%). Drawing the "softmax probability of the true class" from each of 500 calibration images and computing $s_i = 1-\hat{p}$ yields 500 scores. Sorting them in ascending order and taking the top-10% point, i.e. the $\lceil 501 \times 0.9\rceil = 451$st-smallest value (= the 50th-largest), suppose we obtain $q=0.82$ as the threshold. Now, for a new cat photo, if the model predicts cat 0.55, lynx 0.30, dog 0.10, and the rest low, then only classes with $1-\hat{p}\le 0.82$, i.e. $\hat{p}\ge 0.18$, enter the set, giving $\hat{C}={\text{cat, lynx}}$. For an easy photo the model is sure of, the set narrows to a single element; for an ambiguous photo, three or four remain, so the set size itself becomes an indicator of uncertainty.

A. The Two Faces of the Coverage Guarantee — Lower and Upper Bound

What conformal prediction guarantees is, precisely, the two-sided inequality $1-\alpha \le \Pr(Y_{n+1}\in\hat{C}(X_{n+1})) \le 1-\alpha + \frac{1}{n+1}$. That is, coverage not only does not drop below the target, but when the calibration set is large enough it hardly overflows upward either, preventing over-coverage from needlessly enlarging the set. This property distinguishes conformal prediction from the trivial solution "just take the set to be all labels and coverage is 100%." The smaller the calibration set, the larger the $1/(n+1)$ slack on the right-hand side and the looser the guarantee, so for reliability-critical applications it is practically important to secure a calibration set on the order of hundreds to thousands. It must also be understood that this guarantee is not an average over a single fixed threshold but a marginal probability integrated over the randomness of the split, to avoid misunderstanding.

B. The Design of the Nonconformity Score Governs Efficiency

Coverage is guaranteed no matter how the score is defined, but how narrow the prediction set is (efficiency) depends entirely on the design of the nonconformity score. For example, in classification, simply using $s=1-\hat{p}(y\mid x)$ applies the same threshold to easy and hard samples, which is conditionally inefficient. By contrast, cumulative-probability-based (APS) or penalty-added (RAPS) scores significantly reduce the average set size at the same coverage. In regression too, using the absolute residual $|y-\hat{y}|$ yields intervals of constant width for all inputs, whereas using quantile-regression residuals adapts the width per input. Thus the substantive work of conformal-prediction design is not "how to preserve coverage" but finding "which score gives the shortest set." This is an engineering problem that jointly considers model performance and domain characteristics, and recent research aiming to optimize the score function itself through learning targets exactly this point.

Finally, the significance level $\alpha$ is not a mere hyperparameter but a risk policy in itself. $\alpha=0.01$ is a declaration to "allow an out-of-set error only once in 100 times," which enlarges sets and lowers the automation rate. Conversely, $\alpha=0.2$ narrows sets for higher efficiency but accepts one miss in five. Hence the decision on $\alpha$ is a business decision that synthesizes the domain's error cost, operational efficiency, and regulatory requirements, not a technical optimization problem.

3. Major Methods and Variants

flowchart TB
  CP["Conformal Prediction"] --> FULL["Full/Transductive CP: retrain for every label"]
  CP --> SPLIT["Split(Inductive) CP: split off calibration set once"]
  CP --> CV["CV+ / Jackknife+: cross-validation based"]
  SPLIT --> CLS["Classification: APS·RAPS adaptive sets"]
  SPLIT --> REG["Regression: CQR quantile-regression coupling"]
  SPLIT --> MOND["Mondrian CP: group-conditional coverage"]

A. Full/Transductive CP

The most primordial method: for a new input, each possible label $y$ is hypothesized one at a time, that pair is included in the data, the model is retrained, and nonconformity is evaluated. Because it uses all data for both training and calibration simultaneously, it is statistically the most efficient, achieving the same coverage with a narrower set. However, it must retrain the model as many times as there are labels per test sample—or as many as there are grid points in regression—so for models with high training cost like deep learning the computation is unrealistic. Thus Full CP is important as a theoretical reference point for small data and cheap models but is rarely used in large-scale practice. This computational limitation is the direct background for the Split CP below, which splits off calibration only once, and the two methods illustrate the classic trade-off between statistical efficiency and computational efficiency.

B. Split/Inductive CP

The data is split only once into a training set and a calibration set; the model is trained just once on the training set and the threshold is computed just once on the calibration set. Since there is no retraining at all, it applies immediately to any pretrained model and its computational cost is negligible. The downside is that a portion of the data (usually 10–30%) must be carved out for calibration only, and if a single split happens to be skewed, set sizes fluctuate. Most practice adopts this method, generating sets within tens of milliseconds even for ImageNet-scale classifiers. In data-rich industrial settings the calibration-split loss is barely a problem, so it has effectively become the standard.

C. Cross-Validation-Based (CV+·Jackknife+) and Mondrian CP

These are variants that aim to reduce the data waste caused by splitting off a calibration set. Jackknife+ constructs intervals from leave-one-out residuals and CV+ from K-fold cross-validation residuals, providing near-coverage guarantees while using the entire dataset for both training and calibration. They are especially useful in domains where each sample is precious, such as drug and bio experiments with scarce data. Mondrian (group-conditional) CP sets a separate threshold for each class or subgroup rather than only overall average coverage, so coverage does not collapse even in minority groups. For instance, it becomes a means of mitigating the fairness problem in which the coverage of a rare-disease class is sacrificed by being absorbed into majority classes.

D. Adaptive Sets (APS·RAPS) and Quantile-Regression Coupling (CQR)

The basic method guarantees only overall average coverage and has a conditional inefficiency, producing sets that are excessively large for easy inputs and too small for hard inputs. In classification, APS (Adaptive Prediction Sets) constructs the set by accumulating softmax probabilities in descending order, adapting set size to input difficulty, and RAPS adds a penalty to tail classes to make sets smaller and more stable. In regression, CQR (Conformalized Quantile Regression) corrects the upper and lower bounds estimated by quantile regression through conformal calibration, so that on heteroscedastic data the interval width adapts, widening and narrowing with the input. For example, in electricity-demand forecasting it automatically grants a wide interval to volatile peak hours and a narrow interval to stable late-night hours.

The design principle running through these four variants is: "average coverage is guaranteed for free, so effort is spent on conditional adaptivity and minimizing set size." Mondrian targets per-group fairness, APS·RAPS per-difficulty adaptation, CQR per-variance adaptation, and CV+·Jackknife+ data efficiency. In practice one selects a combination based on data volume (CV family if scarce), task type (classification/regression), and fairness requirements (Mondrian if present), and it is also possible to apply several variants simultaneously in one pipeline.

4. Comparison and Application Cases

Category Conformal Prediction Bayesian/MC Dropout Platt·Temperature Scaling
Guarantee type Finite-sample coverage guarantee Posterior (assumption-dependent) Probability calibration only, no coverage guarantee
Distributional assumption Requires only exchangeability Prior and approximation assumptions Presupposes point-probability calibration
Model constraint Model-agnostic (post-processing) Requires specific structure/inference Requires classification probabilities
Output form Prediction set/interval Posterior samples/variance Calibrated scalar probability
Cost Nearly free with Split Multiple-inference/sampling cost Cheap

The crux of this comparison is that "what is guaranteed" differs. Temperature scaling merely calibrates probability values and does not guarantee "the probability that the answer is in the set," and Bayesian techniques break their guarantee if the prior is wrong. Only conformal prediction promises distribution-free coverage in finite samples. That said, conformal prediction's coverage is also marginal, so a conditional guarantee for a specific input has the trade-off of requiring Mondrian or adaptive techniques to be layered on.

Conversely, clarifying what conformal prediction does not guarantee is also important from a professional-engineer's perspective. First, coverage is "the probability that the answer is in the set," not "the probability that each element in the set is the answer," so the set must not be mistaken for a probability distribution. Second, it is not a panacea, because if exchangeability breaks (time series, distribution shift) the guarantee itself becomes void. Third, if the calibration set is small, the guarantee holds but the set fluctuates unstably. Clearly distinguishing "the scope of the guarantee and what lies outside it" like this is a far more important insight for practical application than a superficial ranking against temperature scaling or Bayesian methods.

The true value of conformal prediction arises from this generality: the same mathematical guarantee can be reused across any model or domain. The three cases below are different tasks—classification, regression, and generation—yet they share the same backbone: "decide a nonconformity score and build a set with the calibration quantile."

Case 1 (medical imaging): Wrapping a skin-cancer classifier with Split CP to present a "set of possible diagnoses" allows ambiguous cases, where two or more labels remain in the set, to be automatically routed (selective prediction) to specialist review. Because 90% coverage is guaranteed, the risk of out-of-set misdiagnosis is controlled, and the set size itself becomes an interpretable signal of "how ambiguous this case is." Case 2 (demand forecasting): Applying CQR to retail demand forecasting and setting safety stock at the 95%-interval upper bound lets one explicitly manage the stockout probability to 5% or less. The interval's lower bound quantifies the overstock risk and the upper bound the stockout risk, so inventory policy is built on guaranteeable numbers. Case 3 (LLM): In multiple-choice QA, using model logits as the nonconformity score to build a "guaranteed set containing the answer" controls the risk of missing the correct answer at $\alpha$ while narrowing candidates, instead of asserting a single wrong answer through hallucination. It connects directly to an agent safeguard: process automatically when the set narrows to one label, and hand off to a human when several remain.

The common implication these three cases show is that conformal prediction is not merely a statistical ornament that "draws error bars" but decision-making infrastructure that builds operational automatic/manual routing decisions on top of a guaranteeable threshold. The core of its practical value is that, using set size as a threshold, one can operate the rule "automate the certain, route the ambiguous to humans" together with a mathematical guarantee.

5. Deep Dive — Recent Trends and Handling LLMs and Distribution Shift

Conformal prediction has seen an explosion of research since the 2020s as a reliability tool for generative AI. A 2024 NLP survey organized the trend of applications expanding beyond classification to text generation and summarization, and in 2025, generation-specific techniques such as COPU—which adds the ground truth to the candidate set to raise coverage with few samples (on the order of five)—and methods such as conformal factuality—which prunes while guaranteeing, keeping only sentences with high probability of being factual among generated claims—were proposed. That said, it is repeatedly reported that an LLM's self-stated verbalized confidence tends toward overconfidence, so conformal calibration is used as an external device to correct that overconfidence.

Theoretical extensions matter too. The core assumption of exchangeability breaks when there is distribution shift; to handle this, Weighted Conformal Prediction, which assigns a likelihood-ratio weight to each sample, and Adaptive Conformal Inference (ACI), which updates the threshold online over time to adapt to non-stationary streams, have been proposed. Furthermore, it has been generalized to Conformal Risk Control, which goes beyond the single metric of coverage to control an arbitrary risk such as the false-negative rate or cost below $\alpha$, broadening the scope of application to multi-label, object detection, and more. That said, many of these are still at the arXiv preprint stage with benchmarking and validation ongoing, so maturity must be weighed when adopting them in practice.

The implementation ecosystem is also maturing, lowering the adoption barrier. In Python there are MAPIE, which wraps scikit-learn estimators to provide classification/regression conformal prediction, the PyTorch-based TorchCP, and educational libraries released by the original authors, so a calibration layer can be attached to an existing model in tens of lines of code. In practice one applies it in the order of (1) securing a calibration set representative of the operating distribution, (2) deciding a domain-appropriate nonconformity score and target $\alpha$, and (3) dashboarding coverage and average set size as monitoring metrics. In particular, when coverage begins to fall below target it can be used as an early warning of distribution shift, so an operational design that connects it to a model recalibration/retraining trigger is recommended.

6. Considerations and Implications

Conformal prediction is a low-cost, high-benefit layer that "adds reliability without changing the model," and from a professional-engineer's perspective its adoption strategy and limits must be viewed in balance.

  • Adoption strategy (post-processing layering): Designing it as a plugin that inserts a calibration/set-generation step after inference in an existing MLOps pipeline makes it operate independently of model replacement or retraining. The calibration set requires governance that periodically refreshes it to reflect the operating data distribution.
  • Trade-off (coverage ↔ set size): Lowering $\alpha$ is safer but widens sets/intervals, reducing decision-making usefulness. Given that "a set too large is effectively the same as 'I don't know,'" the target coverage must be decided by weighing both the cost of misjudgment and operational utility.
  • Fragility of assumptions (distribution shift·exchangeability): In cold-start or concept-drift environments, exchangeability can break and void the guarantee, so Weighted CP·ACI application must run alongside drift monitoring. Time series require special caution because exchangeability is inherently weak.
  • Fairness·conditional guarantees: Average coverage can sacrifice minority groups, so domains where regulation and ethics matter must verify per-subgroup coverage with Mondrian·group-conditional CP.
  • Related technologies·outlook: It naturally combines with Trustworthy AI·AI governance, selective prediction (reject option), and human-in-the-loop (HITL) routing. It is poised to establish itself as a standard means of satisfying the behavioral safeguard of LLM agents and the uncertainty-disclosure requirements of EU-AI-Act-type regulation.
  • Organization·capability perspective: Conformal prediction is effective only when risk and regulatory-response organizations operate it together with the model-development team. Because the target coverage $\alpha$ is both a technical parameter and a business risk-tolerance level, a governance structure in which business and legal functions participate in that decision is required.

In sum, conformal prediction is a technique that precisely fits the trend of modern AI governance demanding not just an "accurate model" but a "model that fails reliably." The professional engineer should understand it not as a specific algorithm but as an architectural pattern that layers a guarantee onto any model to mathematically design the boundary between automation and human review, and needs a perspective that, at adoption, jointly designs the assumptions' conditions of validity, calibration-data governance, and the monitoring system.

References


In one line: Conformal prediction is a distribution-free post-processing framework that, from the exchangeability assumption alone, converts any model's output into prediction sets/intervals guaranteeing $1-\alpha$ coverage in finite samples, extending through Split, CQR, adaptive, and distribution-shift-handling variants to medical, demand-forecasting, and LLM reliability.