When Exact Token Importance Is Not Enough: Limits of Top-K Selection in LLM Attention
Organizations: GREYC, CNRS, Université de Caen Normandie
Abstract
Long-context language models often retain only a limited set of past token positions for an attention query. A common strategy scores positions individually and keeps the highest-ranked K. Yet attention weights are renormalized over the chosen set: two individually important positions need not form the best pair. We ask whether independent ranking suffices even when each importance score measures the exact downstream change in next-token predictions caused by deleting that position alone. It does not. A four-position construction makes the ranked pair incur 133.2 times the Kullback-Leibler (KL) divergence of the optimal pair, and a parametric family proves that this multiplicative gap is unbounded. An exact exchange identity and preference reversals for every K >= 2 explain the interaction. In exhaustive frozen-model audits of SmolLM2, Gemma, and Qwen, exact-singleton Top-4 leaves at least 10% relative improvement within a fully enumerated 24-position candidate pool in 55/60, 49/60, and 60/60 cases, respectively. SwapCert, a same-budget one-swap audit, detects 157/164 such cases and returns directly checkable improving supports. A KL-margin certificate relates support fidelity to next-token stability; larger-budget, multi-layer cached-decoding experiments measure predictive fidelity at K = 128 and 256. These results establish joint support quality as an essential object of analysis for sparse attention and motivate downstream-aware support selection under inference constraints.
Figures & tables
| Approach | Object of evaluation | Mathematical or computational role |
|---|---|---|
| Value-aware selectors | Head-output perturbation | Efficient approximations of token importance |
| DropKV | Renormalized head-output residual | Conditional approximation guarantee |
| Set-aware methods | Subset utility and reconstruction | Support-dependent optimization |
| Exact singleton oracle (this work) | Downstream KL of each deletion | Objective-matched ranking sufficiency test |
| SwapCert (this work) | Downstream KL of exchanged support | Checkable one-sided headroom witness |
| Model | Median [95% CI] | Median [95% CI] | |
|---|---|---|---|
| SmolLM2 | 55/60 | .926 [.807,.984] | [ , ] |
| Gemma-2-2B | 49/60 | .561 [.346,.658] | [ , ] |
| Qwen3.5-4B | 60/60 | .954 [.942,.964] | [ , ] |
| Model | Attention | Geometric | Recent | Sink+recent | |
|---|---|---|---|---|---|
| SmolLM2 | 128 | .0011103 | .0009981 | .1794272 | .0425540 |
| SmolLM2 | 256 | .0006785 | .0006863 | .1704914 | .0403637 |
| Gemma-2-2B | 128 | .0006760 | .0006308 | .0419478 | .0134970 |
| Gemma-2-2B | 256 | .0003143 | .0002836 | .0362449 | .0122437 |
| Qwen3.5-4B | 128 | .0011924 | .0011308 | .2587330 | .2472465 |
| Qwen3.5-4B | 256 | .0006270 | .0006127 | .2447003 | .2159831 |
| Model | dense-reference KL [95% CI] | gold-answer NLL [95% CI] | |
|---|---|---|---|
| SmolLM2 | 128 | [ , ] | [ , ] |
| SmolLM2 | 256 | [ , ] | [ , ] |
| Gemma-2-2B | 128 | [ , ] | [ , ] |
| Gemma-2-2B | 256 | [ , ] | [ , ] |
| Qwen3.5-4B | 128 | [ , ] | [ , ] |
| Qwen3.5-4B | 256 | [ , ] | [ , ] |
| Model | Ranked certified | Best-swap certified | Oracle certified | Ranked flips |
|---|---|---|---|---|
| SmolLM2 | ||||
| Gemma-2-2B | ||||
| Qwen3.5-4B | ||||
| Total |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Loss ratio | |||
|---|---|---|---|
| Construction | Cells | Rate | 95% cluster CI | Median |
|---|---|---|---|---|
| U1 hybrid | 360 | .8806 | [.8250,.9306] | .8329 |
| U2 attention | 360 | .8722 | [.8167,.9222] | .8275 |
| U3 mixed, two seeds | 720 | .8597 | [.8028,.9139] | .8272 |
| U4 random, two seeds | 720 | .9639 | [.9389,.9847] | .8851 |
| U5 stratified | 360 | .9917 | [.9750,1.0000] | .8948 |
| Model | 95% cluster CI | Median | Median KL | |
|---|---|---|---|---|
| SmolLM2 | 107/120 | [.825,.950] | .83058 | |
| Gemma | 49/120 | [.325,.4917] | .004078 | |
| Qwen | 118/120 | [.950,1.000] | .92994 |
| Model | Reversal | Median | Median inversion | Best-swap capture | Greedy oracle |
|---|---|---|---|---|---|
| SmolLM2 | 100% | .0250 | 48.75% | 97.16% | 41.82% |
| Gemma | 100% | .0619 | 46.90% | 96.40% | 69.39% |
| Qwen | 98.33% | .1155 | 44.23% | 78.10% | 25.00% |
| Model | Oracle positives | Hits | Misses | Recall [95% CI] |
|---|---|---|---|---|
| SmolLM2 | 55 | 52 | 3 | 94.55% [88.14%,100%] |
| Gemma | 49 | 48 | 1 | 97.96% [93.18%,100%] |
| Qwen | 60 | 57 | 3 | 95.00% [88.33%,100%] |
| Model | Precision | dense-reference KL [95% CI] | gold NLL [95% CI] | KL wins | |
|---|---|---|---|---|---|
| SmolLM2 | BF16 | 128 | [ ] | [ ] | 17/30 |
| SmolLM2 | BF16 | 256 | [ ] | [ ] | 17/30 |
| Gemma-2-2B | FP16 | 128 | [ ] | [ ] | 22/30 |
| Gemma-2-2B | FP16 | 256 | [ ] | [ ] | 24/30 |
| Qwen3.5-4B | BF16 | 128 | [ ] | [ ] | 18/30 |
| Qwen3.5-4B | BF16 | 256 | [ ] | [ ] | 16/30 |
Long-Context Language Model Inference
Long-context language model inference makes processing and generating over lengthy prompts faster and more memory-efficient.
See all 251 papers