Table of Contents
Fetching ...

Collective behavior from surprise minimization

Conor Heins, Beren Millidge, Lancelot da Costa, Richard Mann, Karl Friston, Iain Couzin

TL;DR

This work reframes collective motion as a consequence of agents minimizing surprise via active inference, treating individuals as Bayesian evaluators who infer local neighbor distances and adjust heading to reduce prediction error. The model uses generalized filtering within a dynamic generative framework to reproduce cohesion, directed motion, and milling without predefined social-force rules, and it shows that social forces arise as gradients of the free energy landscape. It reveals how individual beliefs about sensory precision shape group properties like polarization and milling, and demonstrates online plasticity that enhances responsiveness to perturbations and information transfer, including target navigation by informed agents. The approach unifies classical self-propelled particle models with cognitive principles, offering testable predictions for biological swarms and guiding design for swarm robotics and distributed systems.

Abstract

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 modelling 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 non-trivial 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.

Collective behavior from surprise minimization

TL;DR

This work reframes collective motion as a consequence of agents minimizing surprise via active inference, treating individuals as Bayesian evaluators who infer local neighbor distances and adjust heading to reduce prediction error. The model uses generalized filtering within a dynamic generative framework to reproduce cohesion, directed motion, and milling without predefined social-force rules, and it shows that social forces arise as gradients of the free energy landscape. It reveals how individual beliefs about sensory precision shape group properties like polarization and milling, and demonstrates online plasticity that enhances responsiveness to perturbations and information transfer, including target navigation by informed agents. The approach unifies classical self-propelled particle models with cognitive principles, offering testable predictions for biological swarms and guiding design for swarm robotics and distributed systems.

Abstract

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 modelling 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 non-trivial 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.
Paper Structure (14 sections, 85 equations, 5 figures, 1 table)

This paper contains 14 sections, 85 equations, 5 figures, 1 table.

Figures (5)

  • Figure 1: A: Schematic illustrating the Bayesian perspective in the context of our single agents, where the hidden states of the environment are segregated from a focal agent by means of sensory data $y_t$ (right panel of A). This contrasts with classic self-propelled particle models (left panel of A), where environmental or social information manifests in terms of social forces on the focal individual, who emits its own actions based on hand-crafted decision-rules (e.g., changes to heading direction). B: Schematic illustration of the sector-specific distance tracking. The left panel shows a Bayesian network representation of a dynamic generative model (i.e., a time-series model), that represents the time-evolution of a latent variable $x_{1,...,T}$ and simultaneous observations $y_{1,...T}$. Shown are both a standard time-series representation (lower left) and its equivalent representation as generalized coordinates of motion $\tilde{x}_t = (x_t, x_t', x_t", ... )$ (right). We show the orders of differentiation used for our model in practice (3 orders of motion for $\tilde{x}$ and 2 orders of motion for $\tilde{y}$). The middle panel of B shows how each component of the vectorial hidden state $\mathbf{x} = (x_{h,1}, ..., x_{h,L})$ is computed as the average nearest-neighbor distance for the neighbors within each visual sector. Observations are generated as noisy, Gaussian samples centered on the sector-wise distance hidden state (right panel of B). This requires the agent to estimate the true hidden state $x_t$ by performing inference with respect to a generative model of how sensory data are generated $p(\tilde{\mathbf{y}}, \tilde{\mathbf{x}})$.
  • Figure 2: A: Example snapshots of different collective states in schools of $N = 50$ active inference agents. Each line represents the trajectory of one individual, and color gradient represents time, from earliest (light blue) to latest (purple). The polarized regime in the left panel was simulated with the default parameters listed in supplementary Table E1. The milling regime (middle panel) was achieved by increasing the variance of velocity fluctuations (encoded in $\sigma^2_{z',h}$) from $0.01$ to $0.05$ (relative to the default configuration) and increasing $\lambda_z$ from $1.0$ to $1.2$. The disordered regime was achieved by increasing the sensory smoothness parameter to $2.0$ and decreasing $\eta$ from $1.0$ to $0.5$ and $\alpha$ from $0.5$ to $0.1$ (relative to the default configuration). B: Average polarization (left) and milling probability (right) shown as a function of the two factorized components of the sensory precision, $\Gamma_z$ (log-transformed) and $\lambda_z$. For each combination of precision parameters, we ran $500$ independent trials of 'free schooling,' and then averaged the quantities of interest across trials. Each 'free schooling' trial lasted $15$ seconds ($1500$ time steps with $dt = 0.01 s$); the time-averaged metrics (polarization and milling probability, respectively, were computed from the last $10$ seconds of the trial.
  • Figure 3: A: Collective accuracy as a function of proportion informed or $p_{inf}$ for differing values of the sensory precision assigned to social observations $\Gamma_{z-\text{Social}}$. Average accuracy for each condition (combination of $p_{inf}, \Gamma_{z-\text{Social}}, \Gamma_{z-\text{Target}}$) was computed as the proportion of successful hits across $500$ trials. Here, the average accuracy is further averaged across all the values of the $\Gamma_{z-\text{Target}}$ parameter, meaning each accuracy here is computed as the average of $15000$ total trials ($500$ trials per condition $\times$$30$ different values of $\Gamma_{z-\text{Target}}$). B: Collective accuracy as a function of both the social and target precisions ($\Gamma_{z-Social}, \Gamma_{z-Target}$, shown in log-scale) averaged across values of $p_{inf}$ ranging from $p_{inf} = 0.15$ to $p_{inf} = 0.40$. Each condition's accuracy was computed as the proportion of accurate decisions from $500$ trials.
  • Figure 4: A: Schematic of the sensory perturbation protocol. The 'pseudo-motion' stimulus consists of repetitively perturbing the agent's sensory sectors with a moving wave of prediction errors in the agent's velocity-observation modality $\mathbf{y}'_{h}$. The top panel shows stimulus pattern as a heatmap over (amplitude over time) with two repetitions, starting from negative (red, sectors $1$ and $2$) and transitioning to positive (blue, sectors $3$ and $4$) prediction errors. The sign-switch in the stimulus (from negative to positive) mimics a moving object that first moves towards focal individual and then moves away. The temporal order of the stimulus across the sectors can be used to selectively emulate a right-moving vs. left-moving object, relative to the focal individual's heading-direction. The bottom panel shows how the stimulated agent's beliefs about the distance hidden state $\boldsymbol \mu$ changes over the course of the motion stimulus, with these beliefs being analogized to hypothetical neural activity. B: Response magnitude to a perturbation in presence or absence of parameter learning. Left panel: example pair of 2-D trajectories of active inference agents with matched pre-perturbation histories, in response to an individual perturbation. The ability to perform parameter-learning is left on in one stochastic realization (green) and turned off in the other (blue), following the perturbation. Right panel: initialization-averaged collective responses (group turning angle) to perturbation of active inference agents when learning is enabled or disabled. The perturbation response of a 2-zone self-propelled particle model (purple line) based on couzin2005effective is also shown for reference. C: Collective response as a function of the number of perturbed individuals, comparing simulations where parameter-learning is enabled to those where it's disabled. Shown is the mean response with highest density regions (HDRs) of integrated turning magnitude within 500-1000 ms of the perturbation (left) and response probability (right) computed from $N_i = 200$ independent initializations of each condition. For each initialization, the average metric is computed across $N_r = 50$ independent realizations that were run forward from the same point in time, following a sensory prediction error perturbation (to a randomly-chosen set of perturbed agents). Response probability is computed as the proportion of independent realizations, per initialization, where the group turning rate exceeded $\pi$ radians within the first 10 seconds of the perturbation.
  • Figure E.1: Fragmentation probability as a function of the two precision parameters $\log\Gamma_{z}$ and $\lambda_z$. Fragmentation probability was quantified as the proportion of trials (out of 500 independent trials per condition) where the group fragmented. A trial was considered fragmented if least one individual was further than 2.0 dimensionless units from all other individuals for at least 3 of the last 10 seconds of the 15-second trial. All other parameters are identical to those used in Figure \ref{['fig:collective_regimes_collective_properties_analysis']}B in the main text.