End-to-End Pixel-Based Deep Active Inference for Body Perception and Action

Cansu Sancaktar, Marcel van Gerven, Pablo Lanillos · DOI

TL;DR

PixelAI is a new algorithm that scales neuroscience-inspired "active inference" to handle raw visual data using deep convolutional decoders. By minimizing the discrepancy between observed pixels and "imagined" sensations, a Nao robot can autonomously estimate its body pose and perform reaching tasks without needing a predefined rigid body model or an explicit control policy.

What Problem Does This Paper Address?

Traditional robotics typically relies on fixed, rigid-body models to calculate how a robot should move. However, these models are brittle; any mechanical wear, sensor noise, or change in the environment can lead to failure. In contrast, humans possess a flexible "body schema" that adapts to changes (like the famous "rubber hand illusion").

While the Free Energy Principle (FEP) from neuroscience offers a compelling mathematical framework for this kind of adaptive perception and action, it has historically struggled to scale to high-dimensional inputs like raw camera images. This paper addresses the gap between theoretical active inference and practical, pixel-based robotic control.

Methods

The authors introduce PixelAI, which unifies perception and action into a single variational inference problem.

  1. The Generative Model: Instead of a manual kinematic model, the authors train a deep convolutional decoder (shown in Figure 2) that maps the robot's internal belief $\mu$ (joint angles) to an expected visual sensation $g(\mu)$. Figure 2: Network Architecture of the Convolutional Decoder
  2. Perceptual Inference: The robot compares its actual camera feed to the image generated by its decoder. It then uses the resulting "visual prediction error" to update its internal belief $\mu$ via backpropagation through the decoder.
  3. Active Inference (Action): To move, the robot generates joint velocities that minimize the same prediction error. Essentially, the robot "imagines" a goal state in visual space, and the resulting error drives the physical motors to make reality match that imagination. Figure 1: Pixel-based deep active inference (PixelAI) loop
Figure 2: Network Architecture of the Convolutional Decoder (FC: Fully-connected layer, R: Reshape operator, UpConv: Transposed Convolution, Conv: Convolution)
Figure 1: Pixel-based deep active inference (PixelAI). The robot infers its body (e.g., joint angles) by minimizing the visual prediction error, i.e. discrepancy between the camera sensor value xv and the expected sensation g(µ) computed using a convolutional decoder. The error signal is used to update the internal belief to match the observed sensation (perceptual inference) and to generate an action a to reduce the discrepancy between the observed and predicted sensations. Both are computed by minimizing the variational free-energy bound.

Datasets

The model was trained on a dataset of 3,200 samples consisting of joint angles for a Nao robot's left arm and corresponding images from its bottom camera. The data was collected using three methods:

  • Random sampling: Drawing angles from a uniform distribution.
  • Manual guidance: An operator moved the robot's arm to ensure the hand remained centered in the frame.
  • Gaussian sampling: Using Expectation-Maximization to fit a distribution to the "centered" data to introduce controlled randomness.

Evaluation was performed on both a simulated Nao (Gazebo) and a physical Nao robot across three benchmark levels of increasing difficulty (Close, Far, and Random poses).

Key Insights and Ideas

  • Perception and Action as Error Minimization: The core "aha moment" is that both figuring out where your arm is (perception) and moving it to a target (action) can be solved by the same mechanism: minimizing the difference between what you see and what you expect to see.
  • Scaling via Deep Learning: By using a convolutional decoder, the authors bypass the need for complex hand-coded feature extraction (like tracking specific markers or keypoints). The network learns the relevant visual features of the arm itself.
  • Control Without a Policy: Unlike Reinforcement Learning, which requires learning a specific policy (mapping states to actions), PixelAI generates actions "on the fly" by following the gradient of the free-energy bound toward a goal image.

Key Results

  • High Accuracy in Simulation: In the simulated environment, the robot achieved highly accurate body estimation. For "Level 1" (close poses), the mean absolute error for the shoulder pitch was just 0.259°.
  • Robustness to Randomness: Even when initialized with a totally random arm pose (Level 3), the algorithm was able to converge, though it faced higher errors (around 5° to 17° depending on the joint) due to the complexity of the visual search space.
  • Real-World Transfer: The system successfully ran on a physical Nao robot (Figure 3). Despite real-world challenges like mechanical backlash ($\pm 5^\circ$) and lighting variations, the robot could still infer its pose and reach visual goals. Figure 3: Experimental setup in simulation and with the real robot
Figure 3: Experimental setup in simulation (Gazebo) and with the real robot.

Limitations and Future Work

  • Local Minima: Because the algorithm relies on gradient descent, it can get stuck in local minima—situations where two different joint configurations look visually similar to the camera.
  • Temporal Dynamics: The current implementation assumes a simplified model where the first-order dynamics (velocity) are zero at equilibrium. The authors suggest that adding explicit velocity information would lead to smoother, more natural motion.
  • Scaling to Complexity: While successful for a single arm, scaling this to full-body coordination or complex sequential tasks (like manipulation) remains a challenge for future research.

Summary updated

BibTeX
@inproceedings{sancaktar2020end,
  author = {Cansu Sancaktar and Marcel van Gerven and Pablo Lanillos},
  title = {{End-to-End Pixel-Based Deep Active Inference for Body Perception and Action}},
  booktitle = {ICDL-EPIROB},
  year = {2020},
  doi = {10.1109/icdl-epirob48136.2020.9278105},
}
Figure