Active Inference: When Perception Becomes Action
Active Inference: When Perception Becomes Action
Series: The Free Energy Principle | Part: 5 of 11
You're thirsty. Your body needs water. But "thirst" isn't just a passive sensation you observe—it's a prediction error that drives you to act. Your internal model says "I should be hydrated," your sensory receptors say "you're dehydrated," and that mismatch—that free energy—makes you stand up, walk to the kitchen, pour water, drink.
You didn't "decide" to reduce the prediction error through action rather than perception. Your nervous system did both: it can't update the belief "I'm not thirsty" to match the dehydration signals (that would be delusional), so it acts to change the signals themselves.
This is active inference—the recognition that perception and action are two sides of the same coin. Both minimize free energy. One updates beliefs to match the world. The other updates the world to match beliefs.
And once you see it, you can't unsee it. Every action you take is an attempt to fulfill a prediction.
The Two Paths to Free Energy Minimization
Recall from Part 1: when free energy is high (sensory data don't match predictions), you have two options:
Perceptual Inference
Update your beliefs about hidden causes to better explain the sensory data.
You hear rustling in the bushes. Initially, you predict "wind." But the pattern doesn't match wind—it's rhythmic, deliberate. Free energy is high. You update: "probably an animal." Free energy drops. Prediction error resolved through belief revision.
Active Inference
Change your sensory inputs by acting on the world so that incoming data match your predictions.
You predict "I should be at the coffee shop." Current sensory input says "I'm at home." High free energy. You walk to the coffee shop. Now sensory input matches prediction. Free energy drops. Prediction error resolved through action.
Classical frameworks separate these. Perception happens in sensory cortex. Action happens in motor cortex. They're different processes with different algorithms.
Active inference says: they're the same process, operating on different variables.
Perception minimizes free energy by changing internal states (beliefs).
Action minimizes free energy by changing external states (the world).
Both implement variational inference. Both are gradient descent on the same objective function. The only difference is what gets updated.
Predictions as Targets, Not Hypotheses
Here's the shift: in perception, predictions are hypotheses about what's out there. In action, predictions are targets for what should be out there.
When you reach for a cup, your motor cortex doesn't send commands like "contract this muscle by this amount." It sends predictions: "proprioceptors should signal arm extended, hand closed around handle."
Your spinal motor neurons then act to make those predictions come true. They receive the predicted sensory state (hand on cup) and the actual sensory state (hand not yet on cup), compute the error, and issue motor commands that minimize it.
You don't plan movements. You predict sensory consequences, and motor systems resolve the prediction error through movement.
This is why you can reach for a cup while distracted, why practiced movements feel automatic, why you don't need to consciously control every muscle. The high-level prediction ("hand should be on cup") cascades down the hierarchy, with lower levels implementing whatever actions fulfill it.
Motor control is inverse prediction.
Proprioceptive Predictions: How You Move Without Trying
Every action you take begins as a proprioceptive prediction—an expectation about what your body position and movement should feel like.
You want to stand up. What actually happens?
- High-level prediction: "I should be sensing upright posture"
- Prediction error: Current proprioception says "seated posture"
- Motor reflex arc: Minimize error by contracting leg muscles, extending spine
- Updated proprioception: Now sensing upright posture
- Error resolved: Prediction fulfilled
You didn't consciously command each muscle. You predicted the sensory outcome, and motor systems made it happen.
This is how all voluntary movement works. You predict sensations. Reflexes resolve the discrepancy. The subjective feeling of "willing" an action is really predicting its sensory consequences.
Free will, on this view, is free energy minimization through action.
Expected Free Energy: Choosing Actions by Predicting Their Consequences
So far we've discussed minimizing current free energy. But organisms don't just respond to present conditions—they plan. They choose actions that minimize expected free energy over future time.
Expected free energy (G) for a policy (sequence of actions) has two components:
1. Pragmatic value (extrinsic): Will this policy keep me in viable states?
2. Epistemic value (intrinsic): Will this policy reduce uncertainty about my model?
Put simply:
- Pragmatic value: "Will this action get me what I need?"
- Epistemic value: "Will this action teach me something?"
An organism choosing between policies computes expected free energy for each and selects the one that minimizes G.
Example: You're in a new city, hungry, and don't know where restaurants are.
Policy A: Walk randomly until you encounter food.
- Low epistemic value (you learn, but inefficiently)
- Uncertain pragmatic value (might find food, might not)
Policy B: Ask someone for directions.
- High epistemic value (you reduce uncertainty about restaurant locations)
- High pragmatic value (you'll likely find food faster)
Active inference predicts you'll choose Policy B—not because you reasoned it out consciously, but because your nervous system computed that it minimizes expected free energy.
Exploration vs. Exploitation: The Epistemic Drive
Why do organisms explore when they could exploit?
Classical reinforcement learning treats exploration as a problem—you have to add explicit bonuses or randomness to get agents to try new things.
Active inference makes exploration intrinsic. Epistemic value means reducing uncertainty has value even if it doesn't immediately lead to reward. Encountering novelty reduces future expected free energy by improving the model.
This is why:
- Infants explore objects even when sated
- Animals investigate novel environments even when safe
- Humans pursue knowledge even without immediate payoff
- Play exists across species
The drive to reduce uncertainty is built into the math. Exploration is expected free energy minimization.
Foraging as Active Inference
A classic example: a rat foraging in a maze.
Classical view: The rat has a reward function (food = positive reinforcement). It learns action-value mappings and selects actions that maximize expected reward.
Active inference view: The rat has a generative model that predicts "when I'm in viable states, I sense food availability." Hunger creates prediction error (expected food, sensing none). The rat acts to minimize expected free energy by reaching states where food sensations are predicted.
The difference is subtle but important:
- Classical RL: Maximize reward
- Active inference: Minimize prediction error (where being in rewarding states is what you predict)
This explains behaviors RL struggles with:
- Latent learning: Rats explore mazes without reward, building models. Classical RL says they shouldn't—there's no reward. Active inference says they should—epistemic value.
- Incentive salience: The "wanting" of a reward can dissociate from "liking." Active inference: wanting is high prediction error, liking is fulfilled prediction.
- Habits: Repeated actions become automatic. Active inference: they become high-confidence predictions that motor systems fulfill without deliberation.
How Action Selection Actually Works
When you face multiple possible actions, how do you choose?
Active inference says: compute expected free energy (G) for each policy, then select probabilistically weighted by -G.
Policies with low G (minimize future surprise and uncertainty): High selection probability.
Policies with high G (maintain surprise or uncertainty): Low selection probability.
This isn't deterministic. You don't always pick the absolute lowest-G policy. You sample from a distribution over policies weighted by expected free energy.
Why probabilistic? Because certainty about the best action is itself uncertain. Deterministic selection is brittle. Stochastic selection with G-weighting balances exploitation (usually do what minimizes G) with exploration (occasionally try other options).
Neurally, this might be implemented in action-selection circuits: basal ganglia computing expected free energy for motor programs, with winning policies disinhibited for execution.
The Loop: Perception ↔ Action ↔ Perception
Active inference closes the loop between sensing and acting:
- Perception: Infer hidden causes from sensory data (minimize current free energy)
- Planning: Predict which actions will minimize future free energy (expected free energy)
- Action: Execute the policy, generating new sensory data
- Perception: Update beliefs based on new data
- Repeat
This is the action-perception cycle. Not passive reception then separate response, but continuous hypothesis-testing through action.
You don't perceive then act. You perceive by acting. Saccadic eye movements test visual hypotheses. Head turns test auditory hypotheses. Grasping tests haptic hypotheses. Action is embodied inquiry.
Implications for Everything Else
If action is just another form of inference, several things follow:
Motor control is predictive coding. You don't send commands—you send predictions. Reflexes implement them.
Goal-directed behavior is prior fulfillment. Goals are high-confidence predictions about future states. You act to make them true.
Habits are crystallized predictions. Repeated actions become automatic because they've become high-certainty priors that don't require deliberation.
Paralysis is high expected free energy. Depression isn't lack of motivation—it's a model that predicts high free energy for all actions, so no policy minimizes G.
Compulsions are precision errors. OCD might be over-weighting prediction errors in the habit loop, requiring repetitive actions to resolve errors that shouldn't be salient.
Addiction is model hijacking. Drugs create artificial prediction errors (expected pleasure, actual craving) that drive compulsive action.
And beyond individual organisms: social coordination is mutual prediction. You predict my actions, I predict yours. We minimize joint free energy by acting to fulfill each other's predictions. Culture is shared priors. Institutions are stable policies.
The Radical Unity
Active inference dissolves the boundary between mind and body, perception and action, self and world.
You don't have a body that you control. You are a process that maintains itself through action-perception loops. Your body is the active states through which you minimize free energy.
You don't represent goals and then execute plans. You predict sensory states and act to fulfill them. Goals are predictions. Plans are policies. Execution is error minimization.
Perception isn't passive. Action isn't blind. They're dual aspects of the same underlying imperative: stay in expected states, or update expectations to match the states you're in.
Everything you do is active inference. Every movement, every choice, every moment of sustained attention. You are free energy minimization in motion.
Further Reading
- Friston, K. J., Daunizeau, J., & Kiebel, S. J. (2009). "Reinforcement learning or active inference?" PLoS One, 4(7), e6421.
- Friston, K., FitzGerald, T., Rigoli, F., Schwartenbeck, P., & Pezzulo, G. (2017). "Active inference: a process theory." Neural Computation, 29(1), 1-49.
- Pezzulo, G., Rigoli, F., & Friston, K. (2015). "Active Inference, homeostatic regulation and adaptive behavioural control." Progress in Neurobiology, 134, 17-35.
- Parr, T., & Friston, K. J. (2018). "The active construction of the visual world." Neuropsychologia, 104, 92-101.
This is Part 5 of the Free Energy Principle series, exploring how action and perception are unified through free energy minimization.
Previous: Variational Inference for Humans
Next: The Bayesian Brain: Prediction All the Way Down
Comments ()