A reliability diagram is a plot that compares a model’s predicted probabilities with the observed frequency of the predicted outcome, grouped into confidence bins, to show how well the model is calibrated. In model evaluation, it is the standard visual tool for answering a simple question: when a classifier says it is 70 percent confident, is it right about 70 percent of the time?
The diagram is also called a calibration curve or calibration plot. It originated in weather forecasting, where meteorologists checked whether a forecast of a 30 percent chance of rain was followed by rain on roughly 30 percent of such days, and it is now used throughout artificial intelligence to evaluate classifiers, risk models and language models whose scores feed into decisions.
How a reliability diagram is constructed
A reliability diagram is built by sorting predictions into bins by confidence and comparing, in each bin, the average predicted probability with the actual fraction of positive outcomes. The horizontal axis shows mean predicted probability, the vertical axis shows observed frequency, and a diagonal line from the origin to the upper right marks perfect calibration.
For binary classification, the procedure uses the probability of the positive class. For multiclass models, the common variant uses the top-label confidence, the highest predicted class probability, and plots it against accuracy within each bin. Most diagrams also include a histogram of bin counts below the curve, because a bin with very few samples gives an unreliable point.
The table summarizes the construction steps and the choices that most affect the result.
| Step | What is done | Key choice |
|---|---|---|
| Collect scores | Run the model on held-out data | Use a test set, never training data |
| Bin predictions | Group scores into confidence intervals | Number and type of bins |
| Compute bin statistics | Mean confidence and observed frequency | Positive rate or accuracy |
| Plot points | Place each bin against the diagonal | Show bin counts or error bars |
| Summarize | Compute a scalar calibration metric | ECE, MCE or Brier score |
Reading the shape of the curve
The position of the curve relative to the diagonal reveals the direction of miscalibration. Points below the diagonal mean the model is overconfident: its predicted probabilities are higher than the rate at which it is actually correct. Points above the diagonal mean the model is underconfident, which is less common in modern deep networks but frequent after heavy regularization or ensembling.
Characteristic shapes point to specific causes and fixes, as the table shows.
| Curve pattern | Interpretation | Typical cause |
|---|---|---|
| Close to diagonal | Well calibrated | Suitable loss and data |
| Below diagonal at high confidence | Overconfident predictions | Large networks trained to low loss |
| Above diagonal throughout | Underconfident predictions | Strong label smoothing or ensembling |
| S-shaped curve | Scores too extreme at both ends | Margin-based models such as SVMs |
| Inverted S-shape | Scores pulled toward the middle | Naive averaging or boosted trees |
| Erratic points | Insufficient samples per bin | Small evaluation set |
A well-known finding in deep learning is that modern neural networks tend to be overconfident, so their reliability diagrams often sag below the diagonal in the high-confidence region even when accuracy is excellent.
Binning choices and related calibration metrics
The appearance of a reliability diagram depends heavily on how predictions are binned. Equal-width binning uses fixed intervals, typically 10 or 15 bins of width 0.1 or about 0.067, but many bins may end up nearly empty. Equal-mass binning, also called adaptive or quantile binning, places the same number of samples in each bin, which gives more stable estimates at the cost of uneven bin widths.
Scalar metrics condense the diagram into a single number, which is useful for comparing models but hides where the error occurs. The table compares the most frequently reported measures.
| Metric | Definition | Strength | Weakness |
|---|---|---|---|
| Expected calibration error | Weighted mean gap between confidence and accuracy | Easy to interpret | Sensitive to bin count |
| Maximum calibration error | Largest gap across bins | Highlights worst case | Unstable on sparse bins |
| Brier score | Mean squared error of probabilities | No binning needed | Mixes calibration and sharpness |
| Log loss | Negative log likelihood of outcomes | Strictly proper scoring rule | Dominated by extreme errors |
The Brier score can be decomposed into reliability, resolution and uncertainty components, and the reliability term is exactly what the diagram visualizes. Reporting the diagram alongside a proper scoring rule gives the most complete picture.
Using reliability diagrams to fix calibration
Reliability diagrams are most useful before and after post-hoc calibration, because they show whether a correction method actually moved the curve toward the diagonal. Calibration methods are fitted on a separate validation set and then evaluated on the test set to avoid optimistic results.
| Method | How it works | Best suited for |
|---|---|---|
| Temperature scaling | Divides logits by one learned constant | Overconfident neural networks |
| Platt scaling | Fits a logistic function to scores | SVMs and small datasets |
| Isotonic regression | Fits a monotonic step function | Large validation sets, complex distortions |
| Histogram binning | Replaces scores with bin frequencies | Simple, interpretable correction |
Temperature scaling is the usual first choice for deep classifiers because it does not change accuracy: it rescales confidence without altering the ranking of classes.
Limitations and common mistakes
A reliability diagram shows average calibration within bins, not calibration for every individual prediction or subgroup. A model can look well calibrated overall while being badly miscalibrated for a minority group or under distribution shift, so careful teams draw separate diagrams per segment and per deployment period.
- Plotting training data instead of held-out data makes almost any model look overconfident or deceptively accurate.
- Ignoring bin counts leads to overinterpreting points based on a handful of samples.
- Confusing calibration with accuracy: a model that always predicts the base rate is perfectly calibrated yet useless.
- Comparing ECE values computed with different binning schemes produces misleading rankings.
In everyday language
Many AI models say how sure they are. A reliability diagram checks whether that confidence is honest.
Picture a weather presenter who says there is a 70 percent chance of rain on many days. If it rains on about 7 of every 10 such days, the presenter is trustworthy. If it rains on only 4 of them, the forecasts sound more certain than they should. The diagram draws this check as a simple chart. A line that follows the diagonal means the model knows how much it knows.
Seen in the real world
A hospital analytics team builds a model that predicts the risk of patient readmission within 30 days. Clinicians plan to call every patient whose predicted risk exceeds 20 percent, so the scores must mean what they say, not only rank patients correctly.
On a held-out set of 12,000 discharges, the model reaches a strong AUC, but the reliability diagram drawn with 10 equal-mass bins shows the top bins well below the diagonal: patients scored at 40 percent were readmitted only about 25 percent of the time. The team fits isotonic regression on a separate validation set and redraws the diagram.
After calibration, the curve follows the diagonal closely, the expected calibration error drops substantially, and the follow-up program contacts fewer low-risk patients while keeping nearly all high-risk ones on the call list.