Active inference
Active inference is the process by which an agent selects actions to minimize expected free energy, a quantity that combines the cost of being surprised by outcomes with the cost of failing to resolve uncertainty. Developed by Karl Friston as the action-oriented counterpart to the free energy principle, active inference reframes behavior as inference: instead of choosing actions to maximize reward, an agent chooses actions to minimize the divergence between its expected and preferred future states. The framework unifies perception, action, and decision-making under a single variational principle, making it one of the most ambitious attempts to dissolve the boundary between cognition and behavior in contemporary systems theory.
The agent in active inference is not a utility maximizer but a model validator. It maintains a generative model of the environment — a probabilistic mapping from hidden states to observable consequences — and acts to make that model accurate. Where predictive processing describes how the brain updates its model in response to prediction error, active inference describes how the brain changes the world to make the prediction error small. Perception and action are two modes of the same inferential process: the former reduces surprise by updating beliefs, the latter by changing the world.
The Mathematics of Expected Free Energy
At the core of active inference is the expected free energy of a policy, denoted G(π). This quantity decomposes into two terms: pragmatic value (the divergence between predicted and preferred outcomes) and epistemic value (the reduction in uncertainty about the world that a policy affords). A policy that minimizes expected free energy is one that both achieves the agent's goals and learns about the environment — a balance that natural selection appears to have optimized for in biological systems.
The expected free energy of a policy is computed by propagating the agent's generative model forward in time under each candidate policy, then evaluating the divergence between the predicted future and the agent's prior preferences. The policy with the lowest expected free energy is selected, and the agent acts to sample from the distribution that policy implies. This is not reinforcement learning; there is no external reward function. The agent's preferences are encoded as prior beliefs about future states, and behavior is the process of making those beliefs true.
The mathematical formalism draws on variational inference and the Kullback-Leibler divergence. The expected free energy bound is a generalization of the free energy bound for static inference, extended to the temporal domain. It connects active inference to control theory, where the cost function is replaced by a divergence, and to information theory, where the epistemic component corresponds to the mutual information between actions and hidden states.
Active Inference as a Unifying Framework
Active inference claims to subsume several major frameworks in neuroscience and artificial intelligence. In neuroscience, it provides a normative account of action selection: the motor cortex does not command muscles but predicts proprioceptive states, and the peripheral nervous system fulfills those predictions through reflex arcs. This "action as fulfillment of prediction" mechanism collapses the distinction between perception and action that has dominated cognitive science since the cognitive revolution.
In robotics, active inference offers an alternative to classical control theory and reinforcement learning. Rather than optimizing a cost function or reward signal, an active inference robot minimizes expected free energy by exploring uncertain regions of its environment and exploiting known paths to preferred states. The trade-off between exploration and exploitation emerges naturally from the epistemic and pragmatic components of expected free energy, without requiring an epsilon-greedy heuristic or entropy bonus.
The framework also connects to thermodynamics and complex adaptive systems. The expected free energy of a policy is bounded by the thermodynamic work required to implement that policy, and the epistemic component corresponds to the mutual information between the agent's actions and the hidden states of the environment. This suggests that active inference is not merely a computational theory but a physical one — that the imperative to minimize expected free energy is as fundamental as the imperative to minimize thermodynamic free energy.
Criticisms and Limitations
The primary criticism of active inference is that it risks being unfalsifiable. If any behavior can be redescribed as minimizing expected free energy, then the framework explains everything and predicts nothing. Proponents respond that the framework makes specific, quantitative predictions about precision dynamics, policy selection, and the role of neuromodulators in encoding uncertainty. But these predictions remain difficult to test in complex, naturalistic environments where the agent's generative model is itself unknown and evolving.
A second criticism concerns tractability. Computing expected free energy for all policies requires a complete generative model of the environment — something no real agent possesses. The brain does not have a joint probability distribution over all possible future states. Approximations are necessary, and the quality of active inference depends on the quality of the generative model. A bad model produces bad behavior, and the framework has little to say about how good models are acquired in the first place.
Active inference is the most ambitious attempt to dissolve the boundary between perception and action since James Gibson's ecological psychology. But where Gibson grounded his theory in the structure of the environment, active inference grounds its theory in the structure of inference itself. The risk is that the framework becomes a theory of everything and a theory of nothing — a beautiful mathematical system that describes the world without constraining it. Whether it transcends this risk depends on whether it can generate predictions that no other framework could have made, and whether those predictions survive contact with the nervous systems of living, behaving organisms.