Reliability Diagram

A reliability diagram visualizes calibration by comparing predicted confidence with empirical accuracy in bins.

Partition predictions into confidence bins . For bin :

A calibrated model has:

for every bin with enough examples.

Expected Calibration Error

Expected calibration error summarizes the bin gaps:

Confidence Definition

For multiclass classification, confidence is often:

and correctness is:

For binary classification, confidence can mean or . State which one is used.

For regression, ranking, generation, or structured prediction, a reliability diagram needs a task-specific confidence event such as interval coverage, selective accuracy, or validity probability.

Bin Design

ChoiceRisk
equal-width binshigh-confidence bins may have few examples
equal-count binsbin boundaries differ across models
too many binsnoisy calibration estimates
too few binshides local miscalibration
test-set tuningoverstates calibration quality

Calibration estimates should include uncertainty when the bin counts are small:

where .

Reading the Plot

PatternInterpretation
accuracy below confidenceoverconfident predictions
accuracy above confidenceunderconfident predictions
low-confidence bins sparseuncertainty claim is weak in that range
high-confidence gaprisky for automated decision or filtering

Calibration does not replace accuracy. A model can be well-calibrated and still wrong often, or accurate but overconfident.

Checks

  • Are bins populated enough to be meaningful?
  • Is calibration measured on held-out data?
  • Is confidence defined consistently for binary, multiclass, or structured output?
  • Does calibration hold under distribution shift?
  • Are accuracy and calibration both reported?
  • Are binning choices fixed before comparing models?