Abstract
Current reinforcement learning (RL) agents primarily operate through fast, intuitive "System 1" mapping of observations to actions. However, they often struggle in partially-observable environments due to an "amortization gap" in state estimation—where the neural network encoder provides a sub-optimal guess of the true environment state. This paper introduces Iterative Inference (II), a training-free method that enables "System 2" deliberate reasoning by refining an agent's current state representation through latent imagination. By optimizing the current state to minimize future surprise or model disagreement, II significantly improves perception and task performance in complex 3D environments without requiring additional training parameters.
Introduction
Human cognition is frequently characterized by Dual Process Theory: System 1 is fast, automatic, and intuitive, while System 2 is slow, logical, and deliberate. While deep RL agents have achieved remarkable success in System 1 tasks, they often falter in partially-observable (PO) environments. In these settings, the agent cannot perceive the entire state at once, leading to an "amortization gap" where the fixed encoder's state estimate is inaccurate.
To bridge this gap, we propose a decision-time refinement process. Instead of relying solely on the encoder's initial guess, the agent "thinks harder" by imagining potential futures and adjusting its current understanding of the world to make those futures more coherent.
Methodology: Iterative Inference
The proposed method builds upon DreamerV3, a model-based RL agent that utilizes a world model to simulate future trajectories. The core innovation is the Iterative Inference (II) loop, which occurs at every environment step during the inference phase.
As detailed in Algorithm 1, the process follows four primary steps:
- Latent Imagination: Starting from the current inferred state, the agent uses its world model to "roll out" multiple possible future trajectories of length $\lambda$.
- Inference Objectives: The agent evaluates these rollouts using two metrics:
- State Information Gain (SIG): Measures the "surprise" of future states relative to the model's predictions.
- Parameter Information Gain (PIG): Uses an ensemble of models to measure disagreement about future outcomes.
- Iterative Refinement: The current state is treated as an optimizable variable. The agent backpropagates the surprise or disagreement from the imagined futures to the current state, taking gradient steps to refine the estimate.
- Decision-Time Execution: This refinement happens entirely during inference. No model weights are updated; the agent simply improves its situational awareness before selecting an action $a_t$.
Experimental Setup
The authors evaluated Iterative Inference across diverse visual domains:
- DeepMind Lab (DMLab): Challenging first-person 3D environments (e.g., "Collect Good Objects") characterized by high partial observability.
- Atari: The game "Alien," representing a 2D, fully-observable (FO) environment.
- Miniworld: A custom Y-maze task designed to test navigation under sparse rewards and dynamic obstacles.
Key Results
The implementation of Iterative Inference led to substantial improvements in both internal world modeling and external task performance.
Closing the Amortization Gap
As shown in Figure 2, the refined states led to significantly higher PSNR (Peak Signal-to-Noise Ratio) and SSIM (Structural Similarity Index) across 3D tasks. This indicates that the agent's internal "mental image" of the environment became much more accurate through iteration. Notably, the benefits were most pronounced for agents with less pre-training, suggesting that "thinking slow" can compensate for a lack of trained intuition.
Task Performance and Observability
In DMLab, the II-enhanced agent consistently outperformed the baseline DreamerV3. The results highlighted a critical divide between PO and FO environments:
- In partially-observable 3D worlds, longer rollouts ($\lambda = 8$ or $16$) provided the best results as the agent needed to integrate more temporal information.
- In fully-observable Atari games, where the encoder is already highly accurate, long rollouts were occasionally counterproductive, with a "quick look" ($\lambda = 1$) being sufficient.
Discussion and Future Work
While Iterative Inference provides a powerful mechanism for improving agent performance, it introduces significant computational overhead due to the gradient steps required at every environment interaction. Future research may focus on "dynamic" reasoning—triggering System 2 processes only when a certain "uncertainty threshold" is met, rather than at every step. Additionally, the method's success is tied to the quality of the world model; if the model's imagination is hallucinatory, the refinement process may lead the agent astray.
In conclusion, Iterative Inference demonstrates that allowing agents to refine their perception through the lens of imagined futures is a viable path toward more robust and deliberate artificial intelligence.
Summary updated