Conformal prediction

Short description: Statistical technique for producing prediction sets

Conformal prediction (CP) is an algorithm for uncertainty quantification that produces statistically valid prediction regions (multidimensional prediction intervals) for any underlying point predictor (whether statistical, machine learning, or deep learning) only assuming exchangeability of the data. CP works by computing "nonconformity scores" on previously labeled data, and using these to create prediction sets on a new (unlabeled) test data point. A transductive version of CP was first proposed in 1998 by Gammerman, Vovk, and Vapnik,[1] and since, several variants of conformal prediction have been developed with different computational complexities, formal guarantees, and practical applications.[2]

Conformal prediction requires a user-specified significance level for which the algorithm should produce its predictions. This significance level restricts the frequency of errors that the algorithm is allowed to make. For example, a significance level of 0.1 means that the algorithm can make at most 10% erroneous predictions. To meet this requirement, the output is a set prediction, instead of a point prediction produced by standard supervised machine learning models. For classification tasks, this means that predictions are not a single class, for example `'cat'`, but instead a set like `{'cat', 'dog'}`. Depending on how good the underlying model is (how well it can discern between cats, dogs and other animals) and the specified significance level, these sets can be smaller or larger. For regression tasks, the output is prediction intervals, where a smaller significance level (fewer allowed errors) produces wider intervals which are less specific, and vice versa – more allowed errors produce tighter prediction intervals.[3][4][5][6]

## Contents

* 1 History
* 2 Theory
* 2.1 Classification algorithms
* 2.1.1 Inductive conformal prediction (ICP)
* 2.1.2 Mondrian inductive conformal prediction (MICP)
* 2.2 Regression algorithms
* 2.2.1 Inductive conformal prediction (ICP)
* 2.2.2 Split conformal prediction (SCP)
* 3 Applications
* 3.1 Types of learning models
* 3.2 Use case
* 3.3 Use in handling uncertainty and concept drift
* 4 Conferences
* 5 Books
* 6 See also
* 7 References

## History

The conformal prediction first arose in a collaboration between Gammerman, Vovk, and Vapnik in 1998;[1] this initial version of conformal prediction used what are now called E-values though the version of conformal prediction best known today uses p-values and was proposed a year later by Saunders et al.[7] Vovk, Gammerman, and their students and collaborators, particularly Craig Saunders, Harris Papadopoulos, and Kostas Proedrou, continued to develop the ideas of conformal prediction; major developments include the proposal of inductive conformal prediction (a.k.a. split conformal prediction), in 2002.[8] A book on the topic was written by Vovk and Shafer in 2005,[3] and a tutorial was published in 2008.[9]

## Theory

The data has to conform to some standards, such as data being exchangeable (a slightly weaker assumption than the standard IID imposed in standard machine learning). For conformal prediction, a n% prediction region is said to be valid if the truth is in the output n% of the time.[3] The efficiency is the size of the output. For classification, this size is the number of classes; for regression, it is interval width.[9]

In the purest form, conformal prediction is made for an online (transductive) section. That is, after a label is predicted, its true label is known before the next prediction. Thus, the underlying model can be re-trained using this new data point and the next prediction will be made on a calibration set containing n + 1 data points, where the previous model had n data points.[9]

### Classification algorithms

The goal of standard classification algorithms is to classify a test object into one of several discrete classes. Conformal classifiers instead compute and output the p-value for each available class by performing a ranking of the nonconformity measure (α-value) of the test object against examples from the training data set. Similar to standard hypothesis testing, the p-value together with a threshold (referred to as significance level in the CP field) is used to determine whether the label should be in the prediction set. For example, for a significance level of 0.1, all classes with a p-value of 0.1 or greater are added to the prediction set. Transductive algorithms compute the nonconformity score using all available training data, while inductive algorithms compute it on a subset of the training set.

#### Inductive conformal prediction (ICP)

Inductive Conformal Prediction was first known as inductive confidence machines,[8] but was later re-introduced as ICP. It has gained popularity in practical settings because the underlying model does not need to be retrained for every new test example. This makes it interesting for any model that is heavy to train, such as neural networks.[10]

#### Mondrian inductive conformal prediction (MICP)

In MICP, the alpha values are class-dependent (Mondrian) and the underlying model does not follow the original online setting introduced in 2005.[4]

Training algorithm:

1. Train a machine learning model
2. Run a calibration set through the model, save output from the chosen stage
* In deep learning, the softmax values are often used
3. Use a non-conformity function to compute α-values
* A data point in the calibration set will result in an α-value for its true class

Prediction algorithm:

1. For a test data point, generate a new α-value
2. Find a p-value for each class of the data point
3. If the p-value is greater than the significance level, include the class in the output[4]

### Regression algorithms

Conformal prediction was initially formulated for the task of classification, but was later modified for regression. Unlike classification, which outputs p-values without a given significance level, regression requires a fixed significance level at prediction time in order to produce prediction intervals for a new test object. For classic conformal regression, there is no transductive algorithm. This is because it is impossible to postulate all possible labels for a new test object, because the label space is continuous. The available algorithms are all formulated in the inductive setting, which computes a prediction rule once and applies it to all future predictions.

#### Inductive conformal prediction (ICP)

All inductive algorithms require splitting the available training examples into two disjoint sets: one set used for training the underlying model (the proper training set) and one set for calibrating the prediction (the calibration set). In ICP, this split is done once, thus training a single ML model. If the split is performed randomly and that data is exchangeable, the ICP model is proven to be automatically valid (i.e. the error rate corresponds to the required significance level).

Training algorithm:

1. Split the training data into proper training set and calibration set
2. Train the underlying ML model using the proper training set
3. Predict the examples from the calibration set using the derived ML model → ŷ-values
4. Optional: if using a normalized nonconformity function
1. Train the normalization ML model
2. Predict normalization scores → 𝜺 -values
5. Compute the nonconformity measures (α-values) for all calibration examples, using ŷ\- and 𝜺-values
6. Sort the nonconformity measure and generate nonconformity scores
7. Save underlying ML model, normalization ML model (if any) and nonconformity scores

Prediction algorithm:

Required input: significance level (s)

1. Predict the test object using the ML model → ŷt
2. Optional: if using a normalized nonconformity function
1. Predict the test object using normalization model → 𝜺t
3. Pick the nonconformity score from the list of scores produced by the calibration set in training, corresponding to the significance level s → αs
4. Compute the prediction interval half width (d) from rearranging the nonconformity function and input αs (and optionally 𝜺) → d
5. Output prediction interval (ŷ − d, ŷ \+ d) for the given significance level s

#### Split conformal prediction (SCP)

The SCP, often called aggregated conformal predictor (ACP), can be considered an ensemble of ICPs. SCP usually improves the efficiency of predictions (that is, it creates smaller prediction intervals) compared to a single ICP, but loses the automatic validity in the generated predictions.

## Applications

### Types of learning models

Several machine learning models can be used in conjunction with conformal prediction. Studies have shown that it can be applied to for example convolutional neural networks,[11] support-vector machines and others.

### Use case

Conformal prediction is used in a variety of fields and is an active area of research. For example, in biotechnology it has been used to predict uncertainties in breast cancer,[12] stroke risks,[13] data storage,[14] and disk drive scrubbing.[15] In the domain of hardware security it has been used to detect the evolving hardware trojans.[16] Within language technology, conformal prediction papers are routinely presented at the Symposium on Conformal and Probabilistic Prediction with Applications (COPA).[17] Conformal prediction has also been applied to small molecule drug discovery.[18]

### Use in handling uncertainty and concept drift

Conformal prediction is in many instances used to give machine learning models a better understanding of uncertainty in their outputs. In conformal prediction, a non-conformity score measures how unusual a new example is compared to the training data, and these scores are used to compute the p-values that determine the final prediction set. Instead of creating a single label, p-values are generated by the model to show how each possible label correlates with the new data point. These p-values are then used to form prediction sets and credibility scores that indicate whether the model's real-time assumptions remain valid for the input they are evaluating.

Because conformal prediction compares patterns learned from past data with new input, it can help reveal when the underlying data distribution has shifted. When Concept drift is present, new data may receive lower p-value scores, indicating that the model is encountering inputs that differ from its training distribution. This makes conformal prediction useful for assessing whether a model remains reliable as data naturally evolves over time.[19]

Researchers have applied conformal prediction in domains such as cybersecurity and anomaly detection, where data changes rapidly. In the context of malware classification, conformal scores and p-values can help highlight files that deviate from previously observed patterns, signaling uncertainty or possible adversarial manipulation.[19] This makes conformal prediction valuable for strengthening machine learning defenses in environments where threats evolve continually.

## Conferences

Conformal prediction is one of the main subjects discussed during the COPA conference each year. Both theory and applications of conformal predictions are presented by leaders of the field. The conference has been held since 2012.[17] It has been hosted in several different European countries including Greece, Great Britain, Italy and Sweden.

## Books

Published books on Conformal Prediction includes Algorithmic Learning in a Random World,[20] Conformal Prediction for Reliable Machine Learning: Theory, Adaptations and Applications,[21] Practical Guide to Applied Conformal Prediction in Python: Learn and Apply the Best Uncertainty Frameworks to Your Industry Applications,[22] Conformal Prediction: A Gentle Introduction (Foundations and Trends in Machine Learning),[23] and Conformal Prediction for Inventors.[24]

## See also

* Calibration (statistics)
* Bootstrap method
* Quantile regression

## References

1. ↑ 1.0 1.1 Gammerman, Alexander; Vovk, Vladimir; Vapnik, Vladimir (1998). "Learning by transduction". Uncertainty in Artificial Intelligence 14: 148–155. https://dl.acm.org/doi/10.5555/2074094.2074112.
2. ↑ Angelopoulos, Anastasios; Bates, Stephen (2021). "A Gentle Introduction to Conformal Prediction and Distribution-Free Uncertainty Quantification". arXiv:2107.07511 [cs.LG].
3. ↑ 3.0 3.1 3.2 Vovk, Vladimir (2022). Algorithmic learning in a random world. A. Gammerman, Glenn Shafer. New York: Springer. doi:10.1007/978-3-031-06649-8. ISBN 978-3-031-06648-1. https://link.springer.com/book/10.1007/978-3-031-06649-8.
4. ↑ 4.0 4.1 4.2 Toccaceli, Paolo; Gammerman, Alexander (2019-03-01). "Combination of inductive mondrian conformal predictors" (in en). Machine Learning 108 (3): 489–510. doi:10.1007/s10994-018-5754-9. ISSN 1573-0565.
5. ↑ Norinder, Ulf; Carlsson, Lars; Boyer, Scott; Eklund, Martin (2014-06-23). "Introducing Conformal Prediction in Predictive Modeling. A Transparent and Flexible Alternative to Applicability Domain Determination". Journal of Chemical Information and Modeling 54 (6): 1596–1603. doi:10.1021/ci5001168. ISSN 1549-9596. PMID 24797111. https://doi.org/10.1021/ci5001168.
6. ↑ Alvarsson, Jonathan; McShane, Staffan Arvidsson; Norinder, Ulf; Spjuth, Ola (2021-01-01). "Predicting With Confidence: Using Conformal Prediction in Drug Discovery" (in English). Journal of Pharmaceutical Sciences 110 (1): 42–49. doi:10.1016/j.xphs.2020.09.055. ISSN 0022-3549. PMID 33075380. Bibcode: 2021JPhmS.110...42A. https://jpharmsci.org/article/S0022-3549(20)30589-X/abstract.
7. ↑ Saunders, Craig; Gammerman, Alexander; Vovk, Vladimir (1999). "Transduction with Confidence and Credibility". International Joint Conference on Artificial Intelligence 16: 722–726. https://eprints.soton.ac.uk/258961/.
8. ↑ 8.0 8.1 Papadopoulos, Harris; Proedrou, Kostas; Vovk, Volodya; Gammerman, Alex (2002). "Inductive Confidence Machines for Regression". in Elomaa, Tapio; Mannila, Heikki; Toivonen, Hannu (in en). Machine Learning: ECML 2002. Lecture Notes in Computer Science. 2430. Berlin, Heidelberg: Springer. pp. 345–356. doi:10.1007/3-540-36755-1_29. ISBN 978-3-540-36755-0.
9. ↑ 9.0 9.1 9.2 Vovk, Vladimir; Shafer, Glenn (2008-08-03). "A Tutorial on Conformal Prediction". Journal of Machine Learning Research 9: 371–421. https://jmlr.csail.mit.edu/papers/volume9/shafer08a/shafer08a.pdf.
10. ↑ Papadopoulos, Harris; Haralambous, Haris (2010). "Neural Networks Regression Inductive Conformal Predictor and Its Application to Total Electron Content Prediction". in Diamantaras, Konstantinos; Duch, Wlodek; Iliadis, Lazaros S. (in en). Artificial Neural Networks – ICANN 2010. Lecture Notes in Computer Science. 6352. Berlin, Heidelberg: Springer. pp. 32–41. doi:10.1007/978-3-642-15819-3_4. ISBN 978-3-642-15819-3. https://link.springer.com/chapter/10.1007/978-3-642-15819-3_4.
11. ↑ Papadopoulos, Harris; Vovk, Volodya; Gammerman, Alex (October 2007). "Conformal Prediction with Neural Networks". 19th IEEE International Conference on Tools with Artificial Intelligence(ICTAI 2007). 2. pp. 388–395. doi:10.1109/ICTAI.2007.47. ISBN 978-0-7695-3015-4.
12. ↑ Lambrou, A.; Papadopoulos, H.; Gammerman, A. (November 2009). "Evolutionary Conformal Prediction for Breast Cancer Diagnosis". 2009 9th International Conference on Information Technology and Applications in Biomedicine. pp. 1–4. doi:10.1109/ITAB.2009.5394447. ISBN 978-1-4244-5379-5.
13. ↑ Lambrou, Antonis; Papadopoulos, Harris; Kyriacou, Efthyvoulos; Pattichis, Constantinos S.; Pattichis, Marios S.; Gammerman, Alexander; Nicolaides, Andrew (2010), Papadopoulos, Harris; Andreou, Andreas S.; Bramer, Max, eds., "Assessment of Stroke Risk Based on Morphological Ultrasound Image Analysis with Conformal Prediction", Artificial Intelligence Applications and Innovations, IFIP Advances in Information and Communication Technology (Berlin, Heidelberg: Springer Berlin Heidelberg) 339: pp. 146–153, doi:10.1007/978-3-642-16239-8_21, ISBN 978-3-642-16238-1
14. ↑ Vishwakarma, Rahul (2019). New Perspective on Machine Learning Predictions Under Uncertainty (SDC 2019). SNIA SDC.
15. ↑ Vishwakarma, Rahul; Hedayatipour, Ava; Messoudi, Soundouss; Hwang, Jinha (2021). "Enterprise Disk Drive Scrubbing Based on Mondrian Conformal Predictors". Proceedings of Machine Learning Research 204. https://proceedings.mlr.press/v204/vishwakarma23a.html.
16. ↑ Vishwakarma, Rahul; Rezaei, Amin (October 2023). "Risk-Aware and Explainable Framework for Ensuring Guaranteed Coverage in Evolving Hardware Trojan Detection". 2023 IEEE/ACM International Conference on Computer Aided Design (ICCAD). pp. 01–09. doi:10.1109/ICCAD57390.2023.10323655. ISBN 979-8-3503-2225-5.
17. ↑ 17.0 17.1 "10th Symposium on Conformal and Probabilistic Prediction with Applications (COPA 2021)". https://cml.rhul.ac.uk/copa2021/#nav-past.
18. ↑ Luttens, Andreas; Cabeza de Vaca, Israel; Sparring, Leonard; Brea, José; Martínez, Antón Leandro; Kahlous, Nour Aldin; Radchenko, Dmytro S.; Moroz, Yurii S. et al. (2025-03-13). "Rapid traversal of vast chemical space using machine learning-guided docking screens" (in en). Nature Computational Science 5 (4): 301–312. doi:10.1038/s43588-025-00777-x. ISSN 2662-8457. PMID 40082701.
19. ↑ 19.0 19.1 Barbero, Francesco; Pendlebury, Fergus; Pierazzi, Fabio; Cavallaro, Lorenzo (2022). "Transcending TRANSCEND: Revisiting Malware Classification in the Presence of Concept Drift". 2022 IEEE Symposium on Security and Privacy (SP). pp. 1182–1199. doi:10.1109/SP46214.2022.9833659. ISBN 978-1-6654-1316-9.
20. ↑ Vovk, Vladimir; Gammerman, Alexander; Shafer, Glenn (2022). Algorithmic learning in a random world. 29. Springer. doi:10.1007/978-3-031-06649-8. ISBN 978-3-031-06648-1. https://link.springer.com/book/10.1007/978-3-031-06649-8.
21. ↑ Balasubramanian, Vineeth (2014). Ho, Shen-Shyang; Vovk, Vladimir. eds. Conformal prediction for reliable machine learning: theory, adaptations and applications. Newnes. ISBN 978-0-12-398537-8. https://dl.acm.org/doi/10.5555/2671155.
22. ↑ Manokhin, Valery (2023). Practical Guide to Applied Conformal Prediction in Python: Learn and Apply the Best Uncertainty Frameworks to Your Industry Applications. United Kingdom: Packt Publishing. ISBN 9781805120919. https://www.packtpub.com/product/practical-guide-to-applied-conformal-prediction-in-python/9781805122760.
23. ↑ Angelopoulos, Anastasios N.; Bates, Stephen (2023). "Conformal prediction: A gentle introduction". Foundations and Trends in Machine Learning 16 (4): 494–591. doi:10.1561/2200000101. https://www.nowpublishers.com/article/Details/MAL-101.
24. ↑ Vishwakarma, Rahul (August 24, 2024) (in English). Conformal Prediction for Inventors. Yimo. ISBN 978-9334114898.

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Conformal prediction. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Conformal_prediction&oldid=4296736"