An Imitation Learning Approach for Cache Replacement
Evan Zheran Liu, Milad Hashemi, Kevin Swersky, Parthasarathy Ranganathan, Junwhan Ahn
Abstract
Program execution speed critically depends on increasing cache hits, as cache hits are orders of magnitude faster than misses. To increase cache hits, we focus on the problem of cache replacement: choosing which cache line to evict upon inserting a new line. This is challenging because it requires planning far ahead and currently there is no known practical solution. As a result, current replacement policies typically resort to heuristics designed for specific common access patterns, which fail on more diverse and complex access patterns. In contrast, we propose an imitation learning approach to automatically learn cache access patterns by leveraging Belady's, an oracle policy that computes the optimal eviction decision given the future cache accesses. While directly applying Belady's is infeasible since the future is unknown, we train a policy conditioned only on past accesses that accurately approximates Belady's even on diverse and complex access patterns, and call this approach Parrot. When evaluated on 13 of the most memory-intensive SPEC applications, Parrot increases cache miss rates by 20% over the current state of the art. In addition, on a large-scale web search benchmark, Parrot increases cache hit rates by 61% over a conventional LRU policy. We release a Gym environment to facilitate research in this area, as data is plentiful, and further advancements can have significant real-world impact.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 52e327fe-d04e-4a11-93cc-9bb6e0e3b4e9Cited by top-tier papers33
- Online metric algorithms with untrusted predictionsAntonios Antoniadis, Christian Coester, Marek Eliás, Adam Polak et al.ICML 2020 · 170 citations
- Pythia: A Customizable Hardware Prefetching Framework Using Online Reinforcement LearningRahul Bera, Konstantinos Kanellopoulos, Anant Nori, Taha Shahroodi et al.MICRO 2021 · 95 citations
- Decoupling Exploration and Exploitation for Meta-Reinforcement Learning without SacrificesEvan Zheran Liu, Aditi Raghunathan, Percy Liang, Chelsea FinnICML 2021 · 80 citations
- GL-Cache: Group-level learning for efficient and high-performance cachingJuncheng Yang, Ziming Mao, Yao Yue, K. V. RashmiFAST 2023 · 60 citations
- Ginex: SSD-enabled Billion-scale Graph Neural Network Training on a Single Machine via Provably Optimal In-memory CachingYeonhong Park, Sunhong Min, Jae W. LeeVLDB 2022 · 57 citations
Builds on1
Related papers
- Effective Mimicry of Belady's MIN PolicyIshan Shah, Akanksha Jain, Calvin LinHPCA 2022 · 44 citations
- CacheQuery: learning replacement policies from hardware cachesPepe Vila, Pierre Ganty, Marco Guarnieri, Boris KöpfPLDI 2020 · 38 citations
- Predicting Reuse Interval for Optimized Web Caching: An LSTM-Based Machine Learning ApproachPengcheng Li, Yixin Guo, Yongbin GuSC 2022 · 2 citations
- 3L-Cache: Low Overhead and Precise Learning-based Eviction Policy for CachesWenbin Zhou, Zhixiong Niu, Yongqiang Xiong, Juan Fang et al.FAST 2025 · 16 citations
- Robust Learning-Augmented Caching: An Experimental StudyJakub Chledowski, Adam Polak, Bartosz Szabucki, Konrad Tomasz ZolnaICML 2021 · 21 citations
