GTA: Generative Trajectory Augmentation with Guidance for Offline Reinforcement Learning

Jaewoo Lee, Sujin Yun, Taeyoung Yun, Jinkyoo Park

Offline Reinforcement Learning (Offline RL) is a bit like trying to learn how to win a Grand Prix by only watching old race footage. Because you cannot go out on the track to test new maneuvers, you are stuck with whatever the previous drivers did—mistakes and all. If the dataset is mediocre, the resulting policy will likely be mediocre too.

In the paper "GTA: Generative Trajectory Augmentation with Guidance for Offline Reinforcement Learning," researchers introduce a clever way to "hallucinate" better training data. By using diffusion models to slightly tweak and improve existing trajectories, they have created a general-purpose tool that makes standard Offline RL algorithms significantly more effective.

The Challenge of Extrapolation

The fundamental challenge of Offline RL is extrapolation error. Because the agent cannot interact with the environment to verify its assumptions, it often overestimates the value (Q-value) of state-action pairs it hasn't seen before.

Traditional fixes involve adding regularization to keep the agent close to the dataset. Another approach is data augmentation, but current methods have major flaws:

  1. Noise Injection (e.g., S4RL): Simply adds Gaussian noise to states. This "smooths" the area around existing data but doesn't help the agent discover behaviors that yield higher rewards.
  2. Transition-level Synthesis (e.g., SynthER): Generates individual $(s, a, r, s')$ steps. While helpful, it often ignores the long-term temporal dependencies of a full trajectory, leading to "dynamically implausible" data—sequences of actions that do not make physical sense.
Comparison of data augmentation strategies. GTA uniquely shifts augmented data toward high-rewarding distributions.

The authors ask a critical question: Can we generate entire trajectories that are both better than the original data and physically realistic?

The GTA Approach: Trajectory-Level Augmentation

GTA (Generative Trajectory Augmentation) moves the augmentation process from the transition level to the trajectory level. The framework involves three main stages:

  1. Training a Conditional Diffusion Model: The authors train a diffusion model to generate "subtrajectories" (sequences of states, actions, and rewards) conditioned on the total return of that segment.
  2. Partial Noising and Denoising: This is the core innovation. Instead of generating data from pure noise, GTA takes a real trajectory from the dataset and adds a specific amount of noise to it (controlled by the noising ratio $\mu$). Then, it denoises this "blurry" trajectory using Amplified Return Guidance.
  3. Amplified Return Guidance: Using classifier-free guidance, the model is instructed to denoise the trajectory while aiming for a return value higher than the original (e.g., $\alpha \times \text{original return}$).
The three-stage pipeline of Generative Trajectory Augmentation (GTA).

By starting with a real trajectory, the model stays grounded in realistic physics. By aiming for a higher return, it "nudges" the trajectory toward more optimal behavior. Finally, any standard Offline RL algorithm (like CQL, IQL, or TD3+BC) can be trained on this newly augmented dataset.

Key Insights and Findings

The authors evaluated GTA across a massive range of benchmarks, including D4RL Gym Locomotion, sparse reward tasks (AntMaze), complex robotics (Adroit, FrankaKitchen), and pixel-based visual RL (VD4RL).

  • Trajectory > Transition: Generating sequences of states and actions together preserves the "flow" of the environment's dynamics much better than generating isolated steps. This leads to a lower "Dynamic MSE," meaning the generated data rarely violates the physics of the environment.
  • The Power of "Amplified" Guidance: Simply conditioning on the "maximum possible return" can be limiting if the dataset is poor. By using a multiplier ($\alpha$), GTA can push the distribution into unseen high-reward regions while maintaining plausibility.
  • Exploration vs. Exploitation: The noising ratio $\mu$ acts as a knob for exploration. A small $\mu$ keeps the data very close to the original, while a large $\mu$ allows the model to "dream" up entirely new paths.
  • Orthogonality: Because GTA is a data-preparation step, it is "orthogonal" to the RL algorithm itself. You do not have to change your favorite agent's architecture; you simply provide it with a better dataset to learn from.

Ultimately, GTA consistently outperformed baseline algorithms and previous augmentation methods. For instance, on standard locomotion tasks, GTA improved the scores of TD3+BC, CQL, and IQL by significant margins (e.g., boosting TD3+BC from an average of 76.9 to 84.6). It was also particularly effective on mixed-quality and small-scale datasets, proving its ability to extract useful information from limited or messy data.

Limitations and Future Work

While powerful, GTA has a few caveats. It does not explicitly learn a transition or reward model; if the diffusion model fails to capture the environment's physics perfectly, it could still generate "illegal" moves (though empirical violations were minimal). Additionally, training a diffusion model on millions of transitions carries a computational overhead, although this is a one-time cost during data preparation.

Future directions could explore "off-to-online" settings, where the agent starts with a GTA-augmented offline dataset and then continues to refine its policy through real-world interaction.

Summary updated

BibTeX
@inproceedings{lee2024gta,
  author = {Jaewoo Lee and Sujin Yun and Taeyoung Yun and Jinkyoo Park},
  title = {{GTA: Generative Trajectory Augmentation with Guidance for Offline Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=kZpNDbZrzy},
}
Figure