Offline Trajectory Optimization for Offline Reinforcement Learning

Ziqi Zhao, Zhaochun Ren, Liu Yang, Yunsen Liang, Fajie Yuan, Pengjie Ren, Zhumin Chen, Jun Ma, Xin Xin · DOI

TL;DR

This paper introduces OTTO, a novel method for improving offline reinforcement learning (RL) by generating high-quality, long-horizon simulated trajectories. OTTO uses an ensemble of Transformers to model environment dynamics and a World Evaluator to correct potentially unreliable simulations, leading to significantly better policy performance across various benchmarks.

What Problem Does This Paper Address?

Offline reinforcement learning (RL) aims to train agents from pre-collected datasets without further interaction with the environment. This is crucial in real-world scenarios where online exploration is costly or risky (e.g., healthcare, autonomous driving). However, a major challenge is the limited generalization capability of policies trained on static datasets, often due to distributional shift. Existing methods to address this, like model-based offline RL, try to augment the dataset by generating synthetic trajectories. Yet, these methods often produce short-horizon simulations that offer only marginal improvements, or they lack mechanisms to evaluate and correct the quality of the generated data, leading to unreliable augmentations and suboptimal performance.

Methods

OTTO tackles these issues with a two-pronged approach:

  • World Transformers: The core of OTTO is an ensemble of Transformers, termed "World Transformers," used to learn a dynamics model of the environment, predicting both the next state and the reward function. This ensemble approach helps in capturing model uncertainty.
  • Long-Horizon Trajectory Generation: Instead of short rollouts, OTTO generates long-horizon trajectories by perturbing actions in the original data and using the World Transformers to simulate future states and rewards. Three strategies are proposed for selecting which trajectories to augment:
  • Random: Randomly selects start timesteps for augmentation.
  • Top-N: Selects the top N trajectories based on cumulative reward.
  • Softmax: Selects trajectories probabilistically based on their cumulative reward.
  • World Evaluator: A novel uncertainty-based evaluator is introduced. It assesses the confidence of the World Transformers' predictions. If uncertainty is high, a conservative punishment is applied to correct the generated trajectories, ensuring higher quality and reliability of the augmented data.

The augmented data is then combined with the original dataset to train an offline RL agent. OTTO is designed as a plug-in module, compatible with various model-free offline RL algorithms.

Datasets

The paper evaluates OTTO on standard benchmarks from the D4RL (Datasets for Deep Data-Driven Reinforcement Learning) suite, including:

  • Gym MuJoCo: Environments like HalfCheetah, Hopper, and Walker2d, with datasets of varying quality (Medium, Medium-Replay, Medium-Expert).
  • AntMaze: A more challenging environment with sparse rewards, requiring navigation to a goal, with different maze sizes (umaze, medium, large) and dataset types (fixed, play, diverse).

Key Insights and Ideas

  • Long-horizon simulation is key: Simply generating more data isn't enough; generating longer and higher-quality trajectories is crucial for improving generalization.
  • Uncertainty is a signal for correction: The model's uncertainty about its predictions is a valuable indicator of potential errors. By actively correcting trajectories based on this uncertainty, OTTO significantly improves data quality.
  • Ensembles for robustness: Using an ensemble of Transformers for the world model provides a more robust representation of the environment dynamics and helps in quantifying uncertainty.
  • OTTO as a general enhancer: The plug-and-play nature of OTTO allows it to boost the performance of various existing model-free offline RL algorithms, demonstrating its broad applicability.

Key Results

  • OTTO consistently improves the performance of representative model-free offline RL methods (IQL, TD3+BC, DT, CQL) across all evaluated MuJoCo and AntMaze datasets.
  • In MuJoCo tasks, OTTO-augmented algorithms often outperform strong model-based baselines like COMBO and BooT, and achieve comparable or better results than MOPO.
  • On AntMaze, a sparse-reward environment, OTTO demonstrates effectiveness in improving policy performance, highlighting its ability to handle complex scenarios.
  • The proposed trajectory generation strategies (Random, Top-N, Softmax) all improve performance, with Softmax generally achieving the best results.
  • Ablation studies confirm that both the ensemble of World Transformers and the World Evaluator are essential components for OTTO's success.

Limitations and Future Work

  • Hyperparameter sensitivity: While the paper explores hyperparameter tuning, the performance can be sensitive to choices like the augmentation ratio ($\delta$) and noise range ($\epsilon$). For instance, too large a noise range can degrade performance.
  • Computational cost: Training World Transformers and generating trajectories can be computationally intensive, though the paper proposes efficiency improvements like cyclic annealing.
  • Future Directions: The authors suggest exploring ways to further improve the World Evaluator and investigate methods for generating even larger volumes of augmented data to further enhance policy learning.

Summary updated

BibTeX
@inproceedings{zhao2025offline,
  author = {Ziqi Zhao and Zhaochun Ren and Liu Yang and Yunsen Liang and Fajie Yuan and Pengjie Ren and Zhumin Chen and Jun Ma and Xin Xin},
  title = {{Offline Trajectory Optimization for Offline Reinforcement Learning}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2025},
  doi = {10.1145/3711896.3737066},
}
Figure