A reliability diagram is a graphical diagnostic that plots a model's predicted probability against its observed frequency of correctness to visually identify miscalibration. Predictions are grouped into discrete bins based on confidence, and the average accuracy within each bin is compared to the bin's midpoint. A perfectly calibrated model follows the identity diagonal, where a 70% confidence prediction is correct exactly 70% of the time.
Glossary
Reliability Diagram

What is a Reliability Diagram?
A visual tool for assessing whether a probabilistic classifier's confidence scores align with its actual empirical accuracy.
Deviations from the diagonal reveal systematic biases: points below the diagonal indicate overconfidence, while points above indicate underconfidence. This plot complements scalar metrics like Expected Calibration Error (ECE) by showing where miscalibration occurs across the probability spectrum, making it an essential tool for model validators diagnosing the trustworthiness of a classifier's output.
Key Diagnostic Features
A reliability diagram is a visual diagnostic tool that bins predicted probabilities and plots them against observed frequencies to reveal systematic miscalibration patterns.
The Identity Diagonal
The diagonal line (y = x) represents perfect calibration. A model is perfectly calibrated if, for all predictions with a confidence of P%, the actual accuracy is exactly P%.
- Above the diagonal: The model is underconfident—its accuracy is higher than its predicted probability.
- Below the diagonal: The model is overconfident—its predicted probability exceeds its actual accuracy.
- Deviation magnitude indicates the severity of miscalibration at that confidence level.
Binning Strategy
The diagram partitions the probability interval [0,1] into M equal-width or equal-mass bins. For each bin:
- X-axis: The mean predicted probability of samples in that bin.
- Y-axis: The empirical frequency of positive outcomes.
- Bin count (M) is a hyperparameter; 10–20 bins are typical. Too few bins obscure detail, while too many create noisy, unreliable estimates.
- Equal-mass binning (each bin contains the same number of samples) ensures consistent statistical reliability across the plot.
Confidence Histogram
A reliability diagram is often paired with a marginal histogram showing the distribution of predicted probabilities.
- Sharpness: A model concentrated near 0 and 1 is sharp (confident). A model spread across the range is diffuse.
- Sharpness is distinct from calibration. A model can be perfectly calibrated but uselessly diffuse (e.g., always predicting the base rate).
- The histogram reveals where the model operates—critical for understanding if miscalibration occurs in regions with sufficient data density.
ECE as a Summary Metric
The Expected Calibration Error (ECE) is the primary scalar summary derived from a reliability diagram.
- Formula: ECE = Σ (|B_m| / N) × |acc(B_m) − conf(B_m)|, where B_m is bin m, N is total samples, acc is accuracy, and conf is mean confidence.
- ECE is the weighted average of the gaps between each bin's point and the diagonal.
- Limitation: ECE is sensitive to binning choices and can be gamed by models that distribute errors uniformly. Always inspect the full diagram alongside the scalar.
Multiclass Extension
For multiclass classification, reliability diagrams can be constructed in several ways:
- Top-label calibration: Plots the confidence of the predicted class against the accuracy of that prediction. Most common for classifiers with many classes.
- Classwise calibration: Generates a separate diagram for each class, plotting P(class=k) against the observed frequency of class k. Stricter and more diagnostic.
- Confidence histograms for multiclass problems often reveal whether a model collapses probability mass onto a single class regardless of uncertainty.
Diagnosing Recalibration Needs
The shape of the reliability curve directly informs the choice of recalibration method:
- Sigmoidal S-shape (overconfident at extremes, underconfident in the middle): Platt scaling or temperature scaling are effective parametric fixes.
- Non-monotonic or irregular deviations: Isotonic regression is preferred as it makes no functional form assumptions.
- Systematic underconfidence across all bins: Indicates a need for label smoothing during training or adjusting the decision threshold.
- Always recalibrate on a held-out validation set to avoid overfitting the calibration map.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about reliability diagrams and their role in diagnosing model miscalibration.
A reliability diagram is a visual diagnostic tool that plots a model's predicted probabilities against its observed empirical frequencies to assess calibration quality. The mechanism involves binning predictions into discrete intervals (e.g., 0.0-0.1, 0.1-0.2) based on their confidence scores. For each bin, the average predicted probability is plotted on the x-axis, while the fraction of correctly classified samples within that bin is plotted on the y-axis. A perfectly calibrated model follows the identity diagonal (y=x), meaning a 70% confidence prediction is correct exactly 70% of the time. Deviations above the diagonal indicate underconfidence (accuracy is higher than predicted), while deviations below the diagonal signal overconfidence (predicted probability exceeds actual accuracy). The diagram often includes a histogram of sample counts per bin to indicate where predictions are concentrated, providing a comprehensive view of calibration across the entire probability spectrum.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Reliability Diagram vs. Related Diagnostic Tools
Comparing the Reliability Diagram against other common tools used to evaluate and visualize model calibration and predictive uncertainty.
| Feature | Reliability Diagram | Expected Calibration Error (ECE) | Risk-Coverage Curve |
|---|---|---|---|
Primary Output | Visual plot of accuracy vs. confidence per bin | Single scalar summary metric (0 to 1) | Visual plot of error rate vs. coverage |
Identifies Over/Under-Confidence | |||
Identifies Specific Miscalibrated Bins | |||
Evaluates Selective Classification Trade-off | |||
Provides Per-Bin Sample Count Visibility | |||
Sensitive to Bin Width Selection | |||
Directly Visualizes Identity Diagonal | |||
Summary Metric for Model Comparison |
Related Terms
Master the core metrics and methods used alongside reliability diagrams to diagnose and correct model miscalibration.
Expected Calibration Error (ECE)
The primary scalar summary statistic for a reliability diagram. ECE partitions predictions into M equal-width bins, computes the absolute difference between accuracy and average confidence per bin, and calculates a weighted average. A lower ECE indicates better calibration.
- Formula: Sum of (bin size / N) * |acc(B_m) - conf(B_m)|
- Weakness: Sensitive to binning strategy; does not detect non-monotonic miscalibration.
Brier Score
A strictly proper scoring rule that measures the mean squared error between predicted probabilities and binary outcomes. It decomposes mathematically into calibration loss and refinement loss, making it a comprehensive alternative to ECE.
- Range: 0 (perfect) to 1 (worst).
- Advantage: Not dependent on arbitrary binning like ECE.
Isotonic Regression
A powerful non-parametric calibration method that learns a piecewise constant, monotonically increasing function to map raw scores to calibrated probabilities. Unlike Platt scaling, it makes no assumptions about the functional form of the distortion.
- Risk: Prone to overfitting on small validation sets.
- Use Case: Ideal for fixing complex, non-sigmoidal miscalibration patterns visible in a reliability diagram.
Negative Log-Likelihood (NLL)
A proper scoring rule that heavily penalizes confident misclassifications. Minimizing NLL is the objective for temperature scaling optimization. A model with a perfect reliability diagram (identity line) will minimize NLL.
- Formula: -log(p_hat(y_true))
- Behavior: Approaches infinity as the probability of the correct class approaches zero.
Classwise Calibration
A stricter criterion than top-label calibration. A model is classwise calibrated if, for every class k, the predicted probability matches the empirical frequency. A standard reliability diagram only checks top-label calibration.
- Diagnosis: Requires a K x K confusion matrix of probabilities.
- Relevance: Critical for risk-sensitive multi-class decisions where non-max probabilities matter.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us