BRPO: Batch Residual Policy Optimization

Sungryull Sohn, Yinlam Chow, Jayden Ooi, Ofir Nachum, Honglak Lee, Ed Chi, Craig Boutilier

Abstract

In batch reinforcement learning (RL), one often constrains a learned policy to be close to the behavior (data-generating) policy, e.g., by constraining the learned action distribution to differ from the behavior policy by some maximum degree that is the same at each state. This can cause batch RL to be overly conservative, unable to exploit large policy changes at frequently-visited, high-confidence states without risking poor performance at sparsely-visited states. To remedy this, we propose residual policies, where the allowable deviation of the learned policy is state-action-dependent. We derive a new for RL method, BRPO, which learns both the policy and allowable deviation that jointly maximize a lower bound on policy performance. We show that BRPO achieves the state-of-the-art performance in a number of tasks.

Introduction

In Batch (or Offline) Reinforcement Learning, an agent must derive a high-performing policy from a fixed dataset of previous interactions without the benefit of further exploration. The primary challenge in this setting is "distribution shift": if the learned policy selects actions that differ significantly from those in the training data, the agent's value estimates can become unreliable, often leading to catastrophic performance degradation.

To mitigate this, existing methods typically employ a "proximity constraint," forcing the learned policy to remain close to the behavior policy. However, these constraints are usually applied globally, enforcing the same level of caution across all states. This approach is often overly conservative; an agent may miss clear opportunities for improvement in well-sampled states simply to avoid risks in data-sparse regions. The core insight of this work is that confidence should be local, not global. By making the allowable policy deviation state-action dependent, an agent can aggressively optimize in familiar territory while remaining safely conservative in unknown regions.

Methodology

We propose the Residual Policy framework. Rather than learning a standalone policy, we define the target policy $\pi$ as a linear mixture: $$\pi(a|s) = (1 - \lambda(s, a)) \beta(a|s) + \lambda(s, a) \rho(a|s)$$ Where:

  • $\beta(a|s)$: The fixed behavior policy (the safe baseline).
  • $\rho(a|s)$: A learned candidate policy (the improvement).
  • $\lambda(s, a)$: A state-action-dependent confidence factor between 0 and 1.

The resulting BRPO algorithm jointly optimizes both the candidate policy $\rho$ and the confidence levels $\lambda$. This is achieved by deriving a new difference-value function that characterizes the performance gap between the new policy and the behavior policy as a value function of a "residual reward." By leveraging the structure of residual policies, we derive a lower bound on policy improvement that is tighter and less pessimistic than classic methods like Conservative Policy Improvement (CPI). The optimization process alternates between finding a closed-form solution for the candidate policy (via a relative softmax) and solving a quadratic program to determine optimal confidence levels for the current data batch.

Experimental Evaluation

BRPO was evaluated on three standard OpenAI Gym benchmarks: CartPole-v1, LunarLander-v2, and Acrobot-v1. To test the algorithm's robustness across varying data qualities, five distinct datasets were generated for each environment by adjusting the noise ($\epsilon$-greedy exploration) of the behavior policy. These ranged from nearly optimal data ($\epsilon=0.05$) to completely random data ($\epsilon=1.0$).

Key Results

BRPO achieved state-of-the-art results across nearly all tested scenarios, demonstrating superior performance and stability compared to popular baselines like BCQ, SPIBB, and KL-Regularized Q-learning.

Performance comparison of BRPO against baseline methods across various environments and behavior policy noise levels (epsilon).

As shown in the results table, BRPO remains robust even when the behavior policy is extremely poor. For example, in CartPole-v1 with high-noise data ($\epsilon=1.0$), BRPO achieved a mean return of ~369, whereas the behavior policy managed only ~22 and standard DQN failed to learn effectively. Qualitative analysis indicates that the learned $\lambda$ values correctly identify high-confidence regions, enabling larger policy updates where data is plentiful and providing theoretical safety guarantees that the new policy will perform at least as well as the behavior policy.

Limitations and Future Work

The current implementation of BRPO focuses on discrete action spaces. Extending the quadratic programming approach for $\lambda$ to continuous action spaces, such as those found in robotics, remains a primary challenge for future research. Additionally, the method assumes the behavior policy $\beta$ is known or can be accurately estimated. Future work will also focus on formal finite-sample analysis to determine the exact data requirements needed for specific levels of confidence.

Summary updated

BibTeX
@inproceedings{sohn2020brpo,
  author = {Sungryull Sohn and Yinlam Chow and Jayden Ooi and Ofir Nachum and Honglak Lee and Ed Chi and Craig Boutilier},
  title = {{BRPO: Batch Residual Policy Optimization}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.24963/ijcai.2020/391},
}
Figure