Abstract
As Large Language Models (LLMs) transition toward "slow thinking" via long Chain-of-Thought (CoT) reasoning, the memory footprint of the Key-Value (KV) cache becomes a critical bottleneck. Existing KV eviction methods often rely on greedy, per-step importance scores, which lead to significant performance degradation in reasoning tasks. This paper introduces LazyEviction, a framework that leverages the "Token Importance Recurrence" (TIR) phenomenon. By employing an observation window-based lagged eviction strategy, LazyEviction reduces GPU memory usage by 50–70% while preserving reasoning accuracy across complex mathematical and scientific benchmarks.
Introduction
Modern reasoning models, such as OpenAI’s o1 or DeepSeek-R1, generate extensive intermediate tokens to solve complex problems. For a sequence of 16k tokens, the KV cache can exceed 100GB, surpassing the capacity of standard hardware. While KV cache compression is essential, standard algorithms like H2O and TOVA often fail in reasoning contexts. In tasks like mathematics or coding, a model may ignore an initial condition for hundreds of steps before suddenly requiring it to finalize a proof. Greedy eviction methods delete these "temporarily" unimportant tokens, causing catastrophic performance loss.
The Token Importance Recurrence (TIR) Phenomenon
The core insight of this work is the identification of Token Importance Recurrence (TIR). Analysis reveals that over 95% of tokens in reasoning tasks exhibit a pattern where their attention scores "spike" periodically. A token might have a low attention score for a long interval but reactivate during verification or summarization phases.
Existing state-of-the-art (SOTA) methods lose approximately 20% accuracy on reasoning tasks because they mistake a "resting" token for a useless one. However, the researchers found that the Maximum Recurrence Interval (MRI)—the longest gap between these spikes—is relatively small (under 175 tokens) for 80% of tokens, suggesting that a lagged observation window can effectively capture these patterns.
LazyEviction Framework
LazyEviction shifts from per-step greedy eviction to an Observation Window-based Lagged Eviction mechanism. Instead of immediate deletion, the system monitors tokens over a fixed window $W$ to learn their "heartbeat."
The framework utilizes two primary metrics for its eviction policy:
- Recurrence Interval Tracking: The system records each token’s MRI to predict future utility.
- MRI-Centric Scoring:
- H1-score: Predicts if a token is likely to be needed soon based on the time elapsed since its last activation relative to its MRI.
- H2-score: Prioritizes tokens with smaller MRIs, as they are more frequently recurring and critical for the reasoning chain.
By waiting for an observation window to pass, LazyEviction allows "latent" tokens to prove their utility before they are permanently removed from the cache.
Key Results
LazyEviction was evaluated using DeepSeek-R1-Distill, Qwen, and QwQ models across benchmarks including MATH-500, AIME, and GPQA Diamond.
- Memory Efficiency: The framework maintains full-cache accuracy while utilizing only 30% to 50% of the memory budget.
- Superior Reasoning Performance: On MATH-500 and AIME, LazyEviction consistently outperformed other compression methods like TOVA, H2O, and RaaS. In some cases, it slightly exceeded the Full KV baseline by filtering out "noise" tokens that did not contribute to the reasoning path.
- Scalability: While adding minor computational overhead for tracking, LazyEviction becomes more efficient than Full KV for sequences exceeding 16k tokens by preventing the linear growth of attention computation.
Conclusion
LazyEviction demonstrates that "lazy" or lagged eviction is superior to greedy strategies for long-chain reasoning. By acknowledging that token importance is recurrent rather than static, the framework provides a robust solution for deploying high-performance reasoning models on memory-constrained hardware. Future work will explore dynamically adjusting window sizes to further optimize performance across varying task characteristics.
Summary updated