Contrastive Active Inference

Pietro Mazzaglia, Tim Verbelen, Bart Dhoedt
10/19/2021
cs.LG
rlcontrastive-ssl

Official code: mazpie/contrastive-aif (15 stars, Python, MIT, last commit 2024-01-22).

Abstract

Active inference is a unifying theory for perception and action resting upon the idea that the brain maintains an internal model of the world by minimizing free energy. From a behavioral perspective, active inference agents can be seen as self-evidencing beings that act to fulfill their optimistic predictions, namely preferred outcomes or goals.

Show full abstract

In contrast, reinforcement learning requires human-designed rewards to accomplish any desired outcome. Although active inference could provide a more natural self-supervised objective for control, its applicability has been limited because of the shortcomings in scaling the approach to complex environments. In this work, we propose a contrastive objective for active inference that strongly reduces the computational burden in learning the agent's generative model and planning future actions. Our method performs notably better than likelihood-based active inference in image-based tasks, while also being computationally cheaper and easier to train. We compare to reinforcement learning agents that have access to human-designed reward functions, showing that our approach closely matches their performance. Finally, we also show that contrastive methods perform significantly better in the case of distractors in the environment and that our method is able to generalize goals to variations in the background. Website and code: https://contrastive-aif.github.io/

View on arXivView PDF

Code Implementations(1)

MIT

[NeurIPS 2021] World modelling and action learning using a contrastive formulation of the active inference framework, for reaching visual goal states

151PythonJan 15, 20242 years agoMIT
action-learningactive-inferencecontrastive-learningfree-energyworld-models

Similar Papers

Cite this paper

@article{mazzaglia2021contrastive,
  title  = {Contrastive Active Inference},
  author = {Pietro Mazzaglia and Tim Verbelen and Bart Dhoedt},
  year   = {2021},
  eprint = {2110.10083},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.10083}
}

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/2110.10083.svg)](https://codeofpaper.com/paper/2110.10083)

Discussion