Self-organization in a diversity induced thermodynamics

In this work we show how global self-organized patterns can come out of a disordered ensemble of point oscillators, as a result of a deterministic, and not of a random, cooperative process. The resulting system dynamics has many characteristics of classical thermodynamics. To this end, a modified Kuramoto model is introduced, by including Euclidean degrees of freedom and particle polarity. The standard deviation of the frequency distribution is the disorder parameter, diversity, acting as temperature, which is both a source of motion and of disorder. For zero and low diversity, robust static phase-synchronized patterns (crystals) appear, and the problem reverts to a generic dissipative many-body problem. From small to moderate diversity crystals display vibrations followed by structure disintegration in a competition of smaller dynamic patterns, internally synchronized, each of which is capable to manage its internal diversity. In this process a huge variety of self-organized dynamic shapes is formed. Such patterns can be seen again as (more complex) oscillators, where the same description can be applied in turn, renormalizing the problem to a bigger scale, opening the possibility of pattern evolution. The interaction functions are kept local because our idea is to build a system able to produce global patterns when its constituents only interact at the bond scale. By further increasing the oscillator diversity, the dynamics becomes erratic, dynamic patterns show short lifetime, and finally disappear for high diversity. Results are neither qualitatively dependent on the specific choice of the interaction functions nor on the shape of the probability function assumed for the frequencies. The system shows a phase transition and a critical behaviour for a specific value of diversity.


Introduction
Whereas atomic and sub-atomic physics is moved by the quest of the fundamental building block, chemistry and biology have collected and studied many cases of self-organization [1], [2]. Self-organization is a process in which a global pattern emerges from interactions among lower-level components of a system by solely means of local information, without reference to the global pattern. Such process is observed in many different circumstances, ranging from systems under thermodynamic control (spontaneous processes with a negative free-energy change), such as supramolecular complexes [3], crystallization [4], surfactant aggregation [5], certain nano-structures [6], to protein folding [7], protein assembly [8], and DNA duplexing [9], as well as in systems under kinetic control (biological systems with genomic, enzymatic and/or evolutionary control), such as virus assembly [10], formation of beehive and anthill [11], tissue formation [12], swarm intelligence [13]. Out-of-equilibrium systems (non-linear dynamic processes), such as the Zhabotinsky-Belousov reaction [14] and other oscillating reactions, as well as convection phenomena [15] show self-organization of the pattern formation. Other examples of self-organization phenomena have been investigated, such as biological rithms [16], pattern formation and collective behaviour of neurons and in neuron networks [17], [18], [19], [20], patterns in excitable media [21], [22], [23], [24], quantum gravity [25], mobile networks [26]. Social systems also stem from self-organizing processes [27], e.g. human enterprises that form out of self-imposed rules, such as business companies, political parties, families, tribes, and spontaneous forms of collective arts as theater or dance.
The above examples, in a global view, show that self-organization is a ubiquitous and interdisciplinary process, and address the general question about how the self-assembly (auto-catalysis) of ordered structures, with growing complexity and emergent properties, takes place. If on one side noise and fluctuations were found to have a constructive role respect to pattern formation [28], [29], [30], on the other side diversity was recently found to be able to produce coherent collective pulsations out of a disordered ensemble of coupled oscillators [31], [32]. Diversity indeed appears to be a crucial ingredient for self-organization and the reason is that, if the elements are all equal to each other, there is no basis to self-organize, because no flux of information is necessary, and no criteria exists for a choice [33]. Whereas many unexplained collective behaviors-e.g. self-assembled chirality [34]-seem to stem from a transfer of information to the bond-length scale of size, many social patterns stem from relational choices based on affinity [35].
In this work, we explore the possibility of building a thermodynamics based on diversity, with emphasis on the self-organization properties and pattern formation. To do that we take profit of a theory that set a link between diversity and phase transitions, i.e., the Kuramoto model. The Kuramoto model [36], first proposed by Yoshiki Kuramoto, is a mathematical model used to describe synchronization in a large set of coupled oscillators. It was found representative for the behavior of chemical and biological oscillators [37], and it has found widespread applications, e.g., in neuroscience or oscillating flame dynamics [38]. Kuramoto model set a link between collective synchronization and phase transitions. Indeed, the Kuramoto order parameter vs. oscillators natural frequency diversity shows a behavior parallel to spin magnetization in ferromagnetic media vs. temperature. Oscillators diversity acts as the temperature, for being a source of disorder.
In this work we consider a mechanics of interacting material points in a Euclidean space, each given an additional degree of freedom, a phase. Each phase-point is driven by an internal frequency which is the source of motion and a local parameter. Assuming a statistical distribution of such frequencies, a source of disorder is included, when many points are considered. Moreover, as a further element of novelty respect to Kuramoto, we include polarity in the model. The reason is that polarity is a natural characteristic of the large majority of observable systems, from physical to chemical to biological and social systems. Polarity is an intrinsic geometric richness, that allows the unfolding of complex structures, by alternating complementary elements. For low diversity in the local frequencies, oscillator phases synchronize, and a static global pattern (crystal) of synchronized points is the global attractor. By increasing oscillators diversity, desynchronization occurs, parallel to Kuramoto theory. Such transition takes place as follows: the crystal starts to vibrate, developing self-organized internal pulsations that lead to structure disintegration in a competition of dynamic smaller patterns, which are internally synchronized and show robustness and adaptability. By further increasing the oscillators diversity, the patterns finally disappear. Results are neither qualitatively dependent on the specific choice of the interaction functions nor on the shape of the probability function selected for the frequencies. The interaction function is kept local because our idea is to build a system able to produce global patterns when its constituents interact at the bond scale. Such global patterns can be regarded as self-organized structures. The system shows a phase transition and a critical behavior for a specific value of diversity.

The model
Each point i = 1, . . .N is described by a position vector x i embedded in an Euclidean space, a phase ϕ i embedded in a circle S 1 , as dynamic variables, and by a frequency ω i as local parameter. The proposed model reads and since we want particles to interact at the bond scale, we choose local interactions, and one possible choice is where the exponential decay defines a characteristic interaction length L = 1. The coefficients γ ij = ±1 express the particle polarity. In this context polarity means that two different kinds of particles are considered: when particles of the same kind are interacting, the Kuramoto force in Eq (2) is repulsive (i.e. γ ij = 1 thus ϕ i and ϕ j are pushed to synchronize in phase), while when particles of different kind are interacting, the Kuramoto force in Eq (2) is attractive (i.e. γ ij = −1 thus ϕ i and ϕ j are pulled to synchronize out of phase). Polarity is a characteristic that emerges when two or more particles interact. It is a local property, but it shows up in the interaction with other elements. We refer to these types of particles as "circles" or "squares". This is similar to the electric charge, since one cannot say if an isolated particle has a positive or a negative charge. In the following we will show that, when no disorder is included, the effect of polarity is indeed the same as for the electric charge in Newton's dynamics, i.e, it determines the sign of the interaction forces in Eq (1), making them attractive or repulsive.

Two particles
The simplest case is that of two particles in one spatial dimension. Eqs (1) and (2) yield are the relative variables, and γ = −1 or γ = 1 if a circle and a square or two squares (two circles) are considered, respectively. For small relative displacement x ( 1 Eqs (7) and (8) For small diversity in the frequency difference (Δ < 1) the phases of the two particles synchronize, i.e. Eq 12 shows two static solutions ϕ in = arcsin(Δ) and ϕ out = arcsin(Δ) + π, that we call inphase and out-of-phase solutions, respectively. If γ = −1 the fixed point x = 0, ϕ out results to be a stable solution, so the two particles glue together out-of-phase (by π, for Δ = 0), as shown in  if γ = 1 the (limit) fixed point x ! 1, ϕ in results to be a stable solution, so the two particles repell each other in-phase. It is interesting to observe that the dynamics does not significantly change for low, non-zero, diversity (Δ < 1). This can be appreciated from Fig 1, where we have selected the same starting conditions for Δ = 0 and Δ = 0.5, getting identical evolution for position, and similar evolution for phase.
When Δ > 1 phase desynchronization occurs and the fixed points disappear via saddle node bifurcation, leading to oscillations in the relative position x and relative phase running, as shown in Fig 2. We have implemented other (polynomial) types of interaction decay dependences on distance, obtaining the same scenario.
In conclusion, in the case of two particles, we found them glue together (a molecule) for different polarity, while they repel and separate for identical polarity. The particles of the molecule oscillate with respect to each other as diversity increases. The results shown in Figs 1 and 2 do not depend on initial conditions, even though the transient may be different.
For a larger number of particles the complexity of the problem quickly grows.

Many body problem. A diversity induced thermodynamics
Considering many particles including a statistical distribution of the local frequencies ω i , the system exhibits many properties of classical thermodynamics. Local frequencies are both a source of motion and of disorder, parallel to noise terms in Langevin formulation. If all frequencies have the same value (that can be set to zero, i.e. ω i = 0 8i) the system drops into the synchronization manifold, which represents the "zero temperature" configuration, when no diversity is included in the system. In the synchronization manifold the effect of polarity (i.e. the coefficients γ ij ) is the same as the electric charge in Newton's dynamics, i.e. it determines the sign of the forces in Eq (1), making them attractive or repulsive. Indeed, (1) and (2) can be written as i.e., a generic many body dissipative mechanical problem where some interactions are attractive and some repulsive. If diversity in the local frequencies is included, phases start to desynchronize and the rotating terms cos(ϕ j − ϕ i ) in the space equation alter the interaction forces f ij producing a loosening in the spatial bondings and a subsequent phase transition, that mimics the thermodynamic transition from solid to liquid, to gas. In the following we assume a zero mean Gaussian distribution for ω i with standard deviation σ, which acts as the system "temperature". We first consider the case in which σ = 0, i.e. identical oscillators, having the same local frequency, set to zero. In the following, we have assumed a neutral or quasi-neutral system (i.e, the number of circles and squares is equal, or differs only by 1), as it is reasonable to describe standard matter, and either spread or narrow intial conditions (i.e., large or small initial distances with respect to L = 1), corresponding to a relatively dilute or more condensed ensamble of particles. We have considered two spatial dimensions. Numerical simulations of Eqs (1) and (2) produce different solutions, depending on the number of particles N and on initial conditions, and remarkably including, for a large parameter set, the formation of static patterns, i.e. regular spatially extended structures (crystals), and a corresponding synchronization of local phases. Numerical simulations show the emergence of a competition between two kind of patterns, a first kind, we call Even (because it is the typical solution for even N), is made of glued couples of circles and squares, the second kind, we call Odd (because it is the typical solution for odd N), is made of strains of spatially separated alternating squares and circles. Both patterns show an out-of-phase synchronization, i.e., all squares have the same phase, all circles have the same phase, and between any square and circle there is a phase difference equal to π. To cover all relevant cases, in Figs 3 to 7, we show results for different values of N. In Figs 8 and 9, instead, results for the same N = 100 are shown.
In all figures we present in the following, and in movies, we have assumed uniformly distributed random initial conditions and Gaussian distributed oscillator frequencies. However, we have tested also uniform probability distribution for the natural frequencies, as well as polinomial instead of exponential interaction functions, finding the same scenarios. In figures, different colors represent different particles, with repetition, because only five colors have been used. In movies, instead, colors represent the phase evolution, i.e. same color means the same phase (mod 2π). In general, the actual shape of the obtained spatial patterns strongly depends on starting conditions. However, the general scenario does not change.
Movie S1 Video shows the numerical simulation of a population made of N = 50 particles, with wide initial distances (x j (0) > 1 8j), ending up in a static Even-crystal. Fig 3 shows phase dynamics vs. time for the same simulation. Movie S2 Video shows the self-organization of a system made by N = 21 particles, where we have assumed (uniformly) random initial phases and small initial distances (x j (0) ( 18j) among the elements, so that all interact at t = 0. Phase dynamics (not shown) is very similar to the previous case. The result is a strainded Odd-crystal.
For non-zero, but small, σ (σ < 0.3) pattern vibrations take place, spatial structures deteriorate their regularity and phases start to oscillate. Now each particle is different so that the pattern has to adjust its structure, in order to accomodate each particle to a suitable place to sustain the collective structure. Movie S3 Video shows an example of such adaptability. The degree of diversity is still low, so the pattern can maintain a quasi-static integrity. Phase dynamics for this case is shown in Fig 4, exhibiting phase vibrations.
In order to investigate pattern robustness, we have implemented the following numerical experiment. After the pattern is formed, one element is moved away from the pattern, by increasing its position and phase of an arbitrary value. Movie S4 Video shows how the pattern Self-organization in a diversity induced thermodynamics (with no diversity) quickly reacts, by reincluding the perturbed element in a newly adapted structure. This characteristic persists in presence of small diversity.
Increasing diversity, the dynamic activity also increases and crystals loose stability. Many scenarios are possible. As a general trend, a single aggregation pattern is not sustainable if diversity becomes too large. Indeed, pattern disintegration takes place through the emergence of collective pulsations. Movie S5 Video shows an example of such collective pulsations, which are due to partial unlocking of one or more oscillators (Fig 5), which however remain spatially bounded, until the pattern eventually breaks. At this point, because of the complexity of the dynamics, the simple classification Even/Odd does not apply. We thus present selected numerical examples.
Indeed, we found that spontaneous internal oscillations lead to pattern separation into smaller structures, able to manage their internal diversity, and a huge variety of dynamically interacting shapes is formed. Movie S6 Video shows a realization in which a pattern spontaneously separates in two parts. Each part shows internal synchronization to the average frequency of its constituents. Phase dynamics for this situation (Fig 6) shows that the two patterns are made of synchronous elements. The so formed patterns are able to compete with other patterns in a complex dynamics, as shown in movie S7 Video and in Fig 7. As σ further increases, progressively less organized dynamics take place. Elements move erratically, phases are desynchronized, the resulting patterns have short lifetimes, and finally no pattern emerges for very high σ. Still, the dynamics is deterministic. https://doi.org/10.1371/journal.pone.0188753.g006

Self-organization in a diversity induced thermodynamics
It is worth noticing that, when synchronized patterns are formed, each of them can be seen, on its turn, as a (more complex) oscillator, able to synchronize again to affine structures, tolerating a certain amount of diversity, and so forth. A sort of Chinese box of synchronized shapes can form out spontaneously, opening the possibility of having renormalized layers of evolution, with increasing complexity. As a matter of fact, once patterns are formed they can be renormalized, i.e. considered as new points of a new point-like description on a larger scale, where they undergo the same process (synchronization) that previously created them, and so forth. Thus, starting from any arbitrary distributed and disordered point-like description, pattern formation gains growing complexity, moving up through evolutive layers. In this way a myriad of interacting dynamic shapes (morphogenesis) is spontaneously created by the cooperative synchronization process, especially where diversity is moderate, the equivalent of the "liquid" phase.

Kinetic energy and phase transition
The existence of a phase transition between more and less organized patterns (crystal and liquid) can be confirmed by calculating the dynamic activity of the oscillators as a function of σ, which acts as the system temperature. Parallel to thermodynamics, we consider the kinetic energy of the system given by https://doi.org/10.1371/journal.pone.0188753.g007 Self-organization in a diversity induced thermodynamics where < v 2 i > are the time averaged particle square velocities and N the number of particles. For low diversity, the particles have fixed positions inside the crystal, their velocity is zero and the kinetic energy is also zero. A critical behavior appears at a special value of σ as shown in Fig 8, indicating the presence of a phase transition, where the crystal dissolves and particles are free to move. This transition is abrupt, as the melting of a real crystal. This finding is similar to what predicted by the Ising model [40], [41] describing the peculiar behavior of the specific heat of solids and of magnetization for low temperature. Fig 8 suggests that, when considering a large number of oscillators, the global dynamics can be seen in terms of phase transitions, driven by the oscillators diversity. In the following, we better address this point and show that the complete evolution we have outlined in this paper can be found for constant N. In Fig 9 we have drawn the occupation matrix for N = 100 oscillators, with the same starting conditions, and four increasing values of diversity. In the occupation matrix, each element represents the probability of finding one oscillator in a small element dxdy, regardless it is a circle or square, along the full time dynamics. As starting conditions, we have chosen a regular 10x10 arrangement alternating circles and squares, separated by a distance equal to half the interaction length L (L = 1), with linearly increasing starting phases from ϕ 1 = 0 in the left up corner, to ϕ N = 2π in the right bottom corner. Panel a) shows the occupation matrix for zero diversity, where a static (even) crystal is formed. Panel b) shows the occupation matrix for σ = 0.5, i.e., on the left of the transition shown in Fig 8, and the result is a vibrating crystal with oscillators diffusion, and the structure still shows some regularity. Panel c) shows the occupation matrix for σ = 2, above the critical value, where a sort of "liquid" Self-organization in a diversity induced thermodynamics phase takes place, oscillators smoothly tend to occupy the interstitial spaces, and regularity is lost. Finally, panel d) shows the occupation matrix for high diversity σ = 3. The dynamics is now characterized by a high degree of disorder, resambling the motion of a gas.

Conclusion
We have considered a mechanics of interacting material points, each given an additional degree of freedom, i.e. a phase. Each point is characterized by an internal frequency which is the source of motion. We have assumed a statistical distribution of those frequencies when many points are considered, and the standard deviation of such distribution as the global disorder parameter: diversity. For zero and low diversity, static patterns (crystals) appear. For moderate diversity Self-organization in a diversity induced thermodynamics the crystals start to vibrate, developing self-organized internal pulsations that lead to structure disintegration, progressively melting in a competition of dynamic patterns. When moderate diversity is included, a single static global pattern is no longer sustainable, and it breaks into smaller patterns, each of which is capable to manage its internal diversity. In this process a huge variety of self-organized dynamic shapes is formed. Moreover, when synchronized patterns are formed, each pattern can be seen again as a (more complex) oscillator able to synchronize in turn to similar structures, tolerating a certain amount of diversity, and so forth. From a conceptual point of view, the fact that self-organized patterns emerge as a result of a process, and not by mere chance, gives a significance to morphogenesis, because here the existence of a form means that an underlaying cooperative synchronization process is taking place.
Increasing further the oscillators diversity the dynamics ends being erratic and disorganized, dynamic patterns show short lifetime and finally disappear.
Results are neither qualitatively dependent on the specific choice of the interaction functions nor on the shape of the probability function chosen for the frequencies. The interaction functions are kept local because our idea is to build a system able to construct global patterns when its constituents interact at the bond scale. Such global patterns can be regarded as selforganized structures. The system shows a phase transition and a critical behavior for a specific value of diversity.
Supporting information S1 Video. Even crystal formation with no diversity. Numerical simulations starting from (uniformly) random wide spread initial conditions for a population of N = 50 identical oscillators, σ = 0, with different polarity. Colors follow phase evolution: particles with the same color have the same phase value in a [0, 2π] range.