Skip to content

Distance-KV: Exploiting Relative Distance for Efficient Long-Context Inference

Sep 2026 · arXiv.org · Vol abs/2609.32663 · 0 citations · 23 references
Computer Science

Abstract

The memory usage and decoding latency of LLM inference grow rapidly with context length. To reduce these costs, key-value (KV) cache compression methods selectively retain cached states based on token importance or differences in attention patterns across heads. However, we discover that retrieval capability varies substantially with relative distance, even within the same attention head. To exploit this structure, we introduce Distance-KV, which learns a static KV retention pattern over the joint space of layers, attention heads, and relative distances. The pattern is learned offline with the language model frozen and reused across inputs to prune and compact the KV cache without online importance scoring. Across three backbone models and four long-context benchmarks, Distance-KV consistently achieves the best overall performance among competing KV cache compression methods, exceeding the strongest compression baseline by up to 9.3 points on RULER at 128K. On Llama-3.1-8B-Instruct at 128K, Distance-KV reduces KV cache memory by 65.4% and achieves a $1.66\times$ decoding speedup relative to Dense. Together, these results identify relative distance as an important structural dimension for understanding how LLMs retrieve information over long contexts and for designing more efficient inference methods.

View source

Similar papers

Oct 2026

KVCB: Key-Value cache merging towards consistent behavior for efficient inference of large language models

KV cache merging towards consistent behavior (KVCB), a novel KV cache compression method for efficient LLM inference that consistently matches or outperforms state-of-the-art eviction- and merging-based baselines under fixed memory budgets, effectively balancing compression efficiency with generative fidelity across di...

Zhao-Hong Jia, Jie Yu, Xiang-Qian Wang et al. · 0 citations

Cartridges++: KV Cache Compression without Off-Context Derailment

This study investigates the crucial deployment question of whether Cartridges and other CKVs can handle off-context queries, and proposes Cartridges++, simple modifications to cartridges that retain off-context abilities at small or negligible cost.

Sonia Laguna, João Monteiro, Marco Cuturi et al. · 1 citation
#natural language process... Conference Open access Oct 2026

Behavior-Preserving KV Cache Compression

This work proposes Behavior-Preserving KV Cache Compression, a training-free framework that scores candidate evictions by estimating the compressed-cache logits induced by their removal and evaluating the resulting KL to the full-cache next-token distribution using pre-eviction forward statistics.

Doo Hwan Hwang, Junyoung Jang, Jun-Ho Na et al. · 1 citation
Book Open access 2027

HVKV: Scalable Long-Context Inference through Hypervector KV Cache Retrieval

Long-context inference is increasingly bottlenecked by the KV cache rather than the model weights. CPU offloading can extend capacity, but transferring the full KV cache at each decode step turns memory pressure into a bandwidth bottleneck. We present HVKV, a KV-cache retrieval framework based on compact yet effective...

Hyunsei Lee, Se-Hee Park, J. Gwak et al. · 0 citations

PatchKV: Weight-Space Compensation of KV Cache

Long-context inference with Large Language Models (LLMs) is bottlenecked by the linearly growing memory of the key-value (KV) cache. Existing compression methods reduce the cache through token eviction or approximation, but degrade sharply at aggressive compression budgets. We propose PatchKV, a training-free framework...

Chanryeol Lee, Chanhyuk Lee, Yeonwoo Choi et al. · 1 citation
Review Open access Sep 2026

To Evict or to Merge? A Survey of LLM KV Cache Management Strategies and the SR-KV Framework

Large Language Models (LLMs) rely on a Key-Value (KV) Cache to avoid recomputation of attention information for the previously generated tokens, but the cache keeps growing linearly with the sequence length and thus quickly becomes the dominant memory bottleneck during long context inference. This paper presents a surv...

Chaitra Samant, Dhruv Panchal, Kevin Shah et al. · 0 citations

Related blog posts

MIT News · Artificial Intelligence Nov 17, 2026

Learning the language of machine learning

By studying the computational foundations of language learning, Associate Professor Jacob Andreas builds intelligent systems that can communicate effectively with humans.

MIT News · Artificial Intelligence Aug 27, 2026

Looking beyond natural sequences

A new machine-learning framework aims to improve the success rate of computational protein design while moving away from results that reproduce sequences found in nature.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.