Learning from Sparse Offline Datasets via Conservative Density Estimation

Zhepeng Cen, Zuxin Liu, Zitong Wang, Yihang Yao, Henry Lam, Ding Zhao · DOI

Abstract

Offline reinforcement learning (RL) faces significant challenges when datasets are both sparse in rewards and scarce in volume. Traditional methods often suffer from out-of-distribution (OOD) extrapolation errors or unstable importance sampling ratios. This paper introduces Conservative Density Estimation (CDE), an algorithm that applies pessimism directly to the stationary distribution space. By constraining the agent's predicted occupancy of unseen state-action pairs and utilizing a mixed proposal distribution, CDE achieves state-of-the-art performance on challenging benchmarks, demonstrating remarkable resilience to extreme data scarcity.

Introduction

Offline reinforcement learning is a critical paradigm for applying RL to real-world domains where active exploration is prohibited, such as healthcare, finance, and autonomous driving. The primary objective is to derive an optimal policy from a fixed, pre-collected dataset. However, the lack of environment interaction leads to the "deadly triad" of off-policy learning, function approximation, and bootstrapping, which often results in catastrophic OOD extrapolation errors.

Existing approaches generally fall into two categories: pessimism-based methods, which penalize value functions for unseen actions, and Distribution Correction (DICE) methods, which reweight the dataset to match a target policy. While effective in some contexts, these methods struggle when rewards are sparse or when the dataset provides low coverage of the state-action space. In these "thin" data regimes, value-based pessimism can propagate errors through iterative Bellman updates, and DICE methods can suffer from exploding importance sampling ratios.

Methodology

Pessimism in the Distribution Space

The fundamental innovation of Conservative Density Estimation (CDE) is the shift from value-based pessimism to density-based pessimism. Instead of lowering the estimated Q-values of OOD actions, CDE explicitly constrains the stationary distribution of the learned policy. The algorithm ensures that the probability of the agent occupying OOD state-action regions remains below a predefined threshold ($\epsilon$). This provides a theoretically grounded conservative occupation distribution that prevents the agent from entering regions where the data is unreliable.

Mixed Proposal Distribution

To address the instability common in DICE-style methods, CDE introduces a mixed proposal distribution. By combining the empirical dataset distribution with a uniform distribution over OOD actions, CDE ensures that the proposal distribution covers the entire action space. This modification prevents importance sampling ratios from reaching infinity, a common failure mode when the behavior policy has limited coverage.

Optimization Framework

CDE utilizes a two-step optimization process:

  1. Policy Evaluation: The algorithm solves a convex optimization problem to determine the V-values and a regularized advantage function. The convexity of this step is crucial, as it avoids the instabilities and divergence issues associated with standard Q-learning and the Bellman operator.
  2. Policy Extraction: The final policy is extracted by minimizing the KL divergence between the learned conservative distribution and a parameterized policy. This transforms policy extraction into a stable supervised learning problem.

Furthermore, CDE simplifies the hyperparameter tuning process by determining the degree of conservatism through an optimal Lagrange multiplier ($\lambda$), reducing the reliance on the manual heuristics required by algorithms like Conservative Q-Learning (CQL).

Experimental Setup

The authors evaluated CDE against several baselines, including CQL, OptiDICE, and TD3+BC, using the D4RL benchmark with modifications designed to test robustness:

  • Sparse-MuJoCo: Standard tasks (HalfCheetah, Hopper) were modified into goal-reaching tasks where rewards are only granted for top-tier performance.
  • Scarce Data Subsets: The researchers created subsets containing only 1%, 3%, 10%, and 30% of the original D4RL trajectories.
  • High-Dimensional Sparse Tasks: The Adroit and Maze2D domains were used to test performance in environments with high-dimensional states and extremely sparse reward signals.

Results and Discussion

Resilience to Data Scarcity

CDE demonstrated exceptional performance in data-scarce environments. In Maze2D, CDE maintained high success rates even when trained on only 1% of the original dataset. In contrast, the performance of baselines like OptiDICE and CQL collapsed as the data volume decreased. This suggests that CDE's density constraints are more robust than value-based penalties when the dataset is "thin."

Performance in Sparse Reward Regimes

On the Adroit "human" and "expert" tasks, which are notoriously difficult due to their sparse rewards and high dimensionality, CDE significantly outperformed existing SOTA methods. Qualitative analysis via heatmaps in Maze2D environments confirmed that CDE successfully learns to navigate toward goals while strictly avoiding OOD regions that typically trap other offline agents.

Stability and Convergence

CDE exhibited faster convergence and lower variance during training compared to Q-learning-based methods. By reframing policy evaluation as a convex problem and policy extraction as supervised learning, CDE bypasses the iterative instabilities that often plague offline RL training curves.

Conclusion

Conservative Density Estimation (CDE) represents a significant step forward for offline RL in data-constrained environments. By enforcing pessimism within the stationary distribution space and utilizing a convex optimization framework, CDE provides a stable and effective method for learning from sparse and scarce datasets. Future work may explore extending this framework to goal-conditioned RL and addressing the assumption that initial state distributions in training and testing must remain aligned.

Summary updated

BibTeX
@inproceedings{cen2024learning,
  author = {Zhepeng Cen and Zuxin Liu and Zitong Wang and Yihang Yao and Henry Lam and Ding Zhao},
  title = {{Learning from Sparse Offline Datasets via Conservative Density Estimation}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=4WM0OogPTx},
}
Figure