Conformal Prediction
- Also called: CP, conformal inference
- Category: Learning & autonomy › Foundation models
- Tags: uncertainty-quantification, statistics, calibration, safety, llm-planning
A statistical method that turns any model's scores into prediction sets that contain the true answer with a chosen probability, calibrated on held-out data.
Definition
Conformal prediction is a way of attaching a statistical guarantee to the output of any predictive model. Instead of returning a single answer, the model returns a prediction set: every candidate answer that is plausible enough. The set is built so that, over new examples, it contains the true answer with probability at least 1 − ε, where ε is an error rate the user chooses, for example 10%. The framework was developed by Vladimir Vovk, Alex Gammerman and Glenn Shafer and set out in their book Algorithmic Learning in a Random World.
The most common version is split conformal prediction. A trained model is run on a held-out calibration set of labelled examples, and a nonconformity score is computed for each, typically one minus the model's confidence in the correct label. A threshold is taken at a slightly adjusted (1 − ε) quantile of these scores. At test time, every candidate whose score falls below the threshold goes into the prediction set. The guarantee holds whatever the underlying model is, and it needs only one assumption: that calibration and test examples are exchangeable, which in practice means they come from the same distribution.
The guarantee is marginal: it holds on average across test examples, not separately for each one. The size of the set carries the useful signal. When the model is confident, the set is small, often a single answer; when it is unsure, the set grows. In robotics this has been used to decide when a planner built on a large language model should act on its own and when it should ask a human for help, and to build calibrated uncertainty regions around predicted trajectories of people and vehicles for safe planning.
Why it matters
Learned models in robots, from perception networks to language-model planners, are often confident when they are wrong. Conformal prediction gives a simple, model-agnostic way to turn their scores into sets with a stated coverage rate, which lets a system decide in a principled way when to act, when to slow down and when to ask for help.
Key applications
- Deciding when a language-model planner should ask a human for clarification
- Calibrated uncertainty sets for object detection and classification
- Prediction regions around forecast trajectories of pedestrians and vehicles for safe planning
- Runtime monitoring that flags inputs a learned model is unsure about
- Uncertainty bounds on learned dynamics models used in control
In practice
A team using a language model to plan household tasks first collects a few hundred example scenarios with known correct actions. For each scenario, the language model scores a short list of candidate next steps, and the team records the score of the correct step. They choose a target coverage, compute the threshold from these calibration scores, and fix it. On the robot, each new instruction produces a set of candidate actions above the threshold. If only one remains, the robot executes it; if several remain, for example two bowls that both match "put the bowl in the microwave", the robot asks the user which one is meant. The team re-runs calibration whenever the scenario distribution changes, since the guarantee only holds for data like the calibration set.
Common misconceptions
- Conformal prediction guarantees coverage for every individual input — the standard guarantee is marginal, holding on average over the test distribution, not conditionally for each case
- It works under any conditions — it assumes calibration and test data are exchangeable; under distribution shift the coverage guarantee no longer holds without adjustments
- Conformal prediction makes the underlying model more accurate — it calibrates the output sets; a poor model still produces large, uninformative sets
- A prediction set with several answers means the method has failed — the set size is the uncertainty signal, and it is what tells the system to ask for help or act cautiously
Who should know this
- Robot learning researchers deploying learned models on hardware
- Engineers building language-model and vision-language planners
- Safety engineers who need quantified uncertainty from perception
- Autonomous vehicle and mobile robot planning engineers
Related technologies
- Split Conformal Prediction
- Uncertainty Quantification
- Model Calibration
- Deep Ensembles
- Bayesian Neural Networks
Related terms
Related projects
- AprilTag: The standard visual fiducial marker system for robot localization and pose estimation
- image_pipeline: The standard ROS camera stack: calibration, rectification, stereo and depth
- NASA Ogma: NASA runtime monitor generator for safe robotics and flight systems
Videos
- Emmanuel Candès - A Taste of Conformal Prediction: Institut des Hautes Etudes Scientifiques (IHES)
- Rina Foygel Barber: An introduction to conformal prediction and distribution-free inference: Centre International de Rencontres Mathématiques