Synthesizing Fast and Accurate Immediate-Response DRAM Latency Models with Agents

Haocong Luo, Nisa Bostancı, Ataberk Olgun, Harsh Songara, Jikun Wang, Konstantinos Sgouras, Konstantinos Kanellopoulos, Andreas Kosmas Kakolyris, Onur MutluarXiv 2026

TL;DR

Simulating computer memory (DRAM) usually forces an agonizing trade-off: cycle-accurate simulators crawl at a snail's pace, while fast "immediate-response" approximations miss the intricate hardware physics that actually dictate memory delay. In this paper, researchers put LLM agents in a closed-loop laboratory to autonomously write, test, and refine readable C++ memory models from scratch. The resulting code runs up to 31.6× faster than cycle-level simulation while slashing error rates by up to 56.5× compared to existing fast models.

What Problem Does This Paper Address?

When architects design new chips, they test them inside software simulators. Modeling DRAM is notoriously tricky because memory isn't a simple bucket of bytes—it is a mechanical-feeling grid of banks and row buffers. Accessing an already-open row ("row hit") is fast; switching rows ("row conflict") is slow; and memory controllers constantly reorder requests and pause reads to flush buffered writes ("write draining").

Tracking every command cycle-by-cycle (like Ramulator 2 does) is ground-truth accurate, but it slows parallel CPU simulators down by 13–15×. To keep things moving, fast simulators use immediate-response models, which guess a memory request’s completion time the exact instant it arrives and never look back. Historically, these models relied on simplified queueing formulas or aggregate bandwidth curves that ignore where requests go in memory, leading to massive blind spots. Hand-crafting smarter, address-aware approximations for every new memory standard (DDR5, HBM4, etc.) is tedious detective work—making it a prime job for autonomous coding agents.

Methods

The authors built an automated, closed-loop development harness (built on the CHIA framework) around a cycle-accurate "oracle" pairing ChampSim (CPU) with Ramulator 2 (DRAM). Over ten iterations, an LLM agent (tested across GPT-6 Astra, Opus 5.5, DeepSeek V4.1 Flash, and Gemini 3.8 Flash) acts like a hardware engineer:

Figure 1: Workflow of our development harness. Top: six agent tools (teal) on training workloads only (no test set or web search), including Notes for in-iteration scratch notes and cross-iteration summaries (summary.md); diagnostic instruments (dashed) are optional. Bottom: one iteration of the synthesis loop ( 1 – 4 ).
  1. Develop & Diagnose: Working in C++, the agent writes an immediate-response latency predictor. Crucially, it gets diagnostic tools—notably a synthetic traffic generator and open-loop trace replay—allowing it to run controlled micro-experiments to isolate hardware quirks without web access.
  2. Dual-Metric Evaluation: Candidates are scored on both total program runtime error (core-cycle error) and individual request latency error ($\text{MAE}_{\text{Req}}$).
  3. LLM Peer Review: An independent LLM session audits the code (ensuring it doesn't cheat or hard-code workload quirks) and checks anonymous validation metrics before promoting the model and passing written lab notes (summary.md) to the next iteration.

Datasets

  • Main Synthesis & Test Suite: 52 single-core traces from the 4th Data Prefetching Championship (DPC-4)—split into 14 visible training, 14 anonymous validation, and 24 strictly hidden test workloads—spanning Google server traces, SPEC CPU2017, graph analytics (GAP, GMS, Ligra), and AI/ML models (e.g., Llama2-7B, Whisper).
  • Generalization Benchmarks: 15 workloads from PolyBench, NPB, GAP, and PARSEC for execution-driven gem5 tests, plus microbenchmarks and OpenMP kernels for parallel zsim tests. No newly invented benchmark suites were introduced, though custom synthetic traffic sweeps were heavily used for diagnostics.

Key Insights and Ideas

  • Why optimize two metrics? Error cancellation is a trap. If you only judge a model on total CPU execution time, an agent can accidentally write a buggy model where over-predicted row hits cancel out under-predicted row conflicts. Optimizing per-request accuracy ($\text{MAE}_{\text{Req}}$) alongside total cycles forces the agent to discover actual hardware mechanics.
  • Readable white-box discoveries: Instead of inscrutable neural weights, the agents wrote 191 to 783 lines of auditable C++. GPT-6 Astra invented a blazingly fast $O(1)$ clock-tracking system for banks and channels, while Opus 5.5 essentially reverse-engineered a miniature event-driven write scheduler to replay buffered writes.
  • Cheap LLMs can punch way above their weight: API costs varied by 80× across runs. DeepSeek V4.1 Flash cost just $7.98 for ten iterations yet synthesized a model with 2.3× lower core-cycle error than GPT-6 Astra ($639.03).
  • Writes are the ultimate boss fight: Ablations and synthetic sweeps proved the models nail read traffic below saturation, but buffered writes cause 33–47% of residual per-request error because an immediate-response model fundamentally cannot see future arrivals that trigger write-queue flushes.

Key Results

Every synthesized model beat every traditional analytical baseline on both accuracy metrics across the 24 hidden DDR5 test workloads:

Figure 2: Mean core-cycle error (top) and MAEReq (bottom) across the 24 single-core DDR5-4800 test workloads.
  • Accuracy vs. Speed: Opus 5.5 achieved a remarkable 0.15% mean core-cycle error and 0.063 $\text{MAE}_{\text{Req}}$—56.5× and 7.4× more accurate than the best baselines—while running 6.4× faster than the oracle. GPT-6 Astra hit 1.54% core-cycle error at a 31.6× standalone speedup.
  • Zero-Shot Generalization: Dropped unmodified into the gem5 O3CPU simulator, the models held 0.30–1.12% elapsed-time error (vs. 2.99–4.43% for baselines). On emerging LPDDR6 and HBM4 standards, new synthesis runs reached 0.04–0.58% error where baselines ballooned past 14%.
  • Parallel Simulation Boost: Inside the parallel zsim simulator, the models eliminated the serial memory bottleneck, speeding up four-core multiprogram simulations by 3.6–7.3×.

Limitations and Future Work

Because immediate-response models must commit to a latency at admission using only past state, no model under this contract can predict controller reordering caused by future requests (FR-FCFS), nor can they cleanly predict when buffered writes will stall incoming reads. Additionally, one agent (DeepSeek V4.1 Flash) hard-coded 32-bank DDR5 geometry, hurting its zero-shot transfer to 16-bank setups, and multicore evaluation exposed flaws in standard request-pairing metrics (motivating pairing-free Wasserstein distances). The authors plan to open-source their harness and models, pointing toward autonomous synthesis for other complex computer system components.

Summary updated

BibTeX
@misc{luo2026synthesizing,
  author = {Haocong Luo and Nisa Bostancı and Ataberk Olgun and Harsh Songara and Jikun Wang and Konstantinos Sgouras and Konstantinos Kanellopoulos and Andreas Kosmas Kakolyris and Onur Mutlu},
  title = {{Synthesizing Fast and Accurate Immediate-Response DRAM Latency Models with Agents}},
  year = {2026},
  eprint = {2611.38375},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.38375},
}
Figure