TL;DR
DreamerV3 is a reinforcement learning agent. It learns a world model from its own experience, then trains an actor and a critic entirely on imagined trajectories produced by that model. The same algorithm, with the same hyperparameters, works across more than 150 tasks in eight domains, and it was the first algorithm to collect diamonds in Minecraft from scratch without human data or a curriculum.
Where you'll see it: as a general-purpose baseline for model-based reinforcement learning, and as the reference for how to make a learned world model and its policy stable across tasks whose rewards and observations differ by orders of magnitude.
The problem
Reinforcement learning algorithms are fragile in a specific way. An algorithm that wins on Atari usually needs its learning rate, entropy bonus, network size and replay settings retuned for a new benchmark. Tuning costs compute and expert time, and the tuning is often done per benchmark, so published comparisons quietly favour whoever tuned hardest. Model-free methods such as Proximal Policy Optimization (PPO) are robust but need a great deal of environment interaction. Model-based methods can be sample efficient, but they have their own failure modes: a model that is wrong about small details, a reward scale that changes between games, or a value estimate that chases its own moving target.
The paper asks for one algorithm and one configuration that is good enough everywhere: pixels or vectors, dense or sparse rewards, small or large rewards, 2D or 3D worlds, procedurally generated levels or not. Minecraft diamond collection was the hardest test they chose, because it needs long-horizon planning from sparse rewards in a randomly generated open world, and previous approaches resorted to human expert data and domain-specific curricula.
Key idea
DreamerV3 separates learning into three parts that all share one latent state:
- A world model compresses each observation into a latent state and learns to predict the next latent state, the reward and whether the episode continues. It is a Recurrent State Space Model, trained by reconstructing the inputs.
- An actor chooses actions from the latent state.
- A critic estimates the value of a latent state.
The actor and critic never touch the real environment during learning. They are trained on rollouts that the world model imagines, starting from states the agent actually visited. The rest of the paper is a set of normalisation and loss choices that make this three-part loop behave the same way whatever the scale of the rewards, the observations or the environment.
flowchart LR E[Environment] -->|observation, reward| R[Replay buffer] R -->|sequences| W[World model<br/>encoder, RSSM, predictors] W -->|latent start states| I[Imagined rollout<br/>horizon steps in latent space] I --> A[Actor] I --> C[Critic] A -->|action| E C -->|values for returns| A
The method
World model
The encoder maps an observation to a stochastic representation . The sequence model keeps a deterministic recurrent state that is updated from the previous state, the previous representation and the previous action. The model state is the concatenation of and , and reward, continuation and reconstruction heads read from it.
The paper's notation for the sequence model and the three predictors is:
The dynamics predictor is what the agent uses to imagine the future, because it does not see the observation. The encoder is what the agent uses on real data. Training pulls the two together.
The world model loss has three parts. The prediction loss is the negative log likelihood of the observation, the reward and the continuation flag. The dynamics loss is a Kullback–Leibler Divergence that trains the sequence model to predict the encoder's next representation. The representation loss is a KL term in the other direction, which pulls the encoder toward what the dynamics predictor can predict. The two KL terms differ only in which side has the stop-gradient. The three terms are combined with weights , and ; the paper pairs free bits with a small representation loss so that one setting works across visual complexities.
Two details make this stable across domains.
Free bits. Each KL term is clipped below at one nat, about 1.44 bits:
Once the KL is already below one nat the gradient is zero, so the model is not pushed to make the representation trivially predictable at the cost of losing information. Per the paper, this disables the term while it is already well minimised so learning focuses on the prediction loss.
Categorical latents with a uniform mix. The representation is a vector of softmax distributions, sampled with a Straight-Through Estimator. The encoder and dynamics distributions are each mixed as 99 percent network output and 1 percent uniform. This keeps every category probability above a floor, so a KL term cannot blow up when a distribution becomes almost deterministic. The paper reports that earlier experiments had occasional KL spikes of exactly this kind.
Observations pass through symlog before they enter the encoder, and vector-valued reconstruction targets are symlog-transformed too. This keeps inputs of different magnitudes on a common scale.
Critic
The critic predicts a distribution over returns, not a single number. The paper parameterises it as a categorical distribution over exponentially spaced bins, and trains it with a symexp twohot loss, described in the robust predictions section below. The predicted value is the mean of that distribution.
Targets are -returns computed in imagination:
This is the same bootstrapped estimator used in Temporal-Difference Learning and in Generalized Advantage Estimation (GAE), with the discount scaled by the continuation flag so that episode ends stop the sum. The critic is regularised toward the output of an exponentially moving average of its own parameters, a target network in the sense of earlier deep RL work.
Actor
The actor is trained with a Policy Gradient on the imagined trajectory, with the critic's value as baseline and an Entropy bonus:
Here is a fixed entropy scale across domains, and is the return scale. The paper's reason for this form is that the right amount of exploration depends on the scale of the rewards. If the advantage is normalised by its own standard deviation, sparse rewards get amplified noise that drowns out the entropy term. So the paper normalises returns instead, dividing by a robust range that is computed as an exponential moving average of the difference between the 95th and 5th percentiles of the returns, with decay 0.99. The division is only applied when is larger than one, so small returns are not amplified.
Robust predictions
Rewards, returns and reconstructions can differ in scale by orders of magnitude between domains. A squared loss on raw targets can diverge; absolute or Huber losses stagnate; normalising targets with running statistics makes the optimisation non-stationary. The paper's answer has two parts.
For deterministic targets the network predicts the symlog of the target, and the prediction is read out with symexp:
For stochastic targets (rewards and returns) the network outputs logits over bins whose positions are of evenly spaced values between and . The prediction is the probability-weighted mean of the bin positions. The target is encoded as a twohot vector: the two bins that bracket the target get weights that sum to one and favour the nearer bin. The loss is cross-entropy against that soft target:
The loss depends only on the probabilities assigned to the bins, not on the bin positions. So the size of the gradient does not grow with the size of the target, which is the property the paper is after.
Results
The benchmark section of the paper covers eight domains with more than 150 tasks, using one configuration throughout. The table below lists what the paper states in its text. The paper's figures carry the per-task numbers, which are not reproduced here. The eighth domain, BSuite (23 environments, 468 configurations), is omitted from the table; the paper reports a new state of the art there, especially in the reward-scale robustness category.
| Benchmark | Budget (as stated in the paper) | What the paper reports |
|---|---|---|
| Atari, 57 games, sticky actions | 200M frames | Outperforms MuZero and the expert algorithms Rainbow and IQN, with fewer computational resources than MuZero |
| ProcGen, 16 games | 50M frames | Matches the tuned expert PPG and outperforms Rainbow |
| DMLab, 30 tasks | 100M frames | Exceeds IMPALA and R2D2+ at 1B environment steps, a data-efficiency gain the paper puts above 1000 percent |
| Atari100k, 26 games | 400K frames (about 2 hours of game time) | Outperforms the best remaining methods, but not EfficientZero, which the paper says uses extra tricks |
| Proprioceptive control, 18 tasks | 500K environment steps | New state of the art, ahead of D4PG, DMPO and MPO |
| Visual control, 20 tasks | 1M environment steps | New state of the art, ahead of DrQ-v2 and CURL |
| Minecraft diamond | 36000 steps per episode (30 minutes) | Discovers diamonds in 100M environment steps; no compared baseline does |
Two more results matter for the argument. The PPO baseline, run with fixed hyperparameters chosen to maximise performance across domains, is substantially worse than Dreamer; the paper reports that Dreamer outperforms it across all domains. The ablations find that every robustness technique contributes, most notably the world model's KL objective, followed by return normalisation and symexp twohot regression; and that Dreamer rests predominantly on the world model's unsupervised (reconstruction) objective. Across six model sizes from 12M to 400M parameters (tested on Crafter and a DMLab task), larger models gave higher performance and lower data requirements, and more gradient updates per environment step reduced the interaction needed. Every Dreamer agent was trained on a single Nvidia A100 GPU, which the authors use to argue that the results are reproducible for many labs.
On Minecraft the paper plots the fraction of trained agents that reach each of the late items in the tech tree. Several strong baselines progress up to the iron pickaxe. Dreamer is the only compared algorithm that reaches a diamond, and all the Dreamer agents trained on it discovered diamonds within 100M environment steps.
Why it mattered
The paper made the case that one model-based algorithm can be a default rather than a tuned specialist. Its robustness tricks (symlog inputs, symexp twohot losses, percentile return normalisation) are small, self-contained pieces that can be lifted into other agents, which is how the paper frames them. Its ablations also indicate that the world model's unsupervised objective carries most of the learning signal, which the authors suggest could allow future variants that pretrain on unsupervised data.
Its limits are real. The results rely on imagined rollouts being accurate enough over the chosen horizon. The paper's evidence for the fixed configuration is empirical across the domains the authors tested.
Reading guide
Read the paper in this order, with these prerequisites in hand:
- Introduction and Key idea: needs Reinforcement Learning and Model-Based Reinforcement Learning. You need to know what a model of the environment is and why planning with one can be cheaper than acting in the real world.
- World model learning: needs Variational Autoencoder for the encoder and reconstruction picture, Kullback–Leibler Divergence for the dynamics and representation losses, and Recurrent State Space Model for the RSSM structure. Straight-Through Estimator is needed to follow the sampling of categorical latents.
- Critic learning: needs Temporal-Difference Learning and Value Function for the -return, and Experience Replay for where the starting states of imagined rollouts come from.
- Actor learning: needs Actor-Critic Methods, Advantage Function and Entropy. The return-normalisation argument makes most sense after you have seen why a fixed entropy weight is hard to choose.
- Robust predictions: needs Symlog Transformation, Cross-Entropy Loss and Softmax. The twohot idea is a continuous version of one-hot targets, so Mean Squared Error is useful as the contrast the paper draws.
- Results and Methods: needs no new ideas beyond the above, but the PPO baseline section assumes familiarity with Proximal Policy Optimization (PPO).
Check yourself
QuestionWhat is the purpose of the free-bits clip, max(1, KL), in the dynamics and representation losses?Show answer
Without it, the representation can be made trivially predictable by discarding information, which lowers the KL but hurts the reconstruction and reward predictions that the agent depends on. Clipping below one nat means the KL term has zero gradient once it is already small. The optimiser then spends its effort on the prediction loss, and the representation keeps the information needed for control.
QuestionSymlog of 9 is ln(10), about 2.3026. Compute symexp of that value, and then symlog of -99.Show answer
symexp(2.3026) = sign(2.3026) times (exp(2.3026) minus 1) = exp(2.3026) minus 1, which is about 10 minus 1, so 9. The inverse holds. symlog(-99) = sign(-99) times ln(|-99| + 1) = minus ln(100), which is about minus 4.6052. The two values differ by about a factor of 20 in magnitude, but the network only has to produce numbers of similar size, which is the point of the transform.
QuestionWhy does dividing the advantage by max(1, S) not amplify returns when rewards are sparse?Show answer
S is the exponential moving average of the 95th minus 5th percentile of returns. When rewards are sparse, the returns are small, so S is below one, and max(1, S) equals one. The division is then a no-op and the advantage is not scaled up. The paper's reason is that scaling up advantages under sparse rewards amplifies noise that outweighs the entropy term. Dividing only when S is large also means very large returns are scaled down, which is the intended behaviour.
QuestionAn illustrative bin layout has bins at positions 0, 1, 2 and 3. A target of y = 1.3 is twohot encoded. Which two bins get weight, what are the weights, and what is the prediction if the network puts probability 0.5 on bin 1 and 0.5 on bin 2?Show answer
The bracketing bins are at positions 1 and 2. The nearer bin, at 1, gets weight 1 minus 0.3, which is 0.7. The bin at 2 gets 0.3. The weights sum to one. The prediction is the probability-weighted mean of bin positions: 0.5 times 1 plus 0.5 times 2, which is 1.5. The prediction is not restricted to the bin positions, which is why the readout can represent any continuous value in range. This example is illustrative and uses made-up bin positions, not the paper's bins.
QuestionApplied to a new task with a reward scale a thousand times larger than in Atari, which parts of the method are responsible for the agent still learning, and which would you expect to be most sensitive to a change in the fixed hyperparameters?Show answer
Symlog inputs, symexp twohot reward and value heads, and percentile return normalisation are scale-free by construction, so the agent should adapt without retuning. The free-bits KL and the uniform mix keep the world model well behaved across visual complexity. The fixed entropy scale is the part that depends most on the reward structure, but the return normalisation makes it scale-free as well. A sensible answer names the mechanisms and admits that the paper's evidence for the fixed configuration is empirical across its eight domains, not a proof for arbitrary tasks.
Sources
- Hafner, Pasukonis, Ba, Lillicrap (2023). Mastering Diverse Domains through World Models. arXiv:2301.04104
- Hafner, Lillicrap, Ba, Norouzi (2019). Dream to Control: Learning Behaviors by Latent Imagination. arXiv:1912.01603