Model Reduction Through Progressive Latent Space Pruning in Deep Active Inference

Samuel T. Wauthier, Cedric De Boom, Ozan Çatal, Tim Verbelen, Bart DhoedtFrontiers Neurorobotics 2022 · DOI

Abstract

Deep Active Inference models rely on generative models to predict environment states and plan actions. However, determining the optimal dimensionality of the latent space often requires manual tuning. This paper introduces two automated pruning methods—Off-Line and On-Line Sleep—inspired by biological synaptic pruning. These methods allow models to autonomously optimize the balance between representational accuracy and computational complexity. Evaluations across Mountain Car, Car Racing, and real-world Robot Navigation tasks demonstrate that these techniques significantly reduce latent dimensionality without compromising performance, with the On-Line approach showing superior efficiency.

Introduction

In Deep Active Inference, agents utilize neural networks to learn a generative model of their environment. This "mental map" is crucial for predicting future observations and selecting actions that minimize expected free energy. A persistent challenge in designing these agents is selecting the appropriate dimensionality for the latent space ($s_t$). An undersized latent space fails to capture essential task details, while an oversized one leads to overfitting, increased memory usage, and slower planning.

Architecture of a Deep Active Inference model showing the relationship between states, actions, and observations.

Currently, researchers typically determine latent dimensions through trial and error. This study proposes automating this process by allowing models to prune redundant dimensions, effectively mimicking the complexity reduction observed in biological brains during sleep.

Methodology

The authors propose two strategies for latent space reduction:

1. Off-Line Sleep (Post-hoc Reduction)

This method involves a "dreaming" phase after initial training. The model generates sequences of latent vectors, which are then analyzed using Singular Value Decomposition (SVD). Dimensions contributing minimally to variance are pruned, followed by a retraining phase. This cycle repeats until the dimensionality stabilizes.

2. On-Line Sleep (Reflection during Training)

The On-Line approach integrates pruning directly into the training process. Each latent dimension is controlled by a "gate" (a Bernoulli parameter). The model employs $L_0$ regularization to minimize the number of active gates. To handle the non-differentiable nature of gates, the authors use the ARM (Augment-REINFORCE-Merge) gradient estimator alongside GECO (generalized ELBO with constraint optimization). GECO ensures that pruning only commences once the model achieves a specific reconstruction accuracy threshold, preventing premature loss of information.

Experimental Evaluation

The methods were tested on three distinct environments:

  • Mountain Car: A 1D control task with a known optimal dimensionality of 2 (position and velocity).
  • Car Racing: A high-dimensional, pixel-based environment requiring navigation from a top-down perspective.
  • Robot Navigation: A real-world dataset involving camera feeds from a Turtlebot in a laboratory setting.

Results and Discussion

A key observation in the On-Line approach is the non-linear reduction of dimensionality. The model maintains a high number of active dimensions during early learning phases and then exhibits a sharp decline—a "moment of insight"—once the underlying structure of the environment is grasped.

Dynamics of On-Line pruning: (A) Free energy stabilization and (B) the reduction in the expected number of open gates over training epochs.

Efficiency and Performance

In the Car Racing environment, the On-Line method reached an optimal dimensionality (5–7 dimensions) in approximately 4,800 epochs, significantly faster than the 21,600 epochs required by the Off-Line method. In the Mountain Car task, both methods successfully pruned a 16-dimensional initial space to the physically required 2 dimensions.

Furthermore, the On-Line method demonstrated robustness to initialization; models starting with 32 or 128 dimensions converged to similar final sizes. In the Robot Navigation task, reducing the latent space from 128 to 15 dimensions resulted in image reconstructions that were visually indistinguishable from the high-dimensional baseline, proving the method's efficacy in real-world scenarios.

Conclusion and Future Work

This research demonstrates that Deep Active Inference models can autonomously find a "Goldilocks" latent dimensionality through biologically inspired pruning. While the methods reduce the need for manual dimension tuning, they introduce sensitivity to the accuracy threshold ($\tau$). Future work will explore model expansion, allowing agents to grow their latent space when encountering novel, complex environments, creating a truly adaptive generative model.

Summary updated

BibTeX
@article{wauthier2022model,
  author = {Samuel T. Wauthier and Cedric De Boom and Ozan Çatal and Tim Verbelen and Bart Dhoedt},
  title = {{Model Reduction Through Progressive Latent Space Pruning in Deep Active Inference}},
  journal = {Frontiers Neurorobotics},
  year = {2022},
  doi = {10.3389/fnbot.2022.795846},
}
Figure