AsdaKV: Attention-Overlap Driven Semantic KV Retrieval for Long-Context LLMs
Tianming Yan, Kun Yang, Tingwang You, Kui Ren
NeurIPS page · Open on the map
Category: Efficient LLM Inference & Training › KV Cache Optimization · Type: new method · Keywords: KV cache retrieval, semantic windows, attention overlap, long-context LLM, memory efficiency
Areas: Memory › Model Memory Optimization › KV Cache Optimization; Long Context › Long-context mechanisms › KV cache eviction
Summary
AsdaKV introduces an attention-overlap driven KV cache retrieval framework that adaptively defines semantic windows to preserve context while reducing memory overhead.
Explained to a 5-year-old
Large language models remember a lot of information while they talk. To remember everything, they need a big memory called a KV cache that grows very fast. AsdaKV is a new way to organize that memory by looking at which parts the model pays attention to. It groups similar pieces of memory into windows and keeps only a few anchors on fast memory, moving the rest to slower memory. This helps the model stay accurate without using too much memory.
Explained to a 5-year-old, longer
When a big language model talks, it needs to remember everything it has said before. It stores this memory in a special place called the KV cache, which gets bigger and bigger as it talks. If the cache gets too big, the model may not fit on the computer’s memory. Some old methods just forget old parts of the memory to make room. Other methods try to remember everything but only look at small pieces like words or fixed pages. These pieces often don’t match what the model actually needs to remember. AsdaKV is a new idea that looks at how the model pays attention to decide what to remember. It checks if the same parts of the story are being used over and over. When the model starts to forget something important, AsdaKV notices and refreshes that part. It then groups the memory into windows that fit together like puzzle pieces. The full windows are moved to slower memory, while only a few anchors stay on fast memory. When the model needs something, it matches the current question to the right window and uses only the needed anchors.
For a technical reader
AsdaKV adaptively manages the KV cache for long-context LLMs by measuring attention overlap between decoding steps to detect semantic drift. It partitions historical KV states into variable-length semantic windows, offloads full windows to CPU memory, and retains lightweight anchors plus a fixed-budget active cache on GPU. During generation, the current query retrieves relevant windows via anchor matching, while adaptive-stride drift detection and deferred page recall reduce redundant computation. This design preserves contextual evidence that would otherwise be lost by eviction-based methods and aligns retrieval units with the model’s actual dependencies. Experiments show that AsdaKV achieves higher accuracy under the same KV budget while maintaining comparable decoding efficiency across diverse tasks and model families.
Problem
Adapting large language models to long contexts is limited by the linear growth of the KV cache, which either discards information or uses misaligned retrieval units.
Method
The approach measures overlap of high-attention regions across decoding steps to detect semantic drift, groups historical KV states into variable-length semantic windows, offloads full windows to CPU memory, and maintains lightweight anchors plus a fixed active KV cache on GPU, retrieving relevant windows via anchor matching with adaptive stride and deferred page recall.
Results
The approach achieves higher accuracy than existing KV retrieval methods while maintaining comparable decoding efficiency and further outperforms prior systems on long-output generation.
Contributions
It introduces a drift-aware KV cache retrieval that defines semantic windows from model attention overlap, reduces memory overhead, and provides efficient retrieval for long-context LLM inference.
Practical relevance
Enables more efficient long-context LLM inference on limited hardware.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction