# Poster 28506

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/28506

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

In this paper, we explore the key design choices in learning world models for model-based reinforcement learning. At a high level, world models predict the states and reward associated with taking action A in state S. They act as internal simulators, enabling agents to predict environment dynamics and make informed decisions. Typically, world models feature encoder.
that maps the environment state into a latent space z. The agent then learns predictive dynamics and rewards within this learned latent space. Some methods also include a decoder that reconstructs the environment state from the latent space, ensuring the latent space captures all the necessary information about the true state. However, many recent approaches forgo the decoder.
I instead rely on self-supervision to learn the latent space. Two notable algorithms are Dream of v3 and TDFBC2. Dream of v3 uses a discrete latent space with one-hot encoding and performs well across various environments. On the other hand, TDFBC2, which uses a continuous latent space, significantly outperforms Dream of v3 in state -based continuous control tasks.
Whilst there are multiple differences between these two algorithms, it raises a question. What are the critical latent space design choices for well models? In our paper, we systematically examine how different latent space designs impact performance. Specifically, we ask, do discrete latent spaces offer benefits over continuous ones? How does the choice of discrete encoding?
For example, one-hot label or codebook encodings affect performance, and are there advantages to modelling latent dynamics stochastically rather than deterministically? Our findings lead to the development of DC MPC, discrete codebook model predictive control, which has a discrete latent space with a codebook encoding along with a stochastic dynamics model.
Our world model maps environment states to one of the codes in a codebook. This is done by encoding a state into a continuous latent variable x and then quantizing it with finite scalar quantization. Essentially rounding the continuous latent variable to the nearest code in the codebook. In this example, the codebook has two channels. The first channel is quantized into five values and the second into three values.
This results in a codebook with 15 distinct codes. The latent dynamics model in DCN-PC resembles a neural network classifier and predicts the log probabilities of the categorical distribution over the next latent state. During training, we use straight-through Gumbel softmax sampling to allow gradients to backpropagate through the discrete latent space. We then unroll the dynamics autoregressively for several steps in the latent space.
We model the encoder, dynamics, and reward using MLPs, and we train them jointly using a self -supervised temporal consistency objective combined with mean squared error prediction. Alongside our world model, we learn a policy and an ensemble of key functions using a combination of TD-free and red-Q. We do this by sampling transitions from the replay buffer.
Mapping the states to latent states by the encoder and then performing a TD-free update in the latent space. After learning the world model, we leverage it for decision-time planning where the model is used to simulate potential trajectories and assess their performance using the learned reward and key function. To derive a closed-loop control strategy, we apply model-predictive control.
Using a model predictive path integral control as the underlying trajectory optimization algorithm, we demonstrate that a discrete latent space outperforms continuous latent spaces in both deep mind control and met world tasks. Additionally, we find that modeling stochastic transition dynamics further enhances sample efficiency. We also compare our codebook encoding to traditional label and one-hot.
encodings. Finding that code book encodings not only enhance computational efficiency but also improve sampler efficiency. For more detailed analysis and additional experiments please refer to our paper. You can access a paper of code by scanning the QR code at the top right corner of the slide and if you'd like more information please consider joining us at our poster session.
