Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Softmax is smooth and never outputs an exact zero, so gradients always reach every input position; sparsemax kills gradient at the zeros and blocks learning there.
Picture rating every restaurant in town on a sliding scale where every place gets at least a tiny score, never exactly zero. If you change your mind tomorrow about a place you didn't like, you can nudge its score up from that tiny number. Now picture a stricter system: only your top three get a score and everyone else is a hard zero. Once a restaurant is a hard zero, you have no way to change your mind about it later. The system has effectively forgotten how to reconsider it. A learning model needs the sliding system. It is always adjusting which words to pay attention to, and 'always a tiny score' means it can always reconsider any word.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Lay out softmax's three properties, contrast with sparsemax's interpretability vs trainability tradeoff, explain why exponential amplification beats linear normalization, and mention α-entmax as the interpolating family.
| Normalizer | Always positive? | Exponential amp? | Gradient flow? | Used in production? |
|---|---|---|---|---|
| Softmax | Yes | Yes | All positions | Universal |
| Sparsemax | No (exact zeros) | Linear | Dead at zeros | Rare |
| Sum norm (x/Σx) | Requires non-neg input | Linear | All positions if positive | Almost never |
| α-entmax | Configurable | Configurable | Partial | Some research |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Saying 'softmax sums to 1' as the reason. Many normalizers sum to 1; that property isn't what makes softmax the right pick for trainable attention.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.