The anatomy of the human eye lends itself remarkably well to interpretation through the Free Energy Principle. This simulation explores that correspondence — mapping ocular structures onto the architecture of Active Inference.
Any system persisting at a non-equilibrium steady state possesses a Markov blanket that separates internal from external states. The system minimises variational free energy:
The eye can be read as a Markov blanket in physical form. The cornea serves as a sensory surface. The retina and cortex correspond to internal states. The extraocular muscles act as active states. The iris modulates the flow of sensory evidence — analogous to a precision gate.
Light crossing the lens undergoes complete spatial inversion: up becomes down, left becomes right. In the language of Active Inference, the cornea sits at the sensory boundary, where external states (photons) become evidence for the generative model.
This spatial inversion is not a flaw — it is how the boundary separates inside from outside. The generative model learns to work with the inverted signal.
The iris can be interpreted as a physical analogue of precision weighting. Its circular musculature controls how much sensory evidence reaches the interior — effectively setting the gain on incoming signals. In the Active Inference framework, precision (inverse variance) determines how strongly sensory data drives belief updates (Parr & Friston, 2019).
In bright light, sensory evidence is abundant — the pupil constricts. In dim light, evidence is scarce — the pupil dilates, trading resolution for sensitivity. This behaviour parallels precision-weighted prediction error minimisation, though the pupillary light reflex is primarily subcortical. The published link between pupil diameter and precision concerns cognitive (non-luminance) dilation as a readout of noradrenergic arousal (Parr & Friston, 2017).
The pupil marks the aperture between the world and the model — in Markov blanket terms, between external and internal states. Through it, light enters the generative model.
Through the pupil you see the retinal surface. The features visible inside are a phenomenological visualisation — not a literal depiction of neural activity, but a pedagogical rendering of how Active Inference concepts might be imagined at work within the eye:
Three hierarchical rings pulsing at different frequencies represent levels of a Bayesian hierarchy — nested generative models at increasing spatiotemporal scales, as described in Friston, Parr & de Vries (2017).
Radial predictions projecting outward through the pupil represent the model's expectations reaching toward the world. The spiral receding into the centre suggests the recursive depth of hierarchical inference.
Neural sparks represent individual belief update events — moments where accumulated prediction error triggers a discrete update to the posterior.
The eye does not passively receive light. It actively samples the visual world through saccades, smooth pursuit, and fixation — all driven by expected free energy minimisation (Parr & Friston, 2018).
Toggle Saccades to see the oculomotor system actively sampling the environment. Toggle Oculomotor tracking to control gaze direction with your mouse — you become the active inference agent.
The balance of sensory and prior precision determines whether the system is in a learning regime (priors update to match evidence) or an action regime (the system acts to make evidence match priors). The pupil's light response offers a visible analogue of this precision architecture.
Friston, K. (2010). The free-energy principle: a unified brain theory? Nat. Rev. Neurosci., 11(2), 127–138.
Parr, T., Pezzulo, G. & Friston, K. (2022). Active Inference: The Free Energy Principle in Mind, Brain, and Behavior. MIT Press.
Parr, T. & Friston, K. (2018). Active inference and the anatomy of oculomotion. Neuropsychologia, 111, 334–343.
Parr, T. & Friston, K. (2019). The computational pharmacology of oculomotion. Psychopharmacology, 236, 2473–2484.
Parr, T., Corcoran, A., Friston, K. & Hohwy, J. (2019). Perceptual awareness and active inference. Neurosci. Consciousness, 2019(1), niz012.
Rao, R. & Ballard, D. (1999). Predictive coding in the visual cortex. Nature Neuroscience, 2(1), 79–87.
Friston, K., Parr, T. & de Vries, B. (2017). The graphical brain: belief propagation and active inference. Network Neuroscience, 1(4), 381–414.
Parr, T. & Friston, K. (2017). Uncertainty, epistemics and active inference. J. R. Soc. Interface, 14(136), 20170376.
Computational method: CRR temporal grammar (temporalgrammar.ai) · Active Inference Institute · 2026