← Latest papers
💬 NLP

ForesightKV: Optimizing KV Cache Eviction for Reasoning Models by Learning Long-Term Contribution

ForesightKV is a training-based framework that optimizes KV cache eviction for reasoning models by combining a Golden Eviction algorithm with supervised learning and reinforcement learning (GRPO) to predict and retain the most critical KV pairs, thereby significantly reducing memory costs while maintaining high performance on long reasoning tasks.

Original authors: Zican Dong, Peiyu Liu, Junyi Li, Zhipeng Chen, Han Peng, Shuo Wang, Wayne Xin Zhao

Published 2026-02-04
📖 4 min read☕ Coffee break read

Original authors: Zican Dong, Peiyu Liu, Junyi Li, Zhipeng Chen, Han Peng, Shuo Wang, Wayne Xin Zhao

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a brilliant detective (the AI) trying to solve a very long, complex mystery. To do this, you need to keep a massive notebook of clues (the KV Cache) on your desk. As the story gets longer, your notebook grows thicker and thicker. Eventually, your desk becomes so cluttered with papers that you can't move your hands, and it takes forever to find the specific clue you need to make your next deduction. This is the problem of "memory overload" in large language models.

Traditionally, to clear the desk, people use simple rules: "Throw away the oldest papers" or "Throw away the papers with the least ink on them." But the paper ForesightKV argues that these rules are too dumb. Sometimes, an old paper or a paper with faint ink is actually the most critical clue for solving the mystery later in the story. Throwing it away causes the detective to make a mistake that ruins the rest of the investigation.

Here is how ForesightKV solves this problem, explained in three simple steps:

1. The Problem: The "One-Pass" Mistake

Imagine you are packing for a trip. A standard method might say, "Keep the last 10 items you packed, and throw away the rest." But what if the first item you packed (a map) is essential for the whole trip, even though it's far back in the suitcase?
Existing methods try to guess which clues to keep based on simple patterns (like "keep the most recent" or "keep the most popular"). The paper found that in complex reasoning (like math problems), clues have three types of personalities:

  • The Global Star: Always important, no matter what.
  • The Local Neighbor: Only important for a short time.
  • The Semantic Chameleon: This is the tricky one. A clue might seem useless now, but in 50 steps, it becomes the key to the whole puzzle. Simple rules miss these "chameleons."

2. The Solution: A "Time-Traveling" Coach

The authors created a new system called ForesightKV. Instead of using a rigid rulebook, they trained a tiny, smart assistant (a Scoring Model) to act like a coach who can see the future.

This coach doesn't just look at the clues right now; it learns to predict which clues will matter most in the future. It does this through a two-stage training process:

Stage 1: The "Golden Standard" (Supervised Learning)

First, the researchers ran the AI through a math problem without throwing anything away. They watched the AI's attention and asked: "If we had to throw away some clues right now, which ones would cause the least damage to the final answer?"
They used a method called Golden Eviction to find the perfect set of clues to keep. They then taught the tiny assistant to mimic this "perfect" decision-making process. It's like showing a student the answer key and saying, "Learn how to pick the right answers."

Stage 2: The "Real-World Simulation" (Reinforcement Learning)

However, the "perfect" answer key isn't always perfect when the AI is actually solving a problem live, because the AI's mind changes as it thinks.
So, the second stage is like a video game simulation. The assistant is told: "Go ahead and throw away some clues. If the AI makes a mistake on a specific type of word (like a number or a symbol that is easy to get wrong), you get a penalty. If the AI keeps solving correctly, you get a reward."
The assistant learns to be even smarter, realizing that keeping certain "boring" words (low-entropy tokens) is actually vital to prevent the AI from hallucinating numbers later on.

3. The Result: A Smarter, Lighter Desk

The paper tested this on three different AI models using hard math benchmarks (AIME 2024 and 2025).

  • The Claim: ForesightKV can solve these math problems just as well as the full, heavy notebook, but using only half the memory space.
  • The Analogy: It's like being able to carry a backpack that is 50% lighter, yet you still remember every single clue you need to win the game.
  • Speed: Because the backpack is lighter, the AI can think faster and handle more people at once (higher throughput).

Summary

ForesightKV is a new way to manage an AI's memory. Instead of blindly throwing away old notes, it uses a smart, trained assistant that learns to predict which notes will be crucial for the long-term solution. By combining a "perfect example" training phase with a "learn by doing" game phase, it keeps the AI fast and efficient without making it forget the important details needed to solve complex reasoning puzzles.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →