DeepLLM Quiz
Machine Learning

Softmax, probit and the natural pairing of loss and activation

10 questions on multi-class logistic regression, softmax, the noisy threshold model behind probit, outlier sensitivity and canonical link functions.

  • 10 questions
  • Stopwatch
  • Instant feedback

Shown publicly with your score. Don’t use your full real name.

Sample questions

Play now ↑

Answers stay hidden. Start the quiz to play them.

  1. Sample 1

    Why is it called softmax?

    • It was invented by a company called Soft
    • It always gives soft, equal probabilities
    • It is a smoothed version of the max function: when one score is much larger than the rest, its probability is close to one
  2. Sample 2

    A regression network assumes Gaussian noise on its target and is trained with squared error. Which output activation is its natural partner?

    • The sigmoid
    • The identity, so the output is left unsquashed
    • The softmax

How it works

  • One question per screen. An answer is final once sent.
  • You see right away whether you were right, with a short explanation.
  • The stopwatch runs: on equal scores, the faster player ranks first.
  • Only your best attempt counts, so replaying is never risky.

About this quiz

If you open the code of almost any classification network, you will find the same two ingredients at the end: a function that turns a list of scores into probabilities, and a loss that compares those probabilities with the correct answer. They are chosen in pairs, and the pairing is not an accident. Understanding why certain activations and certain losses go together explains a lot of what looks like folklore in practice, such as why the learning signal for each output is simply the gap between the prediction and the truth.

This quiz starts with the multi-class version of logistic regression. The softmax function turns several scores into probabilities that are positive and add up to one, and the quiz asks what the name hints at about its behaviour. You will see the loss it is paired with, how the labels are written for that loss, and the remarkable simplicity of its gradient, which has the same shape as the gradient for linear regression and for two-class logistic regression. Seen as a network, the learning signal for every weight is the product of the input at one end and the error at the other.

Then the quiz introduces an alternative to the sigmoid, derived from a different story. Suppose the label is one whenever a score exceeds a threshold that is itself random. The activation is then the cumulative distribution of the threshold, and when that threshold follows a Gaussian the result is called the probit function. The quiz compares it with the logistic curve, including how each reacts to mislabelled or extreme data points, a question of practical importance.

The last topic is the canonical link, the choice of activation that makes the gradient take the simple form for a given type of target. The quiz asks which output activation is natural for which loss, and whether the idea holds beyond single-layer models. Common mistakes include assuming that probit is far more robust than logistic, that the pairing is a matter of convention only, and that softmax picks a single winner. Knowing the pairing also helps with debugging: if a classification network learns badly, a mismatch between the final activation and the loss, such as applying a softmax and then a loss that expects raw scores, is among the first things to check. A quick sanity check is that the predicted probabilities of a softmax always add up to one, so if they do not, something upstream is wrong.

The quiz suits students and practitioners who work with classification networks. No calculus is needed. There are 10 questions, each with an explanation shown after you answer, and the quiz takes about four minutes.

Questions and answers

›How long does the quiz take?

About 3 to 4 minutes for 10 questions, at roughly 20 seconds each. An explanation appears after every answer.

›Do I need to know about neural networks?

No. The quiz treats the models as a weighted sum followed by an activation function. If you have met logistic regression for two classes, you have enough background, and the multi-class extension is explained from there.

›What is the softmax function?

It takes a list of scores and turns it into a list of probabilities that are positive and add up to one, with the highest score getting the highest probability. The name reflects how it behaves compared with a hard choice of a single winner, and its smoothness is what makes it suitable for gradient-based training.

›Why is the gradient of the loss so simple?

Because the softmax and the cross-entropy loss fit together in a way that cancels the awkward parts of the calculation. What remains for each output is the difference between the predicted probability and the target, times the input that is attached to the weight. The same shape of gradient appears for linear regression and for two-class logistic regression.

›What is a noisy threshold model?

It describes the label as the outcome of comparing a score with a threshold that varies randomly from case to case. If the score is high enough to pass the threshold, the label is one. The probability of a one is then the chance that the random threshold lies below the score, which is a cumulative distribution.

›What is probit regression?

It is classification with a score passed through the cumulative distribution of a Gaussian, which is S-shaped like the logistic curve. In practice, probit and logistic regression give very similar fitted models. The main difference lies in how quickly the curves approach zero and one.

›Which is more sensitive to mislabelled data?

Probit, because its tails fall away much faster than those of the logistic curve. A point that lies far on the wrong side of the boundary is therefore treated as practically impossible by a probit model, and the fit is pulled harder towards it than in the logistic case.

›What is a canonical link function?

It is the choice of output activation that matches the distribution assumed for the target, for example a sigmoid for yes-or-no labels. With that choice, the gradient of the error becomes the simple difference between prediction and target times the input. The idea extends to deep networks, where it guides the choice of final layer and loss. The same pairing logic guides the choice of output layer for new kinds of target: whichever distribution is assumed for the data, the matching activation and loss usually give the smoothest and most reliable training. These conventions are worth learning once, because deep learning frameworks bundle the activation and loss together for numerical stability, and the bundled versions rely on exactly the pairing described here.

More quizzes