
Calibration (Machine Learning)
Calibration describes whether the confidence values given by a learning computer program match reality. If a system says "80 percent certain" in a thousand cases and is correct in about 800 of them, it is well calibrated.
Many computer programs that learn from examples attach a number to each answer. This number is meant to express how certain the program is. An image recognition system might report: “This is 90 percent a dog.” Calibration asks whether such numbers correspond to reality. This is not checked on a single case, but across many cases together. If you take all answers with “90 percent” and about 90 percent of them are actually correct, the system is well calibrated. If only 60 percent are correct, it is overconfident – it claims more certainty than it actually has.
Why false confidence claims become costly
A program can often answer correctly and still be poorly calibrated. These two properties are independent of one another. In practice, however, it is precisely the confidence value that matters. Because it determines whether a human intervenes or not.
An example from medicine: a system evaluates X-ray images and reports “5 percent cancer risk.” If this number is reliable, a doctor can factor it into her decision. If it is actually closer to 30 percent, trusting the number leads to harm. The same applies to credit approval, fraud detection, or self-driving cars. In all these areas, thresholds are set: below five percent risk, approve automatically; above it, a human reviews the case.
Such thresholds only work with honest probabilities. Otherwise, either too many harmless cases end up with reviewers, or too many dangerous ones get waved through. With large language models, that is, programs that generate text, a second problem arises. They phrase fabricated statements in exactly the same confident tone as verified facts. For users, the actual uncertainty is then impossible to detect from the outside.
From the reliability diagram to recalibration
Calibration is measured using a reliability diagram. All predictions are sorted into bins according to their confidence value: 0 to 10 percent, 10 to 20 percent, and so on. For each bin, the claimed value is then compared with the actual proportion of correct answers. With perfect calibration, the two match. The average deviation across all bins is called the expected calibration error.
This can usually be improved after the fact, without rebuilding the model. The most common method is called temperature scaling. Here, all confidence values are compressed or stretched using a single factor. This factor is determined using a dataset the model did not see during training. The order of the answers stays the same, only their confidence changes. The accuracy therefore does not change as a result.
A common misconception: calibration means the model gets better. That is not true. A program that always says “50 percent” can be perfectly calibrated and completely useless. Good models need both – accurate answers and honest uncertainty. Notably, modern, very large models are often more poorly calibrated than smaller ones. During training, they are optimized to the point where they systematically tend toward overconfidence.
Calibration in products and evaluation reports
In everyday life, the result of good calibration can be seen in weather forecasts. “30 percent chance of rain” is a calibrated statement, and weather services verify this over years. Voice assistants also use thresholds: if a device only understands a command with uncertainty, it asks for clarification instead of acting.
In trade press, the term usually appears in two contexts. First, in technical reports on new models, where the calibration error is stated alongside the accuracy. Second, in regulation: the EU’s AI Act requires documented accuracy and robustness for high-risk systems. Reliable uncertainty statements are part of this evidence.
The term should not be confused with the calibration of measuring instruments or cameras. There, it is about physical adjustment, not probabilities. Related, however, is uncertainty quantification. It is the broader framework in which calibration forms only one partial aspect.