Discovering Diverse Nearly Optimal Policies with Successor Features

Tom Zahavy, Brendan O'Donoghue, Andre Barreto, Sebastian Flennerhag, Volodymyr Mnih, Satinder Singh

TL;DR

Standard reinforcement learning agents learn a single policy to solve a task, ignoring countless alternative solutions. Diverse Successive Policies frames discovering multiple distinct solutions as a Constrained Markov Decision Process (CMDP) in the space of Successor Features (SFs). By explicitly minimizing correlation between the stationary feature distributions of learned policies while constraining them to remain near-optimal, the method discovers rich repertoires of qualitatively different behaviors (such as distinct walking gaits).

What Problem Does This Paper Address?

In complex environments, there is rarely just one way to solve a problem. Having a diverse set of high-performing policies is invaluable for exploration, zero-shot transfer, hierarchical RL, and robustness to unexpected disturbances.

However, existing approaches face significant hurdles:

  1. Unsupervised skill discovery methods (e.g., DIAYN) often ignore extrinsic task rewards entirely or rely on discriminatory mutual-information objectives.
  2. Robustness-based diversity methods maximize performance against worst-case reward vectors, but theoretical analysis reveals that a single stochastic policy can often achieve the minimax value, causing the policy set to collapse.
  3. Prior multi-objective methods rely on static scalar weights between diversity and task rewards, falling victim to the "scalarization fallacy"—they cannot guarantee near-optimality across iterations.

Methods

The authors introduce Diverse Successive Policies (DSP), an iterative algorithm that trains a growing set of policies $\Pi^n = \{\pi^1, \dots, \pi^n\}$. Each new policy is trained via a CMDP:

$$\max_\pi d_\pi \cdot r_d^i \quad \text{s.t.} \quad d_\pi \cdot r_e \ge \alpha v_e^*$$

where $r_e$ is the extrinsic task reward, $v_e^*$ is the optimal task value, $\alpha \in [0, 1]$ is the near-optimality threshold (e.g., $\alpha = 0.9$), and $r_d^i$ is an intrinsic diversity reward.

Key Components:

  • Successor Features (SFs) for Long-Term Behavior: Instead of measuring diversity on short-term trajectory slices, diversity is measured in the stationary distribution of feature expectations: $\psi^\pi = \mathbb{E}_{x \sim d_\pi}[\phi(x, \pi(x))]$.
  • Explicit Diversity Rewards: Rather than relying on implicit discrimination, DSP directly minimizes correlation across the SF population:
  • Average Diversity: $r_d(s) = -\frac{1}{n-1}\sum_{j=1}^{n-1} \psi^j \cdot \phi(s)$
  • Minimum (Max-Margin) Diversity: $r_d(s) = \min_{j} (-\psi^j \cdot \phi(s))$
  • Lagrangian Relaxation with Sigmoid Activation: To keep combined rewards bounded, the dual variable $\lambda$ is mapped through a sigmoid activation $\sigma(\lambda)$, smoothly interpolating between the task reward and diversity reward: $r(s) = \sigma(\lambda) r_e(s) + (1 - \sigma(\lambda)) r_d(s)$, stabilized by an entropy regularization term on $\sigma(\lambda)$.

Datasets

The authors evaluated their approach on continuous control benchmark tasks from the DeepMind Control (DM Control) Suite (Tassa et al., 2018):

  • Locomotion and Balancing: Walker (Walker.stand, Walker.walk), Dog (Dog.stand), and HalfCheetah (Cheetah.run).
  • Control Sanity Checks: Cartpole and Reacher (used to evaluate baseline symmetric diversity).
  • Observations consisted of continuous joint angles, positions, and velocities; no new external datasets were created.

Key Insights and Ideas

  • DIAYN Optimizes a Convex Objective: The authors prove that the standard mutual-information skill-discovery objective (under stationary state distributions) is convex with respect to $d_\pi$ (Lemma 1). Because maximizing a convex function over a convex set results in local maxima, discriminative methods are fragile, highly sensitive to initialization, and prone to sub-optimal diversity.
  • Worst-Case Robustness Suffers from Policy Collapse: Solving for worst-case rewards (via Frank-Wolfe iterations) is mathematically sound (Lemma 2), but because stochastic policies can form convex combinations internally, a single policy $\pi^* = \arg\min_\pi \|\psi^\pi\|_2$ can be minimax-optimal. Consequently, the population easily saturates after just 2–3 policies.
  • SFs as Stationary Distribution Proxies: In finite MDPs with one-hot state encodings, $\psi^\pi = d_\pi$. Minimizing inner products between SFs geometrically pushes policies to inhabit different subspaces of the state-action space without drifting away from the task goal.

Key Results

  • Walker: In Walker.stand, the minimum explicit diversity objective discovered 8 distinct, stable standing styles (standing on either single leg, spreading legs, stamping, leaning) while maintaining near-optimal scores (e.g., 809–926 reward, $\ge 88\%$ of optimal). In Walker.walk, the average diversity objective discovered distinct gaits (high knees, heel walking, bent knees) while achieving 85–102% of optimal walking reward.
  • Dog: Under Dog.stand, standard RL agents always stood squarely on all four legs. In contrast, DSP discovered multiple stable "three-legged" stances, lifting different legs while satisfying the standing constraint.
  • Exploration in "No-Reward" Settings: When using robustness as the base constraint instead of task rewards, DSP discovered complex acrobatic locomotion modes on Walker and Cheetah, such as backward crawling, flick-flack jumps, and head-walking.

Limitations and Future Work

  • Mixing Time & Finite Horizons: The framework assumes ergodic Markov chains and measures diversity over stationary distributions. While DM Control domains mix quickly ($\sim 50$ steps), tasks with long mixing times could introduce sampling bias into finite Monte Carlo estimates of SFs.
  • Linear Feature Assumption: The approach assumes the extrinsic reward can be expressed linearly over bounded observable features $\phi(s, a)$. Non-linear or sparse reward landscapes require learned representations.
  • Future Directions: The authors point toward meta-gradient algorithms (e.g., whitebox meta-gradients) to automatically adapt the diversity hyperparameters and discover optimal diversity reward vectors online.

Summary updated

BibTeX
@inproceedings{zahavy2021discovering,
  author = {Tom Zahavy and Brendan O'Donoghue and Andre Barreto and Sebastian Flennerhag and Volodymyr Mnih and Satinder Singh},
  title = {{Discovering Diverse Nearly Optimal Policies with Successor Features}},
  booktitle = {URL @ ICML},
  year = {2021},
  url = {https://openreview.net/forum?id=of_37LKFyNa},
}
Figure