SandHouse
Pages and contents

DreamerV3

The Problem
Reinforcement learning algorithms often perform well only within the kinds of environments they were designed and tuned for. Moving from Atari to continuous control, sparse-reward exploration, 3D environments, or robotics can require different algorithms and substantial hyperparameter tuning. The goal of DreamerV3 is therefore not simply to achieve high performance on one benchmark, but to build a single model-based RL algorithm that works across widely different observation spaces, action spaces, reward scales, and task structures with essentially the same hyperparameters.

Dreamer approaches this by learning a compact predictive model of the environment and training its policy largely from trajectories generated inside that model. DreamerV3 keeps the basic world-model idea of DreamerV1/V2 but introduces a collection of normalization, balancing, and prediction techniques that make learning stable across more than 150 tasks. Its strongest demonstration is Minecraft, where it learns the sequence of behaviors needed to obtain diamonds without demonstrations or a hand-designed curriculum.

The Method

Overall Architecture

Dreamer consists of three learned components:

1. A world model that predicts how the environment evolves.
2. A critic that estimates the return of imagined states.
3. An actor that chooses actions that lead to high-value imagined futures.

The key idea is that the actor and critic are trained primarily inside the learned latent dynamics model rather than through direct interaction with the real environment.

Experience is collected into replay, the world model learns from that experience, and trajectories are then imagined from latent states sampled from replay:

experience→world model→imagined trajectories→actor/critic learning

During actual environment interaction, Dreamer does not perform expensive search or online trajectory optimization. It simply samples an action from the learned actor.

Recurrent State-Space Model

Dreamer uses a Recurrent State-Space Model (RSSM). Its latent state contains a deterministic recurrent component ht and a stochastic component zt :

st=(ht,zt)

The recurrent state summarizes the history of previous latent states and actions:

ht=fϕ(ht−1,zt−1,at−1)

When the real observation xt is available, the encoder produces a posterior latent state:

zt∼qϕ(zt∣ht,xt)

The dynamics model learns to predict that latent state without seeing xt :

z^t∼pϕ(z^t∣ht)

From (ht,zt) , the model predicts the reward, whether the episode continues, and the observation:

r^t∼pϕ(r^t∣ht,zt)
c^t∼pϕ(c^t∣ht,zt)
x^t∼pϕ(x^t∣ht,zt)

Because imagined trajectories do not have access to future observations, imagination uses the predicted prior pϕ(zt∣ht) instead of the encoder posterior.

The stochastic representations are discrete categorical variables, with straight-through gradients used through the sampling operation.

World Model Objective

The world model combines three losses:

ℒ(ϕ)=𝔼qϕ[∑tβpredℒpred+βdynℒdyn+βrepℒrep]

with

βpred=1,βdyn=1,βrep=0.1

The prediction loss requires the latent state to retain information about the observation, reward, and episode continuation:

ℒpred=−ln⁡pϕ(xt∣zt,ht)−ln⁡pϕ(rt∣zt,ht)−ln⁡pϕ(ct∣zt,ht)

The dynamics loss trains the prior to predict the latent representation inferred from the observation:

ℒdyn=max⁡(1,KL⁡[sg⁡(qϕ(zt∣ht,xt)),|,pϕ(zt∣ht)])

The representation loss pushes the encoder representation toward something the dynamics model can predict:

ℒrep=max⁡(1,KL⁡[qϕ(zt∣ht,xt),|,sg⁡(pϕ(zt∣ht))])

The stop-gradient sg⁡(⋅) separates the roles of these two KL terms. ℒdyn primarily trains the dynamics model to predict the representation, while ℒrep softly encourages the representation itself to become predictable.

Both KL losses use free bits: KL values below 1 nat are ignored. This prevents the pressure for predictable representations from overwhelming reconstruction and collapsing the latent state into something easy to predict but uninformative.

Dreamer also mixes every categorical latent distribution with 1 uniform probability. This prevents probabilities from becoming exactly zero or one and avoids unstable KL divergences.

Learning Through Imagination

After encoding a real replay state into st , Dreamer rolls the world model forward without additional observations:

st→atst+1→at+1st+2→⋯

The actor generates the imagined actions

at∼πθ(at∣st)

while the world model predicts subsequent latent states, rewards, and continuation probabilities.

The actor and critic can therefore train on many simulated transitions without collecting an equivalent number of new environment interactions.

The default imagination horizon is approximately 15 steps, but the critic bootstraps beyond this horizon.

Critic

The critic predicts the distribution of future discounted return:

vψ(Rt∣st)

with

Rt=∑τ=0∞γτrt+τ

and γ=0.997 .

Dreamer uses bootstrapped λ \-returns to combine predicted rewards with critic estimates:

Rtλ=rt+γct((1−λ)vt+λRt+1λ)

with

RTλ=vT

and λ=0.95 .

The critic learns a distribution over these returns:

ℒ(ψ)=−∑tln⁡pψ(Rtλ∣st)

Rather than representing returns using a Normal distribution, Dreamer predicts a categorical distribution over exponentially spaced return bins. This is important because returns can differ by orders of magnitude across domains.

The critic is also regularized toward an exponential-moving-average copy of itself, similar in spirit to a target network.

Actor

The actor maximizes the returns produced by imagined trajectories while maintaining an entropy bonus for exploration.

Its policy-gradient objective is approximately

ℒ(θ)=−∑t[sg⁡(Rtλ−vψ(st)max⁡(1,S))log⁡πθ(at∣st)+ηH(πθ(⋅∣st))]

with entropy scale

η=3×10−4

The difficult part is making the same entropy scale meaningful in environments whose rewards may differ enormously.

Dreamer therefore estimates the scale of returns using their central percentile range:

S=EMA⁡(Per95⁡(Rλ)−Per5⁡(Rλ),0.99)

and divides the advantage by max⁡(1,S) .

The lower bound prevents tiny or nearly zero returns in sparse-reward tasks from being amplified into noisy policy gradients. Using percentiles instead of the minimum and maximum also makes the normalization resistant to outliers.

Symlog and Symexp

Values such as observations, rewards, and returns can have radically different scales across domains. Dreamer introduces the signed logarithmic transformation

symlog⁡(x)=sign⁡(x)ln⁡(|x|+1)

with inverse

symexp⁡(x)=sign⁡(x)(e|x|−1)

Unlike an ordinary logarithm, symlog works for both positive and negative numbers and behaves approximately linearly around zero.

Large values are compressed while their ordering and sign are preserved. This allows the same networks and learning rates to deal with variables whose magnitudes differ substantially between environments.

Symexp Twohot Prediction

For stochastic quantities such as rewards and returns, Dreamer uses a categorical distribution over exponentially spaced bins rather than directly regressing a scalar.

A continuous target y is represented by probability mass on its two nearest bins:

twohot⁡(y)

and the model minimizes

ℒ(θ)=−twohot⁡(y)Tlog⁡softmax⁡(fθ(x))

The prediction is recovered as the expectation over the bin values:

y^=softmax⁡(fθ(x))TB

where the bins B are spaced using symexp .

This turns regression over potentially enormous target magnitudes into classification. As a result, a prediction error involving a very large reward does not automatically generate a proportionally enormous gradient.

What Changed in DreamerV3

The main improvements over previous Dreamer generations are not a new conceptual world-model architecture so much as methods that make the existing framework robust across domains.

The important changes are:

• symlog transformations for observations
• KL balancing and free bits
• 1 uniform mixing for categorical distributions
• percentile return normalization
• symexp twohot reward and value prediction
• RMSNorm and SiLU activations
• a block-structured GRU
• adaptive gradient clipping and the LaProp optimizer
• improved replay with an online queue and stored latent states

The ablations show that these robustness techniques matter on different subsets of tasks. The KL objective has the largest overall effect, followed by return normalization and symexp twohot prediction.

Interestingly, removing reward and value gradients from the world-model representation has a smaller effect than removing reconstruction gradients. This suggests that Dreamer's representations are learned predominantly from its task-independent observation reconstruction objective rather than from reward supervision.

Benchmark Performance

DreamerV3 is evaluated across more than 150 tasks with the same core hyperparameters.

Benchmark
Budget
DreamerV3
Important Comparison
⋮⋮
Atari
200M frames
3381 human-normalized mean, 830 median
MuZero: 3054 mean, 693 median
⋮⋮
ProcGen
50M steps
66.01 normalized mean
PPG: 64.89 , PPO: 42.80
⋮⋮
DMLab
100M steps
71.4 human-capped mean
IMPALA at 1B: 66.3
⋮⋮
Atari100k
400K frames
125 human-normalized mean
IRIS: 105 , TWM: 96
⋮⋮
Proprioceptive Control
500K steps
871 task mean
DMPO: 801 , D4PG: 792
⋮⋮
Visual Control
1M steps
861 task mean
DrQ-v2: 770 , CURL: 479
⋮⋮
BSuite
benchmark protocol
66 task mean
Boot DQN: 60 , DQN: 54
⋮⋮
Minecraft Diamond
100M steps
9.1 return
IMPALA: 7.1 , Rainbow: 6.3 , PPO: 5.1

The most notable result is Minecraft. All Dreamer training runs eventually discover at least one diamond within 100 million environment steps, while none of the compared IMPALA, Rainbow, or PPO agents do.

However, obtaining diamonds remains extremely rare: at the end of training, Dreamer obtains a diamond in only about 0.4 of episodes. Thus the result demonstrates successful long-horizon discovery rather than mastery of Minecraft.

Scaling

DreamerV3 is tested from roughly 12 M to 400 M parameters.

Performance improves monotonically as model size increases, and larger models also require fewer environment interactions to reach a given level of performance. Increasing the replay ratio, meaning performing more training for each collected environment transition, similarly improves data efficiency.

This gives two relatively predictable scaling axes:

more model capacity→better performance and data efficiency
more replay computation→better data efficiency


DreamerV3 is substantially more general than earlier model-based RL systems, but this generality still comes with significant compute. The default experiments often use a roughly 200 M parameter model on an A100 GPU, and the Minecraft experiment uses 100 M environment steps and roughly nine GPU-days per run. The "single configuration" claim also applies mainly to the learning hyperparameters: computational choices such as model size, replay ratio, action repeat, and number of environment instances vary between benchmarks. Minecraft also remains far from solved. Diamonds occur in only about 0.4 of episodes after training, and the Minecraft environment provides more structure than raw pixels alone: the agent receives inventory and status vectors and rewards for 12 intermediate milestones leading to the diamond.

Dreamer belongs to the model-based RL tradition of Dyna and learned world models, and directly extends DreamerV1 and DreamerV2. DreamerV1 primarily targeted continuous control, while DreamerV2 introduced discrete latent world models and achieved strong Atari performance. DreamerV3 focuses on making this framework robust enough to work across domains without per-domain algorithm tuning. Compared with MuZero, which learns a task-oriented latent dynamics model primarily through reward and value targets, Dreamer explicitly reconstructs observations, and its ablations suggest that this unsupervised reconstruction signal is crucial to its representation learning. Compared with model-free algorithms such as PPO, Dreamer spends additional computation learning and simulating a world model in exchange for substantially greater data efficiency and the ability to improve its policy through latent imagination.