A new video on YouTube breaks down the difference between softmax and sigmoid functions using a delicious analogy: boba tea shops competing for your dollar.
Softmax: The Multi-Shop Showdown
Imagine five boba tea shops on the same street, each with a different "chewiness" score for their pearls. How do you decide how much of your money to spend at each? Softmax is the mathematical solution. First, it transforms each score using e^x, turning negatives into positives and exaggerating differences. Then it sums them up and divides each by the total to yield probabilities that add up to 1. The shop with the chewiest pearls gets the biggest share, but not all of it—the others still get some love.
Sigmoid: The Binary Choice
Sigmoid is like softmax but for just two shops, where one has a fixed baseline score of zero. It squashes a single score into a probability between 0 and 1, answering: "Will you try the new shop over your usual?" The higher the chewiness of the new place, the more likely you'll switch.
Both functions are essential in machine learning: softmax powers multi-class classifiers and attention mechanisms in transformers, while sigmoid is the go-to for binary classification and gating in LSTMs and GRUs.