Abstract
We propose a policy improvement algorithm for Reinforcement Learning (RL) which is called Rerouted Behavior Improvement (RBI). RBI is designed to take into account the evaluation errors of the Q-function. Such errors are common in RL when learning the $Q$-value from finite past experience data. Greedy policies or even constrained policy optimization algorithms which ignore these errors may suffer from an improvement penalty (i.e. a negative policy improvement). To minimize the improvement penalty, the RBI idea is to attenuate rapid policy changes of low probability actions which were less frequently sampled. This approach is shown to avoid catastrophic performance degradation and reduce regret when learning from a batch of past experience. Through a two-armed bandit with Gaussian distributed rewards example, we show that it also increases data efficiency when the optimal action has a high variance. We evaluate RBI in two tasks in the Atari Learning Environment: (1) learning from observations of multiple behavior policies and (2) iterative RL. Our results demonstrate the advantage of RBI over greedy policies and other constrained policy optimization algorithms as a safe learning approach and as a general data efficient learning algorithm.
Introduction
In Deep Reinforcement Learning (DRL), the $Q$-function serves as the primary estimator for future rewards. Standard practice dictates that agents should follow the $Q$-values to select optimal actions. However, this approach assumes that $Q$-estimates are accurate. In practice, evaluation errors—stemming from limited data or high reward variance—often lead to an "Improvement Penalty," where a policy update actually results in a performance crash. This is particularly prevalent when an agent over-commits to actions that were rarely sampled in the past, as these actions typically have the highest estimation variance.
While existing methods like Trust Region Policy Optimization (TRPO) or Proximal Policy Optimization (PPO) constrain the total statistical distance of policy updates, they do not specifically address the risk associated with low-probability actions in the behavior policy. We introduce Rerouted Behavior Improvement (RBI) to bridge this gap, providing a safer and more data-efficient mechanism for policy improvement.
Rerouted Behavior Improvement (RBI)
The core of RBI is the Reroute Constraint. Rather than limiting a global metric like KL divergence, RBI constrains the ratio of the new policy $\pi$ to the behavior policy $\beta$:
$$\pi(a|s) = c(s, a)\beta(a|s), \text{ where } c(s, a) \in [c_{min}, c_{max}]$$
This ratio constraint ensures that the agent cannot shift massive probability to an action that has not been sufficiently explored, effectively attenuating rapid changes for low-frequency actions. The workflow involves a non-parametric optimization step where the optimal policy is calculated for each state by solving a Linear Program (LP). This "Max-Reroute" step is decoupled from the neural network training; a central learner then performs KL-regression to imitate the calculated optimal behavior, avoiding the local minima and instabilities common in direct policy gradient methods.
Experimental Evaluation
Synthetic Two-Armed Bandit
To analyze the relationship between variance and the improvement penalty, we utilized a two-armed bandit environment with Gaussian distributed rewards. The results demonstrate that the error in $Q$-value estimation is proportional to $1/\sqrt{\beta(a|s)}$.
As shown in the figure above, greedy updates (grey line) suffer from significant improvement penalties when the behavior policy $\beta$ has not adequately sampled the optimal action, especially in high-variance scenarios. RBI (colored lines) significantly reduces this penalty, leading to lower regret and more stable learning.
Atari Learning Environment
RBI was further evaluated in complex environments using the Atari Learning Environment across two regimes:
- Learning from Observations: RBI outperformed Behavioral Cloning and other constrained methods (TV, PPO) in human imitation tasks. Notably, in Montezuma’s Revenge, RBI achieved a score of 2379, significantly higher than PPO's 388.
- Iterative RL: When training from scratch, RBI provided superior policies compared to the Ape-X baseline in 7 out of 11 environments and outperformed Rainbow in 9 out of 11 environments, demonstrating high data efficiency.
Conclusion
Rerouted Behavior Improvement (RBI) addresses the critical issue of evaluation errors in RL by implementing a ratio-based policy constraint. By preventing over-commitment to low-frequency actions, RBI mitigates the improvement penalty and enhances safety and efficiency. While currently focused on discrete action spaces, future work may extend these principles to continuous domains. The implementation is available at https://github.com/eladsar/rbi.
Summary updated