MemOPD Improves Long-Horizon Agent Learning with Memory Alignment

Zhiyuan Liu, Tinghong Ye, Chenghao Liu, Yizhuo Li, Songfang Huang· August 10, 2026 View original

Key takeaways

  • Long-horizon agents struggle with accumulating context, impacting performance.
  • MemOPD uses memory-aligned on-policy distillation to provide accurate teacher supervision.
  • It reconstructs original states for teacher scoring, preventing misalignment issues.
  • MemOPD significantly improves agent performance and training speed for complex tasks.

Who benefits

RoboticsGamingAutonomous SystemsCustomer Service (AI agents)Logistics

Summary

MemOPD (Memory-Aligned On-Policy Distillation) is a new method for training long-horizon agents that addresses performance and stability issues caused by accumulating contexts. It uses on-policy distillation with a novel memory state alignment technique to provide dense teacher supervision for memory updates.

Training AI agents for long-horizon tasks often leads to performance degradation and instability as the agent accumulates vast amounts of context over time. While compact memory mechanisms can compress and rewrite historical data, learning what information to retain is challenging, especially with sparse task rewards. On-policy distillation (OPD) offers a solution by providing dense supervision from a teacher model during student rollouts.However, a critical issue arises in standard OPD when memory compression is involved: the teacher model might evaluate an action under a state that the student never actually experienced during its rollout, due to context rewriting. This "state misalignment" invalidates the teacher's supervision. To overcome this, researchers developed Memory-Aligned On-Policy Distillation (MemOPD).MemOPD meticulously records the inputs and outputs of each model invocation, then reconstructs the original token positions and causal visibility. This allows for efficient and accurate teacher scoring under the exact state the student encountered. The teacher provides full-vocabulary supervision for sampled actions, while Proximal Policy Optimization (PPO) maintains the overall task objective. Experiments show MemOPD significantly improves performance, particularly on F1 scores, and offers substantial speedups in actor computation during training.

Why it matters

This research provides a more effective way to train AI agents for complex, multi-step tasks, leading to more stable and higher-performing long-horizon agents.

How to implement this in your domain

  1. 1Investigate MemOPD for developing AI agents that operate over extended periods or require complex memory management.
  2. 2Apply memory-aligned distillation techniques to improve the training efficiency and performance of existing reinforcement learning agents.
  3. 3Benchmark MemOPD against current PPO-based or other distillation methods for long-horizon tasks.
  4. 4Explore how this approach can be adapted for agents in interactive environments requiring continuous context updates.

Original post by Zhiyuan Liu, Tinghong Ye, Chenghao Liu, Yizhuo Li, Songfang Huang

"arXiv:2608.07068v1 Announce Type: new Abstract: Long-horizon agents accumulate growing contexts during interaction, impairing performance and stability. Compact memory mitigates this problem by compressing and rewriting the history retained between model invocations. Learning wha…"

View on X

Originally posted by Zhiyuan Liu, Tinghong Ye, Chenghao Liu, Yizhuo Li, Songfang Huang on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses