Active inference and the two-step task

Sam Gijsen, Miro Grundei, Felix BlankenburgScientific 2022

Abstract

Sequential decision problems distill important challenges frequently faced by humans. Through repeated interactions with an uncertain world, unknown statistics need to be learned while balancing exploration and exploitation. Reinforcement learning is a prominent method for modeling such behaviour, with a prevalent application being the two-step task. However, recent studies indicate that the standard reinforcement learning model sometimes describes features of human task behaviour inaccurately and incompletely. We investigated whether active inference, a framework proposing a trade-off to the exploration-exploitation dilemma, could better describe human behaviour. Therefore, we re-analysed four publicly available datasets of the two-step task, performed Bayesian model selection, and compared behavioural model predictions. Two datasets, which revealed more model-based inference and behaviour indicative of directed exploration, were better described by active inference, while the models scored similarly for the remaining datasets. Learning using probability distributions appears to contribute to the improved model fits. Further, approximately half of all participants showed sensitivity to information gain as formulated under active inference, although behavioural exploration effects were not fully captured. These results contribute to the empirical validation of active inference as a model of human behaviour and the study of alternative models for the influential two-step task.

Introduction: Beyond Random Exploration

For over a decade, the "two-step task" has served as a primary experimental paradigm for investigating how humans balance habitual (model-free) and goal-directed (model-based) strategies. Traditionally, Reinforcement Learning (RL) has been the dominant framework for analyzing these behaviors. However, standard RL models often struggle to explain the nuances of human exploration, frequently reducing it to "noise" or random choice.

In contrast, humans often explore purposefully to resolve uncertainty. This study investigates whether Active Inference (AI)—a framework rooted in theoretical biology—can provide a more accurate account of human behavior by treating exploration as an intentional drive to minimize "expected free energy," thereby balancing reward-seeking with information gain.

The Two-Step Task Paradigm

The two-step task requires participants to make sequential choices to obtain rewards. As shown in Figure 3, an initial choice in state $s_A$ leads to one of two second-stage states ($s_B$ or $s_C$) with specific transition probabilities. The reward probabilities in the second stage fluctuate over time, forcing participants to continuously update their beliefs and decide when to exploit known rewards versus when to explore potentially better options.

The structure of the two-step task, illustrating transitions from an initial state to subsequent stages based on participant actions.

Comparing Computational Frameworks

The research compared two primary computational families across four diverse datasets:

  1. Hybrid RL: A classic model combining model-free and model-based strategies using point-estimate "Q-values."
  2. Active Inference (AI): A probabilistic framework where agents minimize expected free energy. Unlike RL, AI models in this study utilized probabilistic learning (Beta distributions) to track environmental statistics.

To identify the most effective learning mechanisms, the authors tested several AI variants incorporating different "forgetting" or "surprise-based" learning rules, such as Delta-Update (DU), Delta-Surprise (DS), and Precision-Surprise (PS).

Visualization of different model components (DU, DS, PS) used to test variants of the Active Inference framework against human behavioral data.

Key Results: The Advantage of Active Inference

The study re-analyzed data from four major sources: the large-scale "Online" dataset (Kool et al.), the "Magic Carpet" and "Spaceship" datasets (da Silva & Hare), and a "Shock" avoidance dataset (Lockwood et al.).

Model Superiority in Goal-Directed Contexts

Active Inference significantly outperformed RL in the "Magic Carpet" and "Spaceship" datasets, achieving an exceedance probability of > 0.99. These datasets were characterized by more intuitive instructions that encouraged model-based planning. This suggests that when humans engage in deep, goal-directed thinking, their behavior aligns more closely with the principles of Active Inference than standard RL.

Sensitivity to Information Gain

A critical finding was that approximately 50% of participants demonstrated a clear sensitivity to information gain. These individuals did not merely pursue the highest immediate reward; they assigned intrinsic value to options that helped them learn about the environment's changing statistics. This "information bonus" is a natural emergent property of the Active Inference framework but is absent in standard RL.

The Role of Probabilistic Learning

The use of probability distributions allowed AI models to better capture how humans update beliefs in volatile environments. Specifically, surprise-based learning rules helped the models "forget" outdated information more effectively, mirroring the adaptive nature of human cognition.

Limitations and Future Directions

While Active Inference provided a superior fit in several contexts, it did not fully capture the total magnitude of exploration effects seen in human data. Humans appear even more sensitive to state transitions than current AI models predict. Furthermore, the two-step task itself often confounds reward and information, making it difficult to isolate "pure" exploration.

Future research may benefit from hierarchical Active Inference models that explicitly estimate environmental volatility. Additionally, integrating "habitual" components into the AI framework could help capture the full spectrum of human decision-making phenotypes across more diverse task structures.

Summary updated

BibTeX
@inproceedings{gijsen2022active,
  author = {Sam Gijsen and Miro Grundei and Felix Blankenburg},
  title = {{Active inference and the two-step task}},
  booktitle = {Scientific},
  year = {2022},
  doi = {10.1038/s41598-022-21766-4},
}
Figure