Why can a softmax output layer produce high confidence for inputs far outside the training distribution?

Quick Overview

Asks why a neural network with a softmax output can report near-certain predictions on inputs unlike anything it was trained on. Tests understanding of softmax normalization, logit growth in ReLU networks, decision regions, and which methods help detect out-of-distribution inputs.

Why can a softmax output layer produce high confidence for inputs far outside the training distribution?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

A classifier with a softmax output layer often reports a probability near 1 for inputs that look nothing like its training data. Why can a softmax output layer produce high confidence for inputs far outside the training distribution? ```hint What softmax can express Softmax turns K logits into K probabilities that sum to 1. Ask what that output can say about an input that belongs to none of the K classes. ``` ```hint Scale the input Take a ReLU network and feed it $\alpha x$ for a growing $\alpha$. What happens to the logits, and to the gaps between them? ``` ### What a Strong Answer Covers - What softmax normalizes away and what the model does not represent at all - Why the logits of a ReLU network grow far from the data, and what that does to the softmax output - How the shape of the decision regions and the training objective add to the problem - Which remedies help with out-of-distribution confidence and which only fix in-distribution calibration ### Follow-up Questions - Why does temperature scaling not fix this? - How does an energy score differ from the maximum softmax probability as a signal for out-of-distribution inputs? - How would you evaluate an out-of-distribution detector before deployment? - Would one sigmoid output per class, instead of a softmax, avoid the problem?

Overview: Asks why a neural network with a softmax output can report near-certain predictions on inputs unlike anything it was trained on. Tests understanding of softmax normalization, logit growth in ReLU networks, decision regions, and which methods help detect out-of-distribution inputs.

PracHub logo
General
Nov 24, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

A classifier with a softmax output layer often reports a probability near 1 for inputs that look nothing like its training data. Why can a softmax output layer produce high confidence for inputs far outside the training distribution?

What a Strong Answer Covers Guidance

  • What softmax normalizes away and what the model does not represent at all
  • Why the logits of a ReLU network grow far from the data, and what that does to the softmax output
  • How the shape of the decision regions and the training objective add to the problem
  • Which remedies help with out-of-distribution confidence and which only fix in-distribution calibration

Follow-up Questions Guidance

  • Why does temperature scaling not fix this?
  • How does an energy score differ from the maximum softmax probability as a signal for out-of-distribution inputs?
  • How would you evaluate an out-of-distribution detector before deployment?
  • Would one sigmoid output per class, instead of a softmax, avoid the problem?