Procedural Memory Distillation: Online Reflection for Self-Improving Language Models

Ye Liu, Srijan Bansal, Bo Pang, Yang Li, Zeyu Leo Liu, Yifei Ming, Zixuan Ke, Shafiq Joty, Semih Yavuz

TL;DR

Procedural Memory Distillation (PMD) introduces a framework that allows self-improving language models to capture and internalize cross-episode learning during training. By organizing past attempts into a structured three-level memory hierarchy, PMD acts as a training scaffold that guides a self-teacher, resulting in a significantly more capable, completely memory-free model at inference time.

What Problem Does This Paper Address?

Current reinforcement learning with verifiable rewards (RLVR) and self-distillation methods (like SDPO) treat training as a series of isolated episodes. A model attempts a problem, receives a reward or feedback, updates its weights based on that single instance, and then discards the rollout.

However, during multi-epoch training, models repeatedly encounter identical or closely related problems. Standard episode-local updates completely miss valuable cross-episode signals: Which strategies consistently pass verification? What failure modes persist across epochs? What high-level reasoning patterns recur? PMD bridges this gap by systematically preserving what the model discovers across earlier attempts and distilling it directly into the model's parameters.

Methods

PMD introduces an online, co-evolving framework where the policy and a structured memory bank improve together.

  1. Three-Level Memory Hierarchy:
  2. Experience (Level-0): Stores raw trajectories, rewards, and verifier feedback on a per-problem basis.
  3. Insight (Level-1): Uses contrastive self-reflection to summarize successful strategies and failed lessons per problem, identifying what differentiates correct from incorrect reasoning.
  4. Behavior (Level-2): Clusters related problems globally and abstracts insights into reusable, high-level reasoning instructions.
  5. Co-Evolution Loop: The central design principle is joint adaptation. The current policy generates rollouts to refresh the memory, and the updated memory conditions a self-teacher that provides richer, context-aware supervision to train the next iteration of the policy.
  6. Memory-Free Inference: Crucially, memory is only used during training. Through self-distillation, the student model gradually internalizes this procedural knowledge into its weights, meaning it reasons natively at deployment without any external memory dependencies or retrieval overhead.
Figure 1: Overview of Procedural Memory Distillation (PMD). (1) The student makes repeated attempts and receives verifier feedback. (2) Self-reflection summarizes successes and failures into online memory. (3) The teacher retrieves relevant memory in the form of experience, insight, and behaviors to provide memory-conditioned supervision. (4) This guidance is distilled into the updated student for the next epoch. The bottom row shows the memory hierarchy, from raw trajectories to increasingly abstract and reusable procedural knowledge.

Datasets

The authors evaluated PMD across two challenging, verifiable domains:

  • SCIKNOWEVAL: A multi-level scientific reasoning benchmark covering biology, chemistry, physics, and materials science using multiple-choice questions.
  • LIVECODEBENCH: A contamination-aware code-generation benchmark evaluated using execution-based unit-test feedback.

Key Insights and Ideas

  • Co-Evolution is Critical: Freezing either the memory or the policy during training causes a performance drop of over 10%. The memory bank must evolve alongside the learner; otherwise, the teacher signal becomes stale and misaligned with the model's current strengths and weaknesses.
  • The Fidelity-Transfer Trade-off: Raw experience is highly faithful but too local and verbose to guide learning effectively. Global behaviors transfer broadly but can become too coarse. Level-1 "insights" strike the perfect middle ground by retaining compact, problem-grounded lessons.
  • Mitigating Mode Collapse: Standard self-distillation methods often suffer from early saturation and mode collapse during test-time compute scaling (e.g., generating multiple rollouts for majority voting). PMD preserves answer-space coverage and diversity, allowing test-time scaling methods (like best-of-N or verifier reranking) to remain highly effective.

Key Results

Evaluated on Qwen3-8B and OLMo3-Instruct-7B, PMD demonstrated substantial improvements over standard self-distillation (SDPO):

  • SciKnowEval: PMD achieved absolute accuracy gains of 3.8% to 5.5% over SDPO.
  • LiveCodeBench: PMD delivered relative performance boosts of 7.9% to 13.6%.
  • Test-Time Scaling: PMD opened up a 2–4× wider verifier headroom compared to SDPO, proving that it retains a much more diverse and high-quality pool of candidate answers for downstream reranking.
Table 2: Main results on SCIKNOWEVAL and LiveCodeBench. We compare PMD with the base policy, GRPO, and SDPO. All experiments use thinking-mode disabled (think-off). SCIKNOWEVAL reports avg@16, where each rollout is scored as correct if the extracted answer letter matches the ground truth. LiveCodeBench reports score@4 with sparse unit-test rewards, where a rollout receives score 1.0 only if all unit tests pass. SCIKNOWEVAL AVG is the mean over biology, chemistry, physics, and materials. Best results are shown in bold.

Limitations and Future Work

  • Fixed Task Distributions: PMD currently relies on repeated training over a fixed set of problems across epochs to build its problem-local experience and insights.
  • Narrower Evaluation Scope: While highly effective for science and coding, PMD has not yet been tested in truly open-ended, long-horizon agentic environments where tasks are completely heterogeneous and memories must transfer across entirely distinct domains.

The authors note that extending PMD to broader cross-task behavior retrieval and validating it on complex agent benchmarks are vital next steps.

Summary updated

BibTeX
@inproceedings{liu2026procedural,
  author = {Ye Liu and Srijan Bansal and Bo Pang and Yang Li and Zeyu Leo Liu and Yifei Ming and Zixuan Ke and Shafiq Joty and Semih Yavuz},
  title = {{Procedural Memory Distillation: Online Reflection for Self-Improving Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=yghv7C3L8K},
}
Figure