AI Grounds

Open AI Grounds on a desktop

These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.

Guided discovery

Class Scores & Logits Lab

Move scores; separate the winner from its gap.

Your dataset

Three authored scores describe one toy example. A logit here is a raw class score, not a probability: scores can be negative and need not sum to 1. Effective score z = Positive scale × base + Common shift. The highest score selects a class; equal maxima tie. No true class is given.

-10010A1B0.5C-1Effective raw score (fixed −10..10)

Edit only class C; the other two base scores stay fixed. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Add the same offset after scaling every base score. Differences cancel the shift. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Multiply every base before adding the common shift. This supported scale stays strictly positive. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Close call · Base (1, 0.5, -1) · Scale 1 · Shift 0 · Effective (1, 0.5, -1) · Selected editor C

Selected class only chooses an editor and preserves answers. Actual score, shift or scale edits clear stale explanations. Scenarios restore their base scores with scale 1 and shift 0.

All class scores

Ranks are ordinal positions sorted by effective score descending, then fixed A/B/C identity for ties. Every tied maximum is marked Yes. Gap to top is the highest score minus this row’s score.
ClassBaseScaled baseEffective zRankGap to topAt maximum?
A11110Yes
B0.50.50.520.5No
C-1-1-132No

Order: A (1) → B (0.5) → C (-1). Maximum set: A. Demo selects A, the unique highest score.

Top-two margin = 1 − (0.5) = 0.5 score units. Gap to the lowest score is a different quantity.

Winning class

Highest effective score, with an explicit tie rule.

A

Maximum set: A

Unique maximum; no true label is given to assess correctness.

Top-two margin

Highest minus second-highest score, in score units.

0.5

1 − (0.5)

Zero at a top tie; scale-dependent, not a confidence percentage.

Score total

Sum of the three raw effective scores.

0.5

(1) + (0.5) + (-1)

No normalization; need not be 1. A sum of 1 alone gives no probability interpretation.

Construction and limits

Three base scores range −4..4 in half-unit steps. Common shift ranges −2..2 in half units; Positive scale ranges 0.5..2 in half units. Effective scores are zᵢ=s bᵢ+c, computed exactly for this finite grid, and stay within −10..10. Signed bar positions use this fixed scale; zeros remain in the table. No training or learned data is simulated.

The mathematical argmax can contain multiple classes. This demo exposes every tied maximum and chooses the first identity in A/B/C order. Ordinal ranks use the same deterministic identity ordering. The top-two margin is the largest score minus the second largest, including a second equal maximum. It is zero at a tie. Per-row gap to top compares that row with the leader; it is not generally the top-two margin.

A common shift cancels from differences: (s bᵢ+c)−(s bⱼ+c)=s(bᵢ−bⱼ). It preserves order, ties and margin at a fixed scale, while changing the sum by three times the shift. Positive multiplication preserves inequalities and ties but scales all differences. Zero and negative multipliers are outside this lesson’s supported model.

These multiclass logits are arbitrary raw scores, not declared probabilities or binary log-odds. Scores may be negative, zero, above 1, or sum to any supported value. Even nonnegative scores summing to 1 do not automatically establish a probability interpretation here. There is no ground-truth class or measured accuracy. The top-two score gap is not a calibrated confidence estimate, a physical distance to a decision boundary, or an SVM hinge-loss margin.

Prediction and Reset restore the current experiment’s baseline and selected class. Actual base/shift/scale changes clear stale answers; editor inspection preserves them. Free-exploration Reset starts Experiment 1. Probability conversion belongs to the next Softmax Temperature Lab; no softmax, sigmoid, temperature, loss or calibration is computed here.

Stanford CS231n · Class scores before probability conversion
PyTorch · Unnormalized multiclass logits
TensorFlow · Explicit smallest-index tie convention