mlsanityData to 14 Oct 2026

ZigzagAttention: Efficient Long-Context Inference with Exclusive Retrieval and Streaming Heads

arXiv 2508.12407 ↗First posted 17 Aug 2025cs.CLcited by 1

On the map: Efficient LLM inference and serving → KV cache optimization

Abstract (arXiv)

With the rapid development of large language models (LLMs), handling long context has become one of the vital abilities in LLMs. Such long-context ability is accompanied by difficulties in deployment, especially due to the increased consumption of KV cache. There is certain work aiming to optimize the memory footprint of KV cache, inspired by the observation that attention heads can be categorized into retrieval heads that are of great significance and streaming heads that are of less significance. Typically, identifying the streaming heads and and waiving the KV cache in the streaming heads would largely reduce the overhead without hurting the performance that much. However, since employing both retrieval and streaming heads in one layer decomposes one large round of attention computation into two small ones, it may unexpectedly bring extra latency on accessing and indexing tensors. Based on this intuition, we impose an important improvement to the identification process of retrieval and streaming heads, in which we design a criterion that enforces exclusively retrieval or streaming heads gathered in one unique layer. In this way, we further eliminate the extra latency and only incur negligible performance degradation. Our method named textscZigzagAttention is competitive among considered baselines owing to reduced latency and comparable performance.

Key facts. Cited by 1 paper 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 10 of its 14 references that are in the map. First posted on arXiv 17 Aug 2025.

Builds on

10 of 14 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Heads14 Oct

Other references · 9

  1. 2017Attention Is All You Needcited by 60,361
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  4. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
  5. 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
  6. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
  7. 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 903
  8. 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Timecited by 252
  9. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232

Built on by

Cited by year

Citing papers per year: 2025: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2024TokenSelect: Efficient Long-Context Inference and Length Extrapolation for LLMs via Dynamic Token-Level KV Cache Selection
  2. 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inference
  3. 2026LycheeDecode: Accelerating Long-Context LLM Inference via Hybrid-Head Sparse Decoding
  4. 2026CateKV: On Sequential Consistency for Long-Context LLM Inference Acceleration
  5. 2025LLMs Know What to Drop: Self-Attention Guided KV Cache Eviction for Efficient Long-Context Inference
  6. 2026Distance-KV: Exploiting Relative Distance for Efficient Long-Context Inference
  7. 2024A Little Goes a Long Way: Efficient Long Context Training and Inference with Partial Contexts
  8. 2026From Interpretability to Performance: Optimizing Retrieval Heads for Long-Context Language Models