一句话:提出对话式工具 CacheMind,用 RAG 与大模型对缓存访存迹做语义推理,并发布首个评测基准 CacheMindBench。
缓存替换是 CPU 微体系结构中的难题,长期依赖手工启发式,限制了性能;而缓存数据分析通常需要人工过滤数百万条访存迹(trace),既缓慢又缺乏交互性。本文提出 CacheMind,一个对话式工具,利用检索增强生成(RAG)与大语言模型对缓存迹进行语义推理:架构师可以用自然语言提问,例如“为什么与 PC X 相关的访存造成更多驱逐?”,并首次获得与程序语义挂钩、以迹为证据的可读答案。为评估该工具,作者构建了 CacheMindBench——首个面向缓存替换问题、经校验的 LLM 推理基准。使用 Sieve 检索器时,CacheMind 在 75 个未见过的迹相关问题与 25 个策略推理任务上分别达到 66.67% 与 84.80%;使用 Ranger 时分别为 89.33% 与 64.80%,且在迹相关层级的 6 类问题中有 4 类达到 100% 准确率。检索成功率方面,LlamaIndex 仅 10%,Sieve 为 60%,Ranger 为 90%,表明现有 RAG 方案不足以支撑精确、以迹为据的微体系结构推理。
Cache replacement remains a challenging problem in CPU microarchitecture, often addressed using hand-crafted heuristics that limit cache performance. Cache data analysis requires parsing millions of trace entries with manual filtering, making the process slow and non-interactive. To address this, we introduce CacheMind, a conversational tool that uses Retrieval-Augmented Generation (RAG) and Large Language Models (LLMs) to enable semantic reasoning over cache traces. Architects can now ask natural language questions like, ''Why is the memory access associated with PC X causing more evictions?'', and receive trace grounded, human-readable answers linked to program semantics for the first time. To evaluate CacheMind, we present CacheMindBench, the first verified benchmark suite for LLM-based reasoning for the cache replacement problem. Using the Sieve retriever, CacheMind achieves 66.67% on 75 unseen trace-grounded questions and 84.80% on 25 unseen policy-specific reasoning tasks; with Ranger, it achieves 89.33% and 64.80% on the same evaluations. Additionally, with Ranger, CacheMind achieves 100% accuracy on 4 out of 6 categories in the trace-grounded tier of CacheMindBench. Compared to LlamaIndex (10% retrieval success), Sieve achieves 60% and Ranger achieves 90%, demonstrating that existing RetrievalAugmented Generation (RAGs) are insufficient for precise, trace-grounded microarchitectural reasoning.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2602-12422,
title = {CacheMind: From Miss Rates to Why - Natural-Language, Trace-Grounded Reasoning for Cache Replacement},
author = {Kaushal Mhapsekar and Azam Ghanbari and Bita Aslrousta and Samira Mirbagher-Ajorpaz},
booktitle = {ASPLOS},
year = {2026},
doi = {10.1145/3779212.3790136}
}