Zing Forum

Reading

RiM: Unlocking Working Memory in Large Language Models for Efficient Implicit Reasoning

This article introduces how the Reasoning in Memory (RiM) method replaces autoregressively generated reasoning steps with fixed memory blocks, enabling large language models (LLMs) to use working memory for efficient implicit reasoning just like humans.

RiMReasoning in Memory隐式推理工作记忆思维链计算效率大语言模型课程学习
Published 2026-05-29 01:59Recent activity 2026-05-29 12:51Estimated read 4 min
RiM: Unlocking Working Memory in Large Language Models for Efficient Implicit Reasoning
1

Section 01

RiM: Unlocking LLM Working Memory for Efficient Implicit Reasoning

Reasoning in Memory (RiM) is a novel approach that replaces autoregressive Chain of Thought (CoT) steps with fixed memory blocks, enabling LLMs to perform implicit reasoning like humans using working memory. It addresses key inefficiencies of CoT: high computational cost, coupling of internal reasoning and external communication, context length constraints, and training-inference inconsistency.

2

Section 02

Background: Flaws of Explicit Reasoning & Human Working Memory Inspiration

Current LLMs rely on CoT to generate explicit intermediate steps for reasoning, leading to high computational overhead, forced externalization of internal states (noise/information loss), context length limits, and training-inference mismatch. Humans use implicit working memory (short-term storage/operation without externalization) for efficient reasoning—this inspired RiM.

3

Section 03

RiM Method: Fixed Memory Blocks & Two-Stage Training

RiM uses fixed-length memory blocks (special tokens, non-generated) inserted at model layers. Training has two stages: 1) Explicit grounding (model predicts explicit reasoning steps after memory blocks to learn their meaning); 2) Implicit refinement (drop explicit supervision, model uses memory blocks for implicit reasoning to get final answers).

4

Section 04

Efficiency Advantages Over Traditional CoT

RiM processes all memory blocks in a single forward pass (vs CoT's N steps for N tokens), leading to 2-5x speedup. It reduces memory usage (no intermediate token storage) and avoids iterative autoregressive generation costs, ideal for complex tasks.

5

Section 05

Experimental Validation: Performance & Generalizability

RiM was tested on math (GSM8K, MATH), logic (StrategyQA, LogiQA), and symbol reasoning tasks. Key findings: matches/exceeds CoT performance; works across GPT/Llama architectures; scales better with model size; 2-5x faster. Ablation studies confirm memory block count (2-4 optimal), middle-layer insertion, and curriculum learning are critical.

6

Section 06

Application Prospects of RiM

RiM is suitable for real-time apps (dialogue, code completion, game AI), edge devices (lower energy/memory), and multi-round reasoning (iterative refinement, long-term planning, knowledge integration).

7

Section 07

Limitations & Future Directions

Limitations: reduced interpretability (no explicit steps), task scope constraints (less suitable for explanation-heavy tasks), heuristic memory block design, need for paired (question, reasoning chain, answer) data. Future directions: adaptive memory blocks, cross-task transfer, cognitive science integration, multi-modal extension, tool use collaboration.