Introduction
Offline Reinforcement Learning (RL) involves training agents on fixed datasets without further environment interaction. The Decision Transformer (DT) has emerged as a powerful paradigm, framing RL as a sequence-modeling problem. By conditioning action prediction on a target "Return-to-Go" (RTG), DT leverages the strengths of Transformer architectures. However, DT fundamentally lacks a "stitching" mechanism—the ability to combine segments from different sub-optimal trajectories to form a superior path. This limitation often leads DT to mimic the sub-optimal behaviors present in the training data, even when high returns are requested.
Methodology: Trajectory Branch Generation (BG)
To address the stitching deficit, this paper introduces Diffusion-Based Trajectory Branch Generation (BG). Instead of modifying the Transformer architecture, BG augments the offline dataset with synthetic high-quality "branches" that connect sub-optimal states to high-reward outcomes.
The BG pipeline consists of three core modules:
- Trajectory Value Function (TVF): Pre-trained using expectile regression, the TVF estimates the potential future return of any given trajectory segment. It provides the "guidance" for generating better paths while remaining within the data's support to prevent over-optimism.
- Diffusion-Based Generation: Utilizing an Elucidated Diffusion Model (EDM) with a Transformer backbone, the system generates "succeeding segments" (branches). These branches are conditioned on existing trajectory data and the target returns provided by the TVF.
- Branch Filter: A temporal difference (TD) consistency check ensures that generated branches are physically plausible and maintain return continuity, filtering out unrealistic "hallucinations."
Once the dataset is expanded with these high-return branches, a standard Decision Transformer is trained on the augmented data without further architectural changes.
Experimental Results
The proposed BG+DT method was evaluated on the D4RL benchmark, encompassing navigation (Maze2d, Antmaze) and locomotion (Gym) tasks.
Navigation Tasks (Maze2d and Antmaze)
The most significant gains were observed in navigation environments where spatial "stitching" is critical. In Maze2d-medium-v1, BG+DT achieved a score of 143.60, vastly outperforming the original DT (31.7) and even specialized variants like Q-learning Decision Transformer (QDT, 13.3). In the challenging Antmaze-medium tasks, where standard sequence models often fail to reach the goal (scoring near 0), BG+DT demonstrated a breakthrough, achieving scores between 13.64 and 15.62.
Locomotion Tasks (Gym)
In standard locomotion tasks like Halfcheetah, Hopper, and Walker2d, BG+DT remained highly competitive. It frequently outperformed state-of-the-art sequence models like EDT and QDT, particularly in "Medium-Expert" and "Medium-Replay" settings, showing that data augmentation via diffusion is a robust strategy across diverse RL domains.
Conclusion and Future Work
Trajectory Branch Generation effectively solves the stitching problem for Decision Transformers by addressing it at the data level. By "hallucinating" high-return paths through value-guided diffusion, the method enables sequence models to navigate complex environments more effectively than previously possible. Future research directions include extending BG to high-dimensional, image-based environments and improving the stability of long-horizon trajectory generation.
Summary updated