CommunityKV: Efficient Long-Context Decoding via Graph Partitioning
On the map: Efficient LLM inference and serving → KV cache optimization also fits: Prompt and context compression
Abstract (arXiv)
Scaling Transformers to long contexts is constrained by the quadratic cost of self-attention and the linear growth of key-value cache memory transfer. Sparse attention mitigates this by retrieving only relevant tokens, but current approaches either require large-scale training or, within the training-free regime, rely on semantically coarse heuristics or expensive clustering that is difficult to update efficiently during decoding. We introduce CommunityKV, a framework that formulates sparse attention as a community detection problem. CommunityKV constructs a token graph from the QKT scores already computed during standard prefill, and partitions the graph into communities to enable retrieval of semantically coherent token groups. A local update rule assigns newly generated tokens to communities in constant time, enabling sparse retrieval throughout streaming decoding without global re-partitioning. We evaluate CommunityKV on Qwen3 and Llama-3.1 models across three long-context benchmarks. With one graph per query head, CommunityKV delivers up to 1.25× the end-to-end generation throughput of dense attention, while query-group graph aggregation yields up to 1.71× with comparable accuracy.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 45 of its 50 references that are in the map. First posted on arXiv 30 Sep 2026.
Builds on
45 of 50 references.
Closest ancestors · 9
Same direction, newest first
- 2025GraphKV: Breaking the Static Selection Paradigm with Graph-Based KV Cache Eviction30 Aug
- 2025FreeKV: Boosting KV Cache Retrieval for Efficient LLM Inference19 May
- 2024TokenSelect: Efficient Long-Context Inference and Length Extrapolation for LLMs via Dynamic Token-Level KV Cache Selection5 Nov
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inference16 Jun
- 2024SnapKV: LLM Knows What You are Looking for Before Generation22 Apr
- 2023SparQ Attention: Bandwidth-Efficient LLM Inference8 Dec
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs3 Oct
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun
- 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Time26 May
Other references · 36
- 2017Attention Is All You Needcited by 59,932
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2025Qwen3 Technical Reportcited by 8,195
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2017Billion-scale similarity search with GPUscited by 2,477
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Reformer: The Efficient Transformercited by 1,658
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
- 2020Efficient Transformers: A Surveycited by 784
24 more
- 2025DeepSeek-V3.2: Pushing the Frontier of Open Large Language Modelscited by 755
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
- 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 391
- 2018From Louvain to Leiden: guaranteeing well-connected communitiescited by 379
- 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 367
- 2024BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystackcited by 211
- 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 201
- 2025Plan-and-Act: Improving Planning of Agents for Long-Horizon Taskscited by 190
- 2025MoBA: Mixture of Block Attention for Long-Context LLMscited by 188
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 139
- 2020Fast Transformers with Clustered Attentioncited by 123
- 2024MagicPIG: LSH Sampling for Efficient LLM Generationcited by 112
- 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
- 2023KDEformer: Accelerating Transformers via Kernel Density Estimationcited by 58
- 2024Multimodal Needle in a Haystack: Benchmarking Long-Context Capability of Multimodal Large Language Modelscited by 53
- 2025LongCodeBench: Evaluating Coding LLMs at 1M Context Windowscited by 37
- 2025The Sparse Frontier: Sparse Attention Trade-offs in Transformer LLMscited by 28
- 2015Random Walks, Markov Processes and the Multiscale Modular Organization of Complex Networkscited by 24
- 2020Cluster-Former: Clustering-based Sparse Transformer for Long-Range Dependency Encodingcited by 19
- 2025Multipole Attention for Efficient Long Context Reasoningcited by 14
- 2023GVE-Leiden: Fast Leiden Algorithm for Community Detection in Shared Memory Settingcited by 4
- 2024Heuristic-based Dynamic Leiden Algorithm for Efficient Tracking of Communities on Evolving Graphscited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026You Only Index Once: Cross-Layer Sparse Attention with Shared Routing
- 2026AB-Sparse: Sparse Attention with Adaptive Block Size for Accurate and Efficient Long-Context Inference
- 2026EntmaxKV: Support-Aware Decoding for Entmax Attention
- 2026MOIRA: Mass-Oriented Indexing with Ragged Attention for Long-Context Decoding
- 2025Stream: Scaling up Mechanistic Interpretability to Long Context in LLMs via Sparse Attention
- 2026Elastic Threshold Attention: Learned Contextual Sparsity for Long-Context Decoding
- 2026Simplified Sparse Attention via Gist Tokens
- 2026LycheeDecode: Accelerating Long-Context LLM Inference via Hybrid-Head Sparse Decoding