Beyond the textbookIntermediateNew edition
The eye asks questions
Only the centre of the retina sees detail, so every eye movement is a small experiment: the eye goes where the brain expects to learn most. Watch this eye work out a scene in two or three glimpses, then try it yourself.
AII: EduActive · Watch, then do
Two short clips, two things to try
These two passages come from the Institute’s livestreams and interviews. Neither is about this page, but each describes what the eye above is doing. Each is two to three minutes. Watch one, then press its button and look for the same thing on the stage.
- The ideaA few plain sentences. Enough on its own.
- Listen for, then tryOne line from the clip, and one thing to do on the stage.
- In the modelWhich matrix, term or rate carries the idea, and how this page differs from what is said.
-
Plays here, from 59:21. Nothing loads from YouTube until you press play.Open on YouTube at 59:21
1Before you start
Scanning as foraging
An animal searching for food moves its body to where food is likely to be. An eye searching a picture does much the same, except that what it gathers is information. Looking costs little and leaves the picture unchanged, so the eye can scan, go back and scan again.
Listen forThen tryThink of the blue discs as the food. Each one shows how much the eye expects to learn by looking there. Predict which quadrant the eye will visit first, and what happens to a disc once its quadrant has been seen.In the model equation 3
What the eye forages for here is epistemic value: the mutual information between the view a saccade would deliver and the scene that is out there. It is one of the two terms of the expected free energy G, and the blue discs draw it for each quadrant. A quadrant that is already known is worth nothing, so the eye does not go back to it.
The speaker is describing a different study, in which an eye scans patterns on pottery, and is comparing it with ants that forage on foot. The task on this page is the scene-construction task of Mirza et al. (2016): four quadrants, twelve possible scenes and a report at the end. The two share the main point. Looking does not change the scene, so nothing here corresponds to an ant’s pheromone trail.
Equation 3, epistemic value · Equation 2, expected free energy
-
Plays here, from 54:21. Nothing loads from YouTube until you press play.Open on YouTube at 54:21
2While it runs
Until the scene snaps into place
You never take in a whole scene at once. You collect a few small samples, one glimpse at a time, and each one shifts your belief about what you are looking at. At some point one explanation fits all the samples together, and the scene seems to snap into place.
Listen forThen tryNow you do the sampling. Guess how many glimpses you will need before you are sure. Look at one quadrant at a time and watch the belief bars beside the stage. Notice the glimpse at which one bar takes over.In the model equation 1
The “latent explanation” is the hidden state s: which of twelve scenes is out there. Each glimpse is an outcome o, and the belief Q(s) is updated by Bayes’ rule after every one. The bars show that belief, and the readout H[Q(s)] is the uncertainty left in it. When you look for yourself, the bars show what an ideal observer of your glimpses would believe.
The speaker’s examples are reading a sentence and looking at an abstract painting, and the snap is described as it feels to a person. On this page the snap is only arithmetic: the glimpses so far leave one scene far more probable than the rest, and the entropy falls towards zero. The model uses the exact posterior, and it has no account of how recognition feels.
The quoted lines are taken from the automatic captions, with punctuation added and hesitations removed. The speakers are describing other studies and other examples, not this page; where the two differ, the notes say so. Each clip stops at the end of the passage. The full recordings are listed under Sources.
Learn by doing
Try this
- Predict the next glimpse. The scene holds a bird and either a cat or some seeds. The eye must decide: flee, feed or wait. Before each saccade, say which quadrant it will go to and why. Then watch. After an empty quadrant, notice where it does not bother to look.
- Turn on the information map. Each blue disc is the expected information gain of fixating that quadrant, in nats. Predict what happens to the discs after the next glimpse. The eye always goes to the largest one, and the discs shrink to nothing once the scene is known.
- Look for yourself. Now you see what one fixation delivers. Move the pointer, tap a quadrant, or use the Look buttons. Report as soon as you are sure. Guess how many glimpses you will need, then compare your count with the agent's on the same scene.
- Remove the epistemic term. Predict what an agent does when information has no value to it. It does not guess early here, because being wrong is costly. Instead every saccade is worth the same to it, so it wanders, and sometimes runs out of moves. Run 200 scenes and compare the rows.
- Flatten the acuity. Give the retina the same resolution everywhere. Predict how many saccades the agent will make. With nothing to gain from moving, the map empties and the eye reports at once. Then slide the fall-off back and watch the saccades return.
- Change the question. Ask “Is there a cat?” of the same kind of scene. Predict whether the scan path gets shorter or longer. What counts as knowing enough has changed, so on some scenes the eye stops a little sooner. Run 200 scenes under each question to compare. Yarbus saw the same dependence on the question in people looking at a painting.
The mathematics
What is being computed
The agent has a generative model: a description of how its sensations are caused. The hidden state s is which of twelve scenes is out there, together with where the eye is. An outcome o is what one fixation delivers: a view of each quadrant, reliable at the fovea and poor elsewhere. A move u is a saccade to a quadrant or to a report location. All logarithms are natural, so information is in nats.
The variational free energy F of a belief Q(s) is complexity (how far the belief has moved from the prior P(s)) minus accuracy (how well it explains the glimpse). It can never be less than the surprise, −ln P(o). This model is small enough to use the exact posterior, where the two are equal. Code: observe, using AIF.bayes and AIF.vfe.
G is a cost: the move with the lowest G is taken. P(o) holds the agent's preferences, C: ln P(o) is c for the feedback “right”, −2c for “wrong” and 0 for any view of the scene, less a constant ln Z that makes the probabilities sum to one. Here c = 2, as in the published model. Pragmatic value is the expected log preference. The table beside the stage adds ln Z back so that a look reads as 0. Code: evaluate, checked against AIF.efe.
This is the mutual information between what the eye would see and what is out there: how uncertain the agent is about the view, less the part of that uncertainty which no state of the world would explain. It is what the blue discs show. A quadrant whose contents are already known, or which could only be seen badly, is worth nothing. Code: the epistemic term of evaluate; mutualInformation recomputes it by brute force.
The minimum angle of resolution, MAR, is the finest detail the eye can resolve at eccentricity E, the angle away from the point of fixation. It grows roughly in a straight line, doubling at E₂. The values MAR₀ = 1 minute of arc and E₂ = 2° are typical, not measured from anyone. The second formula is this page's own, illustrative link between the two models: an object whose telling detail is δ = 1 minute of arc is named correctly with probability a(E), which falls to chance (one in four) in the periphery; β = 2. In active inference terms the precision of the “what” likelihood A falls with eccentricity. The blur on the scene is drawn from the same MAR(E), starting at the edge of a sharp window: the objects are drawn larger than life so that they can be seen, and the window is enlarged with them. Code: mar, reliability, blurLevel.
A saccade of amplitude A degrees lasts about D₀ + kA, with typical values D₀ = 21 ms and k = 2.2 ms per degree: larger saccades take longer and are faster, the “main sequence”. The eye here follows a smooth minimum-jerk path, an illustrative choice whose peak velocity is 1.875 A/D. Pupil diameter d in millimetres follows Moon and Spencer's formula for luminance L in candelas per square metre. Neither formula enters the inference. Code: saccade, saccadePos, pupil.
Reading
Where this comes from
We would gain nothing by performing an experiment if we already knew what the results would be with a high degree of confidence.Parr, Pezzulo & Friston (2022), Active Inference, chapter 7, p. 137, on choosing saccades
What is established
Cone density, and with it acuity, falls steeply away from the centre of the fovea (Curcio et al. 1990). The minimum angle of resolution grows roughly linearly with eccentricity (Levi et al. 1985; Strasburger et al. 2011). People therefore move their eyes several times a second, and where they look depends on what they have been asked (Yarbus 1967). Saccade duration and peak velocity rise lawfully with amplitude (Bahill et al. 1975).
The idea that saccades are experiments, chosen to resolve uncertainty about the causes of sensation, was put by Friston et al. (2012). The task on this page is the scene-construction task of Mirza et al. (2016), in which an agent that minimises expected free energy looks at informative quadrants first and reports when it is sure. Parr and Friston (2017, 2018) and Parr et al. (2021) develop the same account for visual search, the anatomy of eye movement and richer scenes.
These are modelling results. The free energy principle is a framework for building such models. This page illustrates it and is not evidence for it.
What this model leaves out
Mirza et al. use a factorised (mean-field) posterior, simulate the neuronal dynamics of belief updating, sample moves from a distribution with precision γ, and let the agent carry on after a wrong report. Here beliefs are exact, the move with the lowest G is always taken, and a trial ends at the first report or after eight moves. The base arrangement of the three scenes is reconstructed from the paper's text.
In the paper nothing is seen away from the fovea. This page adds weak peripheral views so that the acuity curve can be linked to the inference. That link, a(E), is illustrative. Real peripheral vision is limited by crowding and attention as well as by acuity, and none of that is modelled.
The agent plans one move ahead. The question changes when it stops, and so which parts are fixated, but not which glimpse is most informative about the whole scene. Deeper planning would be needed for the question to redirect the first saccade, as it does in people. The objects are drawn larger than life, with the sharp window and the blur scaled to match. Vergence, pursuit, microsaccades, blinks and the pupil's dynamics are not modelled, and the eye is slowed so that its movements can be seen.
- Active Inference Institute. ActInf Livestream #029.0 ~ “Active Inferants: An Active Inference Framework for Ant Colony Behavior”. Recording. youtube.com/watch?v=SNbfAkOokAI
- Active Inference Institute. Conor Heins ~ Active Inference Insights 019 ~ Collective Behaviour, Attention, Intelligence. Recording. youtube.com/watch?v=nf57wi3qLjk
- Mirza, M. B., Adams, R. A., Mathys, C. D. & Friston, K. J. (2016). Scene construction, visual foraging, and active inference. Frontiers in Computational Neuroscience 10:56. doi:10.3389/fncom.2016.00056
- Friston, K., Adams, R. A., Perrinet, L. & Breakspear, M. (2012). Perceptions as hypotheses: saccades as experiments. Frontiers in Psychology 3:151. doi:10.3389/fpsyg.2012.00151
- Parr, T. & Friston, K. J. (2017). The active construction of the visual world. Neuropsychologia 104:92–101. doi:10.1016/j.neuropsychologia.2017.08.003
- Parr, T. & Friston, K. J. (2018). Active inference and the anatomy of oculomotion. Neuropsychologia 111:334–343. doi:10.1016/j.neuropsychologia.2018.01.041
- Parr, T., Sajid, N., Da Costa, L., Mirza, M. B. & Friston, K. J. (2021). Generative models for active vision. Frontiers in Neurorobotics 15:651432. doi:10.3389/fnbot.2021.651432
- Parr, T., Pezzulo, G. & Friston, K. J. (2022). Active Inference: The Free Energy Principle in Mind, Brain, and Behavior. MIT Press. doi:10.7551/mitpress/12441.001.0001
- Yarbus, A. L. (1967). Eye Movements and Vision. Plenum Press. doi:10.1007/978-1-4899-5379-7
- Curcio, C. A., Sloan, K. R., Kalina, R. E. & Hendrickson, A. E. (1990). Human photoreceptor topography. Journal of Comparative Neurology 292:497–523. doi:10.1002/cne.902920402
- Levi, D. M., Klein, S. A. & Aitsebaomo, A. P. (1985). Vernier acuity, crowding and cortical magnification. Vision Research 25:963–977. doi:10.1016/0042-6989(85)90207-X
- Strasburger, H., Rentschler, I. & Jüttner, M. (2011). Peripheral vision and pattern recognition: a review. Journal of Vision 11(5):13. doi:10.1167/11.5.13
- Bahill, A. T., Clark, M. R. & Stark, L. (1975). The main sequence, a tool for studying human eye movements. Mathematical Biosciences 24:191–204. doi:10.1016/0025-5564(75)90075-9
- Carpenter, R. H. S. (1988). Movements of the Eyes, 2nd edition. Pion, London. (Source of the typical duration constants.)
- Moon, P. & Spencer, D. E. (1944). On the Stiles–Crawford effect. Journal of the Optical Society of America 34:319–329. doi:10.1364/JOSA.34.000319
- Watson, A. B. & Yellott, J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision 12(10):12. doi:10.1167/12.10.12