NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Deep active inference agents using Monte-Carlo methods

Zafeirios Fountas, Noor Sajid, Pedro A. M. Mediano, Karl J. Friston

TL;DR

This paper introduces a scalable neural architecture that brings Active Inference—a leading theory of biological intelligence—into complex, continuous environments. By combining deep learning with Monte-Carlo methods, the authors create agents that don't just maximize rewards, but actively explore their world, learn disentangled representations, and can navigate "in the dark" using internal mental simulations.

The Challenge: Scaling Active Inference

For years, the Free Energy Principle and its corollary, Active Inference, have been influential in neuroscience. The theory suggests that biological brains function by constantly trying to minimize "surprise" (variational free energy). While theoretically elegant, turning this into a functional AI agent has been difficult.

Most previous implementations were restricted to "toy" problems with small, discrete grids. Scaling Active Inference to high-dimensional, continuous spaces (like 3D navigation) is computationally expensive because it requires the agent to simulate many possible futures to calculate Expected Free Energy (EFE). This paper bridges the gap between biological theory and modern deep reinforcement learning (RL) by providing a framework that scales.

A Deep Active Inference Architecture

The authors propose a "Deep Active Inference" architecture that uses several clever techniques to handle complexity:

Graphical model of the Deep Active Inference architecture, showing the generative model, transition dynamics, and Monte-Carlo Tree Search.
  1. Monte-Carlo Tree Search (MCTS): Instead of calculating every possible future, the agent uses MCTS to selectively explore the most promising paths, making planning in continuous spaces tractable.
  2. The Habitual Network: To speed up decision-making, the agent trains a "habitual" feed-forward network to mimic the successful plans found by the "deliberative" MCTS. This mimics the biological transition from conscious planning to automatic habits.
  3. MC-Dropout for Curiosity: To implement "active learning," the agent needs to know what it doesn't know. By using MC-dropout (randomly turning off neurons during inference), the agent estimates its own uncertainty about the world's dynamics, driving it to explore novel areas.
  4. Top-Down Precision (Attention): The model includes a mechanism that modulates the "precision" of state transitions. When the agent is uncertain about its policy, it lowers the precision of its internal model, forcing the neural network to learn more robust, independent (disentangled) features of the environment.

Experimental Environments

The researchers evaluated their agents on two main benchmarks:

  • Dynamic dSprites: A new 2D environment created by the authors based on the classic dSprites dataset. Agents must move shapes to specific zones, designed to test if an agent can "disentangle" latent factors like shape, position, and scale.
  • Animal-AI: A complex 3D environment inspired by animal cognition tests. It requires navigation, obstacle avoidance, and planning to reach goals.

Key Insights: Exploration, Disentanglement, and Mental Simulation

  • Exploration is Built-In: Unlike standard RL, where exploration is often an "add-on" (like epsilon-greedy), Active Inference treats exploration as a fundamental part of the objective function. The agent is mathematically driven to resolve uncertainty.
  • Disentanglement via Attention: The "precision" mechanism acts similarly to a $\beta$-VAE. By modulating how much the agent trusts its internal transitions, the model naturally learns to separate independent factors of the world (e.g., separating "where an object is" from "what an object is").
  • Mental Simulation: Because the agent learns a generative model of the world, it can "see" without input. In "lights-off" experiments, the agent continues to navigate successfully for several steps by simulating the expected results of its actions in its "mind's eye."
Mental simulation during blackout periods. The agent successfully predicts future states even when visual input is temporarily suspended.

Performance and Results

  • Stability: In the Animal-AI environment, the Deep Active Inference agent performed significantly better than DQN and A2C. While it performed comparably to PPO2 (a state-of-the-art RL algorithm), it showed much lower variance across training runs, suggesting a more stable and reliable learning process.
  • Superior World Models: The agents were better at reconstructing rewards and predicting future states than baseline reward-maximizing agents, proving that the Active Inference objective leads to a deeper understanding of environmental dynamics.
  • Planning Efficiency: By using the habitual network to guide MCTS, the agent achieved high performance with relatively few search loops, demonstrating a successful "fast vs. slow" thinking architecture.

Limitations and Future Work

The authors note that while their agent is more biologically plausible and stable, it isn't yet a "silver bullet" for beating state-of-the-art RL in pure reward maximization. If the only goal is to get the highest score, a simple reward-maximizer might still be more efficient in some cases.

Future work includes scaling to longer time horizons using architectures like LSTMs, integrating episodic memory to improve long-term planning, and further exploring how components like the precision factor map onto actual neuromodulators in the brain (such as dopamine and noradrenaline).

Summary updated

BibTeX
@inproceedings{fountas2020deep,
  author = {Zafeirios Fountas and Noor Sajid and Pedro A. M. Mediano and Karl J. Friston},
  title = {{Deep active inference agents using Monte-Carlo methods}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=12EZyVD2Ok},
}
Figure