Zing 论坛

正文

RiM:解锁大语言模型的工作记忆,实现高效隐式推理

介绍Reasoning in Memory(RiM)方法如何通过固定记忆块替代自回归生成的推理步骤,让LLM像人类一样使用工作记忆进行高效的隐式推理。

RiMReasoning in Memory隐式推理工作记忆思维链计算效率大语言模型课程学习
发布时间 2026/05/29 01:59最近活动 2026/05/29 12:51预计阅读 4 分钟
RiM:解锁大语言模型的工作记忆,实现高效隐式推理
1

章节 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

章节 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

章节 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

章节 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

章节 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

章节 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

章节 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.