Why not just retrain models to eliminate attention sinks entirely?
Attention sinks force a lot of softmax weight onto the first token. A teammate proposes 'just retrain the model without sinks',why does that not actually solve the underlying problem, and what does fix it?
Sinks come from softmax-must-sum-to-1. Retraining without sinks just promotes the next-best token. The fix is explicit register or sink tokens that absorb the no-op weight.
Imagine every painter in a workshop has to spend exactly one full tube of paint per painting, even when the painting only needs half a tube. With no designated waste bucket, the painters discover that the corner of every canvas is a fine place to dump the leftover paint, so every painting ends up with a weird blob in the corner. If you ban using the corner, the painters do not stop having leftover paint; they just dump it somewhere else on the canvas, and the new dump spot ruins a real part of the picture. The fix is to put a waste bucket next to every easel. That is what register tokens do for attention.
Detailed answer & concept explanation~7 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.
Explain the softmax-must-sum-to-1 constraint, walk why removing the current sink just promotes the next-best token, name the architectural fixes (register tokens, softmax-1, explicit sink tokens), and connect to StreamingLLM as the inference-time mitigation.
Real products, models, and research that use this idea.
- Xiao et al. 2023 (StreamingLLM): keeps the first few tokens permanently in the KV cache because dropping them causes long-context serving to collapse.
- Darcet et al. 2024 (Vision Transformers Need Registers): adds learned register tokens to ViT and demonstrates smoother attention maps and fewer outlier features.
- DINOv2 v2.5 and several 2026 vision foundation models ship with register tokens trained in from the start.
- Gemma 2 and Gemma 4 use softmax-1 style attention normalization in some variants to allow row sums to be less than 1.
- Llama 3 and Llama 4 Maverick exhibit classical BOS sinks; the StreamingLLM trick is the standard fix when serving them with sliding-window caches.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does softmax-1 (adding +1 to the softmax denominator) eliminate the need for sinks, and what does it cost?
QWhat concrete metrics improve when a model is retrained with register tokens?
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.
Trying to train sinks away by deleting the BOS token or penalizing first-position attention. The next-best token just becomes the new sink, often a content token whose representation gets distorted.
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.