Discord in the voter model for complex networks

Online social networks have become primary means of communication. As they often exhibit undesirable effects such as hostility, polarisation or echo chambers, it is crucial to develop analytical tools that help us better understand them. In this paper, we are interested in the evolution of discord in social networks. Formally, we introduce a method to calculate the probability of discord between any two agents in the multi-state voter model with and without zealots. Our work applies to any directed, weighted graph with any finite number of possible opinions, allows for various update rates across agents, and does not imply any approximation. Under certain topological conditions, their opinions are independent and the joint distribution can be decoupled. Otherwise, the evolution of discord probabilities is described by a linear system of ordinary differential equations. We prove the existence of a unique equilibrium solution, which can be computed via an iterative algorithm. The classical definition of active links density is generalized to take into account long-range, weighted interactions. We illustrate our findings on real-life and synthetic networks. In particular, we investigate the impact of clustering on discord, and uncover a rich landscape of varied behaviors in polarised networks. This sheds lights on the evolution of discord between, and within, antagonistic communities.


I. INTRODUCTION
There is growing concern over the nefarious effects of online social networks.One phenomenon in particular, has attracted more and more attention.Similar-minded users tend to gather, and form strongly opinionated communities: echo chambers.This is particularly salient in polarised debates regarding politics, societal issues or conspiracy theories [1][2][3][4][5].Echo chambers tend to foster animosity between opposite sides and fuel reinforcement of pre-existing beliefs [6,7]hence their name.To better understand the phenomenon, it is crucial to first examine how discord-i.e.disagreementevolves in social networks.In this paper we contribute novel insight towards this goal.In the context of the celebrated Voter Model, we demonstrate a formula to calculate discord probabilities on complex networks, defined as where σ i is the opinion of agent i (resp.σ j , agent j).
In the Voter Model, agents within a graph are endowed with individual binary opinions {0, 1}.They proceed to choose a random neighbor and adopt their opinion, repeating this process multiple times.On the Z d lattice (d ≤ 2) as well as on any finite connected network, this dynamic leads to a state of consensus where all agents agree [8,9].The average discord ⟨ρ⟩ over all edges, commonly referred to as active links density, is an order parameter of great interest.A low active links density indicates the presence of large clusters wherein all agents agree, and disagreement is only found at their borders.On the other hand, when it is high, there are no such structures and opinions are spread uniformly on the network.
In finite uncorrelated networks, ⟨ρ⟩ typically decays exponentially fast, and the convergence time scales linearly with N [10][11][12].Similar results have been obtained for smallworld networks, while scale-free networks present a different behaviours depending on the exponent of the power-law degree distribution [12][13][14][15].However, most of these rely on approximations, and no general solution applicable to any given network has been found.If we wish to study the active links density in real-world networks, this is of primary importance.
In this paper, we present a universal formula for discord probabilities that applies to any given directed, weighted network, without any requirement regarding the topology or the degree distribution of the network.Our framework can accomodate any finite number of opinions [9,16], zealots [17,18], and individual update rates [19].Importantly, we make no approximation and the results are exact.We also propose a new way of computing the active links density, that uses the exponential of the adjacency matrix to account for long-range, weighted interactions.
The rest of this manuscript is organised as follows.Section II introduces the model.In Sect.III we derive equations for the evolution of individual opinion distributions.In Sect.IV we present our main results: the formula for discord probabilities and the generalized active links density.Section V is devoted to numerical experiments that demonstrate the use cases of our results.Finally, we conclude in Sect.VI.

byists.
As in [20,21], we consider all zealots with the same opinion s as one single entity exogenous to the network, which we name the s-zealot.The word agent will specifically refer to non-zealous individuals.In this case, the notion of zealots has a broader interpretation as exogenous sources of influence, and may for example describe some inner bias of the agents, or an advertising campaign.We let z s i denote the total amount of influence exerted on agent i by the s-zealot.We say that agent i can be influenced by the s-zealot if either z s i > 0 or there exists an agent j with z s j > 0 and a path from j to i.For the latter, the strength of influence exerted by the s-zealot on i will depend on the cumulated length of all such paths.We discuss long-range influences in more details in Sect.IV C.
We call leaders of i agents in the set L i = {j ∈ N : w ij > 0}.We allow self-loops, i.e. i ∈ L i .They can be used to describe (i) an unwillingness of agents to reevaluate their opinions, or (ii) agents re-affirming their current opinions.The former can effectively adjust the update rates.The latter can be useful when using the Voter Model to describe the dynamics of people retweeting their own previous posts.
For the sake of simplicity and without loss of generality, we consider edge weights to be normalised: for any agent i ∈ N , j∈Li In particular, each node is assumed to either have a leader or to be connected to a zealot.The directed, weighted graph of all agents is denoted by G.We assume G to be weakly connected-if it is not, one can apply the results to each component of the graph separately.We let W = (w ij ) 1≤i,j≤N denote the weighted adjacency matrix of the graph.

III. EVOLUTION OF OPINIONS
Each agent is endowed with an exponential clock of parameter 1. Whenever i's clock rings, i updates their opinion by copying a random neighbor or a zealot.Neighbor j is copied with probability w ij , and the s-zealot with probability z (s) i .In other words, with rate w ij agent i copies agent j, and with rate z s i agent i adopts opinion s via the s-zealot.Let x s i denote the probability for agent i to hold opinion s.To avoid cumbersome notations, we omit the time parameter.We shall remember that x s i is a time-dependent quantity and is implicitly followed by (t).A direct extension of [20, eq. 3] gives which reduces to Hence, at equilibrium we have As expressed by [22,Prop. 3.2], x s i is the probability that a backward random walk initiated at i reaches the s-zealot before another zealot.Hence, x s i > 0 if and only if i can be influenced by the s-zealot.
The dynamics correspond to those of a continous-time Friedkin-Johnsen model [23].The number of distinct equilibrium states depends on the topology of the agent graph and the influence of zealots.Assuming that any agent can be influenced by at least one zealot, Eq. 2 and [24, Lemma 2.1] imply that the spectral radius of W is strictly less than 1, hence there is a unique equilibrium state-c.f.Appendix A. If z s i = 0 for all i, s, we uncover the continuous-time French-DeGroot model [25,26].In that case, consensus is reached if there exists an agent able to reach every other.

IV. DISCORD PROBABILITIES
Let ρ ij denote the probability P (σ i ̸ = σ j ) of discord between agents i and j.The quantity 1 − ρ ij is called probability of harmony.Trivially ρ ii = 0 and ρ ij = ρ ji .For the sake of conciseness we again omit the time parameters, and denote indistinctively by ij or ji the unordered agent pair {i, j}.One can then write However, the above derivation implictly assumes that the opinions σ i and σ j are independent, which is not guaranteed-e.g. if i and j are neighbors.A toy example is presented in Fig. 1.We focus on the general case, valid for any i, j.Later on we characterise precisely the cases where Eq. 10 holds.

A. General case
There are two types of events that lead to i adopting an opinion different than j's: 1. i copies agent k ̸ = j, who holds another opinion than j's.This happens at rate w ik ρ jk .
2. i copies an s-zealot while j holds an opinion different than s.This happens at rate z s i (1 − x s j ).
Hence, i adopts another opinion than j's at rate k∈Li The same reasoning gives us the rate at which j adopts another opinion than i's, and we find that the pair ij switches from harmony to discord at rate: and from discord to harmony at rate Subtracting ∆ − ij from ∆ + ij , we obtain the master equation The evolution of discord probabilities is thus governed by a system of N (N − 1)/2 linear differential equations-although not all will be needed, as stressed below.Setting the left-hand side to zero gives us the equilibrium discord probability for the pair ij, The discord probabilities are thus solution of a linear system of the form The entries of V, y are given by (15).In the absence of zealots, we have y = 0 and the speed of convergence depends on the spectrum of V .If consensus is reached (e.g.strongly connected network), then ρ → 0. Otherwise, the various equilibrium states are given by the leading eigenvectors of V .
In the presence of zealots, Lemma 2.1 from [24] implies that the spectral radius of W is strictly less than 1, assuming every agent can be influenced by a zealot-c.f.Appendix A for details.Hence, the system has a unique solution.It can be efficiently computed by iterating for any initialisation ρ (0) with values in ]0, 1[, and the convergence rate depends on the spectral radius of V .The proof of that statement can be found in [27,Thm. 4].
Finally, note that all the equations we derived can be adapted to account for various update rates r 1 , . . ., r N across agents.It suffices to scale the rates w ij by r i , to replace 2ρ ij by (r i + r j )ρ ij in Eq. 14 and 1/2 by 1/(r i + r j ) in Eq. 15.
Equations 5-6 are unchanged.Here, we stick to the traditional setting r i = 1 for all i.

B. Independent pairs
There are some cases where the opinions σ i and σ j are independent, and one can use Eq. 10 to calculate ρ ij without having to solve a possibly large linear system.Independence holds if one of the following is verified: 1. σ i or σ j is constant, or 2. there is no path from i to j nor from j to i, and i and j have no common ancestor.FIG.1: Dependency between opinions.Nodes 0 and 1 are the 0-and 1-zealot respectively.Numbers along the arrows denote edge weights.In (a) there is a path from i to j.In (b) there is none, but i and j have a common ancestor k.In both cases, Eq. 15 gives ρ ij = 1/4, while Eq. 10 gives ρ ij = 1/2.
A formal proof can be found in the Appendix B. The second condition assures us that i and j do not influence each other, and that they are exposed to strictly different sources: their opinions evolve in total independence.As illustrated in Fig. 1, if one of these assumptions is violated then Eq. 10 gives an incorrect result.
When i and j have the same opinion distribution x, Eq. 10 is akin to the entropy of x.Hence the more uniform x is, the higher the discord.Equation 10 is also exactly 1 minus the cosine similarity between x i and x j .While for dependent agent pairs the discord probabilities are given by Eqs. 14 and 15, Eq. 10 may still be used for the purpose of measuring dissimilarity of opinion distributions.

C. Generalized active links density
The active links density is the average discord between all neighboring agents.While convenient for regular, unweighted graphs, this definition suffers from two shortcomings when it comes to general networks.First, not all edges are created equal: if w ij = 0.80 and w ik = 0.01, then j holds a strong power of influence over i, while k barely has any at all.Discord ρ ij between i and j will thus often be much more relevant to the analysis than ρ ik , a difference not accounted for when taking a simple unweighted average.
Second, two agents may be closer than they appear: if w ij = 0 but w ik = w kj = 0.9, agent j exerts non-negligible influence on i via k, despite them not being directly connected by an edge.The opinion of agent j reaches i in two steps with rate k∈Li w ik w kj . ( Indeed i copies leader k with rate w ik , and each time it happens there is a probability w kj that k's opinion was copied directly from j.
From these considerations stems a novel metric, better suited for complex networks: the generalized active links density, defined over all agent pairs by Here, w ∞ ij can be any measure of influence of j on i. Inspired by [28], here w ∞ ij is the (i, j)-th component of the matrix exponential Summing all powers of W generalises the reasoning made above (19), and lets us quantify the multi-steps influence that agents may have on one another.Scaling by the inverse of the path length factorial attributes a rapidly decaying importance to longer paths.The sum w ∞ ij + w ∞ ji is then a measure of long-range, weighted influence between i and j.
Note that with this definition, zero entries in the i th row w ∞ i correspond to users unable to reach i, and non-zero entries correspond to ancestors of i.The cosine similarity informs us on the similarity of i and j's ancestry, meaning the extent to which they are exposed to the same channels of influence.

V. NUMERICAL EXPERIMENTS A. Dependency between opinions
One may be interested only in certain values of ρ ij , and wishing to avoid the burden of computing them all.It seems natural to use as given by Eq. 10, even if σ i and σ j are not independent.While sometimes effective, this approximation does not always fare well-c.f.Fig. 1.As the dependency of i and j's opinions relies on the strength of paths joining them and the similarity of their ancestry, we expect ρ ij to decrease with these, and the error made by ρij to increase.We verify this at equilibrium on four datasets: zachary [29], football [30], email [31], polblogs [32].More details on the data and the preprocessing are available in the Appendix C. To quantify path strength and ancestry similarity we use respectively w ∞ ij +w ∞ ji and cos(w ∞ i , w ∞ j ).We also look at the effect of the total zealousness ∥z i + z j ∥ of i and j.
Results are shown in Fig. 2, and confirm our hypotheses: ρ ij decreases with the strength of paths joining (i, j) and the similarity of their ancestry, while the error made by ρij increases.Moreover, the error decreases with the total zealousness.This is not surprising, as higher values mean lighter weights on inter-agent edges and thus less influence from peers.The errors are quite low on average, but can peak very high for certain agent pairs (maximum error ranges from 15% for football to 187% for polblogs).The least accurate ρij is on zachary, which could be because of the higher path strengths due to the graph's smaller size.
Moving average for ρ ij (dotted blue line) and error percentage of ρij (orange line) for all dependent agent pairs, function of (a) path strength, (b) ancestry similarity, and (c) and total zealousness.All curves differ in their range of values, which we don't precise on the y-axes for the sake of clarity.On the right are shown average errors and standard deviation for the distribution of errors.

B. Discord and clustering
We investigate the relationship between discord and clustering.To do so, we compute the Generalized active links density ⟨ρ⟩ on a collection of Watts-Strogatz networks [33], with various average degrees and rewiring probabilities.There are N = 100 agents arranged in a circle, and two possible opinions {0, 1}.Each node is connected to its k nearest neighbors, and each edge is rewired at random with probability p.As p increases, the average local clustering coefficient ⟨C⟩defined at node i as the proportion of edges that exist among neighbours of i-decreases.Thus, there are less and less triangles in the graph.
We assume that half of the agents "support" opinion 0: they have z (0) > 0 with a value chosen uniformly at random uniform in [0, 1], and z (1) = 0.The other half analogously supports opinion 1.We consider two cases.
With homophily: agents 1 to 50 support opinion 0, and agents 51 to 100 support opinion 1.Thus, most edges connect similar-minded agents.
Without homophily: supporters of each opinion are placed at random in the graph.Hence, we expect about 50% of edges to connect similar-minded agents, and 50% to connect opposite-minded ones.
Results are presented in Fig. 3.We also plot the evolution of the average local clustering coefficient ⟨C⟩.As expected, ⟨C⟩ decreases with p for all values of the average degree k.We also observe that ⟨ρ⟩ always increases with k.This might be due to the fact that, as degrees increase, each neighbor of a node i is less often copied by i, meaning less opportunities for them to agree.With homophily, discord increases significantly with p. Agents are initially mostly connected with peers who share the same beliefs, but as we rewire more and more edges, two things happen.First, connections with opposite-minded agents increase as those with similar-minded ones decrease.Second, the clustering coefficient, and thus the number of triangles, fall.These two effects consequently increase exposure to a higher diversity of opinions, which entails higher discord overall.
Without homophily, ⟨ρ⟩ also increases with p, but much less so.Thus, when there is no homophily in connections, the amount of triangles in the network has a smaller impact on discord.As the community memberships are initially random, rewiring edges has not much impact on the diversity of opinions that agents are exposed to.We also observe a higher variance in ⟨ρ⟩, which might be due to the higher entropy in the topological distribution of (z (0) , z (1) ).Finally note that, as p approaches 1, the difference between (a) and (b) vanishes.

C. Discord and communities
An immediate application of discord lies in the analysis of polarised networks.If two groups support different ideas, how fiercely do they disagree?To what extent does it depend on the connections between them, and on the influence of zealots in each camp?To study these questions we generate networks partitioned into two communities C 0 and C 1 via the Stochastic Block Model, and calculate ⟨ρ⟩ at equilibrium for various values of the model parameters.The rest of this section is dedicated to the discussion of the results, illustrated in Fig. 4.
When reinforcing connections between different-minded communities, the novel paths of influence create more diverse information flows, and thus a higher exposition to contradicting beliefs.There are two main consequences one could expect from this.Agents may revise their viewpoint to incorporate adverse ideas, leading the system towards a more consensual state of lower discord.Alternatively, they may fiercely cling onto their prexisting opinions, thus creating more tension and reinforcing discord-the so-called backfire effect [34].
When community C 0 is much less zealous than C 1 , for z = (0.1, 0.5) and z = (0.1, 0.9), outgroup edges can surprisingly reduce the discord within C 0 .While adding too few of them will introduce more discord in the community, once they reach a critical mass we observe a decrease in ⟨ρ⟩.This stems from the fact that C 1 is more zealous and thus has fiercer partisans, meaning opinion 1 gets more and more prevalent in the network as connectivity between the two communities z = (0.5, 0.9) z = (0.9, 0.9) FIG.4: Network of N = 100 agents with two communities C 0 and C 1 .The s-zealot exert a total influence z s on each agent in C s and none on others.In-group edge probability is fixed at p in = 0.1, while the out-group edge probability p out and zealousness z = (z 0 , z 1 ) vary.Results are averaged over 20 agent graphs generated under the Stochastic Block Model, for the whole network (a), within each community (b,c) and between them (d).Top: generalized active links density.Middle: Opinion difference.Bottom: Support for opinion 0. The plots have different scales for clarity, but the purpose is to focus on the qualitative dynamics rather than exact values.
goes up-see the support for opinion 0 dropping in the bottom plots.Thus even within C 0 , holding opinion 1 guarantees more agreement with peers.
It is striking that contrary to ⟨ρ⟩, the average difference in opinion ⟨∆x⟩ (Fig. 4b,c) always decreases within communities, given enough outgroup edges.The opinion difference between i and j is defined by the distance ∆x ij = ∥x i − x j ∥.
Hence, despite a surge of discord amongst like-minded agents, the distributions of their equilibrium opinions converge.This might be due to the fact that as edges are added, the network gets closer to a complete one.Individual node particularities thus fade as agents become more similar to one another.But as the distributions of opinions approach the uniform distribution, the probabilities of drawing two different values in-crease.This highlights the importance of distinguishing between dissimilarity of opinion distributions and discord probabilities.
Between the communities, we observe that discord always diminishes with more outgroup edges.However, as shown in the inset (Fig. 4d), for equally low values of zealousness z = (0.1, 0.1), first ⟨ρ⟩ decreases but it quickly goes back up as more outgroup edges are added.Thus, when agents are not too zealous, relations with opposite minded-others become more confrontational as connections between them increase.For high values of z, discord does decrease with the number of outgroup edges, but stays important compared with low zealousness cases.
Finally, Fig. 4a showcases the importance of using other measures than simply average opinions, as also stressed by [11].When the zealousness is the same on both sides, the average opinion ⟨x (0) ⟩ over the whole network does not change with more edges, but we observe various behaviors in the evolution of ⟨ρ⟩ and ⟨∆x⟩.

VI. CONCLUSION
We developed a novel method to compute discord probabilities in the multi-state voter model on complex networks, with and without zealots.Our results do not rely on any approximation, they are exact and applicable to any directed, weighted network of agents with any finite number of opinions, and individual update rates.This led us to propose a generalized definition of the order parameter ⟨ρ⟩ traditionally known as active links density, that quantifies the average discord over all edges.Our new definition accounts for long-range, weighted interactions between agents.
We illustrated our findings on real-life and synthetic networks.We uncovered correlations between discord, edge weights and similarity of ancestors.Through numerical experiments on Watts-Strogatz networks, we observed that clustering had significant impact on discord in the presence of homophily, but less so when that feature was absent.We also found that increasing the number of connections between antagonistic communities could potentially increase discord, depending on the zealousness of agents and density of edges.To gain a deeper understanding of how discord evolves in diverse scenarios, future research shall experiment with various network topologies.Additionally, the theoretical advancements presented here could assist empirical studies examining opinion dynamics in real-world datasets.Thus, this evolution is determined by the connections between i and zealots, and the opinion distributions of the leaders of i.
In turn, the opinion distribution of a leader k of i is function of the connections between k and zealots, and the opinion distributions of the leaders of k.Iterating this reasoning, eventually all ancestors of i-and only them-intervene.Thus, if j is an ancestor of i, the opinions of the two are not independent.Otherwise, if there is no path between them but they have a common ancestor, their opinions are both function of the opinion of that ancestor, meaning they are not independent.If neither i nor j is an ancestor of the other, and if they have no common ancestor, their opinions are two independent random processes.
Appendix C: The datasets In Sect.V A we use four datasets, described in Table I.In each of them, a node belongs to a single community, given by the creators of the dataset.We only keep the largest weakly connected component of each network.The in-degree and out-degree distributions we obtain are presented in Fig. 5.
The datasets are initially unweighted.We first set w ij to 1 if there is an edge from j to i, and zero otherwise.Once all such values are set, we define values of zealousness as follows: for any agent i who belongs to community s, we attribute a random uniform value between 0 and 1 to z s i , and set z r i = 0 for r ̸ = s.We then proceed to multiply each weight w ij by with s the community of user i, so that Eq. 2 holds.To highlight the absence of approximation in our results, we study the difference between empirical values of discord obtained in simulation, and theoretical ones from Eqs. 10 and 15.For the simulation we proceed as per Algorithm 1, with T = 10 5 N steps and a burn time of T b = 10N steps.This means the first 10N steps are not taken into account when computing discord probabilities, in order to reduce the influence of the initial state.Simulated values are compared with their theoretical counterparts in Figure 6.For each pair (i, j) we compute the absolute and relative differences, respectively |ρ theo ij − ρ simu ij | and |ρ theo ij − ρ simu ij |/ρ theo ij .We then average these values over all agent pairs.As the simulation time increases, we observe a tighter and tighter fit between the values, with relative differences reaching between 10 −3 and 10 −2 for all four datasetsexcept for polblogs, with a difference slightly below 10 −1 .This highlights the exactness of the equations we derived.

FIG. 3 :
FIG. 3: Impact of clustering coefficient on ⟨ρ⟩.For each set of parameters (k, p) we generate m = 30 Watts-Strogatz networks of size N = 100, average degree k and rewiring probability p.We average ⟨ρ⟩ over all realisations.Shaded areas cover ±1 standard deviation.Half of the agents support opinion 0 (z (0) > 0), the other half opinion 1 (z (1) > 0).(a) With homophily: the majority of edges are between agents supporting the same opinion.(b) Without homophily: no correlation between edges and opinion support.(c) Average clustering coefficient (independent from homophily).Note the different scales on the y-axes.

FIG. 5 :
FIG.5: Unweighted degree distributions for each toy dataset, logarithmic scale.Zachary and Football are undirected so both distributions are the same.Top: in-degrees.Bottom: out-degrees.

Algorithm 1 :
[32]mation of discord probabilities via simulation Data: user set N , number of opinions S, adjacency matrix W , zealousness matrix Z, number of steps T , burn time T b Result: estimated discord probabilities ρij for all user pairs (i, j) begin xi ∼ U {1,...,S} for all i ∈ N // initialize users opinions at random ρij ←− 0 for all i, j ∈ N // initialize probabilities to zero τij ←− T b + 1 for all i, j ∈ N // time of last update for each pair for 1 ≤ t ≤ T do i ∼ U {1,...,N } // select a random user x old i ←− xi // store current opinion xi ←− xj with probability wij, or s with probability z s i // draw new opinion if t > T b and xi ̸ = x old i then // if i changed opinion, for users j who were disagreeing with i until now, we add the duration of the disagreement to ρij for j ∈ N \{i} do if xj ̸ = x old i then ρij ←− ρij + (t − τij) // update discord probability τij ←− t // set time of last update to current time ρij ←− ρij/(T − T b) for all i, j ∈ N // normalize probabilities Zachary[29]Football[30]Email[31]Polblogs[32]

TABLE I :
Basic statistics for the datasets.Modularity and average clustering are computed on the undirected, unweighted networks.See Sect.IV B for a definition of independent agent pairs.