TL;DR
We have all experienced the frustration of blanking on an exam question only to realize afterward that we knew the relevant fact all along. Large language models suffer from a remarkably similar "tip-of-the-tongue" failure mode during complex reasoning. This paper shows how to locate a model’s internal "memory" and "reasoning" circuits—and introduces a plug-and-play, training-free nudge that helps them talk to each other at inference time.
What Problem Does This Paper Address?
Through massive pre-training, LLMs store encyclopedic amounts of factual knowledge inside their parameters. Yet when faced with multi-step reasoning problems, they frequently fail to retrieve and apply the exact facts they already know. For instance, an LLM might know the laws of thermodynamics cold, yet conclude that an ice cube dropped into hot tea will stay frozen because "ice cools things down."
Typically, engineers fix this by bolting on external search engines via Retrieval-Augmented Generation (RAG) or running expensive fine-tuning and reinforcement learning pipelines. However, RAG ignores the rich knowledge already sitting inside the model's weights, and retraining costs serious compute and curated data. The authors ask: Can we help an LLM tap into its own existing memory during reasoning without changing a single model weight?
Methods
First, the authors need to find where "memory" and "reasoning" live inside the network. Using standard gradient-based importance scoring—measuring how much each neuron contributes to predicting the final token on a memory dataset versus a reasoning dataset—they isolate the top-$K$ ($K=150$) memory-related and reasoning-related neurons across the model. Concatenating the activations of these sparse neuron sets at the prompt's final token gives a compact memory representation ($\mathbf{h}_m$) and reasoning representation ($\mathbf{h}_r$).
To measure how well these two systems align on a set of queries, they introduce Memory-to-Reasoning Alignment (MRA), which uses Singular Vector Canonical Correlation Analysis (SVCCA—a standard statistical tool for comparing the geometry of two high-dimensional spaces) to score their similarity.
To actively fix misalignment, they propose Memory-Guided Activation Injection (MGAI), which operates in two stages:
- Offline Stage: Using a small set of correctly answered queries, MGAI fits a simple linear least-squares mapping $f^*$ that translates $\mathbf{h}_m$ into an "ideal" reasoning representation $\hat{\mathbf{h}}_r$. In parallel, it trains a lightweight XGBoost classifier ("detection probe") on concatenated $[\mathbf{h}_m, \mathbf{h}_r]$ vectors to predict the probability ($p_{\text{fail}}$) that the LLM will botch a given query.
- Online Stage (Inference): For a new query, if $p_{\text{fail}} > 0.5$, MGAI calculates the gap between the memory-guided target and current reasoning state ($\Delta \mathbf{h}_r = f^*(\mathbf{h}_m) - \mathbf{h}_r$) and injects it directly into the reasoning neurons, scaled proportionally to $p_{\text{fail}}$.
Datasets
No new benchmarks are introduced. Instead, the authors use existing datasets cleanly split between calibration and evaluation:
- Offline Localization & Mapping: Small subsets of training splits from GSM8K (math reasoning) and CommonsenseQA / CSQA (factual/commonsense memory).
- Evaluation: Seven unseen reasoning benchmarks—MATH-500, AIME2024, AIME2025, GSM8K (test), AMC23, OlympiadBench (all math), and GPQA Diamond (graduate-level science)—plus CSQA and MMLU to ensure memory and general capabilities stay intact.
Key Insights and Ideas
- Reasoning failures correlate with "disconnected" memory: Across four model families, queries that LLMs answer correctly consistently show much higher MRA scores than queries they get wrong. The knowledge is present, just under-engaged.
- Memory and reasoning live in separate neighborhoods: When comparing top memory neurons against top reasoning neurons, they exhibit near-zero overlap and negative rank correlation (whereas memory and general-task neurons overlap heavily). Because these representations are well-separated, a simple linear map between them captures genuine cross-talk rather than shared background noise.
- Cross-task generalization from tiny calibration: A linear mapping learned purely from grade-school math (GSM8K) and commonsense trivia (CSQA) generalizes out-of-the-box to boost Olympiad-level math and PhD-level science (GPQA Diamond).
- "If it ain't broke, don't nudge it": Intervening blindly on every query performs worse than selective gating. Using the XGBoost probe to intervene only on failure-prone prompts is crucial for stable gains.
Key Results
Tested across five open-weight models—LLaMA3-8B-Instruct, Qwen2.5-14B-Instruct, Qwen3-4B-Instruct, Mistral-7B-v0.3, and DeepSeek-R1-Distill-Qwen-1.5B—MGAI consistently outperforms both vanilla inference and four recent training-free reasoning baselines:
- Strong reasoning jumps: Over vanilla baselines, MGAI boosts Qwen3-4B-Instruct by +10.10% on GPQA-D (56.06% $\rightarrow$ 66.16%) and +9.02% on GSM8K (70.96% $\rightarrow$ 79.98%). On LLaMA3-8B-Instruct, AMC23 jumps +10.00% (25.00% $\rightarrow$ 35.00%).
- Helps specialized reasoning models too: Even on DeepSeek-R1-Distill-Qwen-1.5B, MGAI adds +10.00% on AIME24 and +12.50% on AMC23 (62.50% $\rightarrow$ 75.00%).
- No capability tax: Performance on CSQA and MMLU holds steady or slightly improves across nearly all models (up to +3.44% on CSQA and +1.82% on MMLU).
Limitations and Future Work
- White-box access required: Because MGAI reads gradients to locate neurons and modifies internal activations during forward passes, it cannot be used on closed-source, API-only models like GPT-4 or Claude.
- Opaque gating probe: While the XGBoost detection probe accurately flags impending failures, it acts as a black box. Future work could explore more interpretable probe architectures to explain why a specific query fails to engage memory and how strongly it should be steered.
Summary updated