Injecting noise into pre-softmax attention scores, goal and risk?
Noise on pre-softmax scores regularizes attention against winner take all collapse. Too much noise flattens softmax into uniform mixing and destroys the ability to focus.
Imagine a kid given a single bag of mixed candy and told to grab their favorite. Every time, the kid grabs the same chocolate, ignoring the rest. To teach the kid to try new things, you blindfold them slightly with a thin scarf, just enough that their reach wobbles. Sometimes they still pick chocolate, sometimes a gummy, sometimes something else. Now they learn that several candies are interesting. But if you blindfold them too tight, their reach is purely random and they have no preference at all. Attention noise during training works the same way: a small wobble keeps the model open to alternatives; too much wobble turns it into a coin flip.
Detailed answer & concept explanation~5 min readEverything 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. 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.
6-8 min: pre-softmax score noise mechanism + over-peaked attention failure mode + entropy regularization framing + risk of over-flattening + relation to attention dropout and Entmax.
Real products, models, and research that use this idea.
- Attention dropout (a post-softmax cousin) is built into the original Transformer paper and ships with every PyTorch nn.MultiheadAttention implementation.
- Several efficient-training recipes (T5 v1.1, some PaLM variants) experimented with score-level noise injection alongside attention dropout.
- Modern frontier LLMs like Llama 4 Maverick and DeepSeek V4 typically rely on attention dropout plus QK norm and large batch regularization rather than explicit score noise.
- Research on entropy regularization in attention (Sparsemax, Entmax) targets the same collapse failure mode from a different angle.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does attention noise differ from attention dropout?
QIf a head collapses to one key during training, can it recover?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Confusing attention noise with FFN dropout or with sampling temperature at the output. Attention noise specifically targets the pre-softmax scores inside the attention layer.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.