Introduction
In batch off-policy reinforcement learning (RL), the objective is to derive an optimal policy from a fixed dataset previously collected by a behavior policy. This is common in domains like healthcare or industrial control where online exploration is risky or impossible. However, standard approaches like Off-Policy Actor-Critic (Off-PAC) suffer from a fundamental flaw: they correct for action distribution differences via importance sampling but ignore the "state distribution mismatch." Because a new target policy visits states at different frequencies than the behavior policy, ignoring this shift introduces significant bias, often leading to suboptimal convergence.
This paper introduces OPPOSD (Off-Policy Policy Optimization with State Distribution Correction), a novel algorithm designed to address this mismatch by explicitly estimating and incorporating a state-density ratio into the policy gradient.
Methodology
State Distribution Correction
The core innovation of OPPOSD is the introduction of a state-density ratio estimator, $w(s) = d^\pi(s) / d^\mu(s)$, where $d^\pi$ is the stationary state distribution of the target policy and $d^\mu$ is that of the behavior policy. By re-weighting gradients with this ratio, the algorithm ensures that the updates reflect the states the agent will visit under the new policy, rather than just those it did visit in the historical data.
Theoretical Framework
To handle the "coverage" problem—where the behavior policy may not have explored certain regions of the state space—the authors theoretically construct an augmented MDP featuring an absorbing "dead" state. This allows for a safe, pessimistic gradient estimator. To calculate the ratio $w$ without requiring a model of the environment's transitions, the authors utilize a min-max optimization approach within a Reproducing Kernel Hilbert Space (RKHS).
Actor-Critic Integration
OPPOSD is implemented within an actor-critic framework. To ensure stability during the early stages of training, the networks are "warm-started" using behavior cloning, which encourages the initial policy to mimic the data-collection policy before optimizing for higher rewards.
Experimental Evaluation
The researchers evaluated OPPOSD against several strong baselines, including Off-PAC, SAC (Soft Actor-Critic), and ACER (Actor-Critic with Experience Replay), across two distinct environments.
CartPole-v0 Benchmark
In the classic CartPole environment, the agent was tasked with learning from a dataset collected by a uniformly random policy. This is a challenging scenario because the random policy rarely maintains balance, meaning the "good" states are sparsely represented in the data.
As shown in the results, OPPOSD successfully navigated this mismatch, achieving near-optimal rewards (~200). In contrast, Off-PAC plateaued significantly lower, demonstrating that action-only correction is insufficient when the state distributions diverge sharply.
HIV Treatment Simulation
The algorithm was also tested on a high-fidelity 6D model of HIV viral dynamics. This represents a critical real-world application where learning must be done entirely from existing clinical-style logs.
In this complex environment, OPPOSD found a treatment policy that significantly outperformed the behavior policy. Other methods, including SAC and ACER, struggled to improve upon the baseline data in this strictly batch setting, highlighting the necessity of state distribution correction for complex, high-dimensional tasks.
Conclusion and Future Work
OPPOSD demonstrates that correcting for state distribution mismatch is not merely an optimization but a theoretical necessity for consistent off-policy learning. While the method introduces some computational overhead due to the RKHS-based ratio estimation, the performance gains in complex simulations like HIV treatment are substantial. Future research will focus on scaling these density ratio estimators to higher-dimensional inputs, such as raw image data, and exploring the integration of these corrections into online RL replay buffers to improve sample efficiency.
Summary updated