Abstract
Despite being recognized as neurobiologically plausible, active inference faces difficulties when employed to simulate intelligent behaviour in complex environments due to its computational cost and the difficulty of specifying an appropriate target distribution for the agent. This paper introduces two solutions that work in concert to address these limitations. First, we present a novel planning algorithm for finite temporal horizons with drastically lower computational complexity. Second, inspired by Z-learning from control theory literature, we simplify the process of setting an appropriate target distribution for new and existing active inference planning schemes. Our first approach leverages the dynamic programming algorithm, known for its computational efficiency, to minimize the cost function used in planning through the Bellman-optimality principle. Accordingly, our algorithm recursively assesses the expected free energy of actions in the reverse temporal order. This improves computational efficiency by orders of magnitude and allows precise model learning and planning, even under uncertain conditions. Our method simplifies the planning process and shows meaningful behaviour even when specifying only the agent's final goal state. The proposed solutions make defining a target distribution from a goal state straightforward compared to the more complicated task of defining a temporally informed target distribution. The effectiveness of these methods is tested and demonstrated through simulations in standard grid-world tasks. These advances create new opportunities for various applications.
Introduction
Active Inference (ActInf) is a powerful framework from theoretical neuroscience that posits organisms act to minimize "surprise," or variational free energy. While it provides a unified account of perception, learning, and action, it has historically suffered from a "curse of dimensionality." In standard ActInf, planning requires calculating the Expected Free Energy (EFE) for every possible sequence of future actions. For an agent with 8 possible actions planning 15 steps ahead, this necessitates evaluating over 35 trillion policies ($8^{15}$), making it computationally prohibitive for complex tasks. This paper addresses this scaling problem and the difficulty of manually specifying target distributions for agents.
Methods
The authors propose two primary innovations to make active inference computationally viable:
1. DPEFE (Dynamic Programming in Expected Free Energy)
Instead of an exponential forward-looking tree search, the authors apply the Bellman optimality principle to ActInf. By recursively assessing the EFE in reverse temporal order—starting from the planning horizon and moving back to the present—the algorithm transforms computational complexity from exponential ($O(U^T)$) to linear ($O(T)$) relative to the planning horizon.
2. Learning Preferences via Z-learning
To simplify goal specification, the authors implement an online learning rule inspired by Z-learning from stochastic control theory. This rule updates the agent’s prior preferences ($C$) based on rewards encountered during exploration. This allows the agent to learn which states are desirable on the fly, enabling even agents with short planning horizons to behave intelligently as the value of distant goals is propagated back to immediate observations.
Experimental Results
The researchers evaluated these methods using standard grid-world environments of varying scales (up to 900 states), including both deterministic and stochastic variations.
- Computational Efficiency: For a planning horizon of $T=30$, DPEFE reduced the required operations from approximately $10^{68}$ (in sophisticated inference) to just $10^3$. This represents a shift from computationally impossible to instantaneous.
- Performance Benchmarks: DPEFE performed at par with Dyna-Q, a gold-standard model-based reinforcement learning algorithm.
- Robustness: In stochastic Partially Observable Markov Decision Process (POMDP) settings, where agents face noisy observations and transitions, the DPEFE agent significantly outperformed random agents and recovered faster than standard Q-learning.
Discussion and Conclusion
By integrating dynamic programming with active inference, the authors have bridged the gap between neurobiologically plausible models and the computational efficiency required for modern AI. The DPEFE algorithm maintains the unified mathematical umbrella of free energy minimization while achieving the scalability of classical reinforcement learning.
Future work will focus on scaling these discrete state-space insights to continuous, high-dimensional environments, such as robotics or raw video input. These advances suggest that biological systems may use similar recursive "shortcuts" to avoid the computational explosions inherent in long-term planning.
Summary updated