Introduction: The Disjoint Trajectory Problem
Offline Reinforcement Learning (RL) aims to derive optimal policies from fixed, pre-collected datasets without further environment interaction. The primary challenge is that the resulting policy's quality is strictly bounded by the diversity and coverage of the provided data.
A significant hurdle in this field is the disjoint trajectory problem. In many real-world datasets, high-reward trajectories may be fragmented. For instance, one path might start at the initial state $S$ but fail to reach the goal $G$, while another path might successfully reach $G$ but start from a middle state. Standard RL algorithms often fail to recognize that these two paths can be connected, leaving the agent stuck in low-reward regions.
While existing data augmentation techniques attempt to fill these gaps by extending trajectories through random rollouts, these "one-way" extensions are often aimless. DiffStitch proposes a shift from simple extension to connective stitching, creating globally optimal synthetic trajectories that bridge the gap between low-reward starts and high-reward finishes.
The DiffStitch Pipeline
DiffStitch introduces a systematic four-stage pipeline designed to generate physically plausible and high-value "bridge" data.
1. Step Estimation Module
A critical factor in stitching is determining the temporal distance between two points. If the "bridge" is too short or too long, it violates the environment's physics. DiffStitch uses a conditional generative model to "imagine" potential future states from a starting point. By comparing these imagined states to a target high-reward trajectory, the system identifies the most similar state and calculates the optimal number of time steps ($\Delta$) required for the stitch.
2. State Stitching Module
At the heart of the pipeline is a Diffusion Model. Once the start, end, and duration ($\Delta$) of the bridge are determined, the diffusion model fills in the missing intermediate states. Diffusion models are chosen for their ability to generate smooth, realistic sequences that respect the underlying distribution of the original dataset, ensuring the synthetic path follows natural movement patterns.
3. Trajectory Wrap-up Module
Generated states alone are insufficient for RL training; the agent also needs actions and rewards. DiffStitch employs an Inverse Dynamics Model to infer the actions that would transition the agent between the newly generated states. Simultaneously, a Reward Model estimates the immediate payoff for each transition, completing the synthetic trajectory.
4. Qualification Module
To ensure the reliability of the augmented data, a Qualification Module acts as a filter. It uses a forward dynamics model to check if the generated transitions are physically consistent. If the predicted next state (based on the physics model) deviates significantly from the diffusion-generated state, the trajectory is discarded as a "hallucination," preventing the agent from learning incorrect physics.
Key Insights
- Stitching vs. Extension: Treating augmentation as a "bridge-building" task is more effective than simple rollouts for helping agents escape local minima.
- Temporal Accuracy: The paper demonstrates that using a fixed stitching length is detrimental. Dynamic step estimation is essential for maintaining physical realism.
- Diffusion as a Multi-modal Prior: Diffusion models excel at capturing the complex, multi-modal nature of robotic locomotion, producing stitched paths that look like real data rather than simple linear interpolations.
Experimental Results
The authors evaluated DiffStitch using the standard D4RL benchmark, including MuJoCo locomotion tasks and the complex Adroit-pen environment.
- Performance Boost: DiffStitch consistently improved the performance of diverse RL algorithms, including one-step methods (IQL), imitation-based methods (TD3+BC), and sequence-modeling methods (Decision Transformer).
- Success in Complex Tasks: In the Adroit-pen "Human" task—characterized by high-dimensional state spaces—TD3+BC's normalized score jumped from -3.3 to 29.8 with DiffStitch augmentation.
- Robustness: The method proved particularly effective on "Medium-Replay" datasets, where the original data is most fragmented and the need for connective stitching is highest.
Conclusion
DiffStitch addresses a fundamental limitation of offline RL by transforming fragmented datasets into cohesive, high-value training resources. By leveraging the generative power of diffusion models and a rigorous qualification process, it enables agents to discover optimal paths that were previously hidden in disjoint data. Future work may explore multi-trajectory chains and more sophisticated selection strategies to further enhance the efficiency of the stitching process.
Summary updated