atlas

Research map / Architectures and efficiency / Attention and transformers

Selective Attention Improves Transformer

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Attention head and block redesign · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Selective Attention, a parameter-free modification that lets tokens mask earlier tokens by subtracting accumulated masking from attention logits, improving language modeling and enabling KV-cache pruning.

Problem

Standard transformer attention keeps the entire context and cannot let later tokens suppress unneeded earlier tokens, which degrades quality and inflates inference memory and compute.

Approach

Reuse an existing attention head's scores as a selection matrix, constrain it (ReLU, no BOS masking, no self-masking), cumulatively sum it over future tokens, and subtract it from attention logits; masked-out tokens can then be evicted from the KV cache under per-layer budgets.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add selective attentionTransformer d=28 · ARC-Easy, ARC-Challenge, HellaSwag, CommonSenseQA, OpenBookQA, and PiQAaccuracy: 45.64% -> 46.95%; 26.76% -> 27.37%; 53.50% -> 53.76%; 27.86% -> 28.51%; 37.33% -> 37.54%; 72.32% -> 72.85%Helped
Add selective attentionTransformer d=12 · C4 validationlog-perplexity: 2.6815 -> 2.6372Helped
Add selective attention to the T5 decoderT5-small, T5-base, and T5-large · T5 span-corruption validationloss per non-padding token: 1.962 -> 1.952; 1.693 -> 1.691; 1.528 -> 1.522Helped
Replace shared attention-head selection with a separate bilinear form (ablation)Selective attention on C4 · C4 validation, d=8 and d=12log-perplexity: 2.90 vs 2.91; 2.63 vs 2.63Mixed
Allow tokens to affect their own attention operation by removing the shift (ablation)Selective attention · C4 validation, d=12log-perplexity: 2.831 -> 2.832Hurt
Allow selective attention to mask the <BOS> token (ablation)Selective attention · C4 validationlog-perplexity: 2.6409 vs 2.6373; 2.5486 vs 2.5483; 2.4750 vs 2.4741; 2.4153 vs 2.4156; 2.3674 vs 2.3673; 2.2909 vs 2.2865Mixed
Allow tokens to mask themselves (ablation)Selective attention · C4 validation, d=12, d=14, and d=18log-perplexity: 2.7348 -> 2.7251; 2.6510 -> 2.6423; 2.5261 -> 2.5209Hurt
Remove the ReLU constraint so selection can be negative (ablation)Selective attention · C4 trainingtraining convergenceHurt
Use local attention instead of dense attentionTransformer d=12 · C4 validationlog-perplexity: 2.6815 -> 2.7860 (All-local 32); 2.6815 -> 2.7046 (Local-global 32)Hurt
Add selective attentionTransformer d=3 · Variable Assignment, out-of-distributionaccuracy: 70% -> 100%Helped
Add selective attentionTransformer d=3 · Copy and Parity*accuracyNo clear effect

Surprising findings

Limitations

Experimental setup

Datasets: C4 WikiText lm1b ARC HellaSwag PiQA CommonSenseQA OpenBookQA

Benchmarks: C4 validation perplexity ARC HellaSwag PiQA CommonSenseQA OpenBookQA Variable Assignment Copy Parity*

Metrics: validation log-perplexity accuracy memory requirement of KV cache

Baselines: standard attention transformer H2O TOVA sparse attention local attention Window+4

Builds on: Transformer T5 H2O TOVA

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy