NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning Temporally-Consistent Representations for Data-Efficient Reinforcement Learning

Trevor McInroe, Lukas Schäfer, Stefano V Albrecht

TL;DR

Learning continuous-control policies directly from raw pixels is notoriously sample-inefficient because the scalar reward is the sole supervision signal guiding high-dimensional visual feature extraction. The authors introduce $k$-Step Latent (KSL), a self-supervised auxiliary objective that recurrently predicts future latent representations multiple steps ahead conditioned on actions. Built on top of Soft Actor-Critic (SAC), KSL substantially boosts sample efficiency and asymptotic performance across the PlaNet benchmark while producing representations strongly organized around rewards and invariant to visual perturbations.

What Problem Does This Paper Address?

In visual reinforcement learning, agents face a dual burden: they must simultaneously learn what features matter in the environment (representation learning) and how to act (policy optimization). When the reward signal alone guides both objectives, a severe representation learning bottleneck occurs. Agents typically require hundreds of thousands to millions of environment interactions to learn useful behaviors.

While recent work uses image augmentations (DrQ, RAD) or contrastive/predictive auxiliary tasks (CURL, SPR), existing approaches either ignore the temporal axis entirely, focus only on single-step dynamics, or require expensive multi-stage pre-training. KSL tackles this gap by learning temporally consistent representations over multi-step horizons online, without pre-training or negative sampling.

Methods

KSL builds upon the self-supervised Bootstrap Your Own Latent (BYOL) framework, extending it to model multi-step action-conditioned environment dynamics within off-policy RL:

  • Dual-Pathway Architecture: KSL maintains an online network (encoder $\Phi_o$, projection $\Psi_o$, and prediction head $P$) and a momentum network ($\Phi_m$, $\Psi_m$) updated via exponential moving average (EMA).
  • Recurrent Multi-Step Latent Prediction: Given a trajectory $(s_1, a_1, \dots, a_{k-1}, s_k)$, only the initial state is encoded via $\Phi_o(s_1)$. Subsequent latent states are recurrently predicted using a learned fully-connected transition model: $$z'_o = \mathcal{T}([z_o \mid a_j])$$ The target representations are produced step-by-step by feeding real future states through the target momentum encoder $\Phi_m(s_{j+1})$.

  • Normalized $\ell_2$ Distance Loss: The online predictor targets the $\ell_2$-normalized momentum projection with a stop-gradient applied to the momentum path: $$\mathcal{L}_{\text{KSL}} = \frac{1}{Mk} \sum_{i=1}^M \sum_{j=1}^k \left\| \frac{y_o^{(i,j)}}{\|y_o^{(i,j)}\|} - \frac{y_m^{(i,j)}}{\|y_m^{(i,j)}\|} \right\|_2^2$$

  • Multi-Optimizer Separation: Rather than optimizing a single joint scalar loss, the authors separate the parameters and updates of the RL loss (SAC critic loss) and the KSL loss into separate Adam optimizers. This prevents conflation of Adam’s running momentum statistics between the two tasks.

Datasets

The authors evaluate KSL on the PlaNet benchmark suite (from the DeepMind Control Suite), consisting of six continuous-control environments across varying action dimensions and reward densities:

  1. Finger, Spin (dense)
  2. Cartpole, Swingup (dense)
  3. Reacher, Easy (sparse)
  4. Cheetah, Run (dense)
  5. Walker, Walk (dense)
  6. Ball in Cup, Catch (sparse)

Key Insights and Ideas

  • Emergent Reward Structure: Because KSL forces representations to be predictive over multiple time steps, its latent representations cluster by task reward within just 10k–15k steps of training—long before competing methods (e.g., DrQ) exhibit any reward organization.
  • Conflicting Gradients Help Regularization: The gradient updates from the RL critic and KSL auxiliary loss frequently conflict (cosine similarity $\phi_{ij} < 0$). However, sequestering them into separate Adam optimizers allows high gradient diversity, which regularizes the moving-target, non-i.i.d. nature of RL training without destabilizing the optimizer's momentum states.
  • Vector Over Convolutions for Dynamics: Operating the transition model $\mathcal{T}$ purely in 1D latent space (fully connected layers) outperformed convolutional transitions, which suffered from representational collapse.
  • Sharing Too Much Hurts: Attempting to share intermediate layers between KSL’s transition model and SAC’s Q-networks degraded performance, confirming that isolating task-specific architectures is beneficial.

Key Results

  • Sample Efficiency (100k steps): KSL outperformed all baselines across all six PlaNet tasks, achieving an average improvement of 46.9% over DrQ and 58.1% over RAD. For example, on Cheetah, Run, KSL achieved an evaluation return of 566 ± 54 at 100k steps compared to 314 ± 54 for DrQ and 279 ± 47 for RAD.
  • Asymptotic Performance (500k steps): KSL maintained state-of-the-art results, showing an average gain of 14.5% over DrQ and 21.6% over RAD across all tasks.
  • Downstream Generalization: Freezing a pre-trained KSL encoder and training a new SAC agent on unseen tasks yielded higher performance in 5 out of 6 environments compared to encoders from DrQ, RAD, CURL, or SAC-AE.
  • Temporal Coherence & Robustness: KSL produced smoother latent trajectory shifts between consecutive states and maintained greater stability under visual perturbations (random erasing, noise, translation).

Limitations and Future Work

  • Compute and Wall-Clock Time: KSL requires significantly more wall-clock time than simpler methods—approximately 3.9× the runtime of SAC Pixel (compared to 1.8× for DrQ and 1.2× for RAD), primarily due to trajectory sampling and recurrent unrolling during updates.
  • Hyperparameter Sensitivity to Horizon $k$: While $k=3$ provided the best performance-to-compute balance, higher values of $k$ linearly scale sampling requirements and risk exponential compute overhead.
  • Future Work: The authors propose mitigating training time via parallelized forward passes or lighter network designs, and exploring the applicability of KSL to broader discrete-action domains and complex robotic manipulation settings.

Summary updated

BibTeX
@inproceedings{mcinroe2022learning,
  author = {Trevor McInroe and Lukas Schäfer and Stefano V Albrecht},
  title = {{Learning Temporally-Consistent Representations for Data-Efficient Reinforcement Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=s51gCxF70pq},
}
Figure