Toward Robust and Efficient ML-Based GPU Caching for Modern Inference

Peng Chen, Jiaji Zhang, Hailiang Zhao, Yirong Zhang, Jiahong Yu, Xueyan Tang, Yixuan Wang, Hao Li, Jianping Zou, Gang Xiong, Kingsum Chow, Shuibing He, Shuiguang DengarXiv 2025 · DOI

Abstract

Modern AI inference workloads, such as Deep Learning Recommendation Models (DLRMs) and Large Language Models (LLMs), are increasingly bottlenecked by GPU memory constraints. While machine learning (ML)-based caching policies offer superior performance by predicting data reuse, they often lack the robustness needed for production environments where mispredictions can lead to catastrophic performance degradation. This paper introduces LCR (Learning-based Caching with Robustness), a framework that combines a lightweight LightGBM predictor with a novel LARU (Learning-Augmented LRU) algorithm. LCR achieves significant performance gains—up to 24% in DLRM throughput and 28% in LLM latency—while providing a theoretical safety net that ensures performance never falls significantly below standard LRU, even with adversarial predictions.

The Challenge: Efficiency vs. Robustness

In modern inference, the primary bottleneck is often the limited capacity of high-bandwidth memory (HBM). DLRMs require massive embedding tables, and LLMs generate extensive KV-caches. Traditional caching policies like LRU (Least Recently Used) are robust but fail to capture the complex access patterns of these models. Conversely, "blind" ML-based policies are highly efficient when predictions are accurate but "fragile"; a sudden shift in data distribution can cause the system to follow bad predictions blindly, leading to systemic risk and performance collapse.

Conceptual trade-off between consistency (performance with good predictions) and robustness (safety with bad predictions).

The LCR Framework

LCR addresses this trade-off through three core components:

  1. The LARU Algorithm: A "Learning-Augmented LRU" that balances ML predictions with a fallback LRU policy. It uses a confidence parameter ($\lambda$) to navigate the spectrum between optimal performance (consistency) and worst-case safety (robustness).
  2. Phase-Based Error Detection: LARU monitors its own performance in real-time. By identifying "prediction-induced misses"—items evicted by the ML model that are requested again almost immediately—the system can dynamically reduce its reliance on the predictor.
  3. Lightweight Integration: To avoid competing for GPU resources, LCR utilizes LightGBM on the CPU for feature-based prediction. This ensures the caching "brain" remains efficient without impacting the primary inference task.

Mathematically, LCR is designed to be 1-consistent (matching the optimal policy with perfect predictions) and $O(k)$-robust (never performing significantly worse than LRU), with a practical time complexity of $O(\log k)$.

Evaluation and Key Results

The framework was evaluated across diverse real-world scenarios, including ad-click prediction (AD-CTR-User) and large-scale LLM serving (Aibrix-Synthetic).

  • Performance Gains: LCR improved DLRM throughput by up to 24.2% on the QB-video dataset. For LLMs like DeepSeek-R1-671B, it reduced the P99 Time-to-First-Token (TTFT) by 28.3%, significantly improving user experience.
  • Demonstrated Robustness: Stress tests involving 100% incorrect predictions confirmed that LCR's performance gracefully degrades to match LRU, whereas "blind" ML policies see their hit rates plummet.
Cost ratio vs. prediction error: LARU (blue line) maintains performance near LRU even as prediction error increases, unlike 'blind' ML policies like FPB.

Insights and Future Directions

LCR demonstrates that the "efficiency-robustness gap" can be bridged by treating misprediction as a detectable real-time event. While currently optimized for DLRMs and LLMs, the framework's principles are extensible to other GPU-intensive tasks like Graph Neural Networks (GNNs). Future work will explore incorporating richer semantic features from LLM prompts and expanding support to non-NVIDIA hardware accelerators.

Summary updated

BibTeX
@misc{chen2025toward,
  author = {Peng Chen and Jiaji Zhang and Hailiang Zhao and Yirong Zhang and Jiahong Yu and Xueyan Tang and Yixuan Wang and Hao Li and Jianping Zou and Gang Xiong and Kingsum Chow and Shuibing He and Shuiguang Deng},
  title = {{Toward Robust and Efficient ML-Based GPU Caching for Modern Inference}},
  year = {2025},
  eprint = {2509.20979},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.20979},
}
Figure