Chapter 8IntermediateNew edition
Agents that model one another fall into step
Each disc is an agent with its own rhythm. It predicts that what it senses from its neighbours will match its own phase, and it moves to reduce the error. Raise the precision the agents afford one another, and past a critical value a shared rhythm appears.
Learn by doing
Try this
- Find the threshold. The agents start with almost no precision for one another, and each keeps its own rhythm. Before you touch K, move the gold marker to the coupling at which you expect a shared rhythm to appear, and commit. Then raise K slowly and watch the green point on the chart. The theory curve appears once you have committed.
- Widen the spread. The agents are in step. Predict what happens if their natural frequencies become more varied, then drag Δ upwards. The threshold moves with it, and the shared rhythm dissolves when it passes K.
- A duet. Two agents, each predicting the other. Their natural frequencies differ by 2Δ. Predict how much coupling they need to lock, then raise K. Watch the red arcs, which are the prediction errors, shrink to a fixed lag.
- Deafen one singer. The pair is locked at the mean of their frequencies. Predict who will follow whom when agent 1 stops listening. Then deafen it. Agent 1 returns to its own rhythm; agent 2 still follows, further behind.
- Two communities. Each community is coherent, but the bridges between them carry no precision, so the two drift past each other. Predict what the phase-locking matrix will look like when they merge. Raise the bridge precision and watch the off-diagonal blocks fill in.
- Cut the bridges, then restore them. The communities are merged. Cut the bridges and the shared rhythm breaks into two. Restore them and it re-forms. Watch the two information read-outs: what one interior tells you about the other, with and without knowing the linking agents.
The mathematics
What is being computed
Each agent i has one internal state, a phase θi. It is the agent's expectation about the phase of the rhythm it takes part in, and also the phase of the signal it emits. The agent senses the phases θj of its neighbours. This is a deliberately minimal reading of the duet papers of Friston and Frith (2015), in which each bird has a rich, hierarchical generative model of song. Here the generative model is one line.
Agent i expects the signal from j to share its own phase, with a von Mises density (the circular counterpart of a Gaussian) of precision κij. Precision is the confidence placed in a prediction. With a point belief at θi, the free energy Fi is the negative log probability of what the agent senses. It is written here in nats above its minimum, so it is zero when every neighbour is exactly in phase.
ωi is the agent's natural frequency: its prior belief about how fast its own phase advances. The second term is a sum of prediction errors, sin(θj − θi), each weighted by its precision. This is the textbook's gradient flow for continuous states, with the expected motion ωi in place of Dμ.
The order parameter r, between 0 and 1, measures how closely the phases agree, and ψ is their mean phase. Each agent is pulled towards ψ with a strength that grows with r, so agreement breeds agreement. For natural frequencies drawn from a Cauchy distribution of half-width Δ and very many agents, Kuramoto's result is exact: no shared rhythm below Kc, and the curve above it. The white vector in the polar plot is r eiψ.
κ12 is the precision agent 1 gives to what it hears from agent 2. With κ12 = κ21 = K/2 the pair locks when K ≥ |ω1 − ω2|, at the mean of the two frequencies. Deafening agent 1 sets κ12 = 0: the shared frequency Ω becomes ω1, so agent 1 leads, and the lag grows to asin(2(ω1 − ω2)/K).
a and b are the mean phases of the interior agents of communities A and B: those with no link to the other side. z stands for the phases of the linking agents. The first quantity is the mutual information between the interiors, estimated from a histogram of a − b; H is differential entropy. The second is the information that remains once the linking agents are known, a Gaussian estimate from the partial correlation ρ of a and b after regression on z. It is meaningful while each community is coherent. Both are in nats, over the most recent samples.
Two further measures are drawn on the stage. The phase-locking value of a pair is |⟨ei(θi − θj)⟩|, averaged over about the last 20 seconds (Lachaux et al. 1999). When every natural frequency is equal and precisions are symmetric, the total free energy ΣFi can only fall: set Δ to zero to see it.
Reading
Where this comes from
When what is out there is another creature with a similar model, this synchronization means the internal states of one creature should come to resemble the internal states of the other: a primitive kind of theory of mind.Parr, Pezzulo & Friston (2022), Active Inference, chapter 8, section 8.4, pp. 162–163
What is established
Friston and Frith (2015) simulated two songbirds with the same generative model, each predicting the sensations the other causes. The two come to generalised synchrony: the internal states of one track those of the other. They propose this as a minimal account of communication. Palacios and colleagues (2019) found that synchrony emerges in networks of model neurons that each infer the others.
The mathematics of the transition is older and independent of active inference. Kuramoto (1975, 1984) solved the all-to-all model shown here, and Strogatz (2000) reviews it. The threshold Kc = 2Δ and the curve √(1 − Kc/K) are exact for Cauchy-distributed frequencies and infinitely many agents.
Under the free energy principle, a group whose members are coupled in this way is a candidate system at a higher level, with a boundary of its own: a Markov blanket, a set of states that separates inside from outside (Kirchhoff et al. 2018; Palacios et al. 2020). In the two-community graph, the agents that hold the bridges play that part. In this model, with symmetric precisions and noise, the density near a locked state factorises over the links of the graph, so the two interiors are conditionally independent given the linking agents. The estimate in panel two measures this.
What this model leaves out
Reading the Kuramoto model as free-energy descent is this page's simplification, not a result of the cited papers. In the duet papers each bird has a hierarchical model with chaotic dynamics, infers hidden causes over time, and takes turns by attenuating the precision of its own sensations while it sings. Here each agent has one phase, a point belief with no uncertainty, and fixed precisions. Agents sense phases directly and without noise, and nothing is learned.
The chart compares a finite network with a result for infinitely many agents. With few agents r does not fall to zero below threshold: it hovers near the chance level drawn on the chart. The Cauchy distribution has heavy tails, so a few agents are much faster or slower than the rest and never join.
The conditional independence shown for two communities depends on symmetric precisions and on being near a locked state. Whether Markov blankets can be read off sparse coupling in general is an open question (Biehl et al. 2021; Aguilera et al. 2022). The information estimates are short-window estimates, and the conditional one is a Gaussian approximation.
The free energy principle is a modelling framework. This page illustrates it; it is not evidence for it, and it makes no claim about how brains or birds synchronise.
- Friston, K. & Frith, C. (2015). A Duet for one. Consciousness and Cognition 36, 390–405. doi:10.1016/j.concog.2014.12.003
- Friston, K. J. & Frith, C. D. (2015). Active inference, communication and hermeneutics. Cortex 68, 129–143. doi:10.1016/j.cortex.2015.03.025
- Palacios, E. R., Isomura, T., Parr, T. & Friston, K. (2019). The emergence of synchrony in networks of mutually inferring neurons. Scientific Reports 9, 6412. doi:10.1038/s41598-019-42821-7
- 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
- Kuramoto, Y. (1975). Self-entrainment of a population of coupled non-linear oscillators. Lecture Notes in Physics 39, 420–422. doi:10.1007/BFb0013365
- Kuramoto, Y. (1984). Chemical Oscillations, Waves, and Turbulence. Springer. doi:10.1007/978-3-642-69689-3
- Strogatz, S. H. (2000). From Kuramoto to Crawford: exploring the onset of synchronization in populations of coupled oscillators. Physica D 143, 1–20. doi:10.1016/S0167-2789(00)00094-4
- Watts, D. J. & Strogatz, S. H. (1998). Collective dynamics of ‘small-world’ networks. Nature 393, 440–442. doi:10.1038/30918
- Lachaux, J.-P., Rodriguez, E., Martinerie, J. & Varela, F. J. (1999). Measuring phase synchrony in brain signals. Human Brain Mapping 8, 194–208. doi:10.1002/(SICI)1097-0193(1999)8:4<194::AID-HBM4>3.0.CO;2-C
- Kirchhoff, M., Parr, T., Palacios, E., Friston, K. & Kiverstein, J. (2018). The Markov blankets of life: autonomy, active inference and the free energy principle. Journal of the Royal Society Interface 15, 20170792. doi:10.1098/rsif.2017.0792
- Palacios, E. R., Razi, A., Parr, T., Kirchhoff, M. & Friston, K. (2020). On Markov blankets and hierarchical self-organisation. Journal of Theoretical Biology 486, 110089. doi:10.1016/j.jtbi.2019.110089
- Biehl, M., Pollock, F. A. & Kanai, R. (2021). A technical critique of some parts of the free energy principle. Entropy 23(3), 293. doi:10.3390/e23030293
- Aguilera, M., Millidge, B., Tschantz, A. & Buckley, C. L. (2022). How particular is the physics of the free energy principle? Physics of Life Reviews 40, 24–50. doi:10.1016/j.plrev.2021.11.001