Improving Generalization in Offline Reinforcement Learning via Adversarial Data Splitting

Da Wang, Lin Li, Wei Wei, Qixian Yu, Jianye Hao, Jiye LiangICML 2024

TL;DR

Generalization in offline reinforcement learning (RL) is often hampered by rigid boundaries that treat all unseen data as equally "bad." This paper introduces Adversarial Data Splitting (ADS), a meta-learning framework that simulates distribution shifts by adversarially splitting a static dataset into "hard" train and validation subsets. By forcing the model to generalize across these difficult internal splits, ADS improves performance on truly out-of-distribution (OOD) data without the need for overly pessimistic constraints.

The Problem: The "Cliff-Edge" of OOD Boundaries

Offline RL relies on static datasets collected by unknown policies. A major hurdle is the distribution shift: the learned policy might want to take actions that aren't well-represented in the training data. Standard approaches handle this by being "conservative"—either penalizing OOD actions or strictly limiting the policy to the dataset's support.

However, these rigid boundaries create a "cliff-edge" effect. Data just outside the boundary is treated with extreme pessimism, even if it's very similar to known data. This prevents the model from generalizing effectively to nearby unseen states and actions. The authors argue that we need to "loosen" these rigid demarcations to allow the model to adaptively extract knowledge from empirical data.

Methods: Adversarial Data Splitting (ADS)

The core of the paper is the ADS framework, which treats generalization as a bi-level min-max optimization problem inspired by meta-learning.

The ADS implementation involves clustering the dataset, meta-training the model, and iteratively updating the "hard" data split.

The process iterates through two main steps:

  1. Inner Loop (Minimize): The model is trained on a "train-subset" of the data to minimize its loss on a corresponding "validation-subset." This encourages the model to learn features that generalize across the split.
  2. Outer Loop (Maximize): The framework adversarially searches for the "hardest" possible split—the one with the maximum distribution shift—where the current model fails to generalize.

To make this practical for large-scale RL, the authors use a Gaussian Mixture Model (GMM) to cluster the dataset into "strata." They then use stratified sampling to ensure the train/validation splits maintain some structural similarity while still presenting a challenging distribution shift.

Key Insights

  • Simulated Shifts as a Proxy: By creating "artificial" distribution shifts within the static dataset, the model learns the process of generalization, making it more robust when it encounters real OOD actions during deployment.
  • Moving Beyond Pseudo-Values: Many offline RL methods assign arbitrary "pseudo" Q-values to OOD actions. ADS suggests that learning to generalize from the boundary data itself provides more realistic and useful estimates.
  • Stability through Adversity: Adversarially choosing the hardest split acts as a powerful regularizer. If the model can generalize in the "worst-case" internal split, it is likely to perform well across various real-world shifts.

Key Results

The authors evaluated ADS using the standard D4RL benchmark, integrating it into three popular offline RL baselines: CQL, TD3+BC, and MCQ.

  • Performance Boost: ADS consistently improved the performance of all three baselines across MuJoCo tasks (HalfCheetah, Hopper, Walker2d). For example, CQL+ADS showed significant gains in the "Hopper-Medium" task compared to vanilla CQL.
  • AntMaze Success: ADS proved particularly effective in AntMaze environments, which require long-horizon reasoning and dealing with sparse rewards. It enabled baselines that previously failed (scoring near 0) to achieve competitive scores.
  • Reduced Bias: A major advantage of ADS is its effect on Q-value estimation. While standard Conservative Q-Learning (CQL) can become overly pessimistic over time, ADS significantly reduces the absolute bias of Q-value estimations, leading to more stable and reliable policies.
Comparison of Q-value estimation bias. CQL+ADS maintains a much lower bias compared to vanilla CQL as training progresses.

Limitations and Future Work

  • Computational Cost: While the authors note the overhead is manageable, bi-level optimization is inherently more complex and resource-intensive than standard training.
  • Discrete Control: The current work focuses on continuous action spaces. Extending ADS to discrete control tasks remains an open area for future research.
  • Integration with Generative Models: Combining ADS with diffusion models—which are increasingly popular in RL for modeling data distributions—could be a promising direction for generating even more effective "synthetic" training data.

Summary updated

BibTeX
@inproceedings{wang2024improving,
  author = {Da Wang and Lin Li and Wei Wei and Qixian Yu and Jianye HAO and Jiye Liang},
  title = {{Improving Generalization in Offline Reinforcement Learning via Adversarial Data Splitting}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=CV9PiQGt0i},
}
Figure