NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Diffusion Model is an Effective Planner and Data Synthesizer for Multi-Task Reinforcement Learning

Haoran He, Chenjia Bai, Kang Xu, Zhuoran Yang, Weinan Zhang, Dong Wang, Bin Zhao, Xuelong Li

Introduction

Reinforcement Learning (RL) has traditionally excelled at producing specialist agents capable of mastering specific, isolated tasks. However, the development of "generalist agents"—capable of performing across hundreds of diverse environments—remains a significant challenge. Unlike Large Language Models (LLMs) that generalize across linguistic tasks, RL agents often struggle with multi-task learning, particularly in offline settings where training data is frequently multimodal, inconsistent, and varying in quality.

This paper introduces MTDIFF (Multi-Task Diffusion Model), a unified generative framework designed to address these challenges. By leveraging the expressive power of diffusion models and the architectural strengths of Transformers, MTDIFF serves a dual purpose: it acts as a high-performance planner and a sophisticated data synthesizer for multi-task RL.

Methodology

MTDIFF treats reinforcement learning as a conditional generative modeling problem. Rather than learning a standard policy function, the model learns to generate trajectories by denoising Gaussian noise, conditioned on specific task requirements.

Two Specialized Variants

  1. MTDIFF-P (Planning): This variant focuses on direct action. Given the current state, a target return, and a task prompt, MTDIFF-P generates optimal future action sequences. By modeling the entire distribution of successful trajectories, it can navigate complex, multimodal action spaces that often cause standard RL algorithms to fail.
  2. MTDIFF-S (Synthesis): This variant is designed for data augmentation. It generates full transitions, including states, actions, rewards, and next states. This synthetic data can be used to "boost" the performance of other offline RL algorithms, effectively filling gaps in low-quality or sparse datasets.

Technical Innovations

  • Transformer Backbone: While many diffusion models in RL utilize U-Net architectures, MTDIFF employs a GPT-2 (Transformer) backbone. This choice allows the model to better capture long-range dependencies and the intricate relationships between different modalities (states, actions, and rewards) by treating them as sequences of tokens.
  • Prompt-Based Conditioning: To avoid the limitations of rigid one-hot task identifiers, MTDIFF utilizes trajectory snippets as "prompts." These prompts provide the model with the semantic context of a task, enabling few-shot adaptation and generalization to unseen environments without further parameter tuning.

Experimental Evaluation

The authors evaluated MTDIFF across two rigorous benchmarks: Meta-World (MT50-rand), featuring 50 distinct robotic manipulation tasks, and Maze2D, a navigation benchmark testing spatial reasoning.

Key Results

  • Superior Planning: MTDIFF-P achieved a success rate of approximately 60% on Meta-World, significantly outperforming existing state-of-the-art methods like PromptDT. Its performance even rivaled some online RL methods, despite MTDIFF being restricted to offline data.
  • Data Augmentation Efficacy: MTDIFF-S demonstrated a remarkable ability to improve other algorithms. When standard offline RL algorithms (such as TD3-BC) were trained on datasets augmented by MTDIFF-S, they saw massive performance gains—notably a 131% increase in the "hand-insert" task and a 180% increase in "box-close."
  • Zero-Shot Generalization: In Maze2D tests, MTDIFF-P successfully navigated entirely new map layouts. By observing a single demonstration, the model could infer the underlying logic of the task, proving it had learned generalizable concepts rather than simple path memorization.

Discussion and Insights

The success of MTDIFF highlights several critical insights into the future of multi-task RL:

  1. Handling Multimodality: Diffusion models are uniquely suited for multi-task environments because they can model distributions with multiple "peaks." This prevents the model from "averaging" different task behaviors, which typically leads to suboptimal performance in traditional RL.
  2. Knowledge Sharing: Training on a diverse array of tasks simultaneously allows the model to borrow structural knowledge from related tasks. This implicit knowledge sharing is what enables the model to synthesize high-quality data even for tasks where the original training data was poor.
  3. The Scaling Potential: By treating RL through the lens of sequence modeling and prompting, MTDIFF brings RL closer to the paradigm of LLMs. This suggests that as datasets and models scale, we may see the emergence of even more sophisticated generalist capabilities.

Limitations

Despite its performance, MTDIFF faces a significant hurdle in inference speed. Generating a single action sequence takes approximately 1.9 seconds on an RTX 3090. This latency makes the current iteration unsuitable for real-time, high-frequency robotic control. Future work will likely focus on integrating faster sampling techniques, such as DPM-solvers or consistency models, to bridge this gap.

Conclusion

MTDIFF represents a significant step toward generalist RL agents. By unifying planning and data synthesis within a single diffusion-based framework, it demonstrates that generative models can not only master a wide array of existing tasks but also provide the synthetic foundations necessary to train the next generation of RL agents.

Summary updated

BibTeX
@inproceedings{he2023diffusion,
  author = {Haoran He and Chenjia Bai and Kang Xu and Zhuoran Yang and Weinan Zhang and Dong Wang and Bin Zhao and Xuelong Li},
  title = {{Diffusion Model is an Effective Planner and Data Synthesizer for Multi-Task Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=fAdMly4ki5},
}
Figure