SYNTHESIS NOTE
Topics›LLM Architecture›this note

Can subtracting attention maps remove noise from context?

Standard softmax attention spreads probability across all tokens, creating a noise floor even on irrelevant ones. Could computing attention as the difference between two softmax maps cancel this shared noise and sharpen focus on relevant tokens?

Synthesis note · 2026-07-17 · sourced from LLM Architecture

The standard Transformer over-allocates attention to irrelevant context. Visualized on a needle-in-a-haystack retrieval task, only a small fraction of the attention mass lands on the correct answer while the bulk is smeared across distractors. This is not a training defect so much as a structural property of softmax: because the weights must be non-negative and sum to one, every token gets some mass, and across a long context that residual noise floor accumulates into real distraction.

DIFF Transformer's fix is elegant because it is mechanical rather than learned. It computes attention as the difference between two separate softmax attention maps. Each map carries the same underlying noise; subtracting them cancels the common-mode noise while preserving the differential signal — exactly the common-mode-rejection principle behind differential amplifiers and noise-cancelling headphones. What survives is a sparse attention pattern focused on relevant tokens. Crucially it stays FlashAttention-compatible, so the fix costs no efficiency. This is a distinct solution to a problem the vault has already diagnosed: since Does transformer attention architecture inherently favor repeated content?, the over-attention that produces sycophancy and lost-in-the-middle behavior is architectural — and where that note treats it as a bias to work around, DIFF Transformer removes it at the mechanism. It converges with What mechanism enables models to retrieve from long context?: both point to sparse attention as the substrate of reliable retrieval, one by discovering the heads that already do it, the other by engineering the whole layer toward it.

Inquiring lines that read this note 7

This note is a source for these research framings, grouped by the broader line of inquiry each explores. Scan the bold lines of inquiry; follow any specific question forward.

How do transformer circuits and attention mechanisms enable or limit reasoning? How do different reward signals affect model reasoning and calibration differently? What determines how neural networks organize their internal knowledge representations? How should context management strategies balance efficiency with agent reliability? How can parameter sparsity improve interpretability while maintaining model capability?

Related concepts in this collection 2

This note in its neighbourhood — explore the map, then jump to a related concept in the list below.

Concept map
12 direct connections · 99 in 2-hop network ·medium cluster Open in graph ↗

Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph

your link semantically near linked from elsewhere

Related papers in this collection 8

Papers most semantically related to this note, ranked by cosine similarity in the embedding space.

Original note title

differential attention subtracts two softmax maps to cancel attention noise — the same common-mode-rejection trick that noise-cancelling headphones use applied to context