The effect of social balance on social fragmentation

With the availability of cell phones, internet, social media etc. the interconnectedness of people within most societies has increased drastically over the past three decades. Across the same timespan, we are observing the phenomenon of increasing levels of fragmentation in society into relatively small and isolated groups that have been termed filter bubbles, or echo chambers. These pose a number of threats to open societies, in particular, a radicalisation in political, social or cultural issues, and a limited access to facts. In this paper we show that these two phenomena might be tightly related. We study a simple stochastic co-evolutionary model of a society of interacting people. People are not only able to update their opinions within their social context, but can also update their social links from collaborative to hostile, and vice versa. The latter is implemented such that social balance is realised. We find that there exists a critical level of interconnectedness, above which society fragments into small sub-communities that are positively linked within and hostile towards other groups. We argue that the existence of a critical communication density is a universal phenomenon in all societies that exhibit social balance. The necessity arises from the underlying mathematical structure of a phase transition phenomenon that is known from the theory of a kind of disordered magnets called spin glasses. We discuss the consequences of this phase transition for social fragmentation in society.


I. INTRODUCTION
Social cohesion and social fragmentation are central topics in the organisation and functioning of large-scale societies. As such it is a central topic in sociology since its very beginning. Starting with Durkheim [1], who referred to the mutual dependencies between individuals as "organic solidarity", the concept of social cohesion has evolved, however, it remains a core theme in sociology [2][3][4]. Over the past two decades, concerns have been raised that modern societies might gradually be losing their cohesion [5][6][7][8][9][10]. This has been attributed to several ongoing changes: globalisation, migration and ethnocultural diversity, modern communication technologies, and the integration of states into trans-national entities, such as the European Union [11]. As the cohesion of a society declines, it faces the threat of becoming fragmented, which might come with a number of potentially catastrophic consequences, such as riots, civil wars, governmental shutdowns, or the decline of democracy [12]. Hence it has become a great challenge of how to preserve social cohesion without interfering with diversity [13,14].
Despite the lack of a consensus on what constitutes social cohesion, social relations have been widely regarded among the most essential aspects [11]. Both, social cohesion and fragmentation, emerge from complex inter- * Electronic address: stefan.thurner@meduniwien.ac.at actions between individuals. One mode of collective social organisation can change to another if interactions change: individuals initially united by cooperation for a common good can become segregated once they start competing for their ethno-cultural, economical, or political values (or identities) [15]. In many societies transitions between fragmented and cohesive "phases" happen throughout history [16]. In line with this view, here we define fragmentation as the regime (phase) in which society-wide collaborative efforts are broken down into local cooperation within subcommunities, with little or no collaboration between these groups.

A. New social media and social fragmentation
Local interactions between individuals shape and define the nature and quality of the overall social organisation. Novel communication technologies affect both the quality and the quantity of social interactions and thus might have a crucial impact on social cohesion. Among these new possibilities the effect of social media on social cohesion has been studied [17]. On the one hand, social media may create so-called echo chambers in political discourse [18,19], where individuals reinforce their current position by repeated interactions with those of the same view. On the other hand, social media increasingly guide individuals to contents they are likely to agree with, resulting in the danger of so-called filter bubbles [20,21]. These phenomena might play an important role in the radicalisation of political discourse and the decline of cross-ideological exposure -one of the building blocks of democracy [22]. Recently, several models have been proposed to better understand the formation of echo chambers and filter bubbles, as well as their effects on fragmentation [23][24][25].

B. Modelling of social fragmentation
Modelling social fragmentation has a long history [26]. In the context of cultural dynamics, Axelrod predicted fragmentation into cultural groups if individuals within a given "social neighbourhood" are more likely to interact with similar others than with dissimilar ones [27]. The more they interact with each other, the more similar they become and thus the higher the chance is for future interactions. The dynamics continues until stable regions of identical individuals are established. However, the formation of such cultural regions is observed only for small societies; large societies reach global consensus. Recent research pointed out two properties of the Axelrod model, namely, the fragility of the fragmented phase with respect to random perturbations, such as the "mutation" of cultural features [28], and the fact that the transition from complete homogeneity to cultural diversity only happens beyond a critical number of alternative traits per feature [29]. These shortcomings were later resolved by replacing the interpersonal influence in the original model by social influence [30,31]. In the context of segregation, Schelling's celebrated model for the distribution of people of different races, assumes that individuals prefer to be in a neighbourhood with the majority of their own type [32]. Complete segregation into clusters of one type occurs as they move from one neighbourhood to another to satisfy their preferences. Subsequent research has shown that this way to understand segregation is quite robust [33]. Axelrod's and Schelling's models both explain fragmentation (segregation) as an emergent collective phenomenon that results from individuals' incentives only. A question that remains open, however, is how the transition from cohesion to fragmentation corresponds to the rearrangement of social ties.

Theory of social cohesion -structural balance
One of the seminal ideas in sociology of the 20th century was the concept of structural balance, which is based on the observation that social dynamics in cliques of individuals is determined less by pair-wise, but by triadic relations, i.e. triangle relations become the more fundamental unit. Structural balance theory was first proposed by Heider in the 1940s [34] and states that a group of three individuals forms a balanced triangle, if either all the three are mutually friends (positive relation) or two of them are friends and both have the same enemy (negative link). Three people form an unbalanced triad or triangle, if either all the three are mutual enemies, or if two of them are enemies but the third is their mutual friend, see Fig. 1. Empirically, balanced triangles are found much more frequently than unbalanced ones in human societies, for a list of recent results, see e.g. [35][36][37][38][39][40][41][42][43][44][45][46][47]. If an unbalanced situation occurs, individuals seem to strive to eliminate the associated tension by flipping the sign of one of the three links, resulting in a balanced arrangement. A perfectly balanced society would be one in which there are no unbalanced triangles -all individuals enjoy life without any tension. In contrast, a cohesive but not stress-free society is more conducive to change and/or improvement.

Our definition of social fragmentation
From what has been discussed so far it is clear that one must distinguish between different concepts of social fragmentation: urban fragmentation, segregation, social balance, loss of coherence because of evaporation of joint ideals, etc. These concepts all capture various aspects of social cohesion. For the following, we are interested in a broad and generic definition of social fragmentation, closely following Heider's notion of social balance: We call a society fragmented if there are many groups that are locally collaborative with a high density of "positive links" within the group, but are often hostile to other groups. On the other hand, a society is cohesive if one finds a sufficient density of positive links between groups, such that one can "travel" from group to group, without ever having to use negative links. In other words, we define a society as cohesive, if the positive links percolate.

Co-evolution and adaptive networks
Collective dynamics of social systems has been studied within the framework of adaptive networks; for an overview see e.g. [48]. In this approach, fragmentation results from a co-evolutionary rearrangement of social ties, together with updates of individual traits ("states") [49]. In [50], new relationships are created between people of the same opinion by rewiring pre-existing connections with a given probability. As the rewiring rate increases, the system self-organises into many communities, such that members of the same community converge on their opinions, but strongly differ from members of other groups. In a modification of the original Axelrod model [51] links between dissimilar agents (with no feature in common) are replaced by links between agents who may be either similar or dissimilar. This mechanism was shown to change the network structure from a regular lattice to a network with multiple clusters and to significantly increase the critical point of the transition from a mono-to a multicultural regime. In [52] only links between agents whose opinions differ from each other more than a tolerance level may be broken. New links are established to other agents, regardless of their opinions. As a consequence, the transition from consensus towards fragmentation happens at a lower tolerance level than on fixed networks.

Earlier models on opinion formation
Many previous approaches towards modeling social dynamics focused on a setting where individuals are characterised by a number of socio-economic traits. These become dynamical variables and one cam study their collective evolution with numerical methods. This direction has shaped the field of opinion dynamics [53,54]. Influential models in this field are DeGroot's model of belief consensus [55], the voter model [56,57], and the majorityrule model [58]. A generic and unrealistic feature of these models is that generally global consensus is established among the agents, regardless of the detailed dynamics or the underlying network structures. There are, however, models that do exhibit either consensus or opinion fragmentation. They either rely on the "bounded confidence" assumption that states that only those whose opinions differ less than a given level can interact [59,60], or they employ the fact that individuals only adopt their views once a certain fraction of their neighbours did [61,62]. Both types of models show a phase of global consensus if the confidence level (fraction of neighbours) exceeds a critical value. Below this threshold, clusters of different opinions of various sizes appear.

Opinion dynamics on signed networks
The first attempt to incorporate Heider's social balance into opinion dynamics was in [63][64][65]. They showed that an opinion formation process on a balanced network ends up in polarised states, where contradictory opinions are clustered into two groups. This result was extended to the case of time-varying signed graphs in [66,67], however, there opinion-and network dynamics are not coupled. In yet another class of models that is based on the Hebbian learning rule [68] the weight of the social link between two individuals is assumed to be a function of the correspondence between their states. As their opinions evolve over time, the weight increases (decreases) proportional to their opinion concordance (discordance). Fragmentation has been shown to emerge from such adaptive dynamics, [69,70]. There the network only reacts to the change of opinions, but does not emerge from Heider's principle of minimising social tension. Saeedian et al. [71] recently consider a co-evolutionary dynamics where not only friends with opposite opinions but also enemies with similar ones can change either their opinions or their relations to remove cognitive dissonance. In the final frozen states, the network fragments into groups of friendly and like-minded individuals who, however, are hostile to members of the other groups.
In this paper we propose to understand the mechanism of social fragmentation as a consequence of social balance. To this end we study a minimalistic stochastic, co-evolutionary model where individuals tend to avoid social stress by either adopting their opinions, or by changing their social links from cooperative to hostile, or vice versa. Heider's concept of social balance is explicitly taken into account by co-evolutionary evolution mechanism, rather than being imposed a priori or emerging from the dynamics of the social network alone. We will see that the model allows us to understand the emergence of echo chambers and filter bubbles as a function of the average connectivity of the society. We find a fundamental regime shift (or phase transition) that happens at critical values of social connectivity. Below the critical density we observe a largely cohesive society, above it there exists an unavoidable phase that is dominated by the existence of many small collaborative communities, characterised by hostile links towards other groups.

A. A co-evolutionary model of opinion-and social network formation
We assume that a society is made up by N individuals that we label by latin indices, i. Each of these individuals is embedded in a social network and has social relations to k i fellow individuals that are labelled by j. We keep the average number of links per person k =k i as a model parameter. This number is assumed to be fixed over time. Each relation between i and j can be either positive, J ij = 1, e.g. if they are friends, or negative, J ij = −1, if they are enemies. If two individuals are linked with a negative link this indicates a certain level of social stress. Each individual is endowed with an opinion, s i . For simplicity we assume that there exists only one type of binary opinion, of the type: yes or no,

Regular graph
Small-world Trump or Hillary, etc. In Fig. 2 we show a schematic picture of our model society in the simplest case, where a total of N individuals with opinions (↑ and ↓) are linked to k neighbours each in a regular way (a) and in a socalled small world network [72] (b) with the same average connectivity, k. Imagine that two individuals are linked through a positive link and they have opposite opinions on a given subject. We assume that this will cause a certain amount of social stress in the system. If, on the contrary, the two individuals do not like each other, J ij = −1, and they have opposite opinions, this will not lead to additional social stress. Both, the opinions and the quality of the social links, can be updated. Whenever i changes her opinion, we have s i = 1 → s i = −1, or s i = −1 → s i = 1. The same is true for social links, whenever we change friendship to enmity, J ij = 1 → J ij = −1, or vice versa. We assume that on average individuals tend to update their opinions and social links such that they reduce their local levels of social stress. To keep track of the total amount of social stress, we introduce a function, H, which allows us to formulate a simple stochastic co-evolutionary model.

B. Minimising social stress -a Hamiltonian approach
The system under study evolves to minimise overall social tension, which can be defined as where s i ∈ {−1, 1} denotes the opinion of an individual i and J ij ∈ {1, −1} represents friendship and enmity between two connected agents i and j, respectively (J ij = 0, if they are not linked). This type of cost function is called a Hamiltonian function in physics, where it captures the total energy in a system as a function of its configuration, H = H(s i , J ij ). There it is then used to implement the principle of minimisation of energy.
In Eq. (1), the first sum describes the opinion adoption process between interacting agents. It assumes that individuals should act in such a way as to avoid cognitive dissonance among them: if i and j are friends, they are more likely to share the same view, otherwise, they may hold opposing opinions. Following the "social influence" theory by [73][74][75], for any individual i, the simultaneous influences from all its neighbours are represented by the sum over j of (J ij s j )s i terms. The second term explicitly takes care of Heider's social balance: it incorporates the tendency of suppressing unbalanced triangles between individuals. This effect is implemented by the sum over all possible triadic relations between any three individuals i, j, and k. If J ij J jk J ki = 1, they feel no social tension, otherwise social balance pushes them to switch their relations. Note that a link between i and j, J ij , in general will belong to several triangles. A flip of J ij that lowers the total number of unbalanced triads should happen with a higher probability than a flip that leads to an increase of unbalanced triangles, i.e. increases overall social stress. See the next subsection for how this is implemented. The parameter g in Eq. (1) controls the relative strength of the social balance term with respect to the opinion formation contribution (first term). In accordance with Heider's theory, g must be positive so that balanced triangles do indeed dominate the unbalanced ones 1 . Figure 3 shows an example for how four individuals with given initial opinions and links can change social stress, H, by flipping either opinions or links. The configuration starts with a situation that amounts to H = 2. When node 4 flips its opinion from ↑ to ↓, social stress is decreased to H = 0. Next, node 1 flips its opinion to ↑ and increases stress to H = 2. This is not what happens usually, but since the dynamics is stochastic, these situations will also occur. In the next step, node 2 flips from ↑ to ↓ and thereby lowers social stress to H = −4. Finally, by 1 and 4 flipping their link from positive to negative, we arrive at a relatively stress-free situation, H = −10, that is socially balanced. 1 At this point it is not clear how to empirically infer the value of g for a given society. We chose g ∈ [0, 1] in the model implementation. In fact, any non-negligible value, g = 1, can be shown to yield similar results as g = 1 (see SI). This choice corresponds to the assumption that the effect of social balance is comparable in importance to the opinion terms (social influence) in Eq. (1). As long as the number of links and that of triangles are of the same order of magnitude (as is the case in sparse networks), it seems reasonable to keep the contribution of the Heider term comparable to that of opinions. In physics the case g = 0 corresponds to the classical Edwards-Anderson spin glass model [76], while the other extreme, g → ∞, corresponds to the model studied in [77][78][79]. In the course of this sequence the number of balanced triangles changes from two to four. Note that in the second step social stress is temporarily increased. This is a consequence of the stochastic nature of the model, where also unfavourable events happen from time to time.

C. A stochastic co-evolutionary model -the Metropolis algorithm
The social stress function, H, now specifies the way by which the dynamical variables, s i and J ij , change over time. Assuming that humans generally tend to reduce social stress, changes that decrease H are favoured over those increasing it. We implement the joint evolution of opinions and links by the so-called Metropolis algorithm [80]. Starting from a random configuration of opinions and links, the society is updated from one timestep t to the next as follows: 1. Compute H of the current system, assume it has a value of H 0 . 3. Compute H of the system at this point, assume that it is nowH 0 . We now pick one link randomly, J ij , and flip it. Compute H again, and assuming it to beH 1 , we accept the flip ifH 1 ≤H 0 , and accept it with probability p = e −∆H/T , where ∆H =H 1 −H 0 , ifH 1 >H 0 . For simplicity, we assume that T is the same as in step 2.
4. Continue with the next timestep.
The parameter n controls the relative update rate between opinions and links. The relative frequency of opinion updates versus link updates is nN . Depending on the choice of n, which can range from zero to infinity, (and depending on the initial conditions), the opinions may or may not be given enough time to converge towards a steady state between link updates; in other words they may or may not have enough time to "equilibrate". In the SI we show the consequences of different choices of n. In the main body of the paper we set n = 1. Here we are interested in a true co-evolutionary dynamics, which is guaranteed for this choice of n and the range of N 's considered in the paper. Appropriate care needs to be taken when larger systems are studied to ensure that the co-evolution is correctly implemented.
The parameter T is a kind of 'social temperature' that characterises the average volatility of individuals in a society [81]. The higher T is, the more volatile on average an individual is. This means that he or she is more likely to update his/her opinion and social ties, regardless of which flips reduce social stress. The update rules specified by p and p are based on the intuition that a change that reduces social stress (lower H) is more favourable than one that increases it. The choice of an exponential function is for convenience only and has no particular meaning (as it has in physics).

D. Social coherence through external influences
Opinion formation is not a purely endogenous process. It can be influenced strongly by external influences, such as religion, nationalism, and so on. Within the proposed framework, such influences can be included with additional terms in the H function. We propose to study a term that discourages people from maintaining hostile links. This could be the message of an exogenous religious or moral norm ("love all the others"), or some nationalist propaganda that suggests that people of the same nation should be unconditionally friendly to one another. To this end, whenever we want to model exogenous pro-social pressure, we add a third term, (h/2) (i,j) (1 − J ij ), where h > 0, to Eq. (1). Clearly, this term will suppress negative links in the society.

E. Characterising modes of collective behaviour-order parameters for social fragmentation
To characterise the degree of social cohesion or fragmentation we have to define appropriate quantities that we call order parameters. In the theory of phase transitions [82], order parameters signal regime shifts from one phase into another. To quantify the degree of social fragmentation we use the following measures:

Size distribution of echo chambers
A clear signal for social fragmentation is the distribution of cluster sizes. In a fragmented society there exists a large number of small groups of individuals that cooperate within their group but are hostile towards other groups. We detect these clusters by minimising the number of positive relations between them and that of negative links within them [83][84][85]. By doing that, most of the negative links will be found between the clusters. Further, in agreement with the notion of echo chambers in the literature, from the detected "positive" clusters, we select those that consist of only like-minded agents and identify them as echo chambers. The size of an echo chamber is thus given by the number of such nodes, and is denoted by S(E), where E denotes the chamber.

A measure for polarisation, f
We introduce a simple network variable, f , to measure the level of social balance in the society. It is defined as the difference of the fractions of balanced and unbalanced triangles in the network: where n + and n − are the number of balanced and unbalanced triangles, respectively. f = 1 means that all triangles are balanced, f < 1 signals that unbalanced triangles are present. Even though f could be negative, this situation is never observed in simulations. This is in agreement with both Heider's intuition and the empirical evidence obtained in real social networks, where the value of f is typically above 0.7 [39]. The case f → 0 corresponds to an equal number of balanced and unbalanced triangles. From Harary's result 2 [86], it follows that if the network can be partitioned into strictly positive clusters, within which all links are positive and between which links are exclusively negative, then f = 1. In reverse, the case, f = 1, is not sufficient to imply such a partition for sparse networks; however, high values of f (f → 1) generally correspond to a clustering that is close to this partition.

A measure for group homogeneity, mg
We need a quantity to characterise how opinions are distributed within groups. If a society fragments, it reorganises into sub-communities (clusters) of mutually befriended individuals who would be expected to hold similar opinions. We can measure the average level of opinion homogeneity within a group by where C k denotes the k-th positive cluster found by the community detection method [83][84][85]. The average, . C k , is taken over all the detected clusters. By definition, m g is the average of the absolute values of the local (binary) opinions over all groups so that m g ∈ [0, 1]. m g = 1 if and only if all clusters are composed of like-minded individuals only. However, opinions may be different between individuals belonging to different clusters. On the contrary, m g = 0 corresponds to a totally cohesive society that consists of either one or many groups of befriended individuals but there is no opinion that dominates in any one of these groups. Intermediate values of m g ∈ (0, 1) signal that within a group opinions vary and there is no consensus among its members.

A measure for opinion diversity, m
As a simple measure for the opinion diversity across groups we compute the overall opinion of the society By definition, m ∈ [0, 1]. The lower m is, the more diverse opinions are. Opinions are aligned across society if m → 1. This measure can also serve as a probe of how fast opinions can converge to a consensus. This is important because in real social contexts one can change opinions and friends (or enemies) within a limited lifetime. Therefore, convergence times do matter and must be studied in detail. The time required for the system to equilibrate from different initial conditions may vary strongly.

III. RESULTS
We simulate the model given in Eq. (1) for the parameter choices of N = 400, and g = 1. We first discuss the phase diagram of the model and its consequences.

A. Phase diagrams
The central result of this paper is shown in Fig. 4 that shows f (in colour code) as a function of the average connectivity, k, and social temperature, T . There is a clear separation line at which the society transitions from a well mixed situation with f ∼ 0.1 (blue) to a fragmented one, characterised by f ∼ 1 (yellow). In the yellow region, the emergent networks are strongly balanced and opinion clusters exist. These polarised clusters disappear and opinions become randomly distributed amongst agents in the dark blue region, where there are as many balanced as unbalanced triangles. Note, that values of f ∼ 0 are unrealistic. Real societies are balanced and show empirical values in a range around f ∼ 0.7 [36,39]. We indicate the realistic region with a white box. Assuming that a given society is found somewhere in the realistic region, say at a fixed T , it only takes a small increase of social connectivity, k, for the society to be pushed into the fragmented filter bubble phase. In recent years the average connectivity has certainly increased in societies, making it easier for them to transition into the fragmented regime. The result in Fig. 4 is obtained for a regular lattice ( = 0). We confirmed that the existence of the separation line also holds for small world network topologies; see also below.

B. Size distribution of echo chambers
We show the echo chamber size distribution for various values of T and k in Fig. 5. The left column shows the situation for small social temperature, T = 1, the right column shows T = 5. The upper panels show a high average connectivity, k = 8, while the lower ones correspond to k = 4 neighbours. The left column corresponds to the fragmented phase, the right column to the cohesive phase. It is clearly visible that deep in the fragmented phase there is a broad distribution of echo chamber sizes, spreading to sizes of about 100 for k = 8 and to sizes of about 20 for k = 4. In the right column we observe sharply peaked distributions with maximum cluster sizes of about 2-3, meaning that there is no large cluster of unique opinion forming. This corresponds to a society where different opinions co-exist. The insets show the size distribution of the "positive" clusters C k found by the community detection method. Note that in (b) there is a small peak at 400, which is the maximal size of a cluster. This indicates the possibility of global cooperation of the whole society in the cohesive phase even if opinions are diverse.

C. Robustness
To find out if results are robust with respect to changes of parameters, we perform a series of robustness checks.
We first test the dependence on the size N of the society. For a fixed value of k = 8 we show a section of the phase diagram in Fig. 6 (a) for various system sizes, N = 50, 100, 400 on regular networks. Clearly, there is no visible size dependence. It can be safely assumed that this will also hold when taking N → ∞ 3 . This result is not unexpected since we keep the connectivity smaller than N .
In Fig. 6 (b) we show the effect of the average connectivity on the results, where we fix N = 400 and compute f for various values of k. As we already noted in Fig. 4 with increasing k the phase diagram is shifted towards the fragmented phase (yellow region in the phase diagram). The transition appears to be discontinuous (first-order), meaning that f jumps as a function of the temperature variable. Fig. 6 (b) also demonstrates a hysteresis effect (visible for k = 30), which often accompanies first order transitions. This can be understood in the following way: If in Fig. 6 (b) we increase T , f starts to gradually decrease, and then drops rapidly to much lower values. If at that point one would start decreasing T , f would not immediately jump up to previous levels, but remain low until at a lower T it would finally jump upward again. See arrows in the figure.
To test if the particular network structure has an influence on the results, we computed the phase diagrams with small-world networks [72]. The small-world parameter, , controls the probability to re-connect a link from any node to any other node. Here we rewire the connections in such a way that the network remains connected and does not dissociate into different components. Note that = 0 means a regular network, = 1 corresponds to a random graph. Figure 6 (c) shows the result. The transition line is shifted towards the left, i.e., the critical temperature decreases with increasing . This fact can be understood as a consequence of having less triangles in the networks that are obtained with a larger value of ; see SI 12.
Finally, we check what happens if we lower the coupling strength of the Heider term in Eq. 1. When we take g = 0.01, we observe a shift of the phase transition line to the left and the dependence of the transition on the connectivity, k, becomes negligible; see Fig. 8 in the SI. Obviously, for the case g → 0 where the Heider term vanishes, there will be no more dependence on k. The pronounced fragmentation transition at high interconnectedness is hence a direct consequence of social balance.

D. The role of external influences
In Fig. 7 (a) we show the effect of the external influence, h, designed to suppress negative links in the society, on the fragmented phase. It does what it is expected to do. Note that the terms h and g may compete with each other: if h promotes the flip of a negative link this could result in more unbalanced triangles, meaning that it works against the effect of g. As a consequence of this competition, a low value of h can only remove a small fraction of negative links and a fragmented society emerges, similar to the case without the external influence. Only beyond a critical threshold, h c , can most of the negative links be eliminated and global consensus be reached. See SI 11 for an illustration of this phenomenon for a simple network of N = 3 nodes. Since there is no transition in f (it remains close to 1), we use m to characterise the change in the final state of the society under the effect of the external influence.

E. A note on time scales
In Fig. 7 (b) we analyse the times, τ , that are necessary for the order parameters to converge to their stationary values. This is essential to check since convergence times in this type of system can be exceedingly and unrealistically long. τ is the time required for the system to equilibrate at low social temperature. We observe in Fig. 7 (b) that on average τ is of the order of kN timesteps. Given that the number of links is kN/2, the distribution of τ with a mean 2.11 × kN means that the network updates about 4 times on average before reaching equilibrium. However, for a particular run, τ may vary substantially, depending also on the initial conditions. Typically, the steady state can be reached faster if the initial fraction of positive links is above 1/2. The variability becomes more pronounced in the presence of external influence, h. At sufficiently low temperature, the convergence times can become very long due to the existence of many local minima, so-called "jammed states", in the energy landscape [77,78]. The social stress in a jammed state is not larger than that in any of its neighbouring states, which can be reached from this state by a single spin or link flip. Evolving on such a "rugged landscape", the system is very likely to get trapped in local minima. The global minimum of the social tension, H, hence may even become unobservable during simulation time.

IV. SUMMARY AND DISCUSSION
We proposed a model that captures five key elements of human societies: (i) Agency. Humans make their decisions individually. (ii) Social context-social networks. not fully rational and take random decisions from time to time, that do not maximise certain objective-or utility functions. (iv) Co-evolution. Individuals update their opinions as well as their social links. Most of these updates tend to avoid social tension. (v) Social balance. Social networks show robust overall structures of positive and negative social links. They follow robust patterns of social balance.
We implemented a simple model that captures these five building blocks in a stochastic manner in the framework of a Hamiltonian approach. The focus of the model rests on the notion that humans tend to update opinions and social links, so as to reduce social tension. The model exhibits a clear phase diagram, i.e. it shows at which parameter values tipping points occur where a society rapidly changes its microscopic composition and structure.
The results deliver a very clear and robust message: A society with the ability of a co-evolutionary dynamics of opinion-and link formation must be expected to have a phase diagram as the one presented in Fig. 4. This is a direct consequence of the social balance term in the model, that incorporates the empirical fact that societies are socially balanced to a high degree. The phase diagram shows the existence of a critical connectivity, k c , between individuals of a society at a fixed social temperature, T , that controls the update frequencies of opinions and links. Below that connectivity, k c , society is in the cohesive phase, where opinions co-exist. Above the critical connectivity, society fragments into clusters of individuals who share positive links within the clusters and have negative links between groups. Within the clusters, large patches of uniform opinions form, and a strong reinforcement of homophily is observed. The existence of a critical connectivity is an extremely robust fact; if the connectivity increases above the critical value, society inevitably must fragment.
The model also gives clear answers to how the fragmented phase can be avoided. There are only two ways out: either to lower the connectivity below the critical density, k c , by reducing the number of interaction partners (social distancing) or, alternatively, to increase the social temperature, T , meaning that people would update their opinions (and links) randomly more often. There are no other alternatives within the framework of this model. For the case of increasing update rates, however, the existence of the mentioned hysteresis phenomenon must be taken into account. This means that if at a fixed interaction density, k update rates, T , are increased, the fragmentation might transition rapidly to the mixed opinion phase, at, say T . If then the update rates are again reduced, fragmentation does not immediately return, but might reappear at lower update rates, T < T .
With the strength of the Heider term, g, and the irregular patterns of the underlying networks for > 0, the position of the critical lines can be shifted. The phase diagram remains robust to changes of the overall size of the society. We have seen that under strong exogenous influences, h, such as religion or nationalism, there is a possibility of transitioning from a fragmented society to a "utopian" or fascist one; such interventions will force the society towards a global consensus.
The presented model has a number of shortcomings. Several essential features of real societies have not been included. We strongly simplified the structure of social connectivity. Whereas social systems are multi-layer networks, here we have focussed only on a single layer. It remains to be seen how the phase diagrams change under the integration of more than one layer of (positive and negative) social interactions.
We have also made simplifying assumptions about the plasticity of social networks. In reality individuals can not only switch the sign of social links, but also eliminate and establish new links. We have made a few exploratory steps in this direction, however decided to keep the topologies fixed for the sake of identifying the essential underlying mechanisms. By allowing for more plasticity in network formation, we think that the essence of the model will not be affected much.
The use of one single binary opinion is minimalistic and unrealistic. It would be much more realistic to use multiple opinions such as cultural features in the Axelrod model [27]. The original dynamics, however, needs to be modified to account for negative links. For example, two agents connected by a positive link can become more similar after interaction, while those who are hostile to each other should grow further apart in the space of opinions. It would be interesting to compare the effect of social balance on the fragmentation in this case with the one that occurs in the presented model. The key message of our model should remain valid as the social balance ensures the existence of clusters of positive links, within each of which opinions are driven toward uniformity by the reinforcement effect of homophily, regardless of the opinion multiplicity.
The use of the same social temperature for both the opinion and link update, is not justified a priori and has been applied for the sake of simplicity. To describe situations, in which, either agents' opinions are more frequent to change than their relations, or vice versa, we introduced the parameter, n. As shown in the SI, within a range of n that ensures a true co-evolutionary dynamics, the results do practically not depend on n. Alternatively, a stochastic dynamics with two temperatures, one for opinions and one for links is certainly reasonable. However, in this generalisation a more complicated non-equilibrium approach is required. The structure of the phase diagram may become richer with long-lived metastable phases. Such a non-equilibrium approach has been considered recently in [71], where the network evolution is not driven by Heider's balance, but by another aspect of cognitive dissonance. There fragmentation emerges either as an absorbing steady state of the dynamics or from an active phase due to fluctuations in systems of finite size.
Finally, from a technical side, the model employed here is a variation of a spin glass model used in physics. With the present choice of model parameters (low connectivity, networks of finite size, n = 1), we can not expect to find the complicated phase space structure of a meanfield spin glass [87]. However, the essence of frustration imposed by the Heider term is clearly the same as in spin glasses. A more detailed technical study of the model is going to be published elsewhere.

V. FINAL CONCLUSION
The main conclusion of this paper is that it unambiguously shows that the presence of social balance carries the seed to social fragmentation. Fragmentation inevitably occurs in a co-evolutionary society if the average interaction density exceeds a critical threshold.
As shown in Fig. 4, fragmentation can occur at any level of interconnectedness if the social temperature is low enough. The fragmentation that inevitably happens is caused by social balance. Societies with weak Heider's balance all become fragmented below a universal "critical" temperature, regardless of their communication densities. The phase diagram in Fig. 8 demonstrates this point. Here we used a very weak social balance of g = 0.01. The fragmented phase (yellow) extends as the relative effect of social balance, g, increases, as seen in Fig. 9. Rescaling g to a non-zero value simply shifts the critical line without changing the structure of the phase diagram. B. Relative update frequencies-choice of parameter n Figure 10 shows how the observables f (blue) and m (red) evolve over time for different values of n. For values of n that ensure a correct implementation of the co-evolutionary dynamics (n = 0.01, 1, 100), the system evolves in more or less the same way, see panels (a)-(c). Based on this observation we made our choice for n = 1 as used in the paper. Only when links evolve very slowly compared to opinions (n = 10, 000) do we observe significant deviations; the system can no longer equilibrate during the simulation time. Note the change of scale in panel (d).  9: (a) Balance level, f , and (b) group homogeneity, mg, both as a function of T and g. Results averaged over 1000 realisations for N = 10. Random initial conditions in links and opinions. The reason for using mg here is that m 0 in both regions and therefore can't be used to distinguish the two phases.

C. Illustration of external influences, h
To illustrate the effect of h and its competing role with g in some cases, in Fig. 11 we show an evolutionary path, which a system of three individuals would follow if h ≥ h c . For this particular system h c = 2(1 + g) at zero temperature. When h < h c , both the bipolar (bottom-left) and global consensus (top-right) states are attractors. If the system starts from any configuration in the basin of attraction of the bipolar state, it ends up in this state. This state is no longer the global minimum of the social stress, H, if an external influence, h > h c , is introduced. The system will then be driven towards consensus, following, for example, the illustrated path. and links (x-axis) for h ≥ hc ≡ 2(1 + g) at zero temperature T = 0. If h < hc then a system in the basin of attraction of the bipolar state would never end up in the consensus phase at T = 0, following this path. In this state, the effects of g and h are opposing each other. g tends not to flip either of the two negative links, J12, since the triangle is already balanced, but h favours its removal to reduce the number of negative links. Only a value of h larger than the threshold, hc, can overcome the effect of g and bring the whole system to consensus. Figure 12 shows the number of triangles in small-world networks as a function of k and the rewiring parameter, . It is obvious that less triangles exist in networks with more random connections (larger ). Therefore, the effect of Heider's balance on the dynamics via triadic relations must become weaker as increases. This heuristically explains why the critical line is shifted towards the left, i.e., the fragmented phase shrinks with increasing .