Agents, world models and multi-agent systems
Active inference as a design hypothesis for agents
Expected free energy earns its complexity when an action changes both the world and the evidence the agent will later receive; outside that condition, the same behaviour is often available through simpler control methods.
TLDR
- Active inference matters most when actions alter future observability.
- Expected free energy joins preference seeking with uncertainty reduction.
- Matched RL can imitate the behaviour, so interventions must test the mechanism.
- Preferences and generative models remain engineering choices, not biological facts.
- Use active inference as a measured design hypothesis with an authority boundary.
The pallet that should not move yet
Kestrel-61 is a warehouse agent responsible for routing sealed medicine pallets. One pallet may contain temperature-sensitive vials. Its barcode is partly hidden by torn wrapping, the thermal trace is noisy, and the dispatch lane will close in ninety seconds. Kestrel can send the pallet to cold storage, send it to ordinary storage, or spend eight seconds moving its camera to read a second label.
The obvious design says: estimate the pallet type, then choose the action with the highest expected reward. Yet that sentence hides an assumption. It treats perception as something that happens before action. Here, moving the camera is itself an action, and the action changes what can be known before an irreversible routing decision.
The central claim of this paper is that active inference becomes a distinctive design option when control and evidence acquisition are causally coupled. Expected free energy can then value a policy partly because it reaches a preferred outcome and partly because it is expected to reveal the hidden state that makes later action safer. That is useful. It is not magic, it is not unique to biology, and it does not make Kestrel an organism.
The action that changes what can be known
Most control diagrams put a sensor on the left and an actuator on the right. The order suggests a pipeline: observe, infer, decide, act. This is adequate when observations arrive independently of the agent’s behaviour. A weather service can read a fixed thermometer without changing the weather. A document classifier can receive a file without choosing which page exists.
Kestrel inhabits a different causal structure. Camera angle changes label visibility. Gripper pressure changes tactile evidence. Opening a package exposes a serial number but may break a sterility seal. Asking a user a question changes both the available evidence and the interaction cost. In such systems, the observation model is policy-dependent. A policy does more than choose a future state; it partly chooses the future experiment.
Change only the camera’s mobility
Imagine two otherwise identical Kestrel systems. In System A, the camera is fixed. In System B, the camera can move behind the torn wrapper. Both have the same classifier and the same cost of a routing error. Which system should have a different policy?
If the controller treats observations as exogenous, nothing essential changes until a new image happens to arrive. If the controller represents camera movement as an action that changes the likelihood of future observations, the policy space changes immediately. System B can trade eight seconds for a posterior belief that is more useful for dispatch.
The mechanism is not generic curiosity. It is action-conditioned evidence acquisition. The agent should seek information only when that information can change a consequential downstream choice.
Active inference provides one formal language for this loop. The agent maintains a generative model of how hidden states produce observations, how actions change hidden states or observation channels, and which outcomes are preferred. Perception updates beliefs under the model. Policy selection evaluates predicted futures under those beliefs. In discrete formulations, this is commonly expressed as inference in a partially observable Markov decision process, or POMDP.[5]
Four objects that must be reviewable
A compact discrete active-inference model is often introduced through matrices named A, B, C and D. The letters are less important than the contracts they encode. A is the observation likelihood: for each hidden pallet type and camera pose, how probable is each label reading? If A says the torn barcode is 90 per cent reliable when it is actually 60 per cent reliable, posterior confidence will be wrong before any policy objective is evaluated.
B is the transition model: what happens to hidden state when an action is taken? Moving the camera changes pose but should not change the medicine type. Opening the wrapping may change seal integrity. Routing changes location and may make recovery expensive. A single undifferentiated “action” variable would hide these different causal effects.
C represents preferences over outcomes in a common notation. It might favour verified cold storage, penalise quarantine delay and strongly disfavour an unverified release. Calling C a preference does not remove value design. Someone still chooses its semantics, scale, subject and time horizon. The choice must be traceable to operating policy rather than inferred from fluent model output.
D supplies initial beliefs before the current evidence arrives. Kestrel’s 0.55 cold-chain prior could come from the dispatch manifest, historical base rates or a stale cache. Those sources are not equivalent. Their provenance affects whether D may be used for this pallet at this time.
A policy then predicts trajectories through these objects. The engineering benefit is not the alphabet. It is that likelihood, transition, preference and prior assumptions become separately falsifiable. A failed route can be traced to a bad sensor model, a bad transition, a bad preference or a bad prior rather than being explained by the single phrase “the agent reasoned poorly”.
Established mathematics: variational free energy is a tractable variational objective and bounds negative log model evidence under the stated probabilistic model.[1][2]
Framework claim: active inference uses related variational machinery to model perception, learning and policy selection.[4][5]
Practitioner synthesis: the engineering value is highest when actions change decision-bearing evidence. That narrowing is proposed and tested here.
flowchart TD A["The pallet that should not<br/>move yet"] --> B["The action that changes what<br/>can be known"] B --> C["How expected free energy earns<br/>its keep"] C --> D["Build it as a hypothesis, not<br/>a creed"] D -. "re-test" .-> A classDef first fill:#0a1424,stroke:#5B5CF6,stroke-width:2px,color:#e6f3ff classDef step fill:#0a1424,stroke:#3f7da0,stroke-width:1px,color:#e6f3ff class A first class B,C,D step
How expected free energy earns its keep
Before looking into the future, start with an observation already received. Let s denote a hidden state, such as the pallet type. Let o denote the observed label fragment. The generative model supplies p(o, s), while the agent uses an approximate posterior q(s). Variational free energy can be written as:
The first term measures how far the approximate posterior is from the exact posterior. Because that divergence cannot be negative, minimising F tightens an upper bound on surprise under the chosen model. This is an inference statement. It does not say that a surprising event is emotionally unpleasant.
A policy concerns observations that have not happened. Active inference therefore scores predicted futures. One common discrete-state expression decomposes expected free energy into risk plus ambiguity:
Here π is a candidate policy. The distribution q(o|π) predicts observations under that policy. The distribution p*(o) encodes preferred observations. The first term penalises predicted outcomes that differ from those preferences. The second penalises states whose observations remain ambiguous.
Under related factorisations and approximations, the same design intuition is often expressed as expected preference cost minus expected information gain:
The minus sign is the useful part: a policy can score well because its outcomes are preferred, because its observations are informative about hidden state, or both. Exact decompositions depend on the model factorisation and convention. Expected free energy is not simply “free energy in the future”, and its mathematical motivation remains an active subject of analysis.[3][7]
When eight seconds are worth more than immediate action
Kestrel believes the pallet is cold-chain with probability 0.55 and ordinary with probability 0.45. A wrong route has a synthetic loss of 40 units. Committing to cold storage now therefore has expected loss 0.45 × 40 = 18.
The second-label inspection costs 4 units and is 90 per cent accurate. After the noisy label, Kestrel chooses the more probable route. The residual probability of a routing mistake is 0.10, so the expected total loss is 4 + 0.10 × 40 = 8. Inspection saves 10 expected loss units.
The label also carries about 0.526 bits of mutual information about the pallet type. Yet entropy reduction alone is not the reason to inspect. The decisive fact is that the information arrives before the route and changes expected decision loss.
Follow the posterior, not the slogan
The calculation is small enough to inspect. A “cold” cue occurs with probability 0.55 × 0.90 + 0.45 × 0.10 = 0.54. After that cue, Bayes’ rule gives a cold-chain posterior of 0.495 ÷ 0.54, about 0.917. Kestrel routes cold and is wrong only about 8.3 per cent of the time in that branch. An “ordinary” cue occurs with probability 0.46. The cold-chain posterior then falls to 0.055 ÷ 0.46, about 0.120, so Kestrel routes ordinary and is wrong about 12 per cent of the time in that branch.
Weight those branch errors by their cue probabilities: 0.54 × 0.083 + 0.46 × 0.120 = 0.10. The sensor has converted a 45 per cent minimum error before inspection into a 10 per cent minimum error after inspection. The maximum rational price of the observation, under this loss model, is therefore 40 × (0.45 - 0.10) = 14. Any inspection cost below 14 has positive decision value.
Now change one variable. If a wrong route costs 10 rather than 40, the maximum price falls to 3.5. The same four-unit inspection is no longer worthwhile even though it conveys exactly the same 0.526 bits. Epistemic value is decision-relative when actions have costs. A system that always seeks the most informative observation is not solving this task; it is solving an entropy-reduction task chosen by the designer.
Make the second label random
Keep every cost and reward unchanged, but replace the second label with a random mark. A novelty bonus may still reward looking because the image differs from previous images. A correctly specified expected-free-energy policy should stop looking because the observation no longer resolves hidden state. A correctly specified Bayesian POMDP controller should also stop.
This intervention exposes a crucial boundary. Information seeking is not unique to active inference. Bayesian experimental design, belief-state planning and model-based reinforcement learning can all value observations through their effect on future decisions. The useful comparison is not “curious versus uncurious”. It is whether the formalism makes the relevant coupling explicit, tractable and easier to maintain.
| Design | What is optimised | How information enters | Characteristic failure |
|---|---|---|---|
| Model-free RL | Expected cumulative reward learned from interaction | Usually through exploration strategy, intrinsic reward or learned state | Slow adaptation after sensor or transition shift |
| Bayesian model-based RL | Expected return under a posterior over models or states | Value of information emerges through belief-state planning | Posterior and planning cost can dominate |
| Control as inference | Posterior over actions conditioned on optimality variables | Depends on the generative model and optimality construction | Value semantics can be hidden in likelihood choices |
| Active inference | Expected free energy or a related variational policy objective | Epistemic value is represented inside policy scoring | Preferences, factorisation and approximation can silently determine behaviour |
Formal comparisons support this overlap. Active inference and control as inference differ importantly in how value is incorporated into the generative model.[8] Under specified conditions, active-inference schemes can recover Bellman-optimal reward maximisation; the conditions and planning scheme matter, especially beyond a one-step horizon.[9] Empirical papers have also compared active-inference variants with Q-learning and Bayesian model-based RL on shared environments.[6][10]
Three agents can choose “inspect” for three different reasons
An active-inference agent may inspect because predicted information gain lowers its policy score. A model-based RL agent may inspect because the observation improves expected downstream return. A model-free RL agent may inspect because repeated experience has assigned a high Q-value to the inspect action in the unseen state. The first action is identical, but the counterfactual dependencies differ.
Change the known sensor accuracy without allowing new interaction. The active-inference and model-based agents can respond if their likelihood models are updated. The frozen model-free agent cannot because the change is not represented in its state-action values. Now keep sensor accuracy fixed and change the misroute cost. All three may respond if cost is part of their online input; otherwise only the model-based designs with editable preferences or rewards respond immediately.
Finally, alter a latent variable that produces interesting observations but never affects the route. A pure information-gain term may chase it. A downstream value calculation will ignore it. This is why the paper’s proposed leverage measure conditions epistemic value on decision loss. The intervention target tells us more than the action label.
Turn one inspection into a branching expedition
Give Kestrel four camera poses, three possible questions to a human operator, five route choices and a six-step horizon. The apparent elegance of scoring policies now meets a combinatorial fact: the number of action sequences grows exponentially with horizon if policies are enumerated.
Deep and tree-search implementations use amortised policies, Monte Carlo sampling, pruning or recursive schemes to control this cost.[11] These approximations are not an implementation footnote. They can change which epistemic futures are seen. An agent may appear to “lose curiosity” simply because search no longer reaches the informative branch.
Build it as a hypothesis, not a creed
The phrase “epistemic value” can tempt designers to reward any reduction in uncertainty. That is too broad. An inspection might reveal the colour of the inner packaging while leaving the cold-chain decision unchanged. Entropy falls, but operational uncertainty does not.
This paper proposes a narrower quantity: decision-bearing epistemic leverage. It asks how much an action-conditioned observation can reduce the minimum expected loss of the next consequential decision. For a sensing action a:
The hidden state is S, the later decision is d, and L is a declared loss function. The first term is the best expected loss without the new observation. The second is the expected best loss after receiving it. This is closely related to the expected value of sample information. The new design move is to use it as a gate on the epistemic term: information should matter because it can improve a decision, not because uncertainty reduction is intrinsically impressive.
For Kestrel, the leverage of the 90 per cent accurate inspection is 18 - 4 = 14 loss units before paying the inspection cost. Net value is 10 after the 4-unit delay. At 50 per cent accuracy, leverage is zero. This distinction prevents a class of “curiosity traps” in which the agent repeatedly observes variables that are learnable but irrelevant.
The five-gate active-inference test
- Causal gate: can an available action change the likelihood, precision or timing of a future observation?
- Consequence gate: does uncertainty about the hidden state alter a later decision with material loss?
- Timing gate: can the observation arrive before the relevant action becomes irreversible?
- Model gate: can likelihoods, transitions and preferences be stated, calibrated and versioned?
- Comparison gate: does the approach beat a matched Bayesian or RL baseline under sensor, transition and preference interventions?
If the first three gates fail, expected free energy has little causal work to do. If the fourth fails, the agent will optimise an unreviewable story. If the fifth fails, active inference may still be a coherent description, but it is not yet a justified engineering choice.
A configured system, not a free-floating equation
A useful implementation keeps several objects separate. The generative model predicts observations and transitions. The belief state records the current posterior over hidden states. Preferences express desired outcome distributions or costs. A policy evaluator proposes an action sequence. A deterministic authority kernel decides whether a typed action is permitted. The operational system produces an effect receipt, and an independent readback verifies the outcome.
Discrete reference software and factor-graph formulations can make the inference objects and message flow inspectable, but they do not supply the surrounding authority, evidence and recovery contracts.[12][14]
Belief confidence is not authority. An agent can be 99 per cent confident and still lack permission to open the package. Conversely, an action can be permitted but irrational under the current evidence. Active inference belongs inside the proposal path, not at the control boundary.
A synthetic payment-review agent that may ask before it acts
Consider a synthetic agent reviewing an unusual supplier payment. Its hidden state is not “fraud” in the abstract. It includes narrower hypotheses: the supplier bank account changed legitimately, an invoice was duplicated, an operator account was compromised, or the transaction is routine but rare. Available observations include the payment record, approved supplier master data, device attestation and a confirmation from a named account owner.
The agent has three proposals: release, hold, or request device attestation before deciding. Requesting evidence has a cost because it delays settlement and burdens the user. Releasing an unauthorised payment has a much larger loss. Holding a valid payment also has a cost. The attestation is useful only if it discriminates among the hidden hypotheses and arrives before release.
An active-inference design would encode an observation model for attestation under each hypothesis, a transition model for the hold and request actions, and preferences over verified release, unnecessary delay and unauthorised effect. It could prefer the request policy when the expected evidence changes the release decision. Yet the policy evaluator must not send the request or hold the payment by itself.
The authority kernel checks the actor, subject, purpose, permitted context and current policy. A typed request names the payment, evidence sought, expiry and maximum delay. The tool returns a request receipt. After the attestation arrives, a new policy proposal is computed against fresh world state. If release is authorised, execution produces an effect receipt, followed by an independent ledger readback.
This example shows why active inference is a system hypothesis rather than a replacement for controls. The formalism can decide that evidence is worth acquiring. It cannot decide that the evidence is legally available, that the requester is entitled to contact the account owner, or that a model proposal has authority to move money. Those constraints belong to separate contracts and evidence chains.
Sensor-shift comparison: EFE surrogate, Q-learning and value of information
The lab simulates Kestrel’s two-state routing task. A tabular Q-learning agent learns whether to inspect under the training sensor. An expected-free-energy surrogate uses expected decision cost minus a weighted information-gain term. A Bayesian value-of-information baseline computes the expected downstream loss directly.
Change deployment accuracy without retraining. A positive result for the design hypothesis is not “active inference wins”. It is that an explicit observation model adapts immediately to a known sensor change while a frozen model-free policy does not. A negative result means the task does not require the extra machinery, the model is misspecified, or a matched Bayesian baseline already captures the benefit.
EFE surrogate
Q-learning
Bayesian VOI
View the runnable Python version
from __future__ import annotations
from dataclasses import dataclass
from math import log2
import random
from typing import Literal
Action = Literal["inspect", "cold", "ordinary"]
@dataclass(frozen=True)
class Config:
prior_cold: float = 0.55
train_accuracy: float = 0.90
deploy_accuracy: float = 0.65
inspect_cost: float = 4.0
mistake_cost: float = 40.0
epistemic_weight: float = 2.0
seed: int = 61
def h2(p: float) -> float:
if p <= 0.0 or p >= 1.0:
return 0.0
return -(p * log2(p) + (1.0 - p) * log2(1.0 - p))
def information_gain(prior: float, accuracy: float) -> float:
p_cue_cold = prior * accuracy + (1.0 - prior) * (1.0 - accuracy)
return h2(p_cue_cold) - h2(1.0 - accuracy)
def posterior(prior: float, accuracy: float, cue_cold: bool) -> float:
like_cold = accuracy if cue_cold else 1.0 - accuracy
like_ordinary = 1.0 - accuracy if cue_cold else accuracy
evidence = prior * like_cold + (1.0 - prior) * like_ordinary
return prior * like_cold / evidence
def commit_loss(prior: float, mistake_cost: float) -> tuple[float, Action]:
if prior >= 0.5:
return (1.0 - prior) * mistake_cost, "cold"
return prior * mistake_cost, "ordinary"
def expected_loss_after_inspection(prior: float, accuracy: float,
inspect_cost: float,
mistake_cost: float) -> float:
p_cue_cold = prior * accuracy + (1.0 - prior) * (1.0 - accuracy)
post_cold = posterior(prior, accuracy, True)
post_ordinary = posterior(prior, accuracy, False)
loss_cold, _ = commit_loss(post_cold, mistake_cost)
loss_ordinary, _ = commit_loss(post_ordinary, mistake_cost)
return inspect_cost + p_cue_cold * loss_cold + (1.0 - p_cue_cold) * loss_ordinary
def choose_efe_surrogate(cfg: Config) -> Action:
direct, action = commit_loss(cfg.prior_cold, cfg.mistake_cost)
inspect = expected_loss_after_inspection(
cfg.prior_cold, cfg.deploy_accuracy,
cfg.inspect_cost, cfg.mistake_cost
)
inspect -= cfg.epistemic_weight * information_gain(
cfg.prior_cold, cfg.deploy_accuracy
)
return "inspect" if inspect < direct else action
def choose_voi(cfg: Config) -> Action:
direct, action = commit_loss(cfg.prior_cold, cfg.mistake_cost)
inspect = expected_loss_after_inspection(
cfg.prior_cold, cfg.deploy_accuracy,
cfg.inspect_cost, cfg.mistake_cost
)
return "inspect" if inspect < direct else action
# The browser lab adds a small tabular Q-learning implementation and
# evaluates all three policies over seeded synthetic episodes.
if __name__ == "__main__":
cfg = Config()
print("EFE surrogate:", choose_efe_surrogate(cfg))
print("Bayesian VOI:", choose_voi(cfg))
print("Information gain (bits):",
round(information_gain(cfg.prior_cold, cfg.deploy_accuracy), 3))
How to run: save as active_sensing.py and execute python active_sensing.py. The browser version adds training and evaluation for Q-learning.
Assumptions, interpretation and limits
- The hidden state is binary, episodes are independent, and sensor accuracy is known to the model-based agents.
- The EFE agent uses a transparent surrogate, expected loss minus weighted mutual information, rather than claiming one unique canonical decomposition.
- A lower cost permits the narrow conclusion that the policy is better under this synthetic task and intervention.
- The lab cannot establish biological plausibility, general sample efficiency, sentience, or superiority over well-tuned model-based RL.
- Large epistemic weight can cause over-inspection. That is a feature of the test because it exposes preference and weighting sensitivity.
A discriminating comparison
On partially observed tasks where actions control sensor quality, an explicit active-inference agent should adapt faster than a matched model-free RL agent after a known observation-model shift. The advantage should shrink or disappear against Bayesian model-based RL with the same model update, planning budget and preference information.
The observation that would strengthen the hypothesis is lower post-shift decision loss without additional environment interaction. A result that would weaken it is no advantage after matching compute and model access. A rival explanation is simply better system identification. The smallest useful test is a two-state POMDP with a movable sensor, followed by a robotic or software workflow in which sensing has a real cost.
stateDiagram-v2 [*] --> Claim state "Change only the camera’s mobility" as Claim state "Four objects that must be<br/>reviewable" as Test state "When eight seconds are worth<br/>more than immediate action" as Revision Claim --> Test: expose mechanism Test --> Decision: evidence survives Test --> Revision: rival survives Revision --> Claim: narrow or rebuild Decision --> [*]
Where the biological analogy stops
Active inference emerged from theoretical neuroscience and the free-energy principle, where variational inference is used to describe perception, action, learning and self-organisation.[1] That history gives the engineering framework a rich vocabulary. It also creates a recurring error: importing biological meaning with the mathematics.
Kestrel’s preferred outcomes are specified by designers, policy and operating constraints. They are not inherited through metabolism, development or natural selection. Its “surprise” is negative log probability under a model. It is not distress. Its sensor precision is a numerical property or inferred parameter. It is not attention in every biological sense. Its operating boundary is an architecture choice, not automatically a Markov blanket that establishes organismic identity.
An artificial system that minimises an active-inference objective does not thereby acquire biological stakes. It may implement a useful inference-and-control loop. Any further claim needs independent evidence.
The dark room is a preference-design test
A familiar challenge asks why a surprise-minimising organism does not remain in a dark, silent room where sensory input is predictable. Active-inference replies usually point out that agents do not minimise raw sensory variation in isolation. They act under structured generative models and preferences shaped by expected physiological and environmental trajectories. A dark room may violate expectations about movement, social contact, temperature, nourishment or future viability even if the immediate pixels are stable.
For an artificial agent, this reply becomes an engineering obligation. The designer must specify which outcomes are preferred, over what horizon, and with which confidence. If Kestrel is given only a preference for predictable camera images, parking in front of a blank wall may be locally rational. If it is given strong preferences for verified routing and time-bounded completion, the blank wall is costly. Neither behaviour emerges from “free energy” alone.
The same point applies to curiosity. A generative model can contain thousands of uncertain variables. Without relevance structure, an epistemic policy can spend its budget resolving trivia. Biological accounts may appeal to evolved or learned priors that constrain salience. An engineered system needs an explicit equivalent, such as decision-bearing epistemic leverage, resource budgets and stop conditions. Preference design has moved, not disappeared.
Move Kestrel’s beliefs outside Kestrel
Replace the local belief updater with a remote service. Preserve every input, posterior, policy score and action. Behaviour remains identical. Is the robot still an active-inference agent?
At the system level, yes, if the remote service, robot, observation loop and policy selector form the configured causal system. At the chassis level, no. The chassis is now an actuator and sensor endpoint inside a larger inference loop. The candidate boundary follows causal organisation, not the label on the device.
Now replace the entire variational machinery with a POMDP planner that generates the same actions. Behaviour alone no longer distinguishes mechanisms. The correct test intervenes on beliefs, likelihoods, preferences or search, then compares the action changes.
What biological evidence can and cannot license
The free-energy principle has been criticised as difficult to falsify when stated too generally. A more productive approach fixes a generative model and process theory, then asks whether it predicts unseen dynamics. Work with cultured neuronal networks has reported that a specified variational model predicted later neuronal responses and plasticity from early data, while also noting that a mapping alone is insufficient and predictive validity is the stronger test.[13]
This evidence supports a constrained claim about those networks and models. It does not prove that every brain process performs the same algorithm, that expected free energy is the unique objective of behaviour, or that an engineered agent inherits the biological interpretation. The mathematical review literature is valuable precisely because it exposes assumption structure rather than treating the framework as a slogan.[2]
| Structure | What may transfer | What does not transfer automatically | Required test |
|---|---|---|---|
| Variational inference | Approximate posterior updating under a generative model | Neural implementation or biological plausibility | Compare update dynamics and interventions |
| Expected free energy | Joint scoring of preferred and informative futures | Unique derivation, organismic purpose or felt value | Compare rival objectives under matched models |
| Prior preferences | A formal target distribution over outcomes | Needs, values or homeostasis | Trace preference provenance and failure costs |
| Precision | Weight assigned to uncertainty or prediction error | Attention, arousal or dopamine as an identity claim | Specify the mapping and perturb both sides |
| Agent boundary | A declared causal system for inference and action | Selfhood, sentience or moral status | Boundary interventions plus independent evidence |
The rival that can reproduce the same benefit
A Bayesian model-based RL agent can maintain a belief over hidden states, model how sensing actions alter observations, compute the value of information and choose a policy that first looks and then acts. With matched models, planning horizons and compute, it may reproduce every practical advantage described in the Kestrel case.
This rival does not make active inference useless. It changes the adoption claim. Choose active inference when its generative-model grammar, preference representation or process hypotheses make the system easier to reason about or test. Do not choose it because uncertainty-aware action is impossible elsewhere.
Five failure paths worth injecting
Preference laundering occurs when a designer hides a conventional reward function inside “prior preferences” and then claims reward engineering has disappeared. Epistemic obsession occurs when information gain is weighted without decision relevance. Model capture occurs when a wrong likelihood makes bad evidence look decisive. Search myopia occurs when approximations omit the informative branch. Authority collapse occurs when the policy evaluator is allowed to execute its own proposal.
sequenceDiagram participant Q as Question participant M as Mechanism participant E as Evidence participant D as Decision Q->>M: The pallet that should not move yet M->>E: Change only the camera’s mobility E-->>M: compare rival explanations E->>D: Use active inference only when action controls evidence D-->>Q: revise scope or act
Use active inference only when action controls evidence
Do not adopt active inference because an agent “should minimise surprise”, because the brain has been described that way, or because epistemic value sounds more principled than an exploration bonus. Those reasons do not identify an engineering need.
Start with the causal graph. Ask whether an action can change the evidence channel, whether that evidence can change a consequential decision, and whether it arrives before commitment. Compute decision-bearing epistemic leverage. If leverage is negligible, use the simpler controller. If it is material, build two systems: an active-inference candidate and a matched Bayesian or RL baseline.
Then intervene. Degrade the sensor. Make the informative observation irrelevant. Shift the transition model. Change preferences. Truncate the planning horizon. Externalise the belief updater. The chosen design should change for the reason its theory predicts. If two systems remain behaviourally identical under every useful intervention, prefer the one that is easier to calibrate, govern and recover.
Record five outputs for every intervention: downstream decision loss, calibration, inspection rate, compute cost and recovery burden. A lower task loss that doubles human review, conceals a model update or makes interrupted execution harder to reconstruct is not a system gain. The active-inference candidate should win on the property that motivated it: earlier and safer adaptation when actions control evidence. A null result is useful. It says that epistemic action was not decision-bearing in this environment, that the approximation hid the benefit, or that the rival controller already captured it more simply.
The practical decision is therefore conditional: use expected free energy when perception is an action problem and the explicit generative model makes that coupling testable. Keep preferences versioned, keep authority deterministic, keep world state separate from belief, and keep a rival controller in the experiment.
That decision respects what active inference genuinely offers. It joins sensing and acting inside one policy hypothesis. It also respects the boundary. The resulting agent is an engineered system whose behaviour depends on a declared model, objective and approximation. Whether similar mathematics explains living systems is a scientific question. Whether the artificial system is conscious is another question again.
Glossary
- Active inference
- A family of frameworks in which perception, learning and action are formulated as inference under a generative model, with policies commonly evaluated using expected free energy or related objectives.
- Ambiguity
- Expected uncertainty in observations given hidden states. A state is ambiguous when it can generate observations that are hard to distinguish.
- Belief state
- A probability distribution over hidden states conditioned on available observations and the model.
- Decision-bearing epistemic leverage
- The expected reduction in minimum downstream decision loss made possible by an action-conditioned observation.
- Expected free energy
- A prospective policy objective with decompositions that can combine preference-related and epistemic terms. Exact forms and derivations vary.
- Generative model
- A probabilistic model of how hidden states, observations, actions and transitions relate.
- Prior preference
- A distribution or potential encoding outcomes the agent is designed or modelled to prefer.
- Variational free energy
- A variational objective that bounds negative log model evidence and supports approximate posterior inference.
References
- Friston, K. (2010). The free-energy principle: a unified brain theory? Nature Reviews Neuroscience, 11, 127–138.
- Buckley, C. L., Kim, C. S., McGregor, S., & Seth, A. K. (2017). The free energy principle for action and perception: A mathematical review. Journal of Mathematical Psychology, 81, 55–79.
- Friston, K., Rigoli, F., Ognibene, D., Mathys, C., Fitzgerald, T., & Pezzulo, G. (2015). Active inference and epistemic value. Cognitive Neuroscience, 6(4), 187–214.
- Friston, K., FitzGerald, T., Rigoli, F., Schwartenbeck, P., & Pezzulo, G. (2017). Active inference: A process theory. Neural Computation, 29(1), 1–49.
- Da Costa, L., Parr, T., Sajid, N., Veselic, S., Neacsu, V., & Friston, K. (2020). Active inference on discrete state-spaces: A synthesis. Journal of Mathematical Psychology, 99, 102447.
- Sajid, N., Ball, P. J., Parr, T., & Friston, K. J. (2021). Active inference: Demystified and compared. Neural Computation, 33(3), 674–712.
- Millidge, B., Tschantz, A., & Buckley, C. L. (2020). Whence the expected free energy? arXiv:2004.08128.
- Millidge, B., Tschantz, A., Seth, A. K., & Buckley, C. L. (2020). On the relationship of active inference and control as inference. arXiv:2006.12964.
- Da Costa, L., Sajid, N., Parr, T., Friston, K., & Smith, R. (2023). Reward maximization through discrete active inference. Neural Computation, 35(5), 807–852.
- Tschantz, A., Millidge, B., Seth, A. K., & Buckley, C. L. (2020). Reinforcement learning through active inference. arXiv:2002.12636.
- Fountas, Z., Sajid, N., Mediano, P. A. M., & Friston, K. (2020). Deep active inference agents using Monte-Carlo methods. Advances in Neural Information Processing Systems, 33.
- Heins, C., Millidge, B., Demekas, D., Klein, B., Friston, K., Couzin, I., & Tschantz, A. (2022). pymdp: A Python library for active inference in discrete state spaces. Journal of Open Source Software, 7(73), 4098.
- Isomura, T., Kotani, K., Jimbo, Y., & Friston, K. J. (2023). Experimental validation of the free-energy principle with in vitro neural networks. Nature Communications, 14, 4547.
- van de Laar, T., Koudahl, M., van Erp, B., & de Vries, B. (2022). Active inference and epistemic value in graphical models. Frontiers in Robotics and AI, 9, 794464.