The heatmap nobody expected — follow the mass
Below: attention maps for six heads processing a sentence, patterned after what interpretability tools show on real models. Some heads do honest work — attending to a nearby noun, tracking syntax. But look at the left column of the map: several heads dump most of their probability on token #1, regardless of what it is. Swap the first word for something meaningless and… nothing changes.
Simulated head patterns calibrated to the published phenomenon (Xiao et al., 2023): sink mass stays high no matter which token sits at position 0 — that indifference is the fingerprint.
Why it forms — softmax must spend 100%
Attention weights are a probability distribution: they must sum to exactly 1. But sometimes a head has nothing useful to say for this query — ideally it would attend to nothing. There is no "nothing." So where does the forced budget go? To the one token that is visible from every position, always present, and safely bland: token 0. Drag the relevance slider down and watch the mass drain into the sink. Then flip the "allow sum < 1" switch — the black hole evaporates.
The escape valve is real research: "off-by-one softmax" / registers add a virtual token so heads can abstain. The demo computes both normalizations from the same scores — the sink is pure bookkeeping.
Break a streaming LLM — evict the black hole, watch it die
Infinite chat needs a finite KV cache, so the obvious plan is a sliding window: keep the most recent 512 tokens, evict the oldest. Run the stream below. Everything is fine… right until the moment position 0 slides out of the cache. The perplexity trace goes vertical — the model's heads just lost their abstention box, and the forced probability sprays across random recent tokens, corrupting every layer above.
Simulation of the StreamingLLM paper's headline experiment: sliding-window Llama perplexity explodes precisely at first-token eviction. The cliff's location here is computed from the window arithmetic, not scripted by hand.
The four-token fix — keep the drain, slide the rest
StreamingLLM's fix is almost comically small: never evict the first k tokens (keep them pinned forever) and slide the window over everything else. Drag k: at 0 you get EP 03's crash; at 4, the stream runs forever on flat perplexity — same memory budget, same window, plus four pinned tokens. Then try the deluxe version: a dedicated learned sink token trained into the model from day one.
The cache diagram shows exactly what's held: gold pins + sliding grey window. Perplexity dynamics follow the paper's findings — k=4 recovers dense-attention quality within a small margin; k=1 mostly works if the model used a fixed <bos>.
Sinks are everywhere — quantization pain and vision "registers"
Once you know the shape, you see it everywhere. Two famous sightings: (1) sink tokens carry enormous activation values — the outliers that make int8 quantization of LLMs miserable (toggle the histogram). (2) Vision transformers grow the same organ: high-norm "ghost" patches in empty background regions of images — sinks wearing camouflage. The fix there got a name: registers, extra tokens added purely to absorb this traffic. Toggle them and watch the feature map clean up.
Patterns follow the published findings (massive activations on sink tokens; Darcet et al.'s "Vision Transformers Need Registers"). The feature maps here are schematic reconstructions of those figures, generated per toggle.