CACHEFORGE: LLM-Guided End-to-End Generative Cache Replacement Policy for Performance and Hardware Efficiency

📄 arXiv: 2610.07668v1 📥 PDF

作者: Kaushal Mhapsekar, Bita Aslrousta, Brijesh Kumar Bhayana, Paula Contreras, Azam Ghanbari, Ethan Goodman, Anna Andriiko, Samira Mirbagher Ajorpaz

分类: cs.AR, cs.AI, cs.LG

发布日期: 2026-10-06


💡 一句话要点

提出CACHEFORGE以解决缓存替换策略性能与硬件效率问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 缓存替换 性能优化 硬件效率 大型语言模型 动态工作负载 自动化设计 机器学习

📋 核心要点

  1. 现有缓存替换方法依赖于固定结构和启发式预测,导致性能提升停滞,无法适应动态工作负载。
  2. CACHEFORGE通过将大型语言模型嵌入硬件感知的闭环中,自动生成和评估新的缓存替换逻辑,探索算法变换。
  3. 在SPEC CPU2006基准测试中,CACHEFORGE的总命中率提升了27.36%,在内存密集型工作负载中IPC提升了10.15%。

📝 摘要(中文)

现代缓存替换设计因固定的表示结构和手工特征工程的预测器而饱和,无法自主生成新决策逻辑。CACHEFORGE是首个通过嵌入大型语言模型的闭环框架,进化缓存替换策略。该框架在每次迭代中生成新的C++替换逻辑,并通过模拟器进行评估,同时确保可行性。实验结果显示,CACHEFORGE在SPEC CPU2006上显著优于所有基线方法,提升了命中率和IPC,展示了其在动态工作负载下的优势。

🔬 方法详解

问题定义:论文旨在解决现有缓存替换策略在动态工作负载下的性能瓶颈,现有方法往往依赖于固定的启发式和参数调优,导致无法适应变化的访问模式。

核心思路:CACHEFORGE的核心思路是通过嵌入大型语言模型(LLM),在一个硬件感知的闭环中自动生成和优化缓存替换策略,从而探索更广泛的设计空间。

技术框架:该框架包括多个模块:首先,LLM生成新的C++替换逻辑;然后,使用基于跟踪的CRC-2 ChampSim模拟器评估该策略;最后,通过奖励塑形、结构检查、动态变异、温度调度和跨策略交叉确保生成策略的可行性。

关键创新:CACHEFORGE的创新在于其闭环生成-进化机制,能够在硬件约束下发现紧凑的替换策略,超越了传统方法的固定预测结构。

关键设计:在设计中,采用了奖励塑形来引导策略优化,动态变异和温度调度用于调整生成策略的多样性,确保生成的替换逻辑在实际硬件上可行。具体的参数设置和损失函数设计在论文中进行了详细讨论。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

CACHEFORGE在SPEC CPU2006基准测试中表现优异,提升了总命中率27.36%,在内存密集型工作负载中IPC提升10.15%。与传统基线方法相比,CACHEFORGE展示了显著的性能改进,证明了其在动态工作负载下的有效性。

🎯 应用场景

CACHEFORGE的研究成果在高性能计算、数据中心和嵌入式系统等领域具有广泛的应用潜力。通过优化缓存替换策略,可以显著提升系统性能和资源利用率,降低能耗,满足日益增长的计算需求。未来,该方法还可以扩展到其他硬件优化领域,推动智能硬件的发展。

📄 摘要(原文)

Modern cache replacement designs saturate because they operate within fixed representational structures, hand-crafted and heuristic based feature-engineered predictors, or offline imitation models that cannot generate new decision logic on their own. At the same time, replacement is shaped by the causal interaction of prefetching, thrashing, spatial locality, and access-type behavior, producing an enormous design space that is difficult to traverse manually. Prior approaches typically rely on heuristics, parameter tuning, or imitation of an offline optimal policy, capturing correlations rather than synthesizing new mechanisms. As a result, their performance gains often plateau and they overfit under dynamic workload conditions. CACHEFORGE is the first framework to evolve cache-replacement policies end-to-end by embedding a large language model inside a governed hardware-aware loop. In each iteration, the LLM proposes new C++ replacement logic, the policy is evaluated under a trace-based CRC-2 ChampSim simulator, and the framework enforces feasibility through reward shaping, structural checks, dynamic mutation, temperature scheduling, and cross-policy crossover. This closed-loop generation-evolution loop specifically designed for cache replacement policy enables the discovery of compact policies that satisfy hardware constraints while exploring algorithmic transformations beyond fixed predictor structures. Across SPEC CPU2006, CACHEFORGE outperforms all CRC-2 baselines. It improves the total hit rate by 27.36%, 19.69%, 13.72%, 13.15%, 11.83%, and 5.73% over MPPPB, ReD, Hawk-eye, SHiP++, LIME, and LRU, respectively. On memory-intensive workloads, it increases IPC by 10.15%, 7.89%, 6.34%, 3.64%, 3.12%, and 2.71% over LRU, MPPPB, LIME, ReD, SHiP++, and Hawkeye.