---
title: 'DyMoDreamer: Dynamic Modulation for Visual RL'
url: https://www.emergentmind.com/topics/dymodreamer
type: topic
---

# DyMoDreamer: Dynamic Modulation for Visual RL

DyMoDreamer is a model-based reinforcement learning algorithm for visual control that augments a DreamerV3-style recurrent state-space model with a dynamic modulation mechanism specialized for reward-relevant motion. Its central design is to construct differential observations by masking inter-frame changes, infer a discrete dynamic modulator \(d_t\) from those masked inputs, and use \(d_t\) alongside the conventional stochastic latent \(z_t\) in the transition and prediction heads. The reported outcome is improved sample efficiency on visual RL benchmarks, including a \(156.6\%\) mean human-normalized score on Atari \(100\)k, a mean score of \(832\) on the DeepMind Visual Control Suite, and a \(9.5\%\) improvement over DreamerV3 on Crafter after \(1\)M steps [2509.24804]. A separate 2026 paper uses the name “Dreamer” for a depth-recurrent attention-mixture framework in language modeling and explicitly states that “DyMoDreamer” is not a separate model name there; that alternate usage is best treated as a nomenclature issue rather than as the same method [2601.21582].

## 1. Motivation and conceptual basis

DyMoDreamer is motivated by a limitation of standard Dreamer-style world models: they process observations holistically, and the visual encoder and RSSM optimize reconstruction and reward or continuation prediction on all pixels. In the formulation reported for DyMoDreamer, this dilutes modeling capacity across large static backgrounds and nuisance visual details, even though the reward signal is often driven by small, fast-moving objects and their immediate local context, such as the ball and paddle in Pong or fists in Boxing [2509.24804].

The method is designed around the claim that holistic modeling can exacerbate compounding model errors in imagined rollouts precisely on the dynamic cues that matter most for control. The details further note that VAE stochasticity tends to blur small moving objects, which degrades temporal credit assignment. DyMoDreamer addresses this by introducing a second discrete latent pathway dedicated to reward-relevant dynamics, while keeping the original stochastic representation \(z_t\) to capture static context and non-dynamic task factors. This suggests a division of labor between latents: \(z_t\) remains responsible for broad scene content, whereas \(d_t\) emphasizes dynamic visual features and their temporal evolution.

Relative to Dreamer, DreamerV2, and DreamerV3, the method builds on DreamerV3’s RSSM but adds a second discrete latent head for dynamics, conditions the GRU transition on \(d_{t-1}\), and adds both a differential reconstruction regularizer and losses for \(d_t\). Relative to object-centric methods such as OC-STORM, it does not require pre-trained segmentation or prior object counts. Relative to transformer or tokenized world models such as IRIS, \(\Delta\)-IRIS, STORM, and OC-STORM, it keeps the RSSM architecture lightweight and targets reward-relevant motion directly through temporal differencing and modulation. Relative to latent-difference approaches in model-free RL such as Latent Flow, it performs differencing in pixel space rather than using \(z_t-z_{t-1}\), with the stated goal of avoiding precision loss and missed small-object motions.

## 2. Differential observations and inter-frame masking

The differential-observation pathway begins from the raw image observation \(o_t \in \mathbb{R}^{H \times W \times C}\) and a temporal interval \(k \ge 1\), with \(k=1\) reported as the empirical default. DyMoDreamer defines a vanilla binary differencing tensor \(D_t \in \{0,1\}^{H \times W \times C}\) elementwise by thresholding the inter-frame difference with \(\epsilon=0.001\):

\[
D(o_{i,h,w,c},\, o_{i-k,h,w,c})=
\begin{cases}
1, & \text{if }\|o_{i,h,w,c}-o_{i-k,h,w,c}\|_2>\epsilon,\\
0, & \text{otherwise.}
\end{cases}
\]

Because \(D_t\) is often sparse, the method expands active regions by spatial convolution or dilation with a binary kernel \(K\) and threshold \(\theta>0\):

\[
\tilde{D}_t(h,w,c)=\mathbf{1}\Big((D_t * K)(h,w,c)>\theta\Big),\qquad
M_t(h,w,c)=\tilde{D}_t(h,w,c).
\]

The masked differential observation is then defined as

\[
o'_t = M_t \odot o_t.
\]

This suppresses the static background while preserving, and locally expanding, motion-related regions [2509.24804].

The functional role of this construction is explicit. A stochastic encoder receives \(o_t\) and produces \(z_t\), whereas a dynamic encoder receives \(o'_t\) and produces \(d_t\). Since \(o'_t\) is masked, the dynamic encoder primarily sees moving objects and their immediate context. The details characterize this as an online operation that explicitly encodes object-level motion cues and temporal transitions. The mask itself is deterministic; gradients flow through \(o'_t\) to the dynamic encoder, but not through the hard threshold.

The sensitivity discussion places this mechanism within a concrete operating regime. The threshold \(\epsilon\), the dilation kernel size, and the differencing interval \(k\) trade sensitivity against noise. The data note that longer intervals \(k>1\) can suppress static flashes but may miss fast dynamics. A plausible implication is that the masking stage is both the source of DyMoDreamer’s inductive bias and one of its main hyperparameter sensitivities.

## 3. Dynamic modulation inside the RSSM

DyMoDreamer uses discrete latent variables for both the ordinary representation and the dynamic modulator. The representation latent and modulation latent are sampled as

\[
z_t \sim q_\phi(z_t \mid h_t, o_t),\qquad d_t \sim q_\phi(d_t \mid h_t, o'_t).
\]

Both \(z_t\) and \(d_t\) are modeled as products of \(G\) independent categorical variables over \(C\) classes. In the default setting, \(G=32\) and \(C=32\) for both pathways. The encoder outputs groupwise logits, and sampling uses the straight-through estimator for discrete latents.

The recurrent transition is modulated directly by the previous dynamic latent:

\[
h_t = f_\phi\big(h_{t-1}, z_{t-1}, d_{t-1}, a_{t-1}\big),
\]

where \(f_\phi\) is a GRU. Priors over the representation and modulation latents are produced from \(h_t\),

\[
p_\phi(\hat{z}_t \mid h_t),\qquad p_\phi(\hat{d}_t \mid h_t),
\]

and the predictive heads are conditioned on the concatenated state \(s_t=\{h_t,z_t,d_t\}\):

\[
p_\phi(o_t \mid h_t,z_t,d_t),\quad
p_\phi(r_t \mid h_t,z_t,d_t),\quad
p_\phi(c_t \mid h_t,z_t,d_t).
\]

The implementation description characterizes \(d_t\) as a feature-wise modulator of both the transition and the predictive heads, implemented through concatenation or gating in the inputs [2509.24804].

Architecturally, the world model contains two CNN VAEs with LayerNorm and SiLU, a GRU sequence model, MLP prior heads, a shared decoder, a reward predictor trained with symlog two-hot classification, and a continuation predictor trained with cross-entropy. The stated computational profile is close to DreamerV3 in parameters and FLOPs, with the added heads for \(d_t\) and the mask or regularizer computation contributing only small additional compute. The details further state that inter-frame differencing plus dilation is negligible compared to the CNN and GRU forward, and that no external vision model or optical flow is used.

A recurrent misconception is that differential observations alone explain the method’s gains. The ablation summary argues against that interpretation: removing dynamic modulation from the RSSM while still encoding differential observations causes a large drop, indicating that the integration of \(d_t\) into the transition and predictors is essential rather than incidental.

## 4. Objective function and end-to-end training procedure

The world-model loss combines prediction, dynamics KL, representation KL, and a differential divergence regularizer:

\[
\mathcal{L}(\phi) =
\mathbb{E}\Big[\sum_{t=1}^T
\big(
\mathcal{L}_{\mathrm{pred}}
+ \omega_{\mathrm{dyn}}\mathcal{L}_{\mathrm{dyn}}
+ \omega_{\mathrm{rep}}\mathcal{L}_{\mathrm{rep}}
\big)\Big]
+ \mathcal{L}_{\mathrm{reg}},
\]

with \(\omega_{\mathrm{dyn}}=0.5\) and \(\omega_{\mathrm{rep}}=0.1\). The prediction term decomposes into reconstruction, reward, and continuation losses. The dynamics KL and representation KL are both clipped with free-bits at \(1\) nat and are defined separately for \(z_t\) and \(d_t\), with stop-gradient placed on opposite sides in the two terms to train prior prediction and posterior consistency respectively [2509.24804].

A distinctive component is the differential divergence regularizer. Using temporal differences

\[
\Delta \hat{o}_t = \hat{o}_t - \hat{o}_{t-1},\qquad
\Delta o_t = o_t - o_{t-1},
\]

DyMoDreamer forms global softmax distributions over all pixels and channels using temperature \(\tau=0.1\), then minimizes a KL divergence between the reconstructed and ground-truth inter-frame change distributions. The stated role of this term is to align inter-frame change distributions of reconstructions to ground truth and to complement MSE-like intra-frame losses.

Policy learning follows DreamerV3 on imagined trajectories using model states \(s_t=\{h_t,z_t,d_t\}\). The critic uses an EMA target with decay \(0.98\), the actor uses a REINFORCE surrogate with entropy regularization, the imagination horizon is \(L=15\), the return uses \(\lambda=0.95\), and the entropy scale is \(3\times 10^{-4}\). The normalization term \(S\) is defined as the \(95\)th–\(5\)th percentile range of \(R_t^\lambda\) in the batch. Imagined rollouts begin from posterior states and use the prior transition under the learned policy. Because the differential observation uses backward differencing, a random action is sampled at the first frame to seed \(o'_1\) when \(k=1\).

The training loop is specified as a seven-stage pipeline: data collection; masked differencing; encoding of \(z_t\) and \(d_t\); RSSM update and prior prediction; world-model optimization; policy and value training on imagined rollouts; and repetition. Reproducibility details include replay sequences of length \(64\), batch size \(16\), world-model Adam with learning rate \(1\times 10^{-4}\) and \(\epsilon=1\times 10^{-8}\), actor-critic Adam with learning rate \(3\times 10^{-5}\) and \(\epsilon=1\times 10^{-5}\), gradient clip \(1000\), \(\gamma=0.997\), and discount horizon \(333\). On NVIDIA RTX 4090 with \(8\) CPU cores and \(24\) GB RAM, one Atari \(100\)k run reportedly took approximately \(5.5\) hours in JAX.

## 5. Reported benchmark performance and ablation findings

The empirical evaluation covers Atari \(100\)k, the DeepMind Visual Control Suite, and Crafter. The reported headline numbers are organized below [2509.24804].

| Benchmark | Reported DyMoDreamer result | Reported comparison points |
|---|---:|---|
| Atari \(100\)k (26 games) | Mean human-normalized score \(156.6\%\); median HNS \(71.3\%\) | DreamerV3 \(125\%\); OC-STORM \(134.8\%\); DIAMOND \(146\%\) |
| DeepMind Visual Control Suite (20 tasks, 1M steps, visual) | Mean score \(832\) | DreamerV3 \(786\); TWISTER \(801.8\); TD-MPC2 \(720.9\) |
| Crafter (1M steps) | Return \(10.3\) | DreamerV3 \(9.4\); IRIS \(5.5\); \(\Delta\)-IRIS \(7.7\) |

The reported Atari improvements are especially pronounced in sparse small-object dynamics and high-speed small-object tasks, including Pong \(20.9\), Boxing \(93.6\), Krull \(9624.8\), and Road Runner \(20971.8\). On the DeepMind Visual Control Suite, the paper highlights tasks with sparse or localized moving objects such as Cheetah Run \(868.7\), Quadruped Run \(770.4\), and Finger Spin \(968\). On Crafter, the reported gain over DreamerV3 is \(9.5\%\), with the explanation that differential observations capture egocentric relative motion between the agent and environment components.

The ablation study isolates which components matter. Removing dynamic modulation from the RSSM while keeping differential observations yields a large drop, with Boxing decreasing from \(93.6\) to \(80\) and Road Runner from \(20971.8\) to \(12536\). Removing the differential divergence regularizer causes a moderate drop, such as Krull from \(9624.8\) to \(8961\) and Pong from \(20.9\) to \(20.0\), but the resulting model still remains above DreamerV3. Increasing the size of \(z_t\) without modulation to \(48 \times 48\) groups and classes does not match the benefits of modulation, with Boxing \(76\), Krull \(7325\), and Road Runner \(16320\). Replacing \(d_t\) with latent differencing \(\delta_t = z_t-z_{t-1}\) underperforms, especially on tasks dominated by small objects, with Road Runner \(12266\). Lowering the \(d_t\) dimension to \(16 \times 16\) degrades performance, and using \(k=3\) helps smooth dynamics but can miss fast actions such as those in Boxing.

The qualitative analyses are consistent with the benchmark results. The reported differential masks tightly cover moving objects, and the dilated masks produce contiguous motion regions for small objects. Imagined reconstructions are said to exhibit substantially fewer hallucinations on dynamic patterns than DreamerV3, focusing on reward-relevant moving entities while reconstructing static backgrounds adequately via \(z_t\). With an auxiliary split decoder, an emergent specialization is observed in which \(d_t\) focuses on controllable dynamics and \(z_t\) captures static context and passive motion, despite the absence of explicit targets for that separation.

## 6. Relations, limitations, and terminological ambiguity

Within model-based visual RL, DyMoDreamer is positioned as an RSSM-based alternative to heavier object-centric or transformer-based approaches. Unlike OC-STORM, it does not require pre-trained segmentation or prior object counts. Unlike IRIS, \(\Delta\)-IRIS, STORM, and OC-STORM, it does not rely on larger transformer or token-based vision modules. Its stated contribution is instead to preserve the efficiency and simplicity of RSSM world models while explicitly extracting and modeling dynamic visual cues through differential masking and a discrete modulation latent [2509.24804].

The method is reported to help most in tasks where rewards depend on sparse moving objects or localized interactions, in multi-phase tasks with distinct dynamics, and in continuous control from pixels where localized motion dominates return shaping. The limitations are correspondingly specific. In mostly static environments with negligible motion, or in settings where reward is tied to global appearance, the modulation mechanism may add little. Extremely subtle dynamics below the \(\epsilon\) threshold may require tuning \(\epsilon\), the dilation kernel, or multi-frame logical differencing. Noisy visuals or camera shake can cause naive differencing to highlight noise; the stated mitigation strategies include moving-average differencing and logical AND over frames. Proposed extensions include optical flow or event-based sensors, object-centric latents combined with modulation without pre-trained segmentation, and improved temporal credit assignment via hierarchical time scales or memory-augmented sequence models.

A separate point of clarification concerns the name itself. The 2026 paper “Depth-Recurrent Attention Mixtures: Giving Latent Reasoning the Attention it Deserves” consistently uses the name “Dreamer” for a language-model architecture that combines sequence attention, depth attention, and sparse expert attention inside a depth-recurrent layer. That paper explicitly states that “DyMoDreamer” is not a separate model name in the paper; if the term appears in that context, it is best interpreted as the Dreamer framework instantiated with dynamic sparse expert attention together with depth recurrence, sequence attention, and depth attention [2601.21582]. The two usages therefore refer to distinct technical objects: one is a visual RL world model with dynamic modulation over differential observations, and the other is a depth-recurrent attention-mixture framework for latent reasoning in language modeling.

This naming ambiguity can obscure substantive differences. The RL DyMoDreamer centers on masked inter-frame differencing, a dynamic encoder, and modulation of an RSSM world model; the language-model Dreamer centers on depth recurrence, depth attention, and sparse expert attention. The overlap is lexical rather than methodological.

Source: https://www.emergentmind.com/topics/dymodreamer