What is Softmax?
In Turkish: Softmax · Topic: Models and training
A function that converts the raw scores produced by a neural network into probabilities that add up to one. It is used in multiclass classification and when language models choose the next token.
How does it work?
The network's final layer gives a raw score for each option, and these scores can be negative or very large. Softmax first applies an exponential to each score so that all of them become positive, then divides each by the total to get proportions. As a result, every option gets a share between 0 and 1, and the shares add up to one. The highest score receives the largest probability, and gaps between scores become more pronounced in the process.
Why does it matter?
Softmax turns a model's answer into probabilities that are easy to interpret, so it is almost the standard last step of classification models. Large language models also use it to produce a probability distribution over possible next tokens at each step. Generation settings such as 'temperature' change how sharp that distribution is.
Example
If an image classifier produces scores of 2.0, 1.0 and 0.1 for cat, dog and rabbit, softmax turns them into roughly 66 percent, 24 percent and 10 percent.
FAQ
What is the difference between softmax and sigmoid?
Sigmoid turns a single score into a value between 0 and 1 and is usually used for two-class problems or independent labels. Softmax handles several classes at once and produces probabilities that sum to one.
Does softmax show how confident the model really is?
Not always. The output is in the form of probabilities, but neural networks can assign high probability to wrong answers too.