SEMDICE: Off-policy State Entropy Maximization via Stationary Distribution Correction Estimation

Jongmin Lee, Meiqi Sun, Pieter Abbeel · DOI

TL;DR

This paper introduces SEMDICE, a novel off-policy algorithm for unsupervised reinforcement learning (RL) that directly optimizes for state entropy maximization. Unlike prior methods that struggle with sample efficiency or biased estimates, SEMDICE efficiently learns a stationary, optimal state-entropy-maximizing policy from arbitrary off-policy data, leading to better adaptation in downstream tasks.

What Problem Does This Paper Address?

Reinforcement learning agents often require extensive interaction with an environment to learn a task-specific policy. Unsupervised RL pre-training aims to alleviate this by learning a general-purpose policy without task-specific rewards, enabling faster adaptation to new tasks. A promising approach for this is State Entropy Maximization (SEM), which encourages the agent to explore the state space broadly. However, existing SEM methods are either on-policy (sample-inefficient) or off-policy but suffer from biased state entropy estimates (e.g., estimating the entropy of the replay buffer instead of the target policy's stationary distribution). This paper addresses the challenge of developing a principled, sample-efficient, and unbiased off-policy SEM algorithm.

Methods

The core contribution of SEMDICE is its principled approach to optimizing state entropy directly in the space of stationary distributions, rather than policies. This is achieved through a concave programming formulation that is then transformed into a convex minimization problem. Key aspects of the method include:

  • Stationary Distribution Optimization: Instead of directly optimizing policy parameters, SEMDICE optimizes the stationary distribution of the target policy. This allows for a more stable and principled approach to maximizing state entropy.
  • f-Divergence Regularization: To ensure stability and prevent abrupt distribution shifts, SEMDICE incorporates an f-divergence regularization term. This term balances maximizing state entropy with staying close to the distribution of the collected data.
  • Lagrangian Dual Formulation: The authors derive a Lagrangian dual formulation that allows for a model-free optimization process. This leads to a convex minimization problem that can be solved efficiently.
  • Policy Extraction: The optimized stationary distribution corrections are then used to extract an executable policy via an i-projection method, similar to existing work.

Datasets

The paper evaluates SEMDICE on:

  • Randomly generated tabular MDPs: Used to demonstrate convergence to optimal SEM policies and compare with baselines.
  • MountainCar (Continuous) from Gymnasium: A classic control task used for visualizing state coverage during policy learning.
  • URLB (Unsupervised Reinforcement Learning Benchmark): A suite of twelve tasks across three domains (Walker, Quadruped, Jaco Arm) used to evaluate the fine-tuning performance of pre-trained policies.

Key Insights and Ideas

  • Optimizing Stationary Distributions is Key: The paper argues that directly optimizing the stationary distribution is more principled and stable for SEM than optimizing policy parameters, especially in an off-policy setting.
  • Unbiased Off-Policy SEM is Achievable: SEMDICE demonstrates that it's possible to achieve unbiased state entropy maximization from arbitrary off-policy data, overcoming a significant limitation of prior work.
  • f-Divergence for Stability: The use of f-divergence regularization, while not new in RL, is shown to be crucial for stabilizing the SEM objective and ensuring global optimality.
  • SEM as a Good Initialization: The paper provides theoretical and empirical evidence that SEM policies serve as robust initializations for downstream tasks, particularly against worst-case reward functions.

Key Results

  • Tabular MDPs: SEMDICE consistently converges to an optimal SEM policy in tabular MDPs, outperforming baselines like CB-SA, CB-S, and PB-S. It also shows superior sample efficiency in terms of state entropy of the cumulative experiences.
  • MountainCar Visualization: SEMDICE successfully covers the state space and converges to a stable SEM policy, unlike baselines that exhibit oscillatory behavior.
  • URLB Benchmark: SEMDICE significantly outperforms data-based and knowledge-based baselines in rapid adaptation performance during fine-tuning. It achieves maximum state entropy in Walker and Jaco Arm domains and near-maximum in Quadruped, demonstrating its effectiveness as a pre-training objective.
  • Arbitrary Off-Policy Data: SEMDICE can be optimized even with data collected by a uniform random policy, highlighting its robustness.

Limitations and Future Work

  • Convergence Analysis: The authors acknowledge that a formal analysis of convergence guarantees for SEMDICE remains future work.
  • Representation Learning Integration: They suggest incorporating representation learning components into SEMDICE to improve feature detection and navigation in high-dimensional domains.
  • Competence-Based Methods: A promising future direction is to extend DICE-based methods to competence-based unsupervised RL algorithms for principled off-policy learning of mutual information.
  • Hyperparameter Sensitivity: While generally robust, SEMDICE can become numerically unstable with very small values of $\alpha$, though it's not overly sensitive within a reasonable range. The choice of f-divergence did not significantly impact results.

Summary updated

BibTeX
@inproceedings{lee2025semdice,
  author = {Jongmin Lee and Meiqi Sun and Pieter Abbeel},
  title = {{SEMDICE: Off-policy State Entropy Maximization via Stationary Distribution Correction Estimation}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=rJ5g8ueQaI},
}
Figure