Policy Regularization with Dataset Constraint for Offline Reinforcement Learning

Yuhang Ran, Yi-Chen Li, Fuxiang Zhang, Zongzhang Zhang, Yang Yu

Introduction

Offline Reinforcement Learning (RL) aims to derive optimal policies from fixed, pre-collected datasets without further environment interaction. A primary challenge in this setting is value overestimation: when an agent considers an out-of-distribution (OOD) action, the value function may erroneously assign it a high reward, leading the agent to adopt unstable or failing strategies.

To mitigate this, traditional methods employ policy regularization, constraining the learned policy to remain close to the behavior policy that generated the data. However, these constraints are typically state-conditioned, meaning the agent is restricted to actions observed at a specific state. This paper introduces Policy Regularization with Dataset Constraint (PRDC), a novel approach that allows agents to generalize by "borrowing" successful actions from similar states across the entire dataset.

The PRDC Approach

PRDC shifts the focus from state-specific constraints to a global dataset constraint. Instead of forcing the agent to match the behavior policy at a specific state $s$, PRDC minimizes the point-to-set distance between the proposed state-action pair $(s, a)$ and the entire dataset $\mathcal{D}$.

The PRDC framework: Point-to-set distance calculation using nearest neighbor search in the dataset.

Key Components

  • Dataset Constraint (DC): For any state $s$, the algorithm identifies the nearest state-action pair $(\hat{s}, \hat{a})$ in the dataset and regularizes the agent's action $a$ toward $\hat{a}$.
  • The $\beta$ Hyperparameter: This factor balances the similarity of states versus actions. A high $\beta$ mimics standard Behavioral Cloning, while a tuned $\beta$ enables smarter generalization across the state space.
  • Efficiency via KD-Trees: To maintain computational feasibility, PRDC utilizes KD-Tree structures, enabling logarithmic-time nearest-neighbor searches even in datasets with millions of points.
  • Base Architecture: PRDC is built upon TD3+BC, a minimalist baseline that combines Temporal Difference learning with a behavioral cloning term.

Experimental Evaluation

The researchers evaluated PRDC against leading offline RL algorithms (such as CQL, IQL, and SPOT) using the D4RL Benchmark and a custom Lineworld environment designed to test generalization capabilities.

The lineworld-superhard environment, where PRDC was the only method capable of learning the optimal policy.

Key Results

  • State-of-the-Art Performance: PRDC achieved the highest scores in 13 out of 18 benchmark tasks, showing particular strength in the complex AntMaze navigation tasks which require "stitching" together disparate data segments.
  • Superior Generalization: In the "Lineworld-Superhard" task, where optimal actions for specific states are missing but present in similar states, PRDC was the only method to successfully learn the optimal policy. Baselines like BEAR and TD3+BC failed because they could not look beyond state-specific records.
  • Computational Efficiency: Despite the overhead of nearest-neighbor searches, PRDC remains faster than complex pessimistic methods like CQL due to the efficiency of the KD-Tree implementation.

Insights and Future Work

PRDC provides a "softer" yet more intelligent form of conservatism. By leveraging the entire dataset, it avoids the "sub-optimal data trap" where agents are forced to replicate mediocre actions simply because they were the only ones recorded for a specific state.

While highly effective for vector-based states, future work remains to adapt PRDC for high-dimensional inputs like raw pixels, potentially through the use of learned latent representations. Additionally, exploring more sophisticated ways to aggregate multiple nearest neighbors could further refine the policy regularization process.

Summary updated

BibTeX
@inproceedings{ran2023policy,
  author = {Yuhang Ran and Yi-Chen Li and Fuxiang Zhang and Zongzhang Zhang and Yang Yu},
  title = {{Policy Regularization with Dataset Constraint for Offline Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=0vQVC7WCVq},
}
Figure