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

BiTrajDiff: Bidirectional Trajectory Generation with Diffusion Models for Offline Reinforcement Learning

Yunpeng Qing, Yixiao Chi, Shuo Chen, Shunyu Liu, Kexuan Zhou, Sixu Lin, Litao Liu, Changqing Zou

Introduction

Offline Reinforcement Learning (RL) offers the promise of learning effective policies from fixed, pre-collected datasets without the need for costly or dangerous real-time exploration. However, because the agent cannot interact with the environment to test new hypotheses, it is highly susceptible to out-of-distribution (OOD) errors. If an agent evaluates an action not present in the dataset, its value estimates can become wildly inaccurate.

To mitigate this, offline RL algorithms typically enforce "conservatism," constraining the learned policy to stay close to the logged data. While effective at preventing OOD errors, conservatism is a double-edged sword: the agent inherits all the biases, limitations, and gaps present in the static dataset. If a dataset contains trajectories of a robot in two separate rooms but never shows it crossing the doorway between them, a conservative agent will never learn to navigate between the rooms.

Recent Data Augmentation (DA) methods attempt to fill these gaps using generative models, such as diffusion. However, they predominantly operate under a single-rollout paradigm, generating data in a single direction (either forward from a start state or backward from a goal). This approach tends to remain trapped within the local "modes" of the original data, failing to discover the "bridges" needed to connect distinct behavior patterns.

To address this, researchers have introduced BiTrajDiff (Bidirectional Trajectory Diffusion), a novel DA framework designed to explicitly recover global trajectory-level connectivity absent from the original data.

The BiTrajDiff Framework

BiTrajDiff departs from traditional single-direction generation by decomposing trajectory synthesis into two independent but complementary processes. The framework operates in four main steps:

  1. Bidirectional Diffusion Training: Instead of training a single generative model, BiTrajDiff trains two. One model learns to generate "futures" (forward in time) starting from a given state, while the other learns to generate "pasts" (backward in time) ending at that state. Both processes are conditioned on target returns to ensure high-reward generation.
  2. Anchor-Centered Stitching: To synthesize a novel trajectory, the system selects a real state from the dataset to act as an anchor. It then generates a plausible past and a plausible future from this anchor and stitches them together. This allows the model to explore the "product space" of incoming and outgoing behaviors that were never explicitly paired in the original data.
  3. Trajectory Completion: Because the diffusion models generate only sequences of states, BiTrajDiff employs an Inverse Dynamics Model (IDM) to infer the actions taken between these states, and a Reward Model (RM) to estimate the corresponding rewards.
  4. Two-Stage Filtering: To guarantee the quality of the synthetic data, the framework applies an OOD Filter (using an Isolation Forest) to prune unphysical or "glitchy" trajectories, followed by a Greedy Filter that retains only the highest-reward sequences for training the RL agent.

Key Insights

  • Connectivity is the Bottleneck: The core insight of BiTrajDiff is that the primary limitation in offline RL is often not a sheer lack of data points, but a lack of connectivity. Agents cannot transition between well-explored regions of the state space if the "bridge" connecting them is missing.
  • Factorization over Extrapolation: By factorizing the generation problem into independent past and future segments, BiTrajDiff avoids the difficult task of "guessing" a long, complex path from scratch. It only needs to find plausible short segments that meet at a known, valid anchor state.
  • Diversity without Chaos: BiTrajDiff produces trajectories with significantly higher diversity (measured by L2 distance from the original data) than single-direction models, while maintaining high "dynamic consistency"—meaning the generated paths remain physically plausible.

Experimental Results

The framework was rigorously evaluated on the standard D4RL benchmark, encompassing locomotion (HalfCheetah, Hopper, Walker2d), navigation (Maze2d, AntMaze), manipulation (Franka Kitchen), and a custom "Two-room" toy task designed to highlight the doorway-crossing problem.

  • State-of-the-Art Performance: BiTrajDiff consistently outperformed leading DA methods, such as Synther and RTDiff, across four different offline RL backbones (IQL, TD3BC, CQL, and Decision Transformer).
  • Locomotion Gains: On D4RL locomotion tasks, the augmented data provided an average performance boost of 6-8% over the base RL algorithms.
  • Sparse Reward Mastery: The performance gains were most dramatic in complex, sparse-reward tasks where stitching disparate behaviors is essential for success. For instance, on the challenging antmaze-large-diverse task, BiTrajDiff elevated the IQL baseline score from 18.0 to an impressive 63.0.
  • Robustness: The generated data proved stable across various "n-step" TD estimators, indicating that the synthetic trajectories are of sufficiently high quality to support long-horizon value lookahead.

Limitations and Future Directions

Like all methods relying on proxy models, BiTrajDiff is susceptible to error accumulation; if the Inverse Dynamics Model or Reward Model is inaccurate, the RL agent may exploit these errors. Additionally, the framework exhibits horizon sensitivity. If the generated segments (horizon $H$) are too long, the diffusion models become less reliable, leading to performance drops. Currently, finding the optimal horizon length requires manual tuning.

Looking forward, the authors suggest extending the bidirectional stitching concept to multi-task settings, where it could facilitate the transfer of skills between different but structurally related tasks, further bridging the gaps in offline RL datasets.

Summary updated

BibTeX
@inproceedings{qing2026bitrajdiff,
  author = {Yunpeng Qing and Yixiao Chi and Shuo Chen and Shunyu Liu and Kexuan Zhou and Sixu Lin and Litao Liu and Changqing Zou},
  title = {{BiTrajDiff: Bidirectional Trajectory Generation with Diffusion Models for Offline Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=We5wZLUkF5},
}
Figure