# Self-organization in Space and Time

By Matthew R. Francis

Self-organization is an important topic across scientific disciplines. Be it the spontaneous flocking of birds or dramatic phase transitions like superconductivity in materials, collective behavior without underlying intelligence occurs everywhere.

Many of these behaviors involve synchronization, or self-organization in time, such as activation in heart cells or the simultaneous blinking of certain firefly species. Others are aggregations, or self-organization in space, like swarming insects, flocking birds, or the alignment of electron spins in magnetic material.

Despite their conceptual similarity, self-organization in space and time have largely been treated separately. “I was curious about whether the two fields had been wedded, and it turns out they hadn’t, at least not fully,” Kevin O’Keeffe, a postdoctoral researcher at the Massachusetts Institute of Technology, said. “I knew all these tricks and mathematical tools from synchronization, and I was looking to cross-fertilize them into the swarming world.”

O’Keeffe, along with Hyunsuk Hong of Chonbuk National University in South Korea and Steven Strogatz of Cornell University, developed a simple mathematical model for simultaneous spatially-coordinated and synchronous behavior [1]. They designed their “swarmalator” model to be as simple as possible in order to understand general principles before applying it to more realistic physical or biological systems.

“We came across these Japanese tree frogs that had exactly the right ingredients,” O’Keeffe said. “If you observe a bunch of frogs in a field, they not only synchronize their calling but also move around and form swarms, so they have both spatial and temporal degrees of freedom.”

The team also considered sperm, which move collectively and beat their tails synchronously, triggered by certain chemical reactions. Despite its simplicity, the swarmalator model exhibits multiple distinct complex behaviors, depending on the interactions of the individual elements of the oscillating swarms.

The mathematical study of synchronization began about 50 years ago, when nonlinear dynamics pioneer Arthur Winfree developed a simple model for circadian rhythms based on interacting oscillators. A few years later, physicist Yoshiki Kuramoto simplified Winfree’s model and solved it exactly. Researchers have created many variations of the Kuramoto model to address everything from firefly flashes to superconductivity; it is also similar in mathematical form to several physics-based models of magnetism.

O’Keeffe and his team based the swarmalator model on the simplest form of the Kuramoto model: a system of coupled ordinary differential equations (one for every oscillator). Each oscillator interacts with all others at the same strength — there is no falling off with distance or communication time lag, for example. A single (scalar) parameter sets both the strength of the interaction and the system’s preference as to whether all the oscillators are in or out of phase. The systems cycle freely when the parameter is zero, much like the minute hand of a clock revolving at a steady rate of one cycle per hour.

As a general rule, swarming is much more complicated than synchronization. It is easy to see why: there are three directions in space but only one in time. If the swarming bodies are free to move in all three directions, they have many possible ways to self-organize.

Moreover, unlike synchronization, “swarming” is not a clearly-defined mathematical concept. “You have an intuitive understanding of swarming,” O’Keeffe noted. “You can imagine flocks and stuff, but when you get to the mathematical axioms, there aren’t many.”

This is because swarming behavior is relative to the system under consideration. For many real-world systems, the orientation of the objects within the swarm is important to the overall dynamics. There is also the question of how close the swarming objects want to get to each other, which can theoretically be considered a force that switches from attractive to repulsive when the distance gets too small. After all, maximization and minimization of population density within a group are both forms of self-organization.

The swarmalator formulation uses the so-called aggregation model, which ignores complications like orientation and utilizes power laws to model attraction and repulsion. The model is restricted to two spatial dimensions, which sacrifices some realism for geometric simplicity. Two state variables characterize each swarmalator: a phase angle \(\theta\)—representing the temporal oscillator state—and the two-dimensional vector \(\mathbf{x} = (x,y)\), describing the position. The authors also looked at the three-dimensional version and found many of the same basic behaviors, though the systems were understandably more complicated and harder to interpret.

The equations for \(N\) swarmalators are

\[\dot{x}_i = \frac{1}{N} \sum\limits_{i \neq j}^N \Bigg[\frac{x_j - x_i}{|x_j - x_i|} \Bigg(1 + J \cos(\theta_j - \theta_i)\Bigg) - \frac{x_j - x_i}{{|x_j - x_i}|^2} \Bigg], \\ \dot{\theta}_i = \frac{K}{N} \sum\limits_{i \neq j}^N \sin \frac {(\theta_j - \theta_i)}{|x_j - x_i|},\]

where the dot indicates an ordinary derivative with respect to time. Because the swarmalators begin in a state with no oscillations or motion in space, the initial conditions for the system are static.

The coupling parameter \(K\), modulated by the distance between the swarmalators, determines how strongly the oscillator state variables interact. When \(K\) is positive, the oscillator states minimize their phase differences. When \(K\) is negative, they maximize them. This connection weakens with large separation between swarmalators. When the parameter \(J\) is positive, swarmalators are attracted to others with the same phase. When \(J\) is negative, they are attracted to those with opposite phases.

Varying the values of \(J\) and \(K\) produces a phase diagram (see Figure 1), based on whether the swarmalators synchronize, clump, or produce more complicated behaviors. O’Keeffe, Hong, and Strogatz identify five major classes of swarmalator activity, which correspond to Figure 1 and the subsequent animation.

**Figure 1.** The five major ending states of the simulated “swarmalator” system on the *x-y* plane. Like colors are synchronized with each other, while the full rainbow indicates varying degrees of asynchronization. **1a.** All swarmalators are synchronized and want to be close to each other. **1b.** Swarmalators exhibit maximum asynchronization, but still swarm. **1c.** Swarmalators group with in-phase oscillators but repel those out of phase, making “the wave.” **1d.** Swarmalators behave similarly to 1c, but with abrupt gaps between groups of in-phase oscillators. **1e.** Groups of oscillators revolve in opposite directions. Image courtesy of Kevin O’Keeffe, adapted from [1].

**(a)** When \(K > 0\), the swarmalators synchronize and settle into a static configuration, regardless of the value of \(J\). This is a mathematically-boring configuration but potentially important for many real-world applications, such as the aforementioned tree frogs.

**(b)** When both \(J\) and \(K\) are negative, or when \(K\) is negative and \(J\) is positive but small, the swarmalators prefer to be next to those whose phases are maximally different from theirs, and settle into another static spatial arrangement. This is also mathematically uninteresting.

**(c)** When \(K = 0\) and \(J > 0\), the swarmalators behave like “the wave” at sports games; oscillators group with like oscillators, but the phase difference grows with distance across the swarm. The swarmalators settle into a static ring pattern in space. This is qualitatively similar to the behavior of colloidal particles on a surface, where the oscillator variable corresponds to the electric dipole of the particles.

**(d)** Keeping \(J > 0\) and looking at small negative \(K\) values produces something O’Keeffe jokingly calls a “pizza” configuration or “splintered phase wave.” This is like a sports wave, with significant divisions between each group of fans’ motion.

**(e)** The transitional state between phases (b) and (d) creates a system of groups of counter-rotating swarmalators. This is qualitatively similar to sperm behavior, where the wiggling tail represents the oscillation. The cells tend to stick to surfaces and create clusters in which all the sperm wiggle their tails synchronously, but neighboring clusters have slightly different oscillation phases.

Five major ending states of the simulated “swarmalator” system on the *x-y* plane. Like colors are synchronized with each other, while the full rainbow indicates varying degrees of asynchronization. Video credit: Kevin O’Keeffe.

Readers can run their own swarmalator simultaions using this browser application.

Despite its simplicity, the swarmalator model exhibits enough complex behavior to be interesting. Simplicity often means generality, and extending the original model can provide ways to restore any lost specificity. “You want the simplest model that gives the right physics,” O’Keeffe said. “That is why the Kuramoto model took off and became so popular — just because it was simple.”

There is still much to learn from the model as it stands. For instance, the equations give ambiguous answers for the lines of transition between various phases. Since these transitions determine how one behavior switches to another—analogous to water freezing or a material becoming magnetized—knowledge of them is important for understanding the function of swarmalator groups.

O’Keeffe hopes other researchers will further study the system. “The dream would be to get some experimentalists or physicists interested in this, who could engineer real swarmalator systems,” he said. “If someone could go out there and come up with something tangible, that would be brilliant.”

**References**

[1] O’Keeffe, K.P., Hong, H., & Strogatz, S.H. (2017). Oscillators that sync and swarm. *Nat. Comm., 8*, 1504.

**Further Reading**

-Strogatz, S. (2003). *Sync: How Order Emerges from Chaos in the Universe, Nature, and Daily Life*. New York, NY: Hyperion. See p. 59ff for material on the Kuramoto model.

-Winfree, A.T. (1967). Biological rhythms and the behavior of populations of coupled oscillators. *J. Theo. Bio., 16*, 15.

Matthew R. Francis is a physicist, science writer, public speaker, educator, and frequent wearer of jaunty hats. His website is BowlerHatScience.org.