MILES: modular memory that makes LLM reasoning improve as it solves more problems
MILES attaches a step-level instruction memory outside a frozen LLM so that reasoning improves on its own as problems arrive in sequence. Ruilin Tong and Dong Gong of UNSW released it on arXiv (2607.06974) on July 8, 2026, and the name stands for Modular Instruction Memory with LEarnable Selection. The central claim is that across four backbones (GPT-4.1-mini, GPT-OSS-20B, Qwen3-30B-Instruct, Qwen3-4B-Instruct) and six benchmarks (MATH-500, AIME 2024 and 2025, GPQA-Diamond, MMLU-Pro Physics and Engineering), MILES matches or beats prior memory methods while achieving a better accuracy-per-token tradeoff. ASAP summarizes the paper from the original.
Breaking the habit of solving each problem in isolation
Most test-time reasoning methods treat each problem in isolation, so whatever trick was learned on one problem vanishes when the next one arrives. Chain-of-Thought, Self-Consistency, and Tree-of-Thoughts push accuracy up by spending more compute on a single problem, yet none of them carry experience forward across a stream of problems. That waste is exactly what MILES targets. When problems come in a stream, accumulating reusable experience from earlier solutions can lift accuracy on the ones that follow.
Prior memory methods failed in two ways. One stores whole-solution templates that generalize poorly to novel problems. The other selects step-level fragments using similarity search or prompting heuristics, without optimizing that choice against final-answer correctness. MILES threads the needle: it stores step-level fragments, but trains the decision of which fragment to use against whether the final answer is right.
The memory structure: asymmetric units and a learned selector
A MILES memory unit is an asymmetric pair of a sub-goal embedding and a sub-instruction. The embedding acts as a key that signals "what situation is this," while the instruction carries the actual "then do this." Each unit also carries a learnable selection head that decides whether to pull the fragment right now. Embeddings are computed with text-embedding-3-small, and the sole evaluation metric is final-answer accuracy.
Operation splits into a coarse and a fine stage. The coarse stage expands memory and collects supervision to train the selection heads from samples the model is confident about. The fine stage then uses those trained heads to rerank coarse candidates and guide reasoning on uncertain samples. In effect, easy problems become a proxy label that teaches the selector, and hard problems draw on it. Unlike policy learning that assumes large training sets and a fixed action space, this design fits a test-time setting where memory grows incrementally and supervision is limited.
How to read the numbers: not a new high score but frontier dominance
Reading this scoreboard as a new accuracy record misses the point. When GPT-OSS-20B is already near saturation on AIME 2024 at 93.33%, MILES simply tracks Self-Consistency with no degradation. The impressive part there is the absence of collapse, not a new peak. Where headroom remains, especially on smaller open-weight backbones like GPT-OSS-20B and Qwen3-30B-Instruct, the gains are pronounced. Tellingly, under the same conditions the sample-level memory methods Buffer-of-Thoughts and Dynamic CheatSheet failed to beat even zero-shot CoT because their prompts grew too complex.
The axis that matters is accuracy plotted against token cost. On AIME 2024 and 2025, memoryless scaling methods like Self-Consistency, Tree-of-Thoughts, and rStar flatten quickly as the budget grows. MILES keeps pushing the accuracy-per-token frontier by constructing additional memory units as the budget rises. It reuses knowledge that spans problems, which per-problem scaling alone cannot capture. The source of performance shifts from "think harder" to "retrieve accumulated experience."
The most counterintuitive result: a weaker model's memory helps a stronger one
The experiment most worth revisiting is cross-model transfer. With GPT-4.1-mini as the reasoning backbone, building memory from another auxiliary model's rollouts improved over the no-auxiliary baseline, whether that auxiliary was the smaller Qwen3-4B-Instruct or Qwen3-30B-Instruct. Intuition says only a smarter model's memory should help, and the result unsettles that.
The implication is that what the memory holds is not a particular model's capability but a reusable procedure for the structure of a problem. Even a weaker model, once it extracts step-level sub-goals and sub-instructions, produces procedures that serve as a foothold for a stronger model. The cost angle is not trivial: you could mass-produce memory with a cheap model and let an expensive model merely consume it. This is an interpretation grounded in the reported accuracy gains; the paper does not pin down exactly which procedures transfer and which do not.
How it differs from RAG and long context
For practitioners, MILES separates strands of "AI memory" that often get lumped together. RAG retrieves facts from external documents and appends them; long context shoves the whole record into the window. Both decide what to include by similarity or rules. What sets MILES apart is that it learns what to retrieve by whether the final answer was correct, turning retrieval from a fixed rule into a trained decision.
That distinction offers a practical fork for teams building agents. When detailed factual recall is the crux, RAG or long context still makes sense; but for workloads that repeatedly handle the same type of reasoning problem, reusing the solution procedure pays off more. If ASAP's earlier note on [long context vs fact-based memory](/blog/agent-memory-vs-longcontext) addressed what to store, MILES steps one question deeper by learning when to retrieve what was stored.
Limits and open questions (ASAP's view)
MILES reports results on six math and academic benchmarks under a frozen-LLM assumption. Because answers are cleanly gradable there, using confident samples as label proxies worked well, but there is no evidence yet that the same self-supervision holds for open-ended tasks or long-horizon agent work. Collecting supervision from confident samples also risks propagating errors into memory when the model is confident yet wrong. And as a v1 preprint, it has not been peer reviewed. Even so, the idea of not stopping at storing memory fragments but training the decision of which to pick against correctness looks like a framing that test-time self-improvement work will keep referencing.
Source: ASAP summary of "MILES: Modular Instruction Memory with Learnable Selection for Self-Improving LLM Reasoning" (arXiv:2607.06974v1, July 8, 2026; Ruilin Tong, Dong Gong).

AI & tech,
read in depth
Beyond the headlines — into the context and the structure
AGI Soon As Possible · asapai.co.kr