Out-of-distribution score limitations
Distinguish novelty from task error, expose score nonidentifiability, and evaluate alarms under deployment prevalence and explicit shift families.
On this page
The question for today
What you’ll understand
- Explain why a scalar novelty score cannot identify every shift or error.
- Compute alarm precision from sensitivity, false-positive rate, and prevalence.
- Design held-out OOD evaluations that distinguish semantic novelty, covariate change, and task failures.
An out-of-distribution detector compares an input with a specified reference distribution or task definition. A low confidence score, high energy, unusual embedding, or low likelihood can be useful evidence, but none makes unfamiliarity a directly observed universal property. Novel inputs can still be easy for the task, while familiar-looking inputs can be confidently misclassified. A release claim must name the novelty definition, score, threshold, reference data, and shift families actually evaluated.
A score discards information and a definition supplies the target
Define whether OOD means a new class, a changed sensor, a different language, an unsupported workload, or another specified departure. These targets can overlap without being equivalent. A classifier trained on product categories may correctly recognize a familiar category photographed by a new camera, yet fail on an ambiguous image from the original camera. Deciding which event should trigger abstention requires an operational goal rather than only a geometric distance from training embeddings.
A scalar score can group many inputs together. Two distributions can induce exactly the same score distribution while differing in features the score ignores or in their conditional label laws. A threshold on that score then cannot distinguish them better than its identical alarm rates permit. This is a concrete nonidentifiability example, not a claim that every restricted OOD problem is impossible. Learnability depends on assumptions about available training data, the hypothesis class, and which unseen distributions are allowed.
Confidence, density, and correctness are distinct quantities
Maximum softmax probability is a useful baseline whose empirical behavior must be measured. Softmax normalizes relative class logits and can be large far from labeled training support. A generative likelihood evaluates input density, not the probability of a correct task label or of belonging to a semantic class. Published counterexamples show some trained density models assigning higher likelihood to another dataset than to their own. That finding motivates controls; it is not a theorem that likelihood can never help detection.
Report sensitivity on named OOD families and false-positive rate on representative in-distribution inputs at the chosen threshold. Area-under-curve summaries average over thresholds and can conceal a poor deployment operating point. Alarm precision also depends on novelty prevalence: a small false-positive rate can overwhelm rare true novelties. Estimate that prevalence and its uncertainty, and separately measure task errors among accepted and alarmed cases. Detecting a benchmark’s dataset identity is not automatically the same achievement as preventing costly deployment mistakes.
Evaluate the shift and the downstream action
Keep novelty examples used for detector selection separate from final shift-family tests. Include plausible near-distribution changes, label ambiguity, unsupported classes, and in-distribution hard cases. State how test families were selected and avoid extrapolating their performance to every unknown future distribution. Verify that the fallback triggered by an alarm is available and beneficial. Monitoring input-score drift can request investigation, but labels or other task evidence remain necessary to establish a change in correctness or expected harm.
The sigmoid instrument shows a saturated output with no novelty awareness. Reset, set x to 3 and w to 3, predict logit 8.5 and output approximately 0.9998, then Step. Compare a fresh Reset with both x at 0 and w at 3 before Step: logit −0.5 and output approximately 0.3775. Its fixed mathematical sigmoid has no training distribution, class semantics, or labels. Saturation demonstrates only a score mechanism; neither displayed input can be classified as real OOD from this toy alone.
Work it through
Rare novelty and the alarm denominator
A hypothetical arrival population has 1% OOD prevalence. At a fixed threshold, a detector alarms on 90% of OOD cases and 5% of in-distribution cases. Assume these rates hold in a population of 10,000 arrivals and compute expected alarm composition.
There are 100 expected OOD arrivals and 9,900 expected in-distribution arrivals. True alarms number 0.9 × 100 = 90.
False alarms number 0.05 × 9,900 = 495, producing 585 total expected alarms. Most alarms are therefore not OOD under this mixture.
Alarm precision from these population rates is 90/585 ≈ 0.1538, or 15.38%. This ratio of expected population counts expresses the probability formula, not a guaranteed realized sample fraction.
Sensitivity alone does not identify the workload or reliability of the alarm stream when novelty is rare.
The living notebook
Explore the model
Interactive lab · network
Sigmoid saturation is not novelty identification
Reset, set x = 3 and w = 3, predict z = 8.5 and sigmoid ≈ 0.9998, then Step. Compare a fresh Reset with both x = 0 and w = 3 before Step: z = −0.5 and sigmoid ≈ 0.3775. This fixed unit has no training population, novelty labels, or OOD guarantee.
- Product · wx
- 1.2
- Logit · wx − 0.5
- 0.7
- Sigmoid output
- 0.6682
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 scalar output supplies neither a novelty definition nor a correctness certificate.
Pause & reason
Check your understanding
Your turn
Try it yourself
Assume OOD prevalence 0.02, sensitivity 0.8, and false-positive rate 0.01. Compute alarm probability and alarm precision. Does a higher generative likelihood establish that an input is in distribution?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
True-alarm probability is prevalence times sensitivity. Add the in-distribution false-alarm probability to form the denominator.
Compare with the solution
True-alarm probability is 0.02 × 0.8 = 0.016. False-alarm probability is 0.98 × 0.01 = 0.0098, so total alarm probability is 0.0258 and precision is 0.016/0.0258 ≈ 0.6202, or 62.02%. A high input likelihood alone does not establish semantic membership or task correctness; the reference distribution, density model, and tested shift assumptions still matter. These rates are supplied population assumptions, not evidence that an untested detector attains them.
Keep the idea
Take it with you
- OOD requires an explicit reference and novelty definition.
- A scalar score cannot distinguish shifts with identical score distributions.
- Evaluate prevalence-sensitive alarm quality and the downstream task consequences.
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.