Statistical Foundations

Conformal Prediction in Plain Terms: Sets With a Coverage Guarantee

How split conformal prediction turns any classifier’s scores into prediction sets that contain the true label at a rate you choose.

Statistical Foundations · 5 min read

A support assistant that must route a conversation might return one label when it is confident and two when it is not. Conformal prediction gives that behavior a guarantee you can state in one sentence.

The recipe

Hold out a calibration set that the model has never trained on. For each calibration example, compute a nonconformity score, for instance one minus the probability the model gave to the true label. Sort the scores.

Pick the threshold as the (n + 1)(1 − α)-th smallest score, rounded up, where n is the number of calibration examples. For any new input, include every label whose score is at or below the threshold.

What the guarantee says

If the calibration and test examples are exchangeable, the true label lands in the prediction set with probability at least 1 − α. With continuous scores it is also at most 1 − α + 1/(n + 1), so the sets are not wastefully large.

This is a marginal guarantee, averaged over inputs. It does not promise 90% coverage for every individual customer segment.

Where it breaks

  • If the test traffic differs from the calibration data, the guarantee no longer holds as stated. Calibrate on data that look like deployment.
  • Reusing calibration examples to tune the model quietly breaks exchangeability.
  • Coverage can be uneven. Check it by slice, and treat a gap as a finding.
  • A set that contains every label is valid and useless. Report the average set size alongside coverage.

Use the set size as a signal

Sets of size one can be handled automatically. Larger or empty sets can be routed for human review. This turns the guarantee into an operational rule, with the review rate as the cost you can measure and plan for.

More guides from this book