advanced25 min studyLesson 872 in Engineering

Separate score movement, confidence, and observed correctness

Monitor predicted classes and score distributions without mistaking a model's confidence for labeled evidence of accuracy.

On this page

What you’ll understand

  • Distinguish positive-class probability, top-class confidence, and predicted positive rate.
  • Calculate a labeled confidence gap for a defined cohort.
  • Explain the limitations of prediction-only monitoring under changing labels or model versions.

Prediction logs arrive sooner than many outcomes, making them valuable early indicators. They also invite a dangerous shortcut: treating larger probabilities as evidence that the model is performing better. A model can become confidently wrong, retain identical scores while its labels change, or change its class mix while remaining equally accurate. Keep score movement, threshold decisions, and mature labeled performance as separate signals with their own denominators and version identifiers.

Name the quantity before plotting it

For a binary classifier, a probability assigned to class one differs from confidence in the selected class. A probability of 0.20 selects class zero under a 0.50 threshold and has top-class confidence 0.80. The predicted positive rate counts threshold crossings, while the mean probability averages values on both sides. These summaries can move independently. Record the exact threshold and tie rule because a policy change can alter decision rates without changing any model scores. For multiclass systems, preserve class identities when comparing score vectors or confusion patterns.

Stratify prediction summaries by model artifact, calibration artifact, feature version, and important request populations. A rollout that mixes versions can move the aggregate histogram even when each version behaves consistently. Class-order permutations can make an apparently plausible probability vector refer to the wrong labels. Monitor normalization and finite-value invariants alongside distributions, and retain enough sampled examples to explain sharp changes. Comparing anonymous score arrays without their output contract can conceal an integration error behind an attractive dashboard.

p‾=1N∑i=1Npi,c‾=1N∑i=1Nmax⁡(pi,1−pi),r^+=1N∑i=1N1{pi≥0.5}\overline p=\frac1N\sum_{i=1}^{N}p_i,\qquad \overline c=\frac1N\sum_{i=1}^{N}\max(p_i,1-p_i),\qquad \widehat r_+=\frac1N\sum_{i=1}^{N}\mathbf1\{p_i\geq0.5\}
For N>0 binary predictions with dimensionless p_i in [0,1], these are mean positive-class probability, mean top-class confidence, and the positive-decision rate under the stated threshold and tie rule. None uses a label.↔ Scroll wide equations horizontally.

Correctness requires outcomes from the same cohort

Once trustworthy outcomes mature, compare each prediction with its aligned label and evaluate accuracy or a task-appropriate loss. Calibration asks whether claimed probabilities match outcome frequencies in a specified population. A single global confidence gap is only a coarse diagnostic: overconfidence in one group can cancel underconfidence in another. Reliability plots by score band and relevant slices offer more detail, while proper scoring rules assess probability predictions beyond a threshold. Fitting a new calibration transformation and evaluating it on the same labels would overstate the evidence.

A historical calibration result is scoped to its evaluation distribution and procedure. It does not guarantee calibration after a population shift, nor does calibration imply a useful ranking or low decision cost. A constant prevalence predictor can be calibrated while offering little discrimination. Conversely, an uncalibrated score may rank requests well. Monitor these properties separately, and compare like-for-like mature cohorts rather than mixing a current confidence statistic with last month's accuracy. Missing outcomes and selective label collection can bias even a neatly joined calibration plot.

a^=1N∑i=1N1{y^i=yi},g=c‾−a^\widehat a=\frac1N\sum_{i=1}^{N}\mathbf1\{\widehat y_i=y_i\},\qquad g=\overline c-\widehat a
N>0 refers to one aligned labeled cohort, and predictions use the documented decision rule. The dimensionless signed global gap g is descriptive; g=0 does not imply calibration within score bands, classes, or slices.↔ Scroll wide equations horizontally.

Use prediction changes to ask better questions

A larger fraction of high scores can reflect a genuine increase in positive cases, more extreme inputs, a changed preprocessing scale, or a new model. Before changing a threshold, examine affected examples, population composition, output invariants, and delayed labeled metrics. Conversely, a stable score histogram cannot rule out concept changes that alter outcomes at fixed inputs. Prediction monitors are particularly useful for identifying sudden saturation, constant outputs, lost classes, or changes concentrated in one serving version; their operational value does not require pretending that they measure accuracy.

Use the sigmoid instrument to inspect one mechanism that changes confidence. Reset, set input x=1 and weight w=1, predict logit 0.5 and output approximately 0.6225, then Play or Step. Separately Reset, set x=1 and w=2, predict logit 1.5 and output approximately 0.8176, then Play or Step. The fixed bias is −0.5. This single computation has no labels, training, calibration estimator, or quality measurement. Its increased output therefore illustrates a change in model arithmetic without supplying evidence that the decision became more correct.

Confidence stays fixed while the decision mix changes

In each window there are 100 binary predictions, all either 0.80 or 0.20. The reference has eighty 0.80 scores and twenty 0.20 scores; the current window has forty and sixty. Fully mature labels show reference accuracy 80% and current accuracy 60%. Use threshold 0.50.

  1. Reference mean positive probability is (80×0.8+20×0.2)/100=0.68. Current mean is (40×0.8+60×0.2)/100=0.44; positive-decision rates are 80% and 40%.

  2. Every score has top-class confidence 0.80, so mean confidence is 0.80 in both windows despite the changed class mix.

  3. The global signed confidence gaps are 0.80−0.80=0 for the reference and 0.80−0.60=0.20 for the current cohort. The reference's zero global gap alone does not establish conditional calibration.

The result

Stable confidence can coexist with a changed decision mix and lower observed accuracy. Only the aligned labels establish the latter.

Explore the model

Interactive lab

Interactive lab · network

A larger sigmoid score supplies no correctness label

Reset, set x=1 and w=1, predict logit 0.5 and sigmoid output about 0.6225, then Play or Step. Separately Reset, set x=1 and w=2, predict logit 1.5 and output about 0.8176, then Play or Step. This fixed-bias single unit has no labels or calibration measurement; playback traces its arithmetic.

A larger sigmoid score supplies no correctness labelOne inspectable sigmoid unit, σ(wx − 0.5). Playback traces the computation graph. There is no training, attention mechanism or hidden deep network. Current readings: Product · wx: 1.2; Logit · wx − 0.5: 0.7; Sigmoid output: 0.6682. All parameters are adjustable with the labeled controls below.One input. One weight. One sigmoid.x1.20× w1.20+ b0.70σ0.668output0.668w = 1.00b = −0.50σ(z) = 1 / (1 + exp(−z))
Computation graphSignal trace
Product · wx
1.2
Logit · wx − 0.5
0.7
Sigmoid output
0.6682
t = 0 s

One inspectable sigmoid unit, σ(wx − 0.5). Playback traces the computation graph. There is no training, attention mechanism or hidden deep network. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forA confident numerical output is distinct from evidence of correctness.

Check your understanding

A current window has exactly the same confidence histogram as the reference. Which conclusion is justified?

Try it yourself

Ten predictions contain five scores of 0.90 and five scores of 0.10. Eight threshold decisions are correct. Calculate mean positive probability, mean top-class confidence, accuracy, and the signed global confidence gap.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Class-zero confidence is one minus the positive-class probability.

Compare with the solution

Mean positive probability is (5×0.9+5×0.1)/10=0.50. Mean top-class confidence is 0.90, accuracy is 8/10=0.80, and the signed gap is 0.10. A ten-percentage-point global gap does not identify which score band or subgroup produced the error; inspect those with adequate labeled support.

Take it with you

  • Probability, top-class confidence, and threshold decision rate summarize different quantities.
  • Calibration and accuracy need correctly aligned mature outcomes.
  • Prediction stability does not rule out changes in the relationship between inputs and labels.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.