Greedification Operators for Policy Optimization: Investigating Forward and Reverse KL Divergences

Alan Chan, Hugo Silva, Sungsu Lim, Tadashi Kozuno, A. Rupam Mahmood, Martha White

TL;DR

Policy optimization methods can be framed as Approximate Policy Iteration (API), where policy updates act as "approximate greedification" steps toward a Boltzmann distribution over action values. This paper provides the first systematic theoretical and empirical comparison between using Forward KL (mean-seeking) versus Reverse KL (mode-seeking) divergences for this greedification step. The authors show that while Reverse KL provides strict policy improvement guarantees, Forward KL can promote better exploration in deceptive continuous environments—at the cost of converging to more suboptimal final policies.

What Problem Does This Paper Address?

Reinforcement learning (RL) algorithms commonly iterate between evaluating a policy’s value function and improving (greedifying) the policy. In complex domains with continuous actions or function approximation, exact greedification is impossible; instead, algorithms push a parameterized policy closer to a soft-greedy target (a temperature-scaled Boltzmann distribution over action values, $\mathcal{B}_\tau Q$).

Most popular policy gradient and actor-critic methods optimize this fit using a Reverse KL (RKL) divergence, $\text{KL}(\pi_\theta \parallel \mathcal{B}_\tau Q)$. However, supervised learning and probabilistic inference often employ Forward KL (FKL), $\text{KL}(\mathcal{B}_\tau Q \parallel \pi_\theta)$, which behaves very differently. While RKL is mode-seeking (focusing probability mass onto high-value peaks), FKL is mean-seeking (spreading mass to cover the full support). This paper investigates how this fundamental choice impacts theoretical policy improvement, optimization landscapes, and agent exploration.

Methods

The authors establish an API framework unifying existing RL algorithms across four quadrants: {Reverse KL, Forward KL} $\times$ {Hard ($\tau \to 0$), Soft ($\tau > 0$)}.

  • Categorization: Standard Actor-Critic and TRPO/PPO/DDPG map to Hard RKL, while Soft Actor-Critic (SAC) maps to Soft RKL. Conversely, policy classification methods correspond to Hard FKL, and reward-weighted methods like UREX correspond to Soft FKL.
  • Practical API Algorithm: For continuous actions, the authors implement an off-policy actor-critic algorithm that estimates:
  • RKL gradients using the reparameterization trick.
  • FKL gradients via weighted importance sampling over policy actions.
  • Theoretical Analysis: The authors prove a generalized Soft Performance Difference Lemma to establish necessary and sufficient conditions for policy improvement under expected RKL reduction across states, provide a counterexample showing FKL reduction can degrade performance, and bound RKL in terms of FKL using the Rényi divergence ($D_\infty$).

Datasets

The authors evaluated both approaches on a diverse set of synthetic microworlds and standard RL benchmarks:

  • Microworlds: A continuous 1D Bimodal Bandit with two unequal reward peaks; and a 2-state Switch-Stay domain with short-term penalty vs. long-term reward trade-offs.
  • Exploration Tasks: A continuous 2D Misleading Maze featuring an easy-to-reach, deceptive exit (+1,000 reward) and a hidden optimal exit (+100,000 reward); and a 10$\times$10 discrete Gym-maze.
  • Standard Benchmarks: Continuous control tasks from MuJoCo / OpenAI Gym (Pendulum, Reacher, Swimmer, HalfCheetah); discrete control tasks from OpenAI Gym (CartPole, LunarLander, Acrobot); and five MinAtar arcade games (Asterix, Breakout, Freeway, Seaquest, Space Invaders).

Key Insights and Ideas

  • RKL has strict monotonic improvement guarantees: Reducing RKL on average over the state-visitation distribution $d^{\pi_{\text{new}}}$ is both necessary and sufficient for policy improvement.
  • FKL can strictly harm policy performance: Because FKL penalizes assigning near-zero probability to any action with non-zero Boltzmann probability, a policy moving from near-deterministic good actions toward covering suboptimal actions will lower FKL while dramatically lowering true returns.
  • FKL yields a smoother optimization landscape: In multimodal settings, RKL creates multiple local minima (valleys) where policies can get trapped in suboptimal modes. FKL creates a single, unimodal basin, making gradient descent more robust to noisy updates.
  • Exploration vs. Final Optimality Trade-off: In continuous action spaces parameterized by unimodal Gaussians, FKL resists committing early to actions and maintains higher policy variance. In the Misleading Maze, this prevents the agent from prematurely collapsing onto the deceptive local optimum, allowing FKL to reach the true goal significantly more often than RKL.

Key Results

  • Misleading Maze: With temperatures $\tau \in \{10, 100\}$, FKL reached the true goal exit up to hundreds of times during training, whereas RKL prematurely collapsed into the misleading goal and rarely discovered the true optimal goal exit.
  • Switch-Stay Domain: Under continuous actions, RKL iterates converged closely to the true optimal polytope vertices. FKL iterates converged reliably to a single point but remained noticeably suboptimal due to excessive policy variance.
  • Benchmark Environments: On standard discrete (Gym, MinAtar) and continuous (MuJoCo) benchmarks, FKL and RKL performed comparably. Performance differences were overwhelmingly dominated by the temperature parameter $\tau$ and learning rates rather than the choice of divergence, likely because standard benchmark value functions are predominantly unimodal.

Limitations and Future Work

  • Conservative Bounds: The theoretical conditions guaranteeing policy improvement under FKL reduction are very conservative, requiring near-maximal reduction in practice.
  • Expressivity Bottlenecks: The observed differences between FKL and RKL were magnified by using simple Gaussian policies; evaluating more expressive, multimodal policy parameterizations (e.g., normalizing flows or diffusion policies) remains an open direction.
  • Alternative Target Distributions: Future work should explore divergence minimization against non-Boltzmann targets (such as escort transforms or positive normalized action-values) to bypass the sensitivity of temperature tuning.

Summary updated

BibTeX
@article{chan2022greedification,
  author = {Alan Chan and Hugo Silva and Sungsu Lim and Tadashi Kozuno and A. Rupam Mahmood and Martha White},
  title = {{Greedification Operators for Policy Optimization: Investigating Forward and Reverse KL Divergences}},
  journal = {J. Mach. Learn. Res.},
  year = {2022},
  url = {https://openreview.net/forum?id=-dvWQ8MGtWu},
}
Figure