Understanding Self-Predictive Learning for Reinforcement Learning

Yunhao Tang, Zhaohan Daniel Guo, Pierre Harvey Richemond, Bernardo Ávila Pires, Yash Chandak, Rémi Munos, Mark Rowland, Mohammad Gheshlaghi Azar, Charline Le Lan, Clare Lyle, András György, Shantanu Thakoor, Will Dabney, Bilal Piot, Daniele Calandriello, Michal Valko

Introduction

In Reinforcement Learning (RL), representation learning is the critical process of turning raw data—like pixels—into useful, low-dimensional features. A popular recent trend in this space is self-predictive learning (SPL). In this paradigm, an agent learns by attempting to predict its future latent representation $\Phi(x_{t+1})$ from its current representation $\Phi(x_t)$.

On paper, this objective looks like a recipe for disaster. If the agent simply decides that every state is represented by a constant vector (e.g., $[1, 1, 1]$), its prediction error becomes zero. This phenomenon is known as representation collapse. Despite this obvious theoretical trap, algorithms like BYOL-RL and SPR work incredibly well in practice. This paper tackles a fundamental question: Why do these algorithms avoid trivial solutions, and what exactly are they learning about the environment?

Optimization Dynamics: The Secret Ingredients

To understand why collapse is avoided, the authors analyze self-predictive learning through the lens of Ordinary Differential Equations (ODEs), modeling how representations evolve over time. They identify that the "fix" for representation collapse isn't found in the loss function itself, but rather in the optimization dynamics.

Specifically, two crucial design choices prevent the representations from collapsing:

  1. Semi-gradient updates: The algorithm stops the gradient flow through the prediction target (the future state representation).
  2. Fast-paced predictor optimization: The predictor function $P$ is updated much faster than the representation $\Phi$, ensuring it remains near-optimal at all times.
Diagram illustrating the self-predictive learning architecture with a stop-gradient on the target representation.

By using semi-gradients and keeping the predictor optimal, the representation is forced to "rotate" and capture meaningful transition information rather than shrinking to a zero-loss constant.

SPL as Spectral Decomposition

The authors prove that in an idealized setup, self-predictive learning is essentially performing Principal Component Analysis (PCA) on the environment's state transition matrix. It identifies the directions in the state space that explain the most variance in how states transition.

However, for non-symmetric environments—where transitioning from state A to B has different dynamics than transitioning from B to A—a single representation struggles to capture the full picture. To address this, the authors propose Bidirectional Self-Predictive Learning. While standard SPL only predicts forward in time, the bidirectional version learns two representations simultaneously: one for forward prediction and one for backward prediction. This mirrors the relationship between left and right singular vectors in linear algebra, effectively performing Singular Value Decomposition (SVD) and capturing much richer information about the transition dynamics.

Key Results and Empirical Gains

The paper validates its theories using both small-scale Tabular MDPs (where transition matrices can be explicitly analyzed) and DMLab-30, a large-scale benchmark consisting of 30 diverse, first-person 3D tasks.

Theoretically, the authors prove that under their identified optimization dynamics, the covariance of the representation remains constant, mathematically guaranteeing that it cannot collapse to a single point. Furthermore, they show that the "trace objective"—a measure of how much spectral information is captured—is non-decreasing over time, meaning the agent provably learns more about the environment's structure as training progresses.

Bar chart showing the improvement in human-normalized scores across various DMLab-30 tasks using the bidirectional approach.

Empirically, these theoretical insights translate to significant real-world performance gains. In the complex, partially observable environments of DMLab-30, the bidirectional agent outperformed the strong BYOL-RL baseline. On several tasks, it achieved an improvement of up to 0.4 in human-normalized scores.

Limitations and Future Work

While the paper provides a rigorous mathematical foundation for self-predictive learning, it relies on several simplifying assumptions. Much of the theoretical analysis assumes linear models and tabular states, and extending these proofs to the non-linear "black box" of deep neural networks remains an open challenge. Additionally, the proofs assume a uniform distribution over states, which is rarely true in practice as agents explore specific areas of an environment.

Finally, SPL is inherently "un-grounded" because it does not utilize reward signals. A major future direction is studying how these self-predictive representation signals interact with reward-based signals, like Temporal Difference (TD) learning, to create even more robust and capable RL agents.

Summary updated

BibTeX
@inproceedings{tang2023understanding,
  author = {Yunhao Tang and Zhaohan Daniel Guo and Pierre Harvey Richemond and Bernardo Ávila Pires and Yash Chandak and Rémi Munos and Mark Rowland and Mohammad Gheshlaghi Azar and Charline Le Lan and Clare Lyle and András György and Shantanu Thakoor and Will Dabney and Bilal Piot and Daniele Calandriello and Michal Valko},
  title = {{Understanding Self-Predictive Learning for Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=563dxeRMmib},
}
Figure