Why Attention Patterns Exist: A Unifying Temporal Perspective Analysis
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
Attention patterns play a crucial role in both training and inference of large language models (LLMs). Prior works have identified individual patterns such as retrieval heads, sink heads, and diagonal traces, yet these observations remain fragmented and lack a unifying explanation. To bridge this gap, we introduce Temporal Attention Pattern Predictability Analysis (TAPPA), a unifying framework that explains diverse attention patterns by analyzing their underlying mathematical formulations from a temporally continuous perspective. TAPPA both deepens the understanding of attention behavior and guides inference acceleration approaches. Specifically, TAPPA characterizes attention patterns as predictable patterns with clear regularities and unpredictable patterns that appear effectively random. Our analysis further reveals that this distinction can be explained by the degree of query self-similarity along the temporal dimension. Focusing on the predictable patterns, we further provide a detailed mathematical analysis of three representative cases through the joint effect of queries, keys, and Rotary Positional Embeddings (RoPE). We validate TAPPA by applying its insights to KV cache compression and LLM pruning tasks. Across these tasks, a simple metric motivated by TAPPA consistently improves performance over baseline methods. The code is available at https://github.com/MIRALab-USTC/LLM-TAPPA.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 29 of its 34 references that are in the map. First posted on arXiv 29 Jan 2026.
Builds on
29 of 34 references.
Closest ancestors · 7
Same direction, newest first
- 2025Expected Attention: KV Cache Compression by Estimating Attention from Future Queries Distribution1 Oct
- 2025CAKE: Cascading and Adaptive KV Cache Eviction with Layer Preferences16 Mar
- 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Heads14 Oct
- 2024When Attention Sink Emerges in Language Models: An Empirical View14 Oct
- 2024InfiniGen: Efficient Generative Inference of Large Language Models with Dynamic KV Cache Management28 Jun
- 2024SnapKV: LLM Knows What You are Looking for Before Generation22 Apr
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun
Other references · 22
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2024Qwen2.5 Technical Reportcited by 4,713
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
- 2023LLM-Pruner: On the Structural Pruning of Large Language Modelscited by 643
- 2024KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cachecited by 604
10 more
- 2024SliceGPT: Compress Large Language Models by Deleting Rows and Columnscited by 378
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 375
- 2024ShortGPT: Layers in Large Language Models are More Redundant Than You Expectcited by 369
- 2024Massive Activations in Large Language Modelscited by 277
- 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 219
- 2024LaCo: Large Language Model Pruning via Layer Collapsecited by 124
- 2024Round and Round We Go! What makes Rotary Positional Encodings useful?cited by 111
- 2024Unveiling and Harnessing Hidden Attention Sinks: Enhancing Large Language Models without Training through Attention Calibrationcited by 70
- 2024Spectral Filters, Dark Signals, and Attention Sinkscited by 54
- 2025KVTuner: Sensitivity-Aware Layer-Wise Mixed-Precision KV Cache Quantization for Efficient and Nearly Lossless LLM Inferencecited by 36
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026SPIN: Shadow Predictive Indexer for Sparse Attention6 Oct 2026
- 2026Parameterized Stripe Attention for Efficient Video Generation29 Sep 2026
- 2026DSPO: Diversity-aware Subjective Policy Optimization for Robust Emotional Reasoning29 Sep 2026
- 2026When Can Attention Heads Be Statically Defined?28 Sep 2026
Similar, not cited
Close in wording, no citation either way
- 2025Training-free Context-adaptive Attention for Efficient Long Context Modeling
- 2024Beyond KV Caching: Shared Attention for Efficient LLMs
- 2025Stream: Scaling up Mechanistic Interpretability to Long Context in LLMs via Sparse Attention
- 2026Sliding-window beats linear attention
- 2026Inference Time Context Sparsity: Illusion or Opportunity?
- 2025Progressive Sparse Attention: Algorithm and System Co-design for Efficient Attention in LLM Serving
- 2026FASA: Frequency-aware Sparse Attention
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inference