{
  "id": "active-inference",
  "title": "Active inference",
  "lang": "en",
  "source_lang": "en",
  "summary": "Active inference models perception, learning, and action as probabilistic inference, linking goal-directed behavior with the reduction of uncertainty.",
  "category": "science",
  "subcategory": "biology",
  "type": "concept",
  "aliases": [
    "Active Bayesian inference"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/active-inference/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/active-inference/",
      "json": "https://aiwiki.page/zh/active-inference.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Active inference is a mathematical framework for explaining and designing systems that perceive, learn, and act through Bayesian inference. An active-inference agent maintains a probabilistic model of how observations arise from hidden causes and uses that model both to interpret sensory information and to select actions. Actions can bring observations into agreement with preferred conditions, improve knowledge of the environment, or accomplish both simultaneously. The framework has been developed principally in neuroscience, but it also informs research in psychology, robotics, and artificial intelligence.\n\nIts central proposal is that perception and action can be described within a common inferential architecture. Perception changes beliefs about the causes of observations; action changes which observations become available. In many contemporary formulations, prospective actions are evaluated by an objective called expected free energy, which combines the pursuit of preferred outcomes with opportunities to acquire information. Active inference is closely associated with the free energy principle, although the two are not identical: the principle is a broader theoretical account of self-organizing systems, whereas active inference provides specific models and algorithms for perception–action cycles."
    },
    {
      "heading": "Historical development and conceptual foundations",
      "text": "Active inference draws on a long history of treating perception as inference. In the nineteenth century, Hermann von Helmholtz described perception in terms of unconscious inference: sensory stimulation does not uniquely specify its external causes, so perception depends on assumptions about the world. Twentieth-century developments in control theory, statistical estimation, and cognitive science supplied mathematical tools for describing how an organism could estimate hidden states while interacting with its surroundings.\n\nA second influence was predictive coding, in which a system communicates predictions and deviations from those predictions rather than repeatedly transmitting complete sensory descriptions. In neuroscience, Rao and Ballard’s 1999 model showed how hierarchical prediction and error correction could account for selected properties of visual cortical responses. Predictive coding is not synonymous with active inference. It is an architecture for inference or information processing, whereas active inference also addresses the selection of actions and, in many formulations, the evaluation of possible futures.\n\nKarl Friston developed the free energy principle through work on brain function and statistical inference during the 2000s. His 2006 paper “A free energy principle for the brain” and 2010 review “The free-energy principle: a unified brain theory?” helped establish its broader program. Active-inference models subsequently extended the approach to movement, decision-making, attention, and learning. A 2015 paper by Friston and colleagues, “Active inference and epistemic value,” explicitly developed the importance of information-seeking action within this framework.\n\nThe original motivation connected biological persistence with restricted distributions over possible states. Organisms do not occupy arbitrary physiological conditions: their temperature, hydration, and other variables remain within ranges compatible with continued functioning. In this setting, “surprise” means the negative logarithm of an observation’s probability under a model, not the subjective experience of astonishment. Biological homeostasis provides an important motivating example, but an implemented active-inference model still requires explicit assumptions about observations, hidden states, preferences, and dynamics.\n\nThe relationship between this biological argument and particular computational models must be distinguished. An algorithm can minimize variational or expected free energy without establishing the free energy principle as a universal explanation of life. Conversely, a broad claim about organismic persistence does not uniquely determine a neural circuit or behavioral strategy. The historical development therefore contains several related projects: a general account of self-organization, a theory of brain function, and a family of practical inference-and-control methods."
    },
    {
      "heading": "Generative models and variational inference",
      "text": "An active-inference agent is specified partly by its generative model: a probabilistic description of how hidden states produce observations and how those states change. A navigating robot, for example, might represent location as a hidden state, camera measurements as observations, and movement commands as influences on transitions between locations. “Generative” here means that the model can assign probabilities to possible observations; it need not produce realistic images or language.\n\nFor a sequence of observations \\(o_{1:T}\\), hidden states \\(s_{1:T}\\), and a policy \\(\\pi\\), a simple model has the factorization\n\n\\[P(o_{1:T},s_{1:T}\\mid\\pi) = P(s_1) \\prod_{t=1}^{T}P(o_t\\mid s_t) \\prod_{t=1}^{T-1}P(s_{t+1}\\mid s_t,\\pi).\\]\n\nA policy is a candidate course of action, often a sequence of actions over a limited planning horizon. The likelihood \\(P(o_t\\mid s_t)\\) specifies how observations depend on states, while the transition model specifies how states evolve. More complex models include unknown parameters, multiple interacting state factors, or hierarchical levels operating at different timescales.\n\nExact posterior inference is often computationally impractical. The agent therefore uses an approximate distribution \\(Q(s)\\), updated through variational inference. For a fixed observation \\(o\\), variational free energy is\n\n\\[F[Q] = \\mathbb{E}_{Q(s)} \\left[ \\ln Q(s)-\\ln P(o,s) \\right].\\]\n\nIt can also be written as\n\n\\[F[Q] = D_{\\mathrm{KL}}\\!\\left(Q(s)\\,\\|\\,P(s\\mid o)\\right) -\\ln P(o),\\]\n\nwhere \\(D_{\\mathrm{KL}}\\) is Kullback–Leibler divergence. Because this divergence is nonnegative, \\(F\\) bounds surprise, \\(-\\ln P(o)\\), from above. Minimizing \\(F\\) with respect to \\(Q\\) brings the approximate posterior closer to the true posterior within the chosen approximation family.\n\nAn alternative decomposition is complexity minus accuracy:\n\n\\[F[Q] = D_{\\mathrm{KL}}\\!\\left(Q(s)\\,\\|\\,P(s)\\right) - \\mathbb{E}_{Q(s)}[\\ln P(o\\mid s)].\\]\n\nAccuracy favors beliefs that explain observations, while complexity penalizes departures from prior beliefs. Complexity here is a distributional quantity, not simply the number of parameters. This balance connects active inference to statistical model evidence and regularization.\n\nVariational free energy is an information-theoretic objective. Despite its name and mathematical connections to statistical mechanics, it is not generally a measurement of Gibbs free energy or Helmholtz free energy in joules. Its logarithms are normally dimensionless, and its numerical value depends on the probabilistic model and conventions used. Likewise, minimizing this objective guarantees neither a correct model of the world nor globally optimal inference: those depend on model specification, available data, and the optimization procedure."
    },
    {
      "heading": "Action, embodiment, and continuous control",
      "text": "Active inference extends inferential updating into the physical interaction between an agent and its environment. An agent can reduce a discrepancy between predicted and observed signals by revising its beliefs, but it can also act so that incoming signals change. The distinction is illustrated by reaching: an estimate of hand position can be revised in response to sensory evidence, while movement can bring the actual hand toward a predicted or desired position.\n\nIn continuous-state formulations, hidden bodily and environmental states are often described by differential equations. The agent predicts sensory consequences, including visual signals and proprioceptive signals from muscles and joints. Under Gaussian assumptions, parts of variational free energy become weighted squared prediction errors. For a sensory prediction error \\(\\varepsilon=o-g(\\mu)\\), where \\(\\mu\\) is an estimated state and \\(g\\) an observation function, one contribution has the form\n\n\\[F_{\\mathrm{sensory}} = \\frac{1}{2}\\varepsilon^{\\mathsf T}\\Pi\\varepsilon,\\]\n\napart from normalization and other model terms. Here \\(\\Pi\\) is a precision matrix, the inverse of a covariance matrix. Errors in more reliable sensory channels therefore have greater influence.\n\nA schematic action update is\n\n\\[\\dot a=-\\kappa_a\\frac{\\partial F}{\\partial a},\\]\n\nwhere \\(a\\) represents action variables and \\(\\kappa_a\\) controls update speed. The dependence of free energy on action runs through the sensory consequences of movement. Applying this rule requires assumptions or estimates about how action changes sensation; it does not remove the need to solve that physical mapping.\n\nIn an influential account of motor control, descending signals specify proprioceptive predictions rather than detailed muscle commands. Spinal reflex mechanisms then act to reduce the difference between predicted and actual proprioceptive input. This proposes a different computational interpretation of familiar sensorimotor feedback loops: movement realizes a prediction about the body. It is a theoretical account of motor organization rather than an established description of every descending motor signal.\n\nGoal-directed predictions cannot simply be treated as infallible beliefs about the present. Models must distinguish current-state estimates from desired trajectories, and they must allow evidence about obstacles or mechanical limits to alter action. Otherwise, a controller might persistently attempt movements that cannot occur. Practical implementations address this through dynamics, uncertainty estimates, hierarchical modeling, explicit constraints, or additional control machinery.\n\nContinuous active inference is particularly associated with embodied tasks such as reaching, tracking, balance, and robotic manipulation. Its behavior depends strongly on the observation model and the relative weighting of errors. Reliable visual feedback can correct an uncertain proprioceptive estimate, while strong proprioceptive expectations can stabilize posture. Such effects can also be described by other estimation-and-control frameworks, so successful movement alone does not uniquely identify active inference as its mechanism."
    },
    {
      "heading": "Expected free energy and planning under uncertainty",
      "text": "Inference about current states is insufficient for choosing among actions with different future consequences. Planning requires predicting observations that have not yet occurred. Active-inference models commonly address this by evaluating policies through expected free energy. The objective concerns a predictive distribution over future states and outcomes, together with preferences over those outcomes.\n\nA useful single-time formulation makes the informational and preferential components explicit. Let\n\n\\[Q(o,s\\mid\\pi)=P(o\\mid s)Q(s\\mid\\pi)\\]\n\nbe the predicted joint distribution under policy \\(\\pi\\), and let \\(P_C(o)\\) encode preferred observations. A common expected-free-energy objective is\n\n\\[G(\\pi) = D_{\\mathrm{KL}}\\!\\left(Q(o\\mid\\pi)\\,\\|\\,P_C(o)\\right) + \\mathbb{E}_{Q(s\\mid\\pi)} \\left[H[P(o\\mid s)]\\right].\\]\n\nThe first term is often called risk: it measures divergence between predicted and preferred outcomes. The second is ambiguity: the expected entropy of observations conditional on their hidden causes. Under these definitions, the expression can equivalently be written\n\n\\[G(\\pi) = -\\mathbb{E}_{Q(o\\mid\\pi)}[\\ln P_C(o)] - I_Q(s;o\\mid\\pi),\\]\n\nwhere \\(I_Q\\) is mutual information. Thus minimizing \\(G\\) favors both preferred outcomes and observations informative about hidden states. More elaborate formulations include information about unknown model parameters and dependencies across future times.\n\nThe information-seeking component is often called epistemic value; the preference-related component is called pragmatic or instrumental value. In a two-location search task, an agent may first inspect a cue indicating where a resource is located. Inspecting the cue has little immediate value by itself, but changes which subsequent action is likely to succeed. This differs from undirected randomness: an informative cue is attractive because its possible outcomes discriminate between competing beliefs.\n\nPolicy probabilities are often assigned through an expression such as\n\n\\[Q(\\pi) \\propto P_0(\\pi)\\exp[-\\gamma G(\\pi)],\\]\n\nwhere \\(P_0(\\pi)\\) represents prior policy tendencies and \\(\\gamma\\) controls sensitivity to expected free energy. Larger \\(\\gamma\\) concentrates probability on lower-\\(G\\) policies; smaller values produce a more dispersed distribution. Implementations may additionally include the evidence for policies from observations already received and may infer precision rather than fixing it.\n\nPreferences are not the same thing as predictions. A preference distribution represents which outcomes the agent is organized or designed to seek; a predictive distribution represents what it expects to happen. Conflating them obscures how an agent can expect an undesirable event and act to prevent it. Expected free energy is also not simply the expected variational free energy of an arbitrary future observation: definitions depend on how future outcomes, posterior beliefs, and preferences enter the model. Different planning objectives can produce different exploration behavior even when they share similar terminology."
    },
    {
      "heading": "Learning, hierarchy, and proposed neural mechanisms",
      "text": "Active-inference models distinguish several kinds of updating. State estimation concerns what is happening now. Parameter learning concerns relatively stable regularities, such as whether a cue reliably predicts an outcome. Structural learning concerns the organization of the model itself, including the number of latent contexts or the presence of a causal dependency. These processes operate on different timescales and need not use identical algorithms.\n\nIn finite-state models, likelihood and transition probabilities are often represented by matrices. A likelihood matrix contains probabilities \\(P(o\\mid s)\\), while an action-dependent transition matrix contains probabilities \\(P(s_{t+1}\\mid s_t,a_t)\\). A Dirichlet distribution provides a convenient prior over each categorical probability vector. Learning can then be implemented by updating concentration parameters using expected observation–state or state-transition counts. An uncertain agent can consequently learn not only which state it occupies, but how dependable its sensory cues and action consequences are.\n\nHierarchical models introduce states at multiple temporal or spatial scales. A slowly changing context might determine which task is in effect, while a faster level represents the hand movements or visual events occurring within that task. Higher levels constrain lower-level dynamics, and lower-level evidence updates beliefs about higher-level context. This allows a single observation to have different meanings under different inferred situations—for example, the same traffic signal being relevant or irrelevant depending on the direction of travel.\n\nPrecision is central to proposed neural implementations. For Gaussian variables, precision is inverse variance, or inverse covariance in the multivariate case. Increasing the precision assigned to a prediction error increases its influence on updating. Attention can therefore be modeled as a selective adjustment of confidence in particular sensory signals. This does not mean that attention and precision are interchangeable in every experiment; it supplies a computational hypothesis about one mechanism by which attention could affect processing.\n\nPredictive-processing accounts propose that distinct populations of neurons encode expectations and prediction errors, with recurrent interactions between cortical levels implementing approximate inference. Other proposals associate neuromodulatory signals with different forms of uncertainty or confidence. Some active-inference models relate dopamine to precision over policies, contrasting with accounts centered on reward prediction error. These are model-dependent interpretations: dopamine has diverse effects across circuits and timescales, and no single scalar variable exhausts its established physiological roles.\n\nConnections to neuroplasticity arise when changes in model parameters are mapped onto changes in synaptic efficacy. Such mappings can yield learning rules resembling local associations between neural activities. Nevertheless, a mathematical resemblance between an update equation and a synaptic mechanism is not sufficient evidence of implementation. A neural account must also respect connectivity, signaling delays, cellular diversity, and measurable responses to intervention."
    },
    {
      "heading": "Behavioral models and empirical investigation",
      "text": "Active inference has been used to model perception, eye movements, motor adaptation, information seeking, and sequential choice. A characteristic experiment presents an agent with uncertainty that can be reduced by a specific action. Examples include looking toward a peripheral cue before choosing a target or sampling information before making a consequential decision. The model predicts behavior from the interaction between prior beliefs, cue reliability, outcome preferences, and planning horizon.\n\nEye movements provide a particularly direct example of active sensing. A fixation changes the sensory evidence available to the visual system. An active-inference model may favor a fixation expected to distinguish competing interpretations of a scene, rather than one selected solely by image contrast. However, gaze is influenced by task demands, learned salience, motor constraints, and stimulus structure. Testing an information-seeking account therefore requires comparisons against alternatives that represent these influences.\n\nParameter estimation connects such models to observations. Researchers may fit preference strength, learning rates, prior confidence, sensory precision, or policy precision to a participant’s choices and response patterns. Bayesian model comparison and out-of-sample prediction can then assess whether a model explains behavior better than specified alternatives. A good fit by itself is weak evidence when several parameters can compensate for one another. For example, apparently exploratory choices might reflect information seeking, weak preferences, uncertainty about transitions, or simply imprecise action selection.\n\nParameter recovery is consequently important: data are simulated using known parameter values, and the fitting procedure is tested for its ability to recover them. Model recovery asks whether data generated by competing models can be correctly assigned to their generating models. These procedures help identify experiments in which theoretical differences are observable rather than concealed by flexible fitting. Preregistration can further distinguish predictions made before data collection from explanations developed afterward.\n\nClinical computational research has also used active-inference models to investigate altered perception, action, and belief updating. Such work examines whether differences in inferred precision, learning, or preferences can describe particular task behaviors. These parameters are computational constructs, not established diagnostic measurements, and a successful account of a laboratory task does not establish a disorder’s cause. The same behavioral pattern can arise from different mechanisms, while participants sharing a diagnosis may differ substantially in task performance.\n\nThe most discriminating evidence comes from interventions that separate competing explanations. Manipulating cue reliability while holding outcome value constant can test uncertainty-related predictions. Changing the availability of informative actions can separate deliberate information seeking from random choice. Neural measurements can add constraints, but regional activation correlated with a fitted quantity does not uniquely identify that quantity’s computational role. Strong tests combine behavioral predictions, recoverable parameters, and independently justified links between model variables and measurements."
    },
    {
      "heading": "Connections with reinforcement learning, control, and robotics",
      "text": "Active inference overlaps with reinforcement learning because both address sequential behavior under uncertainty. Reinforcement learning typically defines a reward function and seeks a policy maximizing expected cumulative reward. Active inference commonly represents desirable observations through log probabilities in a preference distribution. If preferences are chosen so that\n\n\\[P_C(o)\\propto \\exp[\\beta r(o)],\\]\n\nthen\n\n\\[-\\ln P_C(o)=-\\beta r(o)+\\ln Z,\\]\n\nwhere \\(r(o)\\) is reward, \\(\\beta\\) is a scaling parameter, and \\(Z\\) normalizes the distribution. The preference component of expected free energy can therefore reproduce a reward-based objective up to scaling and an additive constant.\n\nThis correspondence does not make every active-inference algorithm equivalent to every reinforcement-learning algorithm. Information-gain terms, policy priors, approximate inference procedures, and planning horizons can change the resulting policy. Conversely, reinforcement-learning methods can incorporate information bonuses, Bayesian uncertainty, and entropy regularization. The substantive comparison concerns the objectives and algorithms actually used, not a contrast between “reward-driven” and “curiosity-driven” systems in the abstract.\n\nA closer formal relative is the partially observable Markov decision process, or POMDP. It represents hidden environmental states, actions, observations, and transitions, with decisions based on beliefs rather than directly observed states. Many discrete active-inference models use this same basic structure but formulate policy evaluation through expected free energy. Their relationship to Bayesian experimental design is also close: an action can be selected because its outcome is expected to reduce uncertainty about a state or parameter.\n\nIn control engineering, active inference shares with model predictive control the repeated prediction of future trajectories followed by action and replanning. It also connects with dual control, in which actions simultaneously regulate a system and reveal information about its dynamics. A robot moving an unfamiliar object, for example, may both reposition it and learn its resistance to movement. Active inference offers one way to formalize that combination, but the underlying control problem predates the framework.\n\nRobotic applications include visual reaching, navigation, object interaction, and adaptation to uncertain sensory feedback. Continuous implementations often update latent states and actions by gradient descent, while discrete implementations evaluate candidate action sequences. Learned observation and transition models can be supplied by artificial neural networks, allowing richer sensory inputs than hand-built categorical models.\n\nEngineering performance remains contingent on implementation. Planning over all action sequences becomes exponentially expensive as the horizon grows, and inaccurate dynamics can lead to poor action selection. Practical systems use restricted policy sets, hierarchical planning, sampling, or learned approximations. Comparisons with other controllers must therefore account for computation, model quality, training experience, and access to observations. The label “active inference” alone does not establish superior efficiency, robustness, or adaptability."
    },
    {
      "heading": "Scope, criticism, and unresolved questions",
      "text": "A central conceptual issue is the relationship between broad principles and testable models. The claim that an adaptive system can be described as minimizing some form of free energy is more general than a prediction about a particular experiment. Empirical content emerges only after specifying the system’s variables, model structure, preferences, inference rules, and links to measurable quantities. Without those constraints, different behaviors may be accommodated by changing assumptions after the fact.\n\nThe frequently discussed “dark-room problem” illustrates the importance of distinguishing objectives. If an agent merely minimized sensory unpredictability, it might appear to prefer an unchanging environment. Active-inference accounts respond that organisms have structured expectations and preferences involving nourishment, movement, and other conditions, while epistemic action can make uncertain environments worth exploring. This addresses the simple objection, but transfers explanatory responsibility to the origin and specification of those preferences. In artificial agents they are often supplied by designers; in biological accounts they may be related to development, learning, physiology, and natural selection.\n\nA further issue concerns Markov blankets, used in some formulations of the free energy principle to describe conditional independences separating internal and external states through intervening variables. A Markov blanket is a property of a probabilistic model, not automatically a literal anatomical surface. For a living cell, the cell membrane is an obvious physical boundary, but equating that membrane with a particular statistical partition requires additional modeling assumptions. Whether such partitions justify claims about representation, agency, or inference depends on more than the existence of conditional independence.\n\nTheoretical formulations also differ. Continuous gradient-flow models, discrete policy-selection models, and approaches involving generalized coordinates need not have identical assumptions or guarantees. Expected free energy itself appears in closely related but nonidentical expressions, depending on how preferences and predicted posteriors are defined. Distinguishing exact identities from approximations is essential when comparing their information-seeking consequences. A decomposition valid under one factorization cannot automatically be transferred to another.\n\nComputational tractability and model misspecification remain substantial problems. An agent cannot reliably infer possibilities excluded from its hypothesis space, and confidence can increase around an incorrect model. Approximate posteriors may discard important dependencies, while short planning horizons can miss delayed costs or benefits. Hierarchy and learned representations can reduce computational demands, but introduce additional choices about architecture and training.\n\nFinally, active inference’s proposed neural realization is less settled than its mathematical definitions. Prediction errors, uncertainty signals, and recurrent interactions are widespread enough to support multiple computational interpretations. Establishing a distinctive mechanism requires predictions about timing, circuitry, learning, and perturbation that competing accounts do not equally explain. Formal work must likewise specify when free-energy objectives yield stable control, useful exploration, or calibrated beliefs, especially under limited computation and changing environments."
    }
  ],
  "links": [
    "bayesian-inference",
    "neuroscience",
    "artificial-intelligence",
    "control-theory",
    "predictive-coding",
    "free-energy-principle",
    "homeostasis",
    "variational-inference",
    "kullback-leibler-divergence",
    "regularization",
    "statistical-mechanics",
    "gibbs-free-energy",
    "helmholtz-free-energy",
    "proprioception",
    "feedback",
    "entropy",
    "mutual-information",
    "dirichlet-distribution",
    "variance",
    "neuron",
    "neuroplasticity",
    "synapse",
    "preregistration",
    "reinforcement-learning",
    "partially-observable-markov-decision-process",
    "model-predictive-control",
    "artificial-neural-network",
    "natural-selection",
    "cell",
    "cell-membrane"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}