In the quest for truly capable autonomous agents, Model-Based Reinforcement Learning (MBRL) stands out as a promising frontier. By learning a "world model"—an internal simulator of how the environment works—agents can plan and imagine future scenarios without needing to constantly interact with the real world. However, most state-of-the-art world models, like the Dreamer series, have a glaring weakness: they get easily distracted by irrelevant visual noise.
A new paper from researchers at the Beijing Institute of Technology and DreamFold AI introduces the Hybrid Recurrent State-Space Model (HRSSM) to solve this. By combining spatio-temporal masking with the bisimulation principle, HRSSM learns to ignore the noise and focus purely on task-relevant dynamics.
TL;DR
HRSSM is a robust world model framework that filters out irrelevant visual distractions (exogenous noise) by combining random spatio-temporal masking with a bisimulation-based similarity loss. It outperforms existing methods on complex control tasks with heavy background noise while maintaining the efficiency and performance of standard models in clean environments.
What Problem Does This Paper Address?
Standard MBRL agents typically learn representations by trying to reconstruct the original input pixels. While this works in clean, laboratory-like settings, it fails in the real world where observations are full of exogenous noise—information that is unpredictable or irrelevant to the task, such as moving clouds in the background or shifting shadows.
Because pixel-reconstruction models try to capture everything, they waste capacity on these irrelevant details. This leads to "representation drift" and inaccurate dynamics models, ultimately causing the agent's planning to fail. The challenge is to learn a representation that is compact (filtering out noise) and task-relevant (capturing essential dynamics) without relying on perfect pixel reconstruction.
Methods
The authors propose a dual-branch architecture called the Hybrid Recurrent State-Space Model (HRSSM).
Key components include:
- Spatio-Temporal Masking: The model randomly masks out "cuboid" patches of the input video (across both space and time). This forces the model to infer missing information from the context, focusing on essential structures rather than pixel-perfect details.
- Hybrid Architecture:
- A Mask Branch processes the corrupted input and is the only branch that receives gradient updates for representation learning.
- A Raw Branch processes the original input. Its parameters are updated via an Exponential Moving Average (EMA) of the Mask Branch, which provides a stable target and prevents training instabilities.
- Latent Reconstruction: Instead of reconstructing pixels, HRSSM aligns the latent features of the masked branch with those of the raw branch.
- Bisimulation Similarity Loss: To ensure the latent space is task-aware, the authors use a similarity loss based on the bisimulation principle. This maps states that have similar immediate rewards and similar future dynamics to nearby points in the latent space.
Datasets
The researchers evaluated HRSSM across several challenging benchmarks designed to test robustness:
- DeepMind Control (DMC) Suite: The standard "clean" benchmark for continuous control.
- Distracted DMC: A modified version where backgrounds are replaced with grayscale natural videos from the Kinetics-400 dataset.
- ManiSkill2 with Distractions: A complex manipulation benchmark (e.g., lifting a cube, turning a faucet) enhanced with realistic, high-detail backgrounds from the Matterport3D (HM3D) environment.
Key Insights and Ideas
- RL Needs Less Masking than CV: In pure Computer Vision (like Masked Autoencoders), masking ratios as high as 90% are common. However, the authors found that for RL, a 50% mask ratio is ideal. RL agents need to retain more spatio-temporal information to accurately model the sequential dynamics required for control.
- Bisimulation + Masking = Synergy: Bisimulation helps identify what is important for the task (reward-relevant), while masking helps make the representation compact and robust to visual noise. Neither is as effective on its own as they are together.
- Stability via EMA: Jointly training dynamics, representations, and policies is notoriously unstable. Using an EMA-updated "raw" branch to provide a stable target for the "mask" branch significantly mitigates representation drift.
Key Results
HRSSM demonstrated superior performance and robustness across the board:
- Robustness to Noise: In the Distracted DMC tasks, HRSSM consistently outperformed state-of-the-art baselines like DreamerV3 and RePo. For example, in
walker_walkwith video distractions, HRSSM maintained high performance while others saw significant drops. - Reliability in Complex Tasks: In the ManiSkill
Lift Cubetask, HRSSM achieved a score of 284 ± 85, matching the top performer (TIA) but with significantly lower variance, indicating a much more stable and reliable learning process. - Efficiency: Despite having a dual-branch structure, HRSSM's training time is comparable to DreamerV3 because gradients only flow through the mask branch.
Limitations and Future Work
The authors acknowledge that their random masking strategy is a bit of a "blunt instrument." In some cases, like the cartpole_swingup task, random masking might accidentally hide a tiny but crucial element (like the pole itself), leading to failure.
Future work could involve developing task-specific or learned masking strategies that use signal-to-noise ratios to intelligently decide which parts of an image to discard. Additionally, the reliance on reward signals for bisimulation means the model might struggle in extremely sparse reward environments, a challenge the authors suggest could be addressed with goal-conditioned RL or reward re-labeling.
Summary updated