Supported Policy Optimization for Offline Reinforcement Learning

Jialong Wu, Haixu Wu, Zihan Qiu, Jianmin Wang, Mingsheng Long

Offline Reinforcement Learning (RL) is the "holy grail" for many industrial applications—it promises the ability to learn optimal behaviors from fixed, logged datasets without the risk or expense of real-world trial and error. However, the field is plagued by extrapolation error: if an agent tries an action it hasn't seen before, the value function (Q-function) often provides a wildly optimistic, incorrect estimate, leading the agent to failure.

In their paper, "Supported Policy Optimization for Offline Reinforcement Learning," researchers from Tsinghua University introduce SPOT, a simple yet powerful method that keeps agents "within the lines" of their training data without sacrificing speed or flexibility.

TL;DR

SPOT (Supported Policy OpTimization) is a non-intrusive offline RL algorithm that uses a VAE-based density estimator to explicitly constrain the learned policy to the "support" of the behavior data. It achieves state-of-the-art performance on standard benchmarks while maintaining the inference speed of online RL methods and enabling seamless online fine-tuning.

What Problem Does This Paper Address?

To prevent extrapolation error, offline RL algorithms must ensure the learned policy doesn't stray too far from the behavior policy (the one that collected the data). Existing methods generally fall into two camps:

  1. Parameterization Methods (e.g., BCQ): These "intrusively" change the policy architecture, often forcing the agent to sample actions from a generative model. This makes them slow at inference time and difficult to tune.
  2. Regularization Methods (e.g., BEAR, BRAC): These add a penalty to the loss function based on the divergence (like KL-divergence) between the learned and behavior policies. While "pluggable," these measures are often an indirect proxy for the data's actual distribution, sometimes failing to block out-of-distribution (OOD) actions effectively.

The authors argue that we need a method that is both explicit (directly using the density of the behavior data) and pluggable (easy to add to existing off-policy algorithms like TD3).

Table 1: Comparison among policy constraint methods.

Methods

The core of SPOT is a new regularization term derived from the theoretical definition of a support constraint.

  • Density Estimation: SPOT first trains a Conditional Variational Autoencoder (CVAE) to model the behavior policy $\pi_\beta(a|s)$ found in the dataset.
  • The SPOT Loss: Instead of complex architectural changes, SPOT simply adds a log-likelihood penalty to the standard actor loss: $$J_\pi(\phi) = \mathbb{E}_{s \sim \mathcal{D}} [-Q_\theta(s, \pi_\phi(s)) - \lambda \log \pi_\beta(\pi_\phi(s)|s)]$$ Here, $\lambda$ is a hyperparameter that controls how strictly the agent must stick to the "supported" actions (actions the behavior policy would likely take).

  • Implementation: The authors use the Evidence Lower Bound (ELBO) from the VAE as a practical proxy for the log-density. This allows SPOT to be "plugged" into a standard TD3 agent with minimal code changes.

Datasets

The authors evaluated SPOT on the D4RL benchmark, the industry standard for offline RL:

  • Gym-MuJoCo: Locomotion tasks (HalfCheetah, Hopper, Walker2d) with varying data quality (Medium, Medium-Replay, Medium-Expert).
  • AntMaze: Challenging navigation tasks that require "stitching" together sub-optimal paths to reach a goal.

Key Insights and Ideas

  • The "Upper Envelope" Advantage: By varying the constraint strength $\lambda$, the authors showed that SPOT consistently achieves the best performance tradeoff compared to other methods. It effectively forms the "upper envelope" of possible performance across different levels of conservatism.
  • Direct vs. Indirect Constraints: The paper demonstrates that divergence-based methods (like BEAR) often provide a "loose" constraint that still allows the agent to query OOD actions. By using explicit density, SPOT is much more surgical in its protection.
  • Inference Efficiency: Because SPOT only uses the VAE during training, the final policy is just a standard neural network. This makes it significantly faster than parameterization methods that require sampling from a generative model during every step of execution.
Figure 1: Analysis on constraint strength: (a) With varying values of the coefficient λ, SPOT applies support constraint with different strength, which is demonstrated by the behavior density of actions taken by the learned policy: log πβ(πφ(s)|s), s ∼D. (b) When evaluating the performance at varying levels of constraint strength, SPOT takes shape of the “upper envelope” of all methods, showing that SPOT can always achieve the strongest performance among extensive policy constraint methods. Constraint strength is captured approximately by the 5th-percentile of the distribution log πβ(πφ(s)|s), s ∼D. Extended results can be found in Appendix C.4.

Key Results

  • State-of-the-Art Performance: SPOT achieved a total score of 773.0 across Gym-MuJoCo tasks, significantly outperforming IQL (692.4) and CQL (698.5).
  • AntMaze Success: SPOT is the first "pluggable" method to train successfully on the difficult AntMaze domains, which were previously dominated by more complex, specialized algorithms.
  • Speed: SPOT is more than 2x faster at inference than BCQ, making it viable for real-time robotics applications.
  • Online Fine-tuning: Because SPOT is built on a standard off-policy architecture, it can transition from offline pre-training to online learning seamlessly. In AntMaze-Large, online fine-tuning improved the score from 44.0 to 90.8.
Runtime comparison showing SPOT's efficiency compared to parameterization methods.

Limitations and Future Work

  • Generative Model Dependency: SPOT’s effectiveness is tied to the accuracy of its density estimator. If the VAE fails to capture a highly complex or multi-modal behavior policy, the constraint may be inaccurate.
  • Hyperparameter Sensitivity: Like most offline RL methods, SPOT relies on tuning the $\lambda$ parameter. The authors suggest that future work could focus on auto-tuning this value or using more advanced generative models like Diffusion Models to improve density estimation.
  • Online Evaluation: The current protocol still relies on a small amount of online evaluation to select the best hyperparameters, which may not always be possible in strictly offline real-world scenarios.

Summary updated

BibTeX
@inproceedings{wu2022supported,
  author = {Jialong Wu and Haixu Wu and Zihan Qiu and Jianmin Wang and Mingsheng Long},
  title = {{Supported Policy Optimization for Offline Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=wEMOjNBTno},
}
Figure