DAM: Dynamic Attention Mask for Long-Context Large Language Model Inference Acceleration
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
Long-context understanding is crucial for many NLP applications, yet transformers struggle with efficiency due to the quadratic complexity of self-attention. Sparse attention methods alleviate this cost but often impose static, predefined masks, failing to capture heterogeneous attention patterns. This results in suboptimal token interactions, limiting adaptability and retrieval accuracy in long-sequence tasks. This work introduces a dynamic sparse attention mechanism that assigns adaptive masks at the attention-map level, preserving heterogeneous patterns across layers and heads. Unlike existing approaches, our method eliminates the need for fine-tuning and predefined mask structures while maintaining computational efficiency. By learning context-aware attention structures, it achieves high alignment with full-attention models, ensuring minimal performance degradation while reducing memory and compute overhead. This approach provides a scalable alternative to full attention, enabling the practical deployment of large-scale Large Language Models (LLMs) without sacrificing retrieval performance. DAM is available at: https://github.com/HanzhiZhang-Ulrica/DAM.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 32 of its 38 references that are in the map. First posted on arXiv 6 Jun 2025.
Builds on
32 of 38 references.
Closest ancestors · 9
Same direction, newest first
- 2024DiffKV: Differentiated Memory Management for Large Language Models with Parallel KV Compaction4 Dec
- 2024BUZZ: Beehive-structured Sparse KV Cache with Segmented Heavy Hitters for Efficient LLM Inference30 Oct
- 2024LayerKV: Optimizing Large Language Model Serving with Layer-wise KV Cache Management1 Oct
- 2024SnapKV: LLM Knows What You are Looking for Before Generation22 Apr
- 2024Cost-Efficient Large Language Model Serving for Multi-turn Conversations with CachedAttention23 Mar
- 2024Keyformer: KV Cache Reduction through Key Tokens Selection for Efficient Generative Inference14 Mar
- 2024ChunkAttention: Efficient Self-Attention with Prefix-Aware KV Cache and Two-Phase Partition23 Feb
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs3 Oct
- 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Time26 May
Other references · 23
- 2017Attention Is All You Needcited by 60,361
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2020Reformer: The Efficient Transformercited by 1,668
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
- 2019Multi-News: a Large-Scale Multi-Document Summarization Dataset and Abstractive Hierarchical Modelcited by 431
- 2019Axial Attention in Multidimensional Transformerscited by 358
- 2019Adaptively Sparse Transformerscited by 155
11 more
- 2023LongEval: Guidelines for Human Evaluation of Faithfulness in Long-form Summarizationcited by 96
- 2020O(n) Connections are Expressive Enough: Universal Approximability of Sparse Transformerscited by 83
- 2024LV-Eval: A Balanced Long-Context Benchmark with 5 Length Levels Up to 256Kcited by 81
- 2024MemServe: Context Caching for Disaggregated LLM Serving with Elastic Memory Poolcited by 68
- 2020Masked Language Modeling for Proteins via Linearly Scalable Long-Context Transformerscited by 49
- 2021Global Attention Mechanism: Retain Information to Enhance Channel-Spatial Interactionscited by 39
- 2020ETC: Encoding Long and Structured Inputs in Transformerscited by 34
- 2024BatchLLM: Optimizing Large Batched LLM Inference with Global Prefix Sharing and Throughput-oriented Token Batchingcited by 32
- 2019Lightweight and Efficient Neural Natural Language Processing with Quaternion Networkscited by 26
- 2021A Dynamic Head Importance Computation Mechanism for Neural Machine Translationcited by 4
- 2020Multi-Head Self-Attention with Role-Guided Maskscited by 3
Built on by
Citing papers per year: 2025: 2; 2026: 2.
4 papers.
- 2025VideoNSA: Native Sparse Attention Scales Video Understandingcited by 11
- 2025Trainable Dynamic Mask Sparse Attentioncited by 6
- 2026Hasse Diagrams for Attention: A Partial Order Framework for Designing Transformer Maskscited by 0
- 2026CoWindow Attention: Full Causal Coverage Is a Collective Propertycited by 0
- 2026CoWindow Attention: Full Causal Coverage Is a Collective Property26 Sep 2026
- 2026Hasse Diagrams for Attention: A Partial Order Framework for Designing Transformer Masks8 Jun 2026
- 2025VideoNSA: Native Sparse Attention Scales Video Understanding2 Oct 2025
- 2025Trainable Dynamic Mask Sparse Attention4 Aug 2025
Similar, not cited
Close in wording, no citation either way
- 2025Training-free Context-adaptive Attention for Efficient Long Context Modeling
- 2025Stream: Scaling up Mechanistic Interpretability to Long Context in LLMs via Sparse Attention
- 2026Full Attention Strikes Back: Transferring Full Attention into Sparse within Hundred Training Steps
- 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attention
- 2026Titan-Llama: Retrofitting Pre-trained LLMs with External Neural Memory Modules
- 2026Double-P: Hierarchical Top-P Sparse Attention for Long-Context LLMs
- 2025Every Token Counts: Generalizing 16M Ultra-Long Context in Large Language Models
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefilling