MaxSoftmaxCriterion#
- class torch_uncertainty.ood_criteria.MaxSoftmaxCriterion[source]#
OOD criterion based on the Maximum Softmax Probability (MSP) baseline of Hendrycks & Gimpel (ICLR 2017).
Defined as the negative of the maximum predicted class probability:
\[\text{score}(\mathbf{p}) = -\max_{i} p_i,\]where \(\mathbf{p} = [p_1, \dots, p_C]\) is the predictive distribution. Lower maximum probabilities indicate greater uncertainty.
- Variables:
input_type – Expected input type is probabilities.