Simplifying Model-based RL: Learning Representations, Latent-space Models, and Policies with One Objective

Raj Ghugare, Homanga Bharadhwaj, Benjamin Eysenbach, Sergey Levine, Russ Salakhutdinov

Introduction

Model-based reinforcement learning (MBRL) holds the promise of being vastly more sample-efficient than model-free RL by allowing agents to "practice" within a learned simulator of the environment. However, learning to model raw observations from high-dimensional sensors is notoriously difficult.

Aligned Latent Models (ALM) simplifies MBRL by replacing multiple disjoint training goals with a single, unified objective. By deriving a lower bound on expected returns, ALM jointly optimizes the observation representation, the latent dynamics model, and the policy. This approach achieves the sample efficiency of complex ensemble methods but with significantly lower computational overhead.

The Challenge: Objective Mismatch

In practice, MBRL often suffers from objective mismatch. Standard MBRL typically trains three separate components with three different, often conflicting, goals:

  1. Representations are frequently learned via reconstruction (e.g., using VAEs), which can waste model capacity on task-irrelevant details like background colors or textures.
  2. Models are trained to maximize likelihood, which does not guarantee accuracy in the specific states the policy actually ends up visiting.
  3. Policies are trained to maximize reward, which often leads them to exploit small inaccuracies in the learned model—a phenomenon known as "model exploitation."
Comparison of standard model-based RL algorithms, which use separate losses, versus Aligned Latent Models (ALM), which use a single lower bound on RL loss.

The core argument of ALM is that these components should not be trained in isolation. Instead, they must be "aligned" so that the representation is easy to predict, the model is accurate where the policy goes, and the policy avoids states where the model is unreliable.

Methods: Aligned Latent Models (ALM)

ALM introduces a mathematical derivation that treats the RL objective (maximizing returns) as a latent-variable inference problem.

Key technical features of ALM include:

  • A Unified ELBO: The authors derive an Evidence Lower Bound (ELBO) on the expected return. This single objective is used to train the encoder, the latent dynamics model, and the policy simultaneously.
  • Augmented Reward: The objective naturally yields an "augmented reward" function. It combines the standard environment reward with an intrinsic consistency term—specifically, the KL divergence between the latent model's prediction and the actual encoded representation.
  • Self-Correction: This intrinsic term penalizes the policy for visiting states where the model is inaccurate. Effectively, the policy learns to stay within the "known" parts of the world, mitigating model exploitation.
  • Classifier Trick: To train the policy on "imagined" trajectories without needing to generate high-dimensional observations (like pixels), ALM uses a learned classifier to estimate the consistency term.
  • No Ensembles: Unlike most state-of-the-art MBRL methods (such as MBPO) that require an ensemble of 5-10 models to handle uncertainty, ALM achieves high performance with a single model.

Key Results

The method was evaluated on the standard MuJoCo locomotion benchmark, which includes high-dimensional continuous control tasks like Humanoid, Ant, HalfCheetah, Walker2d, and Hopper.

Performance of ALM compared to baselines across MuJoCo environments, demonstrating superior sample efficiency and significantly lower wall-clock training time.
  • Sample Efficiency: ALM matches or outperforms state-of-the-art model-based methods (like MBPO) and model-free methods (like REDQ) across the majority of benchmark tasks.
  • Wall-Clock Speed: Because it avoids the computational burden of ensembles, ALM is roughly 6x to 10x faster to train than MBPO and REDQ. Remarkably, it even outperforms the popular model-free algorithm SAC, reaching similar performance in about 50% less wall-clock time.
  • Model Accuracy: Ablation studies demonstrate that the joint objective allows the latent model to remain accurate for up to 20 steps of "imagination." In contrast, models trained without this alignment diverge almost immediately (after ~2 steps).

Insights and Future Directions

The primary takeaway from ALM is that consistency is king. You do not need a perfect model of the entire world; you only need a model that is consistent with the policy's behavior. By penalizing inconsistency, the agent naturally avoids the model exploitation trap. Furthermore, because the representation is trained to maximize the return-based ELBO, it naturally ignores environmental "noise" and focuses only on features necessary for predicting rewards.

Limitations: While conceptually simpler than ensemble methods, ALM still involves multiple interacting components (encoder, model, policy, classifier, reward/value predictors). Additionally, the authors noted some hyperparameter sensitivity, requiring the coefficient for the intrinsic reward term to be tuned down from its theoretical value of 1.0 to 0.1 for stability.

Future work may explore an on-policy version of ALM and investigate how this framework can be adapted to handle "optimistic" latent spaces to encourage even better exploration.

Summary updated

BibTeX
@inproceedings{ghugare2023simplifying,
  author = {Raj Ghugare and Homanga Bharadhwaj and Benjamin Eysenbach and Sergey Levine and Russ Salakhutdinov},
  title = {{Simplifying Model-based RL: Learning Representations, Latent-space Models, and Policies with One Objective}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=MQcmfgRxf7a},
}
Figure