Abstract
In traditional machine learning, model architectures are typically pre-defined by researchers, leaving the agent to learn only the parameters within a fixed structural constraint. This paper introduces a framework for supervised structure learning within the Active Inference paradigm, allowing agents to autonomously discover the architecture of their own generative models. By treating model selection as an "active" process guided by Expected Free Energy (EFE), agents learn to disentangle object identity from dynamics and solve complex planning tasks from scratch. We demonstrate the efficacy of this approach on MNIST, dSprites, and the Tower of Hanoi, showing that agents can "carve nature at its joints" through a combination of Bayesian model reduction, expansion, and structured curriculum learning.
Introduction
A fundamental challenge in artificial intelligence is the discovery of relevant latent factors in an environment. While deep learning models excel at parameter optimization, they often struggle with structural flexibility. Biological agents, by contrast, do not possess pre-baked architectures for every novel task; they must identify which "factors" of their world—such as an object's identity versus its spatial location—are relevant for prediction and action.
This research addresses the problem of automatic structure discovery. The authors propose a method for agents to decide when to expand their internal models (adding latent states or factors) or prune them (removing redundant parameters). Central to this process is the concept of a curriculum: learning the "physics" of a world requires data to be presented in a specific ordinal sequence, much like a student learns basic arithmetic before calculus.
Methods: Active Inference and Structure Selection
The framework is built upon Active Inference, where agents minimize variational Free Energy to maintain an accurate model of their environment. Unlike standard approaches that optimize a fixed graph, this work generalizes the concept of "action" to include the selection of the model structure itself.
Active Selection and Expected Free Energy
The agent uses Expected Free Energy (EFE) as a prior to score different potential model structures. In this context, EFE acts as a "constrained mutual information" metric, favoring models that are simultaneously accurate and provide the highest information gain. This allows the agent to actively seek out structures that resolve uncertainty about the environment's underlying causal laws.
Discrete Generative Models
The research utilizes discrete state-space models, specifically Partially Observable Markov Decision Processes (POMDPs). As shown in Figure 1, the model relates hidden states ($s$) to observations ($o$) via a likelihood mapping ($A$) and defines state transitions ($B$) influenced by actions ($u$).
The use of discrete tensors allows for explicit, human-interpretable semantics. For instance, a specific state can be mapped directly to a concept like "Red Ball" or "Position (1,1)."
Bayesian Model Reduction and Expansion
To manage structural complexity, the agent employs two complementary processes:
- Expansion: The model grows "bottom-up" by adding new states when it encounters novel data that its current structure cannot explain.
- Reduction: Through Bayesian Model Reduction (BMR), the agent prunes its model "top-down," removing redundant parameters that do not contribute significantly to the evidence, thereby preventing overfitting and improving generalization.
Experimental Results
The framework was evaluated across three benchmarks designed to test different aspects of structure learning.
MNIST: Efficiency and Pruning
On the MNIST handwritten digit dataset, the agent learned to distinguish digit classes and styles. Using only 2,048 exemplars per digit, the model achieved approximately 96% accuracy. Notably, applying BMR after training allowed the agent to remove over 65,000 redundant parameters, which actually resulted in a slight increase in classification accuracy by simplifying the model's hypothesis space.
dSprites: Disentanglement
Using a simplified dSprites grid-world, the authors tested the agent's ability to "disentangle" latent causes. The model successfully discovered "factorial depth," learning that an object's identity (shape) and its location (horizontal/vertical position) are independent factors. This sparse representation allows the agent to predict the outcome of movements for any shape, even those it has not seen in specific positions before.
Tower of Hanoi: Learning the Rules of the Game
The Tower of Hanoi puzzle served as a test for learning complex transition rules. By observing sequences of moves, the agent learned the "physics" of the game—the legal and illegal transitions between tower configurations. With a sufficient planning depth (5 steps), the agent achieved a 100% success rate in solving the puzzle from arbitrary starting positions.
Discussion
The core insight of this work is that structure is inference. Building a model architecture is not a separate engineering step but a form of Bayesian inference performed by the agent itself. By placing a prior on model selection based on EFE, the agent naturally seeks out the most parsimonious and informative representation of reality—effectively "carving nature at its joints."
While discrete models offer superior explainability and efficient computation of information gain, they face scaling challenges. Processing large datasets like MNIST remains slower than gradient-based methods due to the need for per-observation inference. Furthermore, the "supervised" nature of the curriculum suggests that while the agent can learn structure, it still benefits significantly from a structured presentation of data. Future work will explore how agents might autonomously generate their own "optimal curricula" through exploratory "motor babbling" and how to integrate these discrete structures with continuous dynamics for more complex real-world environments.
Summary updated