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

Discrete Codebook World Models for Continuous Control

Aidan Scannell, Mohammadreza Nakhaeinezhadfard, Kalle Kujanpää, Yi Zhao, Kevin Sebastian Luck, Arno Solin, Joni Pajarinen

In reinforcement learning (RL), "world models" act as internal simulators that allow agents to "imagine" the consequences of their actions to make informed decisions. Historically, there has been a divide: world models with discrete latent spaces (like DreamerV3) excel at visual and discrete-action tasks, while models with continuous latent spaces (like TD-MPC2) have dominated state-based continuous control.

This paper investigates a critical gap: why haven't discrete representations succeeded in continuous control? The authors argue that previous discrete approaches relied on inefficient encodings (like one-hot vectors) that discard the natural ordering of continuous data, or they struggled with compounding errors during long-term planning. To address this, they introduce DC-MPC (Discrete Codebook Model Predictive Control), a model-based RL algorithm that challenges the dominance of continuous latent spaces. By representing environment states as discrete codes from a fixed codebook and training dynamics via classification rather than regression, DC-MPC matches or outperforms state-of-the-art models on complex locomotion and manipulation tasks.

Methodology: The Discrete Codebook World Model

The core of the proposed approach is the Discrete Codebook World Model (DCWM). Its architecture consists of several key components designed to overcome the limitations of prior discrete models:

  1. Finite Scalar Quantization (FSQ): Instead of learning a codebook from scratch—which can be unstable—DCWM uses FSQ to map continuous encoder outputs into a fixed, multi-dimensional grid of discrete codes. This ensures the representation is both discrete and preserves ordinal relationships (i.e., spatial closeness in the codebook reflects closeness in the state space).
  2. Stochastic Dynamics via Classification: Most continuous control models use Mean Squared Error (MSE) regression to predict the next state. DCWM instead treats dynamics as a classification task. It predicts a categorical distribution over the codebook and is trained using cross-entropy loss. This allows the model to capture multi-modal outcomes, effectively "hedging its bets" when the future is uncertain.
  3. DC-MPC Algorithm: To turn this world model into an acting agent, the authors combine it with Model Predictive Path Integral (MPPI) planning. At each step, the agent simulates thousands of possible future trajectories in its discrete latent space to choose the best immediate action.
  4. No Reconstruction: Unlike many visual world models, DC-MPC does not attempt to reconstruct the original observation (e.g., pixels or joint angles). It learns purely through a latent-state consistency loss, focusing only on information relevant to predicting rewards and future states.
The DCWM training pipeline, showing how observations are encoded, quantized into codes, and used to predict future states and rewards.

Key Insights and Results

The researchers evaluated DC-MPC across three major continuous control benchmarks, totaling 80 distinct tasks: DeepMind Control Suite (DMControl, 30 tasks), Meta-World (45 tasks), and MyoSuite (5 musculoskeletal tasks).

Several key insights emerged from the evaluation:

  • Codebooks > One-hot Encodings: One-hot encodings are too high-dimensional and "sparse" for continuous control. Codebook encodings are dense and better preserve the underlying structure of the physical world.
  • The Power of Classification: Training with cross-entropy is more robust than MSE. It handles uncertainty better and prevents the model from averaging multiple possible future states into a single, physically impossible mean state.
  • Stochasticity as a Feature: Even in deterministic environments, modeling the world as stochastic (using Gumbel-softmax sampling during training) improves the quality of the learned representations.

Empirically, DC-MPC proved to be highly competitive, often setting a new bar for sample efficiency. In high-dimensional challenges like the "Dog" and "Humanoid" tasks in DMControl, DC-MPC significantly outperformed TD-MPC2 and DreamerV3. Furthermore, ablation studies demonstrated that simply switching a continuous model to a discrete codebook model—without changing other hyperparameters—resulted in a significant performance boost.

Aggregate statistics showing that the discrete stochastic model (purple) outperforms continuous and deterministic baselines.

Limitations and Future Work

While powerful, DC-MPC currently requires some task-specific tuning, particularly for exploration noise schedules and N-step return parameters. A more "generalist" version of the model would ideally use a single set of hyperparameters across all tasks.

Future research directions include integrating more advanced exploration mechanisms (like epistemic uncertainty), testing the model on larger scales (such as multi-embodiment foundation models for robotics), and exploring different backbones like Transformers or Diffusion models within the discrete codebook framework.

Summary updated

BibTeX
@inproceedings{scannell2025discrete,
  author = {Aidan Scannell and Mohammadreza Nakhaeinezhadfard and Kalle Kujanpää and Yi Zhao and Kevin Sebastian Luck and Arno Solin and Joni Pajarinen},
  title = {{Discrete Codebook World Models for Continuous Control}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=lfRYzd8ady},
}
Figure