Offline Reinforcement Learning with Discrete Diffusion Skills

Ruixi Qiao, Jie Cheng, Xingyuan Dai, Yonglin Tian, Yisheng LvarXiv 2025 · DOI

Abstract

Offline Reinforcement Learning (RL) presents significant challenges in long-horizon, sparse-reward environments where identifying successful action sequences is difficult. We introduce Discrete Diffusion Skills (DDS), a hierarchical framework that replaces traditional continuous latent spaces with a compact, discrete "skill codebook." DDS employs a Transformer-based encoder to map trajectories to discrete indices and a Diffusion-based decoder to reconstruct diverse, multi-modal actions. Our approach achieves a 12% performance improvement on the AntMaze-v2 benchmark and offers enhanced interpretability by categorizing behaviors into distinct, semantic skills.

Introduction

Training agents from historical data without environment interaction is essential for safety-critical applications like robotics and autonomous driving. However, offline RL often fails in tasks with sparse rewards and long horizons. While hierarchical methods using "skills" (short action sequences) have been proposed, they typically rely on continuous latent spaces. These "black box" representations are often unstable to train and difficult for high-level policies to navigate. DDS addresses these issues by discretizing the skill space, providing intrinsic regularization and a searchable library of behaviors.

Methods

The DDS framework operates through a two-level hierarchy: a low-level skill extraction module and a high-level policy.

Skill Extraction Module

The low-level module consists of three primary components:

  1. Transformer Encoder: Maps a sequence of states and actions ($\tau$) into a latent representation.
  2. Discrete Skill Codebook: Utilizing a Vector Quantized-Variational Autoencoder (VQ-VAE) approach, the latent representation is quantized into a discrete index from a fixed codebook. This forces the model to categorize diverse behaviors into a finite set of "skills."
  3. Diffusion Decoder: To reconstruct actions from a skill index and current state, a Diffusion Probabilistic Model is used. Diffusion models are uniquely capable of capturing the multi-modal nature of expert data, allowing the agent to represent various ways to execute a single high-level skill.
The DDS architecture featuring a Transformer encoder, a discrete skill codebook, and a diffusion-based decoder for hierarchical offline RL.

High-Level Policy

Once skills are learned, the offline dataset is relabeled with skill indices. A high-level policy $\pi_\phi(s)$ is trained using Implicit Q-Learning (IQL) and Advantage Weighted Regression (AWR) to select the optimal skill index every $H$ steps. This discretization simplifies the action space for the high-level policy, facilitating more effective exploration.

Experimental Results

DDS was evaluated on the D4RL benchmark, including Gym Locomotion, Kitchen, and AntMaze-v2 tasks.

Performance on Long-Horizon Tasks

DDS demonstrated state-of-the-art performance on the AntMaze-v2 benchmark, which requires "stitching" trajectory fragments to navigate complex mazes. It achieved a 12% improvement over existing methods like IDQL and CQL. Notably, on the "Large-Diverse" maze, DDS reached a success rate of 82.6, significantly outperforming IDQL's 67.9.

Interpretability and Qualitative Analysis

The discrete nature of the skill codebook allows for direct visualization of learned behaviors. By fixing a skill index, researchers observed that specific indices correspond to distinct semantic actions, such as "moving forward" or "turning left."

Visualization of diverse trajectories generated by different discrete skills in the AntMaze environment, demonstrating the model's ability to learn distinct, interpretable behaviors.

Conclusion

Discrete Diffusion Skills (DDS) provides a robust and interpretable framework for hierarchical offline RL. By combining the representational power of Transformers and Diffusion models with a discrete codebook, DDS overcomes the limitations of continuous latent spaces in long-horizon tasks. While performance remains dependent on the quality of the offline dataset, the intrinsic regularization and simplified action space offered by DDS represent a significant step forward for complex robotic control and autonomous systems.

Summary updated

BibTeX
@misc{qiao2025offline,
  author = {Ruixi Qiao and Jie Cheng and Xingyuan Dai and Yonglin Tian and Yisheng Lv},
  title = {{Offline Reinforcement Learning with Discrete Diffusion Skills}},
  year = {2025},
  eprint = {2503.20176},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.20176},
}
Figure