TL;DR
Deterministic Policy Gradient (DPG) methods typically differentiate a neural network critic with respect to continuous actions, violating classic compatibility conditions and introducing estimation errors. This paper introduces Off-Policy Compatible Policy Gradient (oCPG), which avoids explicit action differentiation by using a two-point zeroth-order stochastic gradient approximation in action space. With just a minimal code modification to existing frameworks like TD3, oCPG provably bounds policy gradient errors and matches or outperforms state-of-the-art actor-critic algorithms on continuous control benchmarks.
What Problem Does This Paper Address?
In continuous reinforcement learning (RL), actor-critic algorithms like Deep Deterministic Policy Gradient (DDPG) and Twin Delayed DDPG (TD3) rely on the deterministic policy gradient theorem: the actor is updated by backpropagating through the critic—specifically chaining the actor’s Jacobian with the gradient of the action-value function with respect to actions ($\nabla_a Q(s, a)$).
However, critics are trained via Temporal Difference (TD) learning to predict returns, not action gradients. Classical RL theory shows that updating the actor along the critic's gradient only follows the true policy gradient if the critic satisfies strict "compatibility" conditions—which formally require linear critics. Modern deep RL replaces linear models with deep neural networks, rendering the action-value gradient technically unsound and prone to divergence or poor gradient alignment. While prior fixes required training auxiliary gradient networks or learning complex environment dynamics models, they introduce heavy computational overhead and instability.
Methods
The authors propose Compatible Policy Gradient (CPG), which evaluates the critic's action gradient without directly differentiating the network:
-
Zeroth-Order Action-Space Smoothing: Instead of differentiating $Q_\psi(s, a)$, the method applies Gaussian smoothing in the low-dimensional action space: $$\nabla_a Q_\mu(s, a) \approx \mathbb{E}_{u \sim \mathcal{N}(0, I_p)} \left[ \frac{Q(s, a + \mu u) - Q(s, a)}{\mu} u \right]$$ This computes a directional derivative estimate via two-point evaluations of the existing critic network.
-
Theoretical Compatibility Bound: The authors prove (Theorem 1) that the error between this approximate gradient and the true policy gradient is upper-bounded by a function approximation term $\frac{\varepsilon_{\mu,\psi}}{\mu} \sqrt{p}$ plus a smoothing bias term $G\mu\sqrt{p}$ (where $G$ is the Lipschitz constant of $\nabla_a Q$). Thus, minimizing the critic’s value estimation error directly bounds the policy gradient error.
- Off-Policy Integration (oCPG): The approach integrates seamlessly into off-policy deep RL. Built on top of TD3’s Clipped Double Q-learning framework, oCPG uses replay buffers, delayed policy updates, and target networks, requiring only a few lines of code to substitute the backpropagated action gradient with the two-point finite difference.
Standard DPG: Actor Update <-- ∇_θ π_θ(s) · ∇_a Q_ψ(s, a) [Backprop through Q]
CPG (Ours): Actor Update <-- ∇_θ π_θ(s) · [(Q_ψ(s, a+μu) - Q_ψ(s, a)) / μ] · u [Zeroth-order]
Datasets
The authors evaluated oCPG on six standard continuous control environments from the MuJoCo physics engine interfaced via OpenAI Gym (v3):
Ant-v3,HalfCheetah-v3,Hopper-v3,Humanoid-v3,Swimmer-v3, andWalker2d-v3.
To test robustness, they also created imperfect environment variants featuring:
- Sparse rewards: Agent observes true reward with probability 0.5, and 0 otherwise.
- Delayed rewards: Rewards are delayed by 10 time steps.
- Noisy rewards: Additive Gaussian noise scaled to 10% of the replay buffer reward range.
Key Insights and Ideas
- Zeroth-Order Without Parameter Explosion: Traditional zeroth-order optimization perturbs policy parameters directly (which can number in the millions), causing massive variance. CPG perturbs only the action space (typically 2 to 20 dimensions), combining black-box gradient estimation for the critic with exact first-order Jacobians for the actor network.
- Justifying Exploration Noise: Gaussian noise added to actions during exploration in DDPG/TD3 is shown to directly correspond to the smoothing parameter $\mu$ required for zeroth-order gradient consistency.
- No Extra Networks Needed: Unlike model-based gradient estimators (e.g., MAGE) or auxiliary gradient predictors (e.g., GProp), CPG queries the standard Q-network twice per sample, maintaining fast, model-free training speeds.
Key Results
Evaluated over 10 random seeds and compared against TD3 and Soft Actor-Critic (SAC):
- Statistically Superior Performance: Based on Welch's $t$-test ($p < 0.05$), oCPG outperformed both baselines in 3 out of 6 standard MuJoCo tasks, while performing on par in the other 3:
- Ant: oCPG achieved $5463.99 \pm 202.70$ vs. TD3 ($4225.08 \pm 835.24$) and SAC ($3945.51 \pm 673.33$).
- HalfCheetah: oCPG reached $7661.15 \pm 650.76$ vs. TD3 ($6744.59 \pm 671.74$) and SAC ($6074.23 \pm 405.97$).
- Swimmer: oCPG reached $113.48 \pm 71.67$ vs. TD3 ($59.81 \pm 9.48$) and SAC ($58.40 \pm 10.99$).
- Robustness: Under noisy, delayed, and sparse rewards, oCPG maintained strong asymptotic performance across environments, matching or beating the baselines.
Limitations and Future Work
- Input Dimension Bottlenecks: In high-dimensional environments like
Humanoid(combined state-action dimension of 393), oCPG exhibited slower initial convergence when paired with small networks (256 hidden units), as input noise can overwhelm representations without wider layers. - Sensitivity to Reward Distortions: Because CPG relies directly on raw value differences rather than value gradients, heavy reward perturbations (such as sparse or noisy feedback) can slow down convergence in tasks like Hopper and Walker2d.
- Off-Policy Distributional Shift: CPG is theoretically derived on-policy but deployed with an off-policy replay buffer without importance sampling corrections. The authors point to explicit off-policy probability-ratio corrections and model-based extensions as promising future directions.
Summary updated