Logit

Basic concept

A classifier’s raw score for one class, before softmax turns the scores into percentages.

Also called Raw score, Pre-softmax score

The ticket router’s three logits for one ticket, and their softmax, before and after the archived edit. The router picks the largest logit; the percentages are for reading.

Original

Request info11.4%z = −1
Standard84.4%z = 1
Expedited4.2%z = −2

Answer Standard · margin 2

Archived 4-weight edit

Request info3.5%z = −1
Standard25.9%z = 1
Expedited70.5%z = 2

Answer Expedited · margin 1

The Expedited logit rises from −2 to 2 and overtakes Standard by 1.

Figure 1. Every number is computed in your browser.

What it is

The last layer of a classifier produces one logit per class, and the largest wins. Logits can be any size and either sign; only the differences between them matter, because softmax gives the same percentages if you add the same number to all of them. The gap between the top two logits, the margin, tells you how far the answer is from flipping.

Easy to misread

A logit of 2 is not “twice as sure” as a logit of 1. Compare logits by subtracting them: a difference of 1 means the top class is e ≈ 2.7 times as likely as the other one under softmax.

In WeightSpace

The ticket router picks its route from three logits. The archived edit raises the Expedited logit from −2 to 2 for urgent, complete tickets, overtaking Standard (1) by a margin of 1.