Deep active inference agents using Monte-Carlo methods

Zafeirios Fountas, Noor Sajid, Pedro A. M. Mediano, Karl Friston
6/7/2020
q-bio.NCcs.AIstat.ML

Official code: zfountas/deep-active-inference-mc (102 stars, Python, GPL-3.0, last commit 2025-06-14).

Abstract

Active inference is a Bayesian framework for understanding biological intelligence. The underlying theory brings together perception and action under one single imperative: minimizing free energy.

Show full abstract

However, despite its theoretical utility in explaining intelligence, computational implementations have been restricted to low-dimensional and idealized situations. In this paper, we present a neural architecture for building deep active inference agents operating in complex, continuous state-spaces using multiple forms of Monte-Carlo (MC) sampling. For this, we introduce a number of techniques, novel to active inference. These include: i) selecting free-energy-optimal policies via MC tree search, ii) approximating this optimal policy distribution via a feed-forward `habitual' network, iii) predicting future parameter belief updates using MC dropouts and, finally, iv) optimizing state transition precision (a high-end form of attention). Our approach enables agents to learn environmental dynamics efficiently, while maintaining task performance, in relation to reward-based counterparts. We illustrate this in a new toy environment, based on the dSprites data-set, and demonstrate that active inference agents automatically create disentangled representations that are apt for modeling state transitions. In a more complex Animal-AI environment, our agents (using the same neural architecture) are able to simulate future state transitions and actions (i.e., plan), to evince reward-directed navigation - despite temporary suspension of visual input. These results show that deep active inference - equipped with MC methods - provides a flexible framework to develop biologically-inspired intelligent agents, with applications in both machine learning and cognitive science.

View on arXivView PDF

Code Implementations(1)

GPL-3.0

Deep active inference agents using Monte-Carlo methods

10218PythonJun 3, 20201 years agoGPL-3.0
active-inferenceanimal-aicognitive-architecturescognitive-sciencedisentangled-representations+7 more

Similar Papers

Cite this paper

@article{fountas2020deep,
  title  = {Deep active inference agents using Monte-Carlo methods},
  author = {Zafeirios Fountas and Noor Sajid and Pedro A. M. Mediano and Karl Friston},
  year   = {2020},
  eprint = {2006.04176},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2006.04176}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2006.04176.svg)](https://codeofpaper.com/paper/2006.04176)

Discussion