An Analysis of Categorical Distributional Reinforcement Learning

Mark Rowland, Marc G. Bellemare, Will Dabney, Rémi Munos, Yee Whye Teh

Abstract: Distributional approaches to value-based reinforcement learning model the entire distribution of returns, rather than just their expected values, and have recently been shown to yield state-of-the-art performance. This paper provides a theoretical analysis of Categorical Distributional Reinforcement Learning (CDRL), proving convergence and establishing error bounds using the Cramér distance.

Introduction: The Distributional Shift

In standard value-based Reinforcement Learning (RL), an agent learns to predict the expected (average) return of its actions. Distributional RL flips this paradigm by having the agent predict the entire probability distribution of returns. The flagship algorithm for this, C51, achieved state-of-the-art performance on Atari benchmarks by modeling these distributions over a fixed categorical grid.

To make learning computationally tractable, C51 approximates the continuous return distribution using a discrete grid (e.g., 51 evenly spaced values). However, when the Bellman update shifts this distribution, the resulting values no longer align with the fixed grid. This necessitates a heuristic "projection" step to snap the values back into place. While C51 showed massive empirical success, its theoretical underpinnings remained a mystery because the projection step was known to break contraction guarantees in the commonly used Wasserstein metric.

Visualizing the distributional Bellman update and the subsequent projection step onto a fixed categorical grid.

Methodology: The Cramér Distance

The authors bridge this theoretical gap by moving away from the Wasserstein metric and instead analyzing CDRL using the Cramér distance (specifically, the supremum-Cramér metric). They re-interpret the heuristic projection operator ($\Pi_C$) used in C51 as an orthogonal projection within the geometry of the Cramér distance.

By analyzing the algorithm through this lens, the authors prove that the projection step is a non-expansion. This allows them to demonstrate that the combined projected distributional Bellman operator is a strict contraction, guaranteeing convergence to a unique fixed point. To prove that the algorithm works when learning from random environmental samples, they utilize stochastic approximation theory and the concept of "stochastic dominance."

Geometric interpretation of the projected Bellman operator as a contraction within the space of probability measures.

Key Insights and Results

1. Contractivity and Convergence

The paper mathematically proves that the projected distributional Bellman operator ($\Pi_C \mathcal{T}^\pi$) is a $\sqrt{\gamma}$-contraction in the Cramér distance. This provides the first rigorous proof of almost-sure convergence for sample-based categorical policy evaluation and categorical Q-learning in the tabular setting.

2. Bounded Approximation Error

The "cost" of using a discrete grid of supports instead of the true continuous distribution is not arbitrary. The authors established an upper bound on the approximation error: $$\bar{\ell}_2^2(\eta_C, \eta_\pi) \le \frac{1}{1-\gamma} \max (z_{i+1} - z_i)$$ This proves that making the grid finer (decreasing the distance between grid points) linearly reduces the squared Cramér error.

3. Stability in Control

In standard RL, combining approximations with control (Q-learning) can sometimes lead to divergence. The authors show that categorical Q-learning preserves the optimal policy because its specific projection step perfectly preserves the expected value of the unprojected target.

Discussion and Future Work

While this work provides a solid theoretical foundation for CDRL, some questions remain. The convergence proof applies to a "mixture update" rule; whether these guarantees hold for the exact Kullback-Leibler (KL) divergence gradient step used in the original C51 algorithm is still an open question. Additionally, these proofs are restricted to the tabular setting. Future research is needed to explore the interaction between distributional RL and function approximation (like deep neural networks).

Ultimately, these findings suggest that future algorithms could be improved by directly minimizing the Cramér distance instead of KL divergence, or by dynamically adapting the support grid to reflect the true range of returns.

Summary updated

BibTeX
@inproceedings{rowland2018analysis,
  author = {Mark Rowland and Marc G. Bellemare and Will Dabney and Rémi Munos and Yee Whye Teh},
  title = {{An Analysis of Categorical Distributional Reinforcement Learning}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2018},
  url = {https://openreview.net/forum?id=ZHI-1IyCuzC},
}
Figure