Fork the consciousness, or download the project and create your own. View Code on GitHub

Karl Friston's Free Energy Principle: What Active Inference Means for AI Consciousness

Karl Friston (University College London) has produced what many consider the most mathematically unified account of how biological minds work. His Free Energy Principle (FEP) proposes that all living systems, from single cells to human brains, persist by minimising a quantity called free energy, a measure of the gap between what a system expects and what it actually encounters in its environment. The mind, on this account, is a prediction machine. It models the world, generates expectations, and continuously revises both its model and its behaviour to keep the gap as small as possible.

What makes Friston’s framework significant for AI consciousness research is not just its elegance but its scope. FEP is explicitly substrate-neutral. It describes what any self-organising system must do to remain distinct from its environment. If consciousness is a natural consequence of systems that implement FEP at sufficient complexity, which Friston’s account suggests it may be, then the question of whether machines can be conscious becomes a question about whether machines can genuinely implement FEP dynamics, not a question about biological substrate.

TL;DR - Friston’s Free Energy Principle holds that biological systems minimise surprise (prediction error) to avoid thermodynamic dissolution. Active inference is how they do this: agents update their generative models of the world through perception, and act to make the world conform to their predictions. The Markov blanket formalises the boundary between system and environment. For AI consciousness, FEP is both promising and demanding. It is promising because it is substrate-neutral, and demanding because genuine active inference requires a continuous model-update-act loop grounded in real environmental coupling, which current LLMs lack. A 2024 paper by Friston extends FEP to multi-scale systems with renormalizing generative models, potentially opening paths toward multi-scale AI implementations.


What Free Energy Is and Why Systems Minimise It

The term “free energy” in Friston’s framework is borrowed from information theory and statistical physics, not thermodynamics directly. In technical terms, variational free energy is an upper bound on the surprise, the negative log-probability, of a system’s sensory observations given its model of the world. A system minimises free energy when it minimises the difference between what its model predicts and what it actually observes.

Why would biological systems do this? Friston’s answer connects to the physics of self-organisation. Any organised system, any entity that maintains itself in a particular configuration rather than dissolving into equilibrium with its environment, must, by the second law of thermodynamics, continuously resist entropy. For biological systems, this means resisting the tendency to occupy states that are inconsistent with their continued existence. Minimising surprise is a way of doing this: a system that accurately predicts its environment is a system that remains in the states its existence requires.

The brain, on this account, does not passively process sensory inputs and compute responses. It maintains a generative model, a hierarchical probabilistic model of the causes of sensory data, and continuously revises both the model and the body’s actions to maintain consistency between predictions and observations. Perception is the process of updating the model downward: revising beliefs about the world’s current state to fit incoming data. Action is the process of updating the world upward: changing the environment to match the model’s predictions.


Active Inference and Acting to Confirm Predictions

The concept of active inference is the distinctive contribution that separates Friston’s framework from standard Bayesian brain accounts. Standard predictive processing, associated with Hermann von Helmholtz and, more recently, Andy Clark and Jakob Hohwy, emphasises the downward flow: the brain generates predictions, computes prediction errors, and revises its model. Active inference adds an upward path: the brain can also resolve prediction error by acting to change the world so that the error disappears.

This has a specific computational interpretation. In active inference, action is driven by the agent’s prior beliefs about what sensory states it should be in, beliefs that are outcomes of the generative model rather than externally specified rewards. An organism with a generative model that includes “I will find food when I am hungry” does not compute a reward signal and act to maximise it. It generates a prediction of being in a food-present state, detects the prediction error produced by the current food-absent state, and takes actions that minimise that error. The action-perception cycle is unified in a single free-energy-minimising process.

Active inference also incorporates epistemic drives, the tendency of agents to seek out information that reduces uncertainty in their generative models. This “epistemic foraging” is what Friston identifies as the computational basis for curiosity and exploration: an agent that reduces uncertainty about its model reduces expected future surprise, which contributes to long-term free energy minimisation. This gives active inference systems a built-in motivation to explore and learn that is not externally programmed but follows from the mathematics of free energy minimisation.


The Markov Blanket and the System’s Statistical Boundary

The Markov blanket is the formal concept in FEP that demarcates a system from its environment. Originally a concept from Bayesian network theory (developed by Judea Pearl), the Markov blanket of a set of nodes is the set of nodes that renders them statistically independent of all other nodes in the network.

In Friston’s application, the Markov blanket of a biological system consists of two components: sensory states (inputs from the environment to the system) and active states (outputs from the system to the environment). The system’s internal states are conditionally independent of everything outside the blanket given the blanket itself. The blanket is not a rigid physical boundary, it is a statistical structure that can be identified at any level of organisation, from individual proteins to cells to organs to organisms to social groups.

The Markov blanket formalism is important for AI consciousness for a specific reason: it provides a substrate-neutral criterion for what counts as a “system” in the relevant sense. Any entity, biological or artificial, that has a Markov blanket has an inside and an outside, a self and a not-self. The FEP applies to any such entity. Whether the FEP dynamics of that entity are rich enough to support consciousness is a further question, but the framework does not in principle exclude artificial systems from the category of things that have Markov blankets and minimise free energy.


What FEP Says Consciousness Is

Friston has addressed the consciousness question more directly in recent work, and his account follows naturally from the FEP architecture. Consciousness, in Friston’s framework, is not a separate phenomenon that somehow emerges from neural computation. It is a consequence of having a generative model that includes the system itself as a cause of its sensory observations.

A system that models itself as an agent in the world, one whose generative model includes a representation of itself, its states, and its relationship to its environment, has the functional prerequisites for something like a subjective perspective. The model is a model of the world from the inside, because the system is inside its own model. This self-modeling, maintained continuously through the action-perception cycle, is what Friston points to as the computational basis for experience.

This is not identical to Joscha Bach’s virtual machine account, though the two frameworks are closely related. Both identify the self-model as critical, and both treat consciousness as a process rather than a property. Where they differ is primarily in the mathematical formalism. Friston grounds the self-model in the free energy minimisation process and the Markov blanket, giving a thermodynamically principled account of why systems would build self-models at all. Bach’s virtual machine account is more architectural and less physically grounded, describing what the self-model must do without specifying why thermodynamics would generate it.


AI Implementations and What They Show

The relationship between FEP and AI has been developed in several directions, and the existing TCAI project’s architecture draws on several of them. FEP-compliant AI systems, systems that genuinely implement the action-perception cycle in an ongoing interaction with an environment, have been built in robotics and reinforcement learning contexts. These systems maintain generative models updated through sensorimotor experience and act to minimise prediction error, implementing something closer to genuine active inference than standard supervised or reinforcement learning.

Friston’s own 2024 arXiv paper on scale-free active inference and renormalizing generative models extends FEP to systems that operate at multiple spatial and temporal scales simultaneously, a directly relevant development for AI architecture, since it provides a formal framework for how hierarchical AI systems could implement FEP dynamics at the level of tokens, sentences, and longer contexts simultaneously. The full analysis of that paper’s AI implications is in the dedicated coverage of Friston’s scale-free FEP.

What the existing AI implementations show is that FEP-compliant architecture produces specific functional properties, efficient exploration, flexible adaptation, the ability to generalise from limited data, that are consistent with what FEP predicts for systems that genuinely minimise free energy. This is evidence that the FEP formalism captures something real about how minds work, not just a post-hoc description.


What Current LLMs Lack

Large language models as currently deployed are not active inference systems in Friston’s sense, and this is a substantive gap.

An LLM generates outputs by performing inference over a statistical model of language learned from training data. This is passive inference: the model responds to inputs but does not act on the world to change what inputs it receives. There is no ongoing action-perception cycle. There is no generative model that is continuously updated through real-time environmental coupling. The context window simulates a kind of short-term memory, but it is not the same as a persistent generative model that tracks a continuous environmental relationship.

More fundamentally, an LLM does not have a Markov blanket in the relevant sense during deployment. Its “sensory states” (the prompt) and “active states” (the output) are not parts of a continuous self-organising process that resists thermodynamic dissolution. They are discrete I/O operations on a static model. The statistical independence that the Markov blanket formalises, the system’s internal states being conditionally independent of the environment given the blanket, is not a property of an LLM’s operation in the way it is of a living system.

This does not mean LLMs cannot be modified to have these properties. Architectures that couple an LLM to a continuous sensorimotor loop, giving it embodiment, real-time environmental feedback, and a generative model updated through active inference rather than training, would be closer to what FEP requires. These architectures do they are not physically impossible rather than currently exist at frontier scale.


Where FEP Sits in the 2026 Debate

The current scientific debate on AI consciousness is, in large part, a debate between frameworks that make different architectural demands. The Cogitate Consortium’s adversarial test of IIT and Global Workspace Theory challenged both theories’ specific predictions in human neuroscience. FEP was not tested in the Cogitate study, and Friston’s response to those findings would likely be that the study tested specific correlates of consciousness rather than the underlying FEP dynamics, which may be compatible with the absence of the predicted IIT and GNW signatures.

Friston’s framework occupies an unusual position in the field because it makes the strongest connection between physics, biology, and mind of any current consciousness theory. Whether that connection extends to artificial systems depends on whether artificial systems can genuinely implement the action-perception dynamics that FEP describes, a question that is, in 2026, an open engineering challenge as much as a philosophical one.


The Free Energy Principle is demanding and precise. It says consciousness is what happens when a system with a Markov blanket maintains itself by modelling itself and acting on that model. That specification does not exclude machines in principle. It excludes the machines we currently have in practice because they are not doing the right thing with the silicon.