Understanding Sparse Attention Selectivity in Long-Context Foundation Models via Counterfactual Evaluation
Xingyu Ren, Youran Sun, Chugang Yi, Haizhao Yang
cs.CL, cs.LG
Submitted: 2026-08-03
License: http://creativecommons.org/licenses/by/4.0/
The gist: Sparse attention is widely deployed in long-context serving stacks, yet no framework audits how discarding blocks changes the influence of specific content on model output.
Terminology
Abstract
Sparse attention is widely deployed in long-context serving stacks, yet no framework audits how discarding blocks changes the influence of specific content on model output. We first establish that the phenomenon is real and causal: Block Sparse Flash Attention (BSFA) route replay across four architectures changes output decisions in 13 of 16 cells, with zero identity-replay label flips. We then introduce a dense-calibrated counterfactual audit using matched probe cards---Gold (carrying the correct answer label), Poison (carrying a target wrong label), and Benign (filler only)---under six-layout position symmetry, isolating the sparsification-specific effect. Two patterns compete. Signal concentration: the selector preserves Gold and Poison blocks far above filler-matched Benign blocks (G about P B across all model--task pairs). Integration loss: discarding blocks severs cross-block attention---confirmed by an ablation where isolating the probe block collapses its influence from 4.48 logits to zero. Compression ratio governs the balance: a full sweep from mild (c=0.25) to aggressive (c=0.75) compression across four model--task pairs reveals that three of four cells move toward stronger sparse amplification at higher compression, with two exhibiting sign reversals. Three independent arms---BSFA route replay, controlled block-top- k, and KV-cache eviction---converge: sparsification changes content influence in ways aggregate accuracy cannot detect. We provide an open measurement framework deployable on any model exposing block identities.
Sources
- ReST-KV: Robust KV Cache Eviction with Layer-wise Output Reconstruction and Spatial-Temporal Smoothing
- Understanding the Physics of Key-Value Cache Compression for LLMs through Attention Dynamics
- Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction
- Towards Automated Circuit Discovery for Mechanistic Interpretability
- The Llama 3 Herd of Models
- Mistral 7B
- SCBench: A KV Cache-Centric Analysis of Long-Context Methods
- SnapKV: LLM Knows What You are Looking for Before Generation
- Lost in the Middle: How Language Models Use Long Contexts
- Llama See, Llama Do: A Mechanistic Perspective on Contextual Entrainment and Distraction in LLMs
- Block Sparse Flash Attention
- Qwen3 Technical Report
- Gated Sparse Attention: Combining Computational Efficiency with Training Stability for Long-Context Language Models
- Towards More Robust Retrieval-Augmented Generation: Evaluating RAG Under Adversarial Poisoning Attacks
- Agon: An Autonomous Large-Scale Omnidisciplinary Research System Built on Prompt Economy
- PerspectiveGap: A Benchmark for Multi-Agent Orchestration Prompting
- Efficient Streaming Language Models with Attention Sinks
- A Preliminary Study on the Promises and Challenges of Native Top-$k$ Sparse Attention
- Qwen2.5 Technical Report
- Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attention
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering