Readouts
τ-scale comparison — band vs iqr
Both modes select the same band negatives. Each applies its own
calibrated temperature (band ≈ 1.0, iqr ≈ 0.1 — the docstring pairing) to its dispersion
scale, so τ_eff = temperature · scale differs, changing the sigmoid
sharpness, the loss, and the gradients. The selected row drives the live demo.
| mode | scale | τ_eff | loss = 1 − pAUC |
|---|---|---|---|
| band t_α − t_β | — | — | — |
| iqr q75 − q25 | — | — | — |
Score axis & gradients
Negatives below the axis, positives above. The shaded band is
[t_β, t_α] mapped from the negative score quantiles. Ringed points are the
band negatives that enter the pairwise loss. Drag any point.
ROC & partial-AUC region
Empirical ROC. The shaded vertical strip is the FPR band [α, β]; the
partial AUC the loss targets is the normalized area under the curve inside it.
The surrogate replaces the step indicator 1[pos > neg] with
σ((pos − neg)/τ_eff), averaged over positives × band-negatives. As
temperature → 0 the sigmoid sharpens toward the true step (and the surrogate pAUC
approaches the empirical partial AUC over the band), at the cost of vanishing gradients for
well-separated pairs. As β grows the band widens to include more negatives; as
α grows the band's upper edge drops below the top scores.
Only negatives whose scores fall in [t_β, t_α] contribute. Move a
negative into or out of the band and watch loss and the gradient arrows snap.