Collective behavior from surprise minimization
Open accessAbstract
Collective motion is ubiquitous in nature; groups of animals, such as fish, birds, and ungulates appear to move as a whole, exhibiting a rich behavioral repertoire that ranges from directed movement to milling to disordered swarming. Typically, such macroscopic patterns arise from decentralized, local interactions among constituent components (e.g., individual fish in a school). Preeminent models of this process describe individuals as self-propelled particles, subject to self-generated motion and “social forces” such as short-range repulsion and long-range attraction or alignment. However, organisms are not particles; they are probabilistic decision-makers. Here, we introduce an approach to modeling collective behavior based on active inference. This cognitive framework casts behavior as the consequence of a single imperative: to minimize surprise. We demonstrate that many empirically observed collective phenomena, including cohesion, milling, and directed motion, emerge naturally when considering behavior as driven by active Bayesian inference—without explicitly building behavioral rules or goals into individual agents. Furthermore, we show that active inference can recover and generalize the classical notion of social forces as agents attempt to suppress prediction errors that conflict with their expectations. By exploring the parameter space of the belief-based model, we reveal nontrivial relationships between the individual beliefs and group properties like polarization and the tendency to visit different collective states. We also explore how individual beliefs about uncertainty determine collective decision-making accuracy. Finally, we show how agents can update their generative model over time, resulting in groups that are collectively more sensitive to external fluctuations and encode information more robustly.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
Canonical collective phenomena-cohesion, milling, and directed motion-emerge when agents minimize surprise about their conspecifics, with real-time model updates coupling individual learning to group-level properties.
“Canonical collective phenomena-cohesion, milling, and directed motion-have been shown to emerge when agents minimize surprise about their conspecifics, with real-time model updates coupling individual learning to group-level properties (Heins et al., 2024).”
From Social Reality Construction via Active Inference: Modeling the Dialectic of Conformity and Creativity (2026) · cites this paper as Heins et al., 2024
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
Rao, R. P. N., & Ballard, D. H. (1999) · Nature Neuroscience · doi:10.1038/4580 · Cited by 5,483 · see citing works
Active inference: a process theory
Friston, K., FitzGerald, T., Rigoli, F., Schwartenbeck, P., & Pezzulo, G. (2017) · Neural Computation · doi:10.1162/neco_a_00912 · Cited by 1,156 · see citing works
Self-citationInferring the structure and dynamics of interactions in schooling fish
Katz, Y., Tunstrøm, K., Ioannou, C. C., Huepe, C., & Couzin, I. D. (2011) · Proceedings of the National Academy of Sciences · doi:10.1073/pnas.1107583108 · Cited by 927 · see citing works
A review of predictive coding algorithms
Spratling, M. W. (2017) · Brain and Cognition · doi:10.1016/j.bandc.2015.11.003 · Cited by 437 · see citing works
Active inference on discrete state-spaces: A synthesis
Da Costa, L., Parr, T., Sajid, N., Veselic, S., Neacsu, V., & Friston, K. (2020) · Journal of Mathematical Psychology · doi:10.1016/j.jmp.2020.102447 · Cited by 226 · cited 4× · see citing works
“In the active inference framework we rather ask: what is the minimal model an organism might have of its environment that is sufficient to explain its behavior? Behavior is then cast as the process by which the agent minimizes surprise or prediction error, with respect to this model of the world [20, 27].”
InfluentialSelf-citationSmith, R., Badcock, P., & Friston, K. J. (2021) · Psychiatry and Clinical Neurosciences · doi:10.1111/pcn.13138 · Cited by 174 · see citing works
Friston, K., Stephan, K., Li, B., & Daunizeau, J. (2010) · Mathematical Problems in Engineering · doi:10.1155/2010/621670 · Cited by 171 · see citing works
Self-citationThe free energy principle made simpler but not too simple
Friston, K., Da Costa, L., Sajid, N., Heins, C., Ueltzhöffer, K., Pavliotis, G. A., & Parr, T. (2023) · Physics Reports · doi:10.1016/j.physrep.2023.07.001 · Cited by 163 · cited 3× · see citing works
“Figure 2A displays examples of different types of group phenomena exhibited in groups of active inference agents, whose diversity and types resemble those observed in animal groups [39, 40] and in other collective motion models [6, 7, 41].”
Self-citationEpistemic Communities under Active Inference
Albarracin, M., Demekas, D., Ramstead, M. J. D., & Heins, C. (2022) · Entropy · doi:10.3390/e24040476 · Cited by 48 · see citing works
Self-citation
Flagged first, then by citations
Research works printed but not linked: 65
- [2]S. Camazine, Self-Organization in Biological Systems (Princeton University Press, 2003).
- [3]M. Rubenstein, C. Ahler, R. Nagpal, “Kilobot: A low cost scalable robot system for collective behaviors” in 2012 IEEE International Conference on Robotics and Automation (IEEE, 2012), pp. 3293–3298.
- [5]C. W. Reynolds, “Flocks, herds and schools: A distributed behavioral model” in Proceedings of the 14th annual conference on Computer graphics and interactive techniques (1987), pp. 25–34.
- [6]T. Vicsek, A. Czirók, E. Ben-Jacob, I. Cohen, O. Shochet, Novel type of phase transition in a system of self-driven particles. Phys. Rev. Lett. 75, 1226 (1995). 10060237
- [7]I. D. Couzin, J. Krause, R. James, G. D. Ruxton, N. R. Franks, Collective memory and spatial sorting in animal groups. J. Theor. Biol. 218, 1– 12 (2002). 12297066
- [8]J. Toner, Y. Tu, Flocks, herds, and schools: A quantitative theory of flocking. Phys. Rev. E 58, 4828 (1998).
- [9]D. J. Sumpter, The principles of collective animal behaviour. Philos. Trans. R. Soc. B: Biol. Sci. 361, 5– 22 (2006). PMC1626537 16553306
- [10]E. Bertin, M. Droz, G. Grégoire, Boltzmann and hydrodynamic description for self-propelled particles. Phys. Rev. E 74, 022101 (2006). 17025488
- [12]J. E. Herbert-Read, Inferring the rules of interaction of shoaling fish. Proc. Natl. Acad. Sci. U.S.A. 108, 18726– 18731 (2011). 22065759 PMC3219133
- [13]D. S. Calovi, Swarming, schooling, milling: Phase diagram of a data-driven fish school model. New J. Phys. 16, 015026 (2014).
- [14]A. M. Hein, An algorithmic approach to natural behavior. Curr. Biol. 30, R663– R675 (2020). 32516620
- [15]A. K. Fahimipour, Wild animals suppress the spread of socially transmitted misinformation. Proc. Natl. Acad. Sci. U.S.A. 120, e2215428120 (2023). 36976767 PMC10083541
- [16]J. Gautrais, Deciphering interactions in moving animal groups. PLoS Comput. Biol. 8, e1002678 (2012). 23028277 PMC3441504
- [18]K. J. Friston, J. Daunizeau, S. J. Kiebel, Reinforcement learning or active inference? PLoS ONE 4, e6421 (2009). 19641614 PMC2713351
- [20]T. Parr, G. Pezzulo, K. J. Friston, Active Inference: The Free Energy Principle in Mind, Brain, and Behavior (MIT Press, 2022).
- [22]K. Friston, A theory of cortical responses. Philos. Trans. R. Soc. B: Biol. Sci. 360, 815– 836 (2005). PMC1569488 15937014
- [23]K. Friston, J. Kilner, L. Harrison, A free energy principle for the brain. J. Physiol.-Paris 100, 70– 87 (2006). 17097864
- [24]K. Friston, What is optimal about motor control? Neuron 72, 488– 498 (2011). 22078508
- [27]R. A. Adams, S. Shipp, K. J. Friston, Predictions not commands: Active inference in the motor system. Brain Struct. Funct. 218, 611– 643 (2013). 23129312 PMC3637647
- [28]A. Ali, N. Ahmad, E. de Groot, M. A. J. van Gerven, T. C. Kietzmann, Predictive coding is a consequence of energy efficiency in recurrent neural networks. Patterns 3, 100639 (2022). 36569556 PMC9768680
- [29]C. Caucheteux, A. Gramfort, J. R. King, Evidence of a predictive coding hierarchy in the human brain listening to speech. Nat. Hum. Behav. 7, 430– 441 (2023). 36864133 PMC10038805
- [30]K. N. Laland, Social learning strategies. Anim. Learn. Behav. 32, 4– 14 (2004). 15161136
- [31]P. M. Krafft, Bayesian collective learning emerges from heuristic social learning. Cognition 212, 104469 (2021). 33770743
- [32]M. Baltieri, C. L. Buckley, Generative models as parsimonious descriptions of sensorimotor loops. arXiv [Preprint] (2019). 10.1017/S0140525X19001353 (Accessed 4 May 2023). 31775931 · DOI
- [33]C. Uran, Predictive coding of natural images by v1 firing rates and rhythmic synchronization. Neuron 110, 1240– 1257.e8 (2022). 35120628 PMC8992798
- [34]K. Friston, The free-energy principle: A rough guide to the brain? Trend. Cognit. Sci. 13, 293– 301 (2009). 19559644
- [36]K. Friston, A free energy principle for a particular physics. arXiv [Preprint] (2019). 10.48550/arXiv.1906.10184 (Accessed 10 January 2021). · DOI · Paper page
- [37]B. Collignon, A. Séguret, J. Halloy, A stochastic vision-based model inspired by zebrafish collective behaviour in heterogeneous environments. R. Soc. Open Sci. 3, 150473 (2016). 26909173 PMC4736928
- [38]R. Bastien, P. Romanczuk, A model of collective behavior based purely on vision. Sci. Adv. 6, eaay0792 (2020). 32076645 PMC7002123
- [40]K. Friston, J. Mattout, N. Trujillo-Barreto, J. Ashburner, W. Penny, Variational free energy and the Laplace approximation. Neuroimage 34, 220– 234 (2007). 17055746
- [41]D. J. MacKay, D. J. Mac Kay, Information Theory, Inference and Learning Algorithms (Cambridge University Press, 2003).
- [42]J. F. Jehee, C. Rothkopf, J. M. Beck, D. H. Ballard, Learning receptive fields using predictive feedback. J. Physiol.-Paris 100, 125– 132 (2006). 17067787 PMC2929357
- [44]A. Maselli, P. Lanillos, G. Pezzulo, Active inference unifies intentional and conflict-resolution imperatives of motor control. PLoS Comput. Biol. 18, e1010095 (2022). 35714105 PMC9205531
- [45]M. Baltieri, C. L. Buckley, PID control as a process of active inference with linear generative models. Entropy 21, 257 (2019). 33266972 PMC7514737
- [46]C. L. Buckley, C. S. Kim, S. McGregor, A. K. Seth, The free energy principle for action and perception: A mathematical review. J. Math. Psychol. 81, 55– 79 (2017).
- [47]P. Romanczuk, I. D. Couzin, L. Schimansky-Geier, Collective motion due to individual escape and pursuit response. Phys. Rev. Lett. 102, 010602 (2009). 19257176
- [48]I. D. Couzin, J. Krause, N. R. Franks, S. A. Levin, Effective leadership and decision-making in animal groups on the move. Nature 433, 513– 516 (2005). 15690039
- [50]K. Tunstrøm, Collective states, multistability and transitional behavior in schooling fish. PLoS Comput. Biol. 9, e1002915 (2013). 23468605 PMC3585391
- [51]I. Giardina, Collective behavior in animal groups: Theoretical models and empirical studies. HFSP J. 2, 205– 219 (2008). 19404431 PMC2639936
- [52]R. Kaufmann, P. Gupta, J. Taylor, An active inference model of collective intelligence. Entropy 23, 830 (2021). 34210008 PMC8306784
- [53]C. Heins, B. Klein, D. Demekas, M. Aguilera, C. L. Buckley, “Spin glass systems as collective active inference” in Active Inference: Third International Workshop, IWAI 2022, Grenoble, France, September 19, 2022, Revised Selected Papers (Springer, 2023), pp. 75–98.
- [54]M. M. Sosna, Individual and collective encoding of risk in animal groups. Proc. Natl. Acad. Sci. U.S.A. 116, 20556– 20561 (2019). 31548427 PMC6789631
- [55]T. Parr, J. Limanowski, V. Rawji, K. Friston, The computational neurology of movement under active inference. Brain 144, 1799– 1818 (2021). 33704439 PMC8320263
- [56]J. Buhl, From disorder to order in marching locusts. Science 312, 1402– 1406 (2006). 16741126
- [57]I. D. Couzin, Uninformed individuals promote democratic consensus in animal groups. Science 334, 1578– 1580 (2011). 22174256
- [58]A. Strandburg-Peshkin, D. R. Farine, I. D. Couzin, M. C. Crofoot, Shared decision-making drives collective movement in wild baboons. Science 348, 1358– 1361 (2015). 26089514 PMC4801504
- [59]V. H. Sridhar, The geometry of decision-making in individuals and collectives. Proc. Natl. Acad. Sci. U.S.A. 118, e2102157118 (2021). 34880130 PMC8685676
- [60]A. Kolpas, How the spatial position of individuals affects their influence on swarms: A numerical comparison of two popular swarm dynamics models. PLoS ONE 8, e58525 (2013). 23555585 PMC3605438
- [61]A. Bizyaeva, A. Franci, N. E. Leonard, Nonlinear opinion dynamics with tunable sensitivity. IEEE Trans. Autom. Control 68, 1415– 1430 (2022).
- [62]H. Hamann, “Evolution of collective behaviors by minimizing surprise” in Artificial Life Conference Proceedings (MIT Press One, Cambridge, MA, 2014), pp. 344–351.
- [63]T. K. Kaiser, H. Hamann, Innate motivation for robot swarms by minimizing surprise: From simple simulations to real-world experiments. IEEE Trans. Robot. 38, 3582– 3601 (2022).
- [64]D. Gandolfi, Emergence of associative learning in a neuromorphic inference network. J. Neural Eng. 19, 036022 (2022). 35508120
- [65]K. Friston, Active inference and learning. Neurosci. Biobehav. Rev. 68, 862– 879 (2016). 27375276 PMC5167251
- [66]M. H. Hennig, Theoretical models of synaptic short term plasticity. Front. Comput. Neurosci. 7, 45 (2013). 23626536 PMC3630333
- [67]A. J. Ward, J. E. Herbert-Read, D. J. Sumpter, J. Krause, Fast and accurate decisions through collective vigilance in fish shoals. Proc. Natl. Acad. Sci. U.S.A. 108, 2312– 2315 (2011). 21262802 PMC3038776
- [68]A. Strandburg-Peshkin, Visual sensory networks and effective information transfer in animal groups. Curr. Biol. 23, R709– R711 (2013). 24028946 PMC4780851
- [69]J. D. Davidson, Collective detection based on visual information in animal groups. J. R. Soc. Interface 18, 20210142 (2021). 34229461 PMC8261228
- [70]R. Harpaz, M. N. Nguyen, A. Bahl, F. Engert, Precise visuomotor transformations underlying collective behavior in larval zebrafish. Nat. Commun. 12, 6578 (2021). 34772934 PMC8590009
- [73]A. D. Wissner-Gross, C. E. Freer, Causal entropic forces. Phys. Rev. Lett. 110, 168702 (2013). 23679649
- [74]H. Hornischer, S. Herminghaus, M. G. Mazza, Structural transition in the collective behavior of cognitive agents. Sci. Rep. 9, 12477 (2019). 31462661 PMC6713784
- [75]D. A. Friedman, A. Tschantz, M. J. Ramstead, K. Friston, A. Constant, Active inferants: An active inference framework for ant colony behavior. Front. Behav. Neurosci. 15, 647732 (2021). 34248515 PMC8264549
- [77]P. R. Montague, R. J. Dolan, K. J. Friston, P. Dayan, Computational psychiatry. Trend Cognit. Sci. 16, 72– 80 (2012). PMC3556822 22177032
- [79]R. Escobedo, A data-driven method for reconstructing and modelling social interactions in moving animal groups. Philos. Trans. R. Soc. B 375, 20190380 (2020). PMC7423377 32713309
- [80]R. K. Mudaliar, T. M. Schaerf, An examination of force maps targeted at orientation interactions in moving groups. PLoS ONE 18, e0286810 (2023). 37676869 PMC10484433
- [81]W. D. Penny, J. Mattout, N. Trujillo-Barreto, Bayesian Model Selection and Averaging. Statistical Parametric Mapping: The Analysis of Functional Brain Images (Elsevier, London, UK, 2006).
Cited by
Sorted by citations
Formalizing Lacanian psychoanalysis through the free energy principle
Li, L., & Li, C. (2025) · Frontiers in Psychology · doi:10.3389/fpsyg.2025.1574650 · Cited by 4 · see citing works
Nomura, K., & Horii, T. (2026) · ALIFE 2026: Proceedings of the 2026 Artificial Life Conference · doi:10.1162/isal.a.1009
Social Reality Construction via Active Inference: Modeling the Dialectic of Conformity and Creativity
Nomura, K., & Horii, T. (2026) · arXiv
“Canonical collective phenomena—cohesion, milling, and directed motion—have been shown to emerge when agents minimize surprise about their conspecifics, with real-time model updates coupling individual learning to group-level properties (Heins et al., 2024).”
- Authors
- Heins, C., Millidge, B., Da Costa, L., Mann, R. P., Friston, K. J., & Couzin, I. D.
- Affiliations
- University of Konstanz (DE)
- University of Oxford (GB)
- VERSES Research Lab, Los Angeles, CA90016
- University of Leeds (GB)
- Wellcome Centre for Human Neuroimaging (GB)
- Corresponding author
- Heins, Conor
- Couzin, Iain D.
- Venue
- Proceedings of the National Academy of Sciences
- Publisher
- National Academy of Sciences
- Published
- 2024-04-17
- Volume
- 121
- Issue
- 17
- Pages
- e2320239121-e2320239121
- ISSN
- 0027-8424 (ISSN-L)
- 1091-6490
- PMC
- PMC11046639
- OpenAlex
- W4394874494
- Cited by
- 55
- References
- 9
- Citations by year
- 2026: 19 · 2025: 27 · 2024: 9
- FWCI
- 11.97
- Type
- journal article
- Language
- en
- Open access
- hybrid
- doi.org
- Licence
- Locations
- Proceedings of the National Academy of Sciences (publishedVersion, cc-by)
- PubMed Central (publishedVersion, cc-by)
- PubMed (publishedVersion)
- White Rose Research Online (University of Leeds, The University of Sheffield, University of York) (acceptedVersion)
- arXiv (Cornell University) (submittedVersion, cc-by)
- UCL Discovery (University College London) (submittedVersion, cc-by)
- KOPS (University of Konstanz) (submittedVersion, cc-by)
- arXiv (Cornell University) (cc-by)
- Funders
- DOD | USN | Office of Naval Research (N0001419-1-2556)
- Germany’s Excellence Strategy (EXC 2117-422037984)
- Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie Grant agreement (860949)
- John Templeton Foundation (61780)
- Fonds National de la Recherche Luxembourg (13568875)
- EPSRC Centre for Doctoral Training in Mathematics of Random Systems (EP/S023925/1)
- UK Research and Innovation Future Leaders Fellowship (MR/S032525/1)
- Templeton World Charity Foundation (TWCF-2021-20647)
- Wellcome Centre for Human Neuroimaging (205103/Z/16/Z)
- Canada-UK Artificial Intelligence Initiative (ES/T01279X/1)
- European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement (945539)
- PathFinder European Innovation Council Work Programme (101098722)
- Topics
- Life Sciences › Neuroscience › Cognitive Neuroscience › Embodied and Extended Cognition
- Physical Sciences › Computer Science › Computer Networks and Communications › Distributed Control Multi-Agent Systems
- Physical Sciences › Engineering › Ocean Engineering › Evacuation and Crowd Dynamics
- Keywords
- collective behavior, active inference, surprise minimization, Bayesian inference, self-propelled particles, social forces, milling behavior, directed motion, group polarization, group decision making, generative models
- MeSH terms
- Animals, Bayes Theorem, Behavior, Animal, Fishes, Mass Behavior, Models, Biological, Motion, Movement, Social Behavior
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review