[Paper Review] CacheMind: From Miss Rates to Why -- Natural-Language, Trace-Grounded Reasoning for Cache Replacement
CacheMind presents a conversational, retrieval-augmented system that grounds cache-replacement analysis in per-event trace slices and natural language queries, validated by a new CacheMindBench benchmark.
Cache replacement remains a challenging problem in CPU microarchitecture, often addressed using hand-crafted heuristics, limiting 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 Retrieval-Augmented Generation (RAGs) are insufficient for precise, trace-grounded microarchitectural reasoning. We provided four concrete actionable insights derived using CacheMind, wherein bypassing use case improved cache hit rate by 7.66% and speedup by 2.04%, software fix use case gives speedup of 76%, and Mockingjay replacement policy use case gives speedup of 0.7%; showing the utility of CacheMind on non-trivial queries that require a natural-language interface.
Motivation & Objective
- Motivate interactive, explainable cache-replacement analysis beyond fixed miss-rate metrics.
- Enable semantic, per-PC and per-address questioning over millions of trace events.
- Provide a verified benchmark suite to evaluate LLM-based reasoning in microarchitectural contexts.
- Demonstrate retrieval-augmented reasoning that yields trace-grounded explanations for policy and workload interactions.
Proposed method
- Introduce CacheMind, a dual retriever system (Sieve and Ranger) plus a generator LLM to produce trace-grounded explanations.
- Sieve performs symbolic-semantic filtering to extract task-specific trace slices from ChampSim traces.
- Ranger translates natural-language queries into executable retrieval code against an external trace database.
- Use Retrieval-Augmented Generation (RAG) to ground LLM outputs in retrieved trace evidence.
- Develop CacheMindBench, a 100-question benchmark spanning factual, comparative, arithmetic, and semantic reasoning over traces.

Experimental results
Research questions
- RQ1Can a conversational, trace-grounded system answer per-event, per-PC cache questions with verifiable evidence?
- RQ2How do symbolic-semantic and LLM-based retrievals compare for precision and flexibility in cache analysis?
- RQ3What is the impact of grounding LLM reasoning in trace data on accuracy and trustworthiness?
- RQ4What actionable insights can be derived for bypass prediction, software fixes, and policy design from trace-grounded reasoning?
Key findings
- CacheMind achieves 66.67% accuracy on 75 unseen trace-grounded questions and 84.80% on 25 unseen policy-specific reasoning tasks with the Sieve retriever.
- With Ranger, CacheMind reaches 89.33% and 64.80% on the same evaluations, respectively, and attains 100% accuracy in 4 of 6 trace-grounded categories.
- CacheMindBench shows 9× better retrieval accuracy than LlamaIndex in the evaluated setup.
- Across benchmarks, CacheMind provides actionable insights such as bypass-related hit-rate gains of 7.66% and IPC improvement of 2.04%, software-fix speedups of 76%, and a 0.7% speedup in a Mockingjay RDP context.
- CacheMind demonstrates that reasoning-enabled, trace-grounded analysis can outperform traditional, fixed-metric reporting for cache policy evaluation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.