Offline-to-Online Reinforcement Learning with Classifier-Free Diffusion Generation

Shuai Li (李帅), Xiao Huang, Xu Liu, Enze Zhang, Tong Yu, Shuai Li · DOI

TL;DR

This paper introduces Classifier-Free Diffusion Generation (CFDG), a novel data augmentation technique for offline-to-online Reinforcement Learning (O2O RL). CFDG leverages classifier-free diffusion to generate higher-quality synthetic data that better aligns with the online policy, significantly improving agent performance compared to existing methods.

What Problem Does This Paper Address?

Reinforcement Learning (RL) agents typically learn by interacting with an environment. However, in many real-world applications, these interactions are costly or dangerous, leading to the development of offline RL, where agents learn from pre-collected static datasets. A more recent paradigm, offline-to-online (O2O) RL, aims to leverage both offline data and limited online interactions to achieve better performance. A key challenge in O2O RL is the "distribution shift" – the difference between the data distribution in the static offline dataset and the data distribution generated by the agent's evolving policy during online fine-tuning. Existing methods for data augmentation in O2O RL, such as those using VAEs or GANs, often struggle to bridge this gap, resulting in generated data that doesn't fully align with the online policy, thus limiting performance improvements. This paper addresses this by proposing a method to generate synthetic data that is more closely aligned with the online policy, thereby enhancing the effectiveness of O2O RL.

Methods

The core of this paper is the Classifier-Free Diffusion Generation (CFDG) method. CFDG builds upon diffusion models, a class of generative models known for their high-quality sample generation. The key innovations are:

  • Classifier-Free Guidance: Instead of relying on an auxiliary classifier to guide the diffusion process (which can be complex and computationally expensive to train), CFDG uses a classifier-free approach. This technique allows the diffusion model to be conditioned on labels (in this case, distinguishing between "offline" and "online" data) without needing a separate classifier. This simplifies the training process and makes the method more adaptable.
  • Simultaneous Augmentation of Offline and Online Data: CFDG treats offline and online data as two distinct categories and uses the diffusion model to generate synthetic samples for both. This is a departure from some prior work that primarily focused on augmenting offline data. The intuition is that augmenting online data, which is already closer to the current policy, can further improve alignment and performance.
  • Data Reweighting: After generating synthetic data, CFDG employs a reweighting strategy. It prioritizes synthetic data that is more aligned with the online policy, effectively increasing its influence during agent training. This ensures that the augmented data contributes more effectively to learning the desired online behavior.

The overall process involves training a diffusion model that can generate both offline-like and online-like data, and then using this model to augment the existing datasets during the O2O RL training loop.

Datasets

The paper evaluates its method on the D4RL (Datasets for Deep Data-Driven Reinforcement Learning) benchmark, specifically using:

  • Locomotion tasks: Including environments like HalfCheetah, Hopper, and Walker2D, with various quality levels of policies.
  • AntMaze tasks: Including medium and large maze environments.

The paper also mentions experiments on the Adroit benchmark (relocate-human-v1, pen-human-v1, and door-human-v1) for further validation. No new datasets were introduced.

Key Insights and Ideas

  • The distribution shift is a critical bottleneck: The paper strongly emphasizes that the mismatch between offline and online data distributions is a primary reason why existing O2O RL methods with data augmentation don't reach their full potential.
  • Augmenting online data is surprisingly effective: Contrary to some prior assumptions, the authors found that augmenting the online data itself, not just the offline data, leads to better performance. This is because online data is inherently more aligned with the current policy.
  • Classifier-free guidance is a practical and effective simplification: By avoiding the need for a separate classifier, CFDG reduces complexity and computational overhead while still achieving strong conditional generation.
  • Treating offline and online data distinctly is key: CFDG's ability to generate and leverage both types of synthetic data separately, rather than treating them as a monolithic block, is crucial for its success.

Key Results

  • Significant performance improvements: CFDG consistently outperformed baseline O2O RL algorithms (IQL, PEX, APL) by an average of 15% on the D4RL Locomotion and AntMaze benchmarks.
  • Superiority over existing data augmentation methods: CFDG achieved better results than EDIS (an energy-guided diffusion model for offline data augmentation) and SynthER (a diffusion model for online data augmentation). For instance, on Locomotion tasks, CFDG showed a 15% improvement over previous model-based methods.
  • Improved data quality: Analysis using Jensen-Shannon (JS) divergence showed that data generated by CFDG was more closely aligned with the online policy compared to data generated by EDIS.
  • Generalization: The method demonstrated effectiveness across various tasks and algorithms, including those with different data utilization paradigms.
  • Computational cost: While CFDG introduces some computational overhead compared to base algorithms, it is considered a reasonable trade-off for the performance gains, and the authors note that diffusion model sampling is faster than prior designs.

Limitations and Future Work

  • Computational Cost: The paper acknowledges that integrating diffusion models inherently increases computational and time costs for training and sampling. Future work aims to further refine and optimize these costs.
  • Reliance on Dataset Quality: The method's ethical implications are tied to the quality and representativeness of the offline datasets. The authors suggest that future work should focus on ensuring diverse and unbiased data selection to mitigate unintended consequences.
  • High-Stakes Applications: In critical applications, over-reliance on synthetic data without thorough validation should be avoided.
  • Future Directions: The authors suggest exploring fine-tuning large pre-trained models and leveraging their generalization capabilities to synthesize new pixel-based environment data in RL.

Summary updated

BibTeX
@inproceedings{2025offline,
  author = {Shuai Li (李帅) and Xiao Huang and Xu Liu and Enze Zhang and Tong Yu and Shuai Li},
  title = {{Offline-to-Online Reinforcement Learning with Classifier-Free Diffusion Generation}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=4JbQK1qGpA},
}
Figure