Inference of Affordances and Active Motor Control in Simulated Agents

Fedor Scholz, Christian Gumbsch, Sebastian Otte, Martin V. Butz

Abstract

Active Inference provides a robust framework for agent behavior based on the minimization of expected free energy. However, its application in complex, high-dimensional environments is often limited by computational costs. This paper proposes a modular neural network architecture that bridges the gap between low-level motor control and high-level perception by learning "affordances"—action possibilities relative to the environment. Our model utilizes a vision-based context encoder and a transition model trained end-to-end via self-supervised learning. Results indicate that agents can autonomously develop affordance maps that facilitate zero-shot generalization to novel environments and effective navigation through uncertain terrains.

Introduction

In computational neuroscience and artificial intelligence, the Free Energy Principle suggests that agents act to minimize surprise or uncertainty. While standard Active Inference is theoretically powerful, it typically requires simulating exhaustive future action sequences, which is computationally prohibitive in complex settings.

Humans and animals circumvent this by perceiving affordances: the functional properties of the environment that enable specific actions. For instance, a handle is perceived as "pull-able" rather than a set of geometric coordinates. This research addresses the integration of learned affordance maps into the Active Inference framework, allowing agents to navigate complex worlds by understanding what actions are possible in their immediate vicinity.

The high-level interaction loop between the agent and the environment, showing the relationship between action selection, the world model ($t_M$), and the physical environment (env).

Methodology

The proposed architecture consists of three primary neural modules designed to process environmental information and predict future states:

  1. Vision Model ($v_M$): A Convolutional Neural Network (CNN) that processes local "patches" of the environment, compressing them into a latent context code ($c$).
  2. Transition Model ($t_M$): A multilayer perceptron that predicts the next state (change in position $\Delta p$) based on the current action ($a$) and the context code ($c$) provided by the vision model.
  3. Look-up Map ($\omega$): A global representation that the agent probes to extract local visual information ($v^t$) at its current position ($p^t$).
The internal neural architecture of the agent, illustrating the flow from the global map $\omega$ through the vision model $v_M$ to the transition model $t_M$, ultimately calculating the free energy for planning.

The system is trained end-to-end using self-supervised learning. The agent explores its environment, observing the outcomes of its actions and minimizing the Negative Log-Likelihood of its predictions. For navigation, the agent employs either gradient-based inference or the Cross-Entropy Method (CEM) to optimize action sequences that minimize Expected Free Energy (EFE).

Results and Key Insights

Emergent Affordance Maps

A significant finding of this work is the emergence of affordance maps within the latent context codes ($c$). Without explicit supervision, the agent learns to categorize visual patterns based on their impact on movement—distinguishing between obstacles, free space, and terrains with directional forces (e.g., "upward push").

Zero-Shot Generalization

Because the agent's perception is localized to visual patches rather than global coordinates, it demonstrates remarkable robustness. Agents trained in one set of environments were able to navigate procedurally generated maps with novel obstacle configurations immediately, without further training.

Active Uncertainty Avoidance

By adjusting the weight of the entropy term ($\beta$) in the EFE calculation, agents were observed to actively avoid "foggy" regions where sensory noise increased prediction uncertainty. In experimental trials, agents using context-aware active inference reached their goals while avoiding uncertain regions nearly 100% of the time, whereas baseline models without context failed to navigate these challenges.

Discussion and Future Work

While the current model successfully integrates affordances into active motor control, several limitations remain. The agent currently employs a "greedy" planning horizon (20 steps), which can lead to local minima in complex layouts (e.g., the "key and door" problem). Furthermore, the agent lacks a persistent internal memory, relying instead on a look-up map for local perception.

Future research will explore the integration of Recurrent Neural Networks (RNNs) to provide temporal memory and investigate methods for better "disentangling" environmental properties within the learned context codes. This work represents a step toward more biologically plausible and computationally efficient agents capable of navigating the inherent uncertainties of the real world.

Summary updated

BibTeX
@article{scholz2022inference,
  author = {Fedor Scholz and Christian Gumbsch and Sebastian Otte and Martin V. Butz},
  title = {{Inference of Affordances and Active Motor Control in Simulated Agents}},
  journal = {Frontiers Neurorobotics},
  year = {2022},
  doi = {10.3389/fnbot.2022.881673},
}
Figure