TL;DR
IceCache is a novel memory management strategy that enables Large Language Models (LLMs) to handle massive sequences by semantically clustering Key-Value (KV) caches. By organizing related tokens into contiguous memory pages and using a hierarchical indexing structure (DCI-tree), it maintains 99% accuracy on long-context tasks while using only a fraction of the typical GPU memory budget.
What Problem Does This Paper Address?
As LLMs move toward "infinite" context windows, they hit a physical wall: the KV-cache. To avoid recomputing every previous token during generation, LLMs store intermediate states (Keys and Values) in GPU memory. However, this cache grows linearly with sequence length. For a 100k-token prompt, the KV-cache can easily exceed the capacity of even high-end GPUs like the A100.
Existing solutions try to "offload" this cache to the much larger (but slower) CPU memory, bringing only the "important" tokens back to the GPU when needed. The challenge is two-fold:
- Imprecise Selection: Most methods pick tokens based on their original position or simple heuristics, often missing the most relevant context for complex reasoning.
- Transfer Bottlenecks: Moving individual tokens between CPU and GPU is incredibly inefficient due to PCIe overhead. It’s like trying to move a house one brick at a time instead of using a truck.
Methods
IceCache introduces a three-pronged approach to make offloading viable:
- Semantic Token Clustering: Instead of storing tokens in the order they appear (temporal order), IceCache groups them by their mathematical similarity (semantic order). It uses a DCI-tree (Dynamic Continuous Indexing)—a hierarchical data structure that clusters similar key embeddings into the same memory "pages."
- Bulk Loading: Because related tokens are clustered into the same pages, IceCache can perform "bulk transfers." When the model needs a specific piece of information, IceCache pulls the entire relevant page from the CPU. This maximizes PCIe bandwidth and significantly reduces latency.
- Pipelining: To hide the "cost" of indexing and searching the DCI-tree, the authors designed a pipelining scheme. While the GPU is busy calculating the "prefill" (initial processing) of one layer, the CPU is simultaneously indexing the previous layer’s tokens.
Datasets
The authors evaluated IceCache across several rigorous benchmarks designed for long-context and reasoning capabilities:
- LongBench: A comprehensive suite covering single/multi-document QA, summarization, and few-shot learning.
- Passkey Retrieval: A "needle-in-a-haystack" test where the model must find a specific five-digit number hidden in a 10k to 100k word context.
- GSM8K (Chain-of-Thought): A math word problem dataset used to test if the cache management breaks multi-step reasoning.
- RULER: A benchmark for testing models at extreme context lengths (up to 250k tokens).
Key Insights and Ideas
- Semantic Locality > Temporal Locality: The "aha moment" here is that for retrieval-based attention, meaning is a better organizational principle than time. By grouping tokens that "mean" similar things, you increase the "hit rate" of your memory pages.
- Hierarchical Search is Key: Using a multi-level DCI-tree allows the system to perform Approximate Nearest Neighbor (ANN) searches fast enough to keep up with the millisecond-level requirements of LLM decoding.
- The "Budget" Efficiency: IceCache demonstrates that you don't need the whole cache. With a budget of just 256 tokens (compared to thousands in a full cache), the model retains nearly all its intelligence because the right 256 tokens are being retrieved.
Key Results
- Accuracy: On LongBench, IceCache maintained 99% of the original accuracy of a full KV-cache model while using a tiny 256-token budget.
- Memory vs. Speed: In tests on an A100 GPU with 36k sequences, IceCache achieved the best trade-off between memory footprint and "Time-Per-Output-Token" (TPOT). It outperformed other retrieval-based methods like PQCache and OmniKV in both speed and memory efficiency.
- Robustness: In the Passkey Retrieval task, IceCache achieved 100% accuracy across all tested context lengths (up to 100k), whereas many eviction-based methods fail as the "needle" gets buried deeper.
- Reasoning: On GSM8K, it outperformed the strongest baseline (PQCache) by 1.2 absolute percentage points, proving that semantic clustering doesn't "confuse" the model's reasoning chain.
Limitations and Future Work
- Initial Layer Sparsity: The authors noted that the first two layers of LLMs typically don't exhibit much sparsity (meaning they attend to almost everything). Consequently, IceCache isn't applied to these layers, which still require full memory residency.
- CPU Overhead: While pipelining hides much of the latency, the DCI-tree construction is still a CPU-intensive task. In systems with very weak CPUs or limited threads, this could become a bottleneck.
- Future Directions: The authors suggest exploring even more aggressive compression within the clustered pages and extending the system to multi-node distributed inference environments.
Reference: Mao, Y., Wang, Q., Ester, M., & Li, K. (2026). IceCache: Memory-Efficient KV-cache Management for Long-Sequence LLMs. Published as a conference paper at ICLR 2026.
Summary updated