Manuscript Offprint

arXiv:2608.21265

Memory Augmentation Unlocks Efficient Chain-of-Thought Reasoning

Simeng Zhang, Yilong Chen, Wenyuan Zhang, Zhenyu Zhang, Yao Chen, Junyuan Shang, Tingwen Liu

Abstract

Large language models often rely on Chain-of-Thought (CoT) reasoning to solve complex tasks, but verbose reasoning traces introduce substantial inference overhead. CoT compression shortens generation, yet aggressive compression may disrupt logical coherence and degrade performance. We formalize this trade-off as the Context-Generation Substitution Law, where explicit reasoning context substitutes for part of decode-time generation. Based on this principle, we propose Memory-Augmented Compression, a training-free framework that constructs reusable reasoning memories from historical traces and retrieves them as prefill-side scaffolds. Rather than using raw demonstrations, these memories summarize reusable reasoning patterns, key constraints, and critical operations to compensate for information lost during compression. Experiments show that Memory consistently improves prompt-based Chain-of-Draft (CoD) compression across mathematical reasoning, complex reasoning, and science question answering tasks, yielding accuracy gains of 21.4, 28.0, 29.5, and 6.61 points over CoD on GSM8K, MATH, BBH, and MMLU-Sci, while achieving a 1.14–1.49×\times latency speedup over standard CoT. Memory is also compatible with token-level, reasoning-trace-level, and inference-state compression mechanisms. Further analyzes show that the gains come from relevant reasoning memories rather than simply increasing context length.

1 Introduction

Large Language Models (LLMs) exhibit strong generalization capabilities, enabling them to perform complex reasoning tasks. Chain-of-Thought (CoT) prompting (Wei et al., 2022) improves reasoning by explicitly generating intermediate steps, while recent reasoning-oriented models such as OpenAI o-series models (Jaech et al., 2024) and DeepSeek-R1 (Guo et al., 2025) further show that scaling test-time computation and producing longer reasoning traces can substantially improve performance on difficult benchmarks. However, this long-thinking paradigm comes with a significant cost: verbose reasoning traces must be generated token by token in an autoregressive manner, leading to increased decoding latency, token cost, and serving overhead (Kwon et al., 2023; Chen et al., 2026).

Figure 1: Illustration of memory-augmented compression. Explicit memory shifts part of the reasoning support to the prefill stage, improving short-CoT accuracy while preserving generation efficiency.

To mitigate the overhead of long reasoning traces, existing methods compress reasoning at different levels, including semantic-level shortening, token-level pruning or skipping, and inference-state compression (Xu et al., 2025; Xia et al., 2025; Song et al., 2026). However, these methods mainly reduce reasoning information produced or retained during generation. As compression becomes more aggressive, they may discard useful subgoals, constraints, or logical dependencies, causing accuracy degradation. This exposes a key limitation of generation-side compression: shorter reasoning traces do not necessarily preserve the support needed for problem solving. How, then, can we preserve such support without returning to long autoregressive generation?

How can we leverage the parallelism of context scaling to substitute the serial overhead of lengthy generation?

Motivated by this question, we conduct a preliminary study on the interplay between input context and generated CoT. We observe that useful reasoning context, such as abstract reasoning memories, can help preserve or improve accuracy while enabling shorter reasoning traces. Since prefill computation is more parallelizable than autoregressive decoding, this suggests that some decode-side reasoning support can be shifted to the prefill context. We formalize this observation as the Context-Generation Substitution Law in Sec. 2.3, capturing the trade-off between prefill-side reasoning context and decode-side CoT generation.

Based on the above observation, we propose Memory-Augmented Compression, a training-free memory-prefill framework for compensating information loss in compressed reasoning. The framework uses abstract reasoning memories constructed from historical traces, which capture reusable problem-solving patterns, key constraints, and critical operations. For a new query, relevant memories are retrieved and injected into the prompt as prefill-side scaffolds, allowing the model to access reusable reasoning support while generating shorter reasoning traces. The framework is not tied to a specific compression algorithm, making it compatible with various compression mechanisms, including prompting-based compression, token-level compression, and KV-cache compression.

Our contributions are:

  • We introduce the Context-Generation Substitution Law, the first formulation to characterizes the trade-off between prefill-side reasoning context and decode-time generation.
  • We propose Memory-Augmented Compression, a training-free framework that retrieves abstract reasoning memories and injects them into the prefill context to facilitate highly compressed reasoning.
  • Experiments demonstrate that the proposed method improves the accuracy-latency trade-off across domains, models, and compression mechanisms, with analyses confirming that relevant memories compensate for information lost under aggressive compression.

References (33)