A generalised mean-field approximation for the Deffuant opinion dynamics model on networks
Susan C. Fennell, Kevin Burke, Michael Quayle, James P. Gleeson
AA generalised mean-field approximation for theDeffuant opinion dynamics model on networks.
Susan C. Fennell ∗ Kevin Burke ∗ Michael Quayle †‡ James P. Gleeson ∗ Abstract
When the interactions of agents on a network are assumed to follow the Def-fuant opinion dynamics model, the outcomes are known to depend on the structureof the underlying network. This behavior cannot be captured by existing mean-fieldapproximations for the Deffuant model. In this paper, a generalised mean-field ap-proximation is derived that accounts for the effects of network topology on Deffuantdynamics through the degree distribution or community structure of the network.The accuracy of the approximation is examined by comparison with large-scaleMonte Carlo simulations on both synthetic and real-world networks.
Mean-field approximations can be used to gain insight into the behaviour of complex dy-namical systems at a fraction of the computational cost associated with running large-scaleMonte Carlo simulations. Originally developed to study phase transitions in statisticalphysics, mean-field (MF) theory is now used in various areas, for example epidemic mod-elling [14] and neural networks [3], but our focus is its use in the study of models of opinionformation and consensus [17, 4, 6, 10, 5, 18, 1]. Mean-field approximations are particu-larly useful for studying dynamics that take place on the nodes of a (large) network. Inmodels of opinion dynamics, for example, each node in a network represents an agent whoholds an opinion, and the model dictates how the agents interact to change their opinionsover time. By making assumptions about the network structure and dynamical correla-tions [15], a set of equations for the time-dependent proportion of agents with a givenopinion can be derived. The number of such equations is typically much smaller than thesystem size and so numerical integration of those equations is more efficient than MonteCarlo simulations of the entire system. In some cases it is possible to identify importantparameters in the system through a mathematical analysis of the MF equations. In theAxelrod model, for example, numerical integration of the MF equations reveals a phasetransition between an ordered phase in which all agents hold the same set of opinionsand a disordered phase in which the network is separated into non-interacting clusters ofagents with the same opinions [5]. The precise location of this phase transition for the one ∗ MACSI, Department of Mathematics and Statistics, University of Limerick, Limerick, Ireland † Department of Psychology, University of Limerick, Limerick, Ireland ‡ Department of Psychology, University of KwaZulu-Natal, Pietermaritzburg, KwaZulu-Natal, SouthAfrica a r X i v : . [ phy s i c s . s o c - ph ] J u l imensional case can be obtained though a mathematical analysis of the MF equations[18].The Deffuant model is a so-called “bounded confidence” model of opinion formation,whereby agents are only influenced by those agents whose (scalar) opinions are close to(within a parameter (cid:15) of) their own [7]. While the Deffuant model has mostly beenstudied by Monte Carlo simulations of the dynamics, a MF approximation was developedand analysed in [1], under the assumption of a well-mixed population of agents. Underthis assumption, which is also a common assumption in Monte Carlo simulations of theDeffuant model, each agent may interact with any other agent whose opinion is closeenough to their own. Instead of keeping track of how each individual changes theiropinion over time, the MF approach is to focus on the density P ( x, t ) of opinions x overthe population and how this evolves in time. Having derived an evolution equation for P ( x, t ), the authors of [1] numerically integrated the equation for a range of values of theconfidence bound (cid:15) , enabling them to examine the dependence of the number of opinionclusters at steady state on (cid:15) .Notwithstanding its usefulness, note that the approach in [1] makes use of a classicalMF assumption: that each agent can (if their opinion allows) interact with any otheragent. When we consider the agents as nodes on a fixed network, the well-mixed assump-tion of [1] corresponds to the dynamics taking place on a complete (and infinite) graph,where an agent has every other agent as a network neighbor. However, if (as we wish todo here) the agents are instead assumed to be connected by a fixed social network, so thatthe choice of potential interaction partners is limited to neighboring nodes on the graph,it was shown in [13] that that the results of running Deffuant dynamics depend on thespecific network structure. For example, on Erd˝os R´enyi graphs, as on complete graphs,the number of stable opinion clusters increases as the confidence bound (cid:15) decreases, whileon cycle graphs the confidence bound has no effect - everyone will eventually have thesame opinion. The behaviour on lattices [7], Barab´asi-Albert networks [16] and WattsStrogatz networks [9] also differs from that of complete graphs. Thus, the original MFapproximation of [1] is insufficient to accurately describe these cases and a more generalMF approximation is needed to describe the way in which Deffuant dynamics are affectedby the network structure.In this paper we first develop a degree-based MF approximation that is suitable forconfiguration-model networks with prescribed degree distribution q k (and in the limit ofinfinite network size). To do so, we extend the density P ( x, t ) of opinions at time t thatwas introduced in [1] to multiple opinion densities P k ( x, t ), one for each distinct degreeclass k (i.e., group of nodes with the same degree k ) in the network. By making mean-field assumptions that are common when studying, for example, binary-state dynamicson networks [15], we derive a system of coupled equations for the evolution of the variousdensities P k ( x, t ).We also develop a further generalization of this method, where we consider a parti-tion of the network nodes into discrete classes, with the probability for two nodes beingconnected on the network depending only on their class labels. This reduces to our firstcase when the class of a node is its degree, but we show that other useful partitions canalso be considered in this way. This more general approximation, which we refer to as a class-based MF approximation , can be used in cases where the degree distribution alonedoes not describe the network structure well, for example, in networks with communitystructure such as stochastic block models. By comparing with Monte-Carlo simulations,2e show that the class-based MF equations yield a good approximation to the Deffuantdynamics and that they accurately predict behavior on networks that the original MFapproximation of [1] fails to capture due to its well-mixed assumption being violated.The rest of this paper is organised as follows. In section 2 we introduce the Deffuantdynamics and give a motivating example where network structure affects the outcome.We derive the degree-based MF equations for the Deffuant model in section 3 and comparethe solution of these equations with the simulation results from section 2. In section 4we derive the more general set of class-based MF equations. We use these equations todescribe the dynamics on networks with community structure in section 5 and on examplesof real-world networks in section 6. We conclude in section 7. In the Deffuant model of opinion dynamics, each node (or agent) i holds a time-dependentopinion x i ( n ) that is a real number on the interval [0 ,
1] which defines the continuous spaceof opinions. We consider an undirected network of N nodes together with a set of initialopinions x i (0) , i ∈ { , . . . , N } . At each discrete time n an edge ( i, j ) is chosen at randomfrom the network. Nodes i and j will update their opinions x i ( n ) and x j ( n ) if their opiniondifference | x i ( n ) − x j ( n ) | is below a threshold (cid:15) . The update rule is x i ( n + 1) = x i ( n ) + µ ( x j ( n ) − x i ( n )) ,x j ( n + 1) = x j ( n ) + µ ( x i ( n ) − x j ( n )) , where µ ∈ (0 , .
5] is a parameter that represents how much individuals are willing tochange their opinion. If | x i ( n ) − x j ( n ) | ≥ (cid:15) then no change occurs at time n + 1. Thedynamics eventually lead to clusters of individuals in the opinion space with membersof the same cluster having the same opinion in the limit n → ∞ [7, 1]. On completegraphs clusters form based on opinion distance alone, while on other networks note thatindividuals whose opinions are within the (cid:15) threshold of each other may be disconnectedon the network; hence, clusters in the latter context are formed both through individuals’opinions and their positions on the network. To illustrate the effect that network structure can have on the dynamics, we simulate theDeffuant model on networks from a configuration model with two degree classes. Eachnetwork has N = 10 nodes, 10% of which (the minority ) have degree k min = 100 whilethe majority have degree k maj . We consider two cases: (i) k maj = 5 and (ii) k maj = 25. Ineach simulation a new network is generated along with a set of initial opinions which aredrawn from a uniform distribution on [0 , simulations with (cid:15) = 0 . µ = 0 . k maj . The time t is measured as the number of timestepsdivided by N/ a) (b)(b) t = t = t = t = x k maj = 25 k maj = 5 Complete graph Figure 1: Time evolution of the opinion distribution, averaged over simulations, on con-figuration model networks ( N = 10 ) where 90% of nodes have degree k maj and 10% ofnodes have degree 100. Snapshots are shown at the times labelled on the vertical axis(earliest time on top). Two cases are considered: k maj = 25 and k maj = 5; the latter casehas lower connectivity. For comparison, the results on a complete graph (correspondingto the original MF approximation of [1]) are also shown. One central cluster forms for k maj = 25 (a), while for k maj = 5 smaller clusters also persist at the boundaries of theopinion space (b).Figure 1 shows the time evolution of the opinion distribution for the two cases k maj =25 and k maj = 5, averaged over simulations, compared with the average opinion distri-bution from simulations on a complete graph. Firstly, note that the behaviour for thegraph with k maj = 25 is similar to that of the complete graph, with one cluster formingat x ≈ .
5. While this large central cluster also appears in the k maj = 5 case, we alsosee clusters persisting near the boundaries of the opinion space. As the distribution isquite flat at the boundaries these clusters may seem small, however they make up over20% of the network. Note that the complete-graph case does not display these boundaryclusters. The distribution of opinions within each degree class is shown in Fig. 2. Thehigher degree nodes form one cluster at x ≈ .
5. For the lower degree nodes, while manyare pulled towards the centre, a portion remain closer to the boundaries.It is useful to think of two types of network in this process: the underlying staticnetwork and a temporal network in which nodes are connected if they are both connectedin the underlying network and close enough in the opinion space to influence each other.Observations of individual simulations show that nodes, typically those with low degrees,become disconnected in the temporal network as their neighbours move away from themin the opinion space. An example of the temporal network (with N = 1000 for visual-4 = t = t = t = x Degree 100 Degree 5
Figure 2: The distribution of opinions within each degree class on a configuration modelnetwork with 90% degree-5 nodes and 10% degree-100 nodes.ization purposes) once the system has converged is shown in Fig. 3. The colour of thenode represents its location in the opinion space (greyscale where 0=black and 1=white).Approximately 80% of nodes form a large connected component with opinions close to 0.5,whereas 20% of nodes, all of which have degree 5 (indicated by the dark blue boundary),become disconnected from the large connected component. Due to the small number ofconnections between the low degree nodes, they are either completely isolated or formclusters with 1 or 2 other nodes. When this individual simulation is represented in termsof its opinion distribution, there is a large peak at 0.5 along with many smaller peaksat the boundaries. These smaller peaks, when averaged over many simulations, yield theuniform-like portions at the boundaries in Figs. 1 and 2.
To approximate the dynamics on a configuration-model network with degree distribution q k (i.e., q k is the probability that a randomly-chosen node has degree k ), we make anannealed network assumption, which is that at each time step the edges of the networkare all assumed to be rewired, while the individual nodes retain their degree. This meansthat the network at each time step is one of the ensemble of networks with the prescribeddegree distribution [2]. In a given time step, the probability that a node is connected to,and therefore chosen for interaction with, a node in degree class k is the same for any nodein that class. Under this assumption we need not know the opinions of each individualnode in the class, only the distribution of opinions within the class. We define the densities P k ( x, t ) for each distinct degree class k such that (in the limit dx → P k ( x, t ) dx is the5igure 3: The temporal network for one simulation on a configuration model network with90% degree 5 nodes and 10% degree 100 nodes ( N = 1000) once the system has converged.Links exist between pairs of nodes who can interact, i.e., are connected in the networkand have opinion difference less than (cid:15) . 80% of nodes form one cluster with opinions closeto 0.5 (grey fill). The rest, in this case all degree 5 nodes (dark blue boundary), formsmall clusters closer to the boundaries of the opinion space (black is opinion 0, white isopinion 1).probability that the opinion of a k -degree node lies in the interval [ x, x + dx ) at time t .We can write down a continuous-time equation for P k ( x, t ) by calculating the expectedchange in the number of degree k nodes with opinion in [ x, x + dx ) in an infinitesimaltime step dt as follows. The expected number of nodes of degree k is (for large N ) N q k ,and the fraction of these with opinions in [ x, x + dx ) is P k ( x, t ) dx , so the expected changeover the time increment dt can be written as N q k P k ( x, t + dt ) dx − N q k P k ( x, t ) dx =Expected number of degree- k nodes whose opinions move inside [ x, x + dx ) in dt − Expected number of degree- k nodes whose opinions move outside [ x, x + dx ) in dt, (1)where the time step dt = 2 /N is chosen such that one pair of nodes interact at each timestep. Note that the limit N → ∞ corresponds to the continuous-time limit dt → i with degree k and opinion y . We define π kl to be the probability that an edgeexists between a node chosen at random from all degree k nodes and a node chosen atrandom from all degree l nodes . The probability that node i is chosen for interaction In terms of the adjacency matrix for the network, π kl = (cid:80) i : deg ( i )= k (cid:80) j : deg ( j )= l A ij /N q k N q l whichis the ratio of the number of edges that exist between degree k and degree l nodes and the number ofpossible edges (if all pairs of nodes were connected). l node in dt is Nq l π kl | E | , where | E | = N (cid:80) k (cid:80) l q k q l π kl is the number of edgesin the network . It is useful to write this probability in terms of the graph density γ = | E | N , which is the ratio of the number of edges in the network to the number ofpossible edges in the large N limit ( γ = 1 on a complete graph); the probability thatnode i is chosen for interaction with a degree l node is then q l π kl Nγ . Node i will onlybe influenced to change its opinion if the degree l node has opinion z ∈ ( y − (cid:15), y + (cid:15) ),in which case node i will move its opinion to y + µ ( z − y ). This new opinion will bein [ x, x + dx ) for z ∈ (cid:104) y + µ ( x − y ) , y + µ ( x − y ) + dxµ (cid:17) . The proportion of degree l nodes with such opinions is P l (cid:16) y + µ ( x − y ) , t (cid:17) dxµ . Thus, the probability that node i hasopinion in [ x, x + dx ) after interacting with a degree l node is q l π kl Nγ P l (cid:16) y + µ ( x − y ) , t (cid:17) dxµ .Summing over all degree classes, the probability that node i moves its opinion to [ x, x + dx )in dt is (cid:88) l q l π kl N γ P l (cid:18) y + 1 µ ( x − y ) , t (cid:19) dxµ . This probability is the same for any degree k node with opinion y , of which there are N q k P k ( y, t ) dy . Integrating over y , we get the expected number of degree k nodes whomove to opinion [ x, x + dx ) in dt , (cid:88) l q k q l π kl γ (cid:90) | x − y | <(cid:15)µ µ P k ( y, t ) P l (cid:18) y + 1 µ ( x − y ) , t (cid:19) dx dy, (2)where the domain of integration comes from the constraint for z ∈ ( y − (cid:15), y + (cid:15) ).Now, to calculate the negative contribution of the right hand side of Eq. (1), considera node j with degree k and opinion in [ x, x + dx ). Node j will change its opinion ifit interacts with a node with opinion y such that | x − y | < (cid:15) . The probability of thishappening is (cid:90) | x − y | <(cid:15) (cid:88) l q l π kl N γ P l ( y, t ) dy. The number of nodes with degree k and opinion in [ x, x + dx ) is N q k P k ( x, t ) dx and sothe expected number of degree k nodes who move outside of [ x, x + dx ) in dt is (cid:88) l q k q l π kl γ (cid:90) | x − y | <(cid:15) P k ( x, t ) P l ( y, t ) dy dx. (3)Inserting expressions (2) and (3) into the right hand side of Eq. (1), we obtain N q k P k ( x, t + dt ) dx − N q k P k ( x, t ) dx = (cid:88) l q k q l π kl γ (cid:20)(cid:90) | x − y | <(cid:15)µ µ P k ( y, t ) P l (cid:18) y + 1 µ ( x − y ) , t (cid:19) dx dy − (cid:90) | x − y | <(cid:15) P k ( x, t ) P l ( y, t ) dy dx (cid:21) . (4) On a network with no self-edges, the number of edges is | E | = (cid:80) k [ (cid:80) l (cid:54) = k N q k N q l π kl − N q k ( N q k − π kk ]. In the limit N → ∞ this is | E | = N (cid:80) k (cid:80) l q k q l π kl . Again, on a network with no self-edges the graph density is γ = | E | N ( N − , and the probability thatnode i is chosen for interaction with a degree k node is Nq k k − π kk N γ . However the quantities defined inthe text assume the limit N → ∞ will be taken.
7e assume the ensemble of networks is from a configuration model, in which case π kl = klN (cid:104) k (cid:105) , where (cid:104) k (cid:105) = (cid:80) k kq k is the average degree . Rearranging Eq. (4) and taking thelimit as dt = 2 /N →
0, assuming the number of degree classes and the degree distributionare fixed, we get ∂P k ( x, t ) ∂t = (cid:88) l klq l (cid:104) k (cid:105) (cid:20) µ (cid:90) | x − y | <(cid:15)µ P k ( y, t ) P l (cid:18) y + 1 µ ( x − y ) , t (cid:19) dy − (cid:90) | x − y | <(cid:15) P k ( x, t ) P l ( y, t ) dy (cid:21) . (5)Once we have the densities within each class, we can obtain the opinion density overthe network, P ( x, t ) = (cid:88) k q k P k ( x, t ) . We solved Eq. (5) numerically for two degree classes, k = 5 and k = 100 ( q k =0 . , q k = 0 . (cid:15) = 0 . µ = 0 . . The total distribution P ( x, t ) is shown in Fig. 4 together with the dis-tribution from the simulations as described in section 2. The degree-based MF equationsprovide a good approximation to the simulations, and in particular they correctly predictthe behaviour at the extremes of the opinion space where many of the degree 5 nodespersist. The two distributions begin to diverge at later times as the distribution fromthe degree-based MF equations (which assumes the N → ∞ limit) evolves towards adelta-function spike at x = 0 .
5, while the finite-size network in simulations retains somegranularity in opinions. This is expected, however, since the amplitude of any peak inthe distribution from the simulations will be limited by the network size (the effect ofnetwork size on simulation results is discussed at the end of section 5).
One of the key assumptions in deriving the degree-based MF equations is that there isthe same probability of connecting any degree k node to any degree l node. However,there are many networks where this assumption is violated. For example, in a networkwith community structure the probability of a degree k node being connected to a degree l node will be higher if the two nodes are in the same community than if they are indifferent communities.We can extend the degree-based MF equations by partitioning the network into moregeneral classes. Suppose we have a network with N nodes which can be partitioned into K classes with a proportion q k of nodes in class k . We assume that this network comes When a configuration model network is constructed, each node i is assigned a degree k i which isrepresented as a stub (half-edge). Two stubs are chosen at random and connected to form an edge.Then, two further stubs are chosen at random from the remaining stubs and connected. This continuesuntil all stubs have been connected. Consider a node i with degree k and a node j with degree l . If wetake a stub of node i , the probability that this is connected to one of node j ’s stubs is l/ | E | , where 2 | E | is the total number of stubs (twice the number of edges in the network). The probability that any ofnode i ’s stubs connects to any of node j ’s, i.e., the probability that there is an edge between node i andnode j , is kl/ | E | . Now | E | = N (cid:104) k (cid:105) /
2, and so π kl = klN (cid:104) k (cid:105) . We checked that the results are visually unchanged if a larger number of states is used. = t = t = t = x Simulations Degree−based MF
Figure 4: The distribution of opinions on a configuration model network in which 10% ofnodes have degree 100 and 90% of nodes have degree 5.from an ensemble of networks such that when we choose a network at random, and twonodes at random from that network, the probability that they are connected will dependonly on the classes to which they belong. We can then take the same approach as insection 3, where π kl is now the probability that an edge exists between a node chosen atrandom from class k and a node chosen at random from class l and P k ( x, t ) is the opiniondensity for nodes in class k .The derivation for general classes is the same as for degree-classes up until the pointwhere we specify π kl , and so Eq. (4) holds for this more general π kl . We assume thenormalised edge probabilities π kl (cid:80) m (cid:80) n π mn do not depend on N , which allows us to take thelimit dt = 2 /N → ∂∂t P k ( x, t ) = (cid:88) l q l π kl γ (cid:20) µ (cid:90) | x − y | <(cid:15)µ P k ( y, t ) P l (cid:18) y + 1 µ ( x − y ) , t (cid:19) dy − (cid:90) | x − y | <(cid:15) P k ( x, t ) P l ( y, t ) dy (cid:21) . (6)The original MF equation [1] can be recovered from Eq. (6) with 1 degree class ( q k = 1)and µ = 1 /
2. In fact this is independent of the edge probability π kk , which indicatesthat the dynamics are the same on complete graphs ( π kk = 1) and Erd˝os R´enyi graphs( π kk = p ) for any edge probability p , as has previously been shown in simulation studies[13]. 9 .00 0.25 0.50 0.75 1.00 x P ( x , ) Community 1 Community 2 Whole network
Figure 5: The initial distribution of opinions within each community and over the wholenetwork for the simulations on SBM networks.
In a network with community structure there are, on average, more connections betweennodes in the same community than between nodes in different communities. If there isgreater variance in the initial opinions across communities than within them, we mightexpect nodes within the same community to become closer in the opinion space whilenodes in different communities become separated from each other. It is natural then touse the class-based MF equations to approximate the dynamics on these networks.The stochastic block model (SBM) is a random graph model which can produce net-works with community structure. Nodes are assigned to groups and each pair of nodes isconnected with a probability dependent on their group membership. If this probability ishigher for nodes in the same group than nodes in different groups then the network willhave a community structure. We simulate the dynamics on networks generated from thismodel with N = 10 nodes and two equally sized communities, where the probability ofan edge between two nodes in the same community is p w = 0 . p b = 0 .
01. Each node is assignedan initial opinion from a truncated normal distribution with mean 0.2 or 0.8, dependingon which community that node belongs to, and standard deviation 0.25. The initial dis-tribution in each community, and the distribution over the whole population, is shownin Fig. 5. As in the example of section 2.2, (cid:15) = 0 . µ = 0 .
5. We also simulate thedynamics on a complete graph with the same initial distribution of opinions.The opinion distribution at a number of time points is shown in Fig. 6. On the SBMnetwork the two communities become separated in the opinion space, while on a completegraph consensus emerges. The distribution calculated from the class-based MF equationsis a good match to the distribution from the simulations. As we would expect, the originalMF equation predicts the central cluster that we see on the complete graph.10 = t = t = t = x Sim. SBM network Class−based MFSim. complete graph Original MF
Figure 6: Opinion distribution, averaged over simulations, on a SBM network with p w =0 . p b = 0 .
01 and on a complete graph, together with the distributions from the twoMF approximations.Not all networks generated from the stochastic block model have community structure.If p b = p w then there are as many connections between communities as within communi-ties. Since nodes can be influenced as much from agents outside of their community asfrom those within it, this leads to consensus throughout the network as can be seen inFig. 7 for p b = p w = 0 .
1. In this case we do not need a class-based approach to approxi-mate the dynamics as the original MF equation is sufficient, and in fact for p b = p w theclass-based MF equations reduce to the original MF equation.Even when p b (cid:54) = p w the community structure may not be very pronounced and theoriginal MF equations might be sufficient to describe the dynamics. Figure 8 shows thedistributions from simulations on SBM networks for p w = 0 . p b = 0 . , .
04 and 0 . p b = 0 .
02 a class-based approach is needed to pick up the two clusters that form. Forlarger values of p b the original MF equation correctly predicts the qualitative behaviour,although as we would expect it does not provide as good a fit to the distribution as theclass-based MF does.This behaviour can to some extent be predicted from a closer inspection of Eq. (6).The strength of the coupling between the opinion distributions is controlled by the ra-tio of the coefficients within an equation, q π /γq π /γ . The two communities are of equalsize, so this ratio is p b p w . For p b = 0 the distributions become uncoupled and we gettwo systems evolving independently in the original MF regime, resulting in polarization.For p b = p w the system of equations can be reduced to the original MF equation with11 = t = t = t = x Simulations Class−based MF Original MF
Figure 7: Opinion distribution on a SBM network with p w = 0 . p b = 0 . P ( x, t ) = ( P ( x, t ) + P ( x, t )) and in this setting we get consensus. At an intermediatevalue p ∗ b ≈ . p b < p ∗ b the coupling is not strong enough toprevent polarization, while for p b > p ∗ b the coupling is strong enough to result in consensus.For most of the examples we have shown, the distribution from the simulations clearlystarts to diverge from the MF distribution at later times. This is because we are approxi-mating the dynamics on a finite sized network using an equation that is valid in the limitof large network size. Figure 9 shows that as we increase the size of the network, thelength of time for which the MF equations accurately predict the simulated distributionincreases. This effect will be more apparent in section 6 when we simulate the dynamicson real-world networks which are somewhat smaller than those we have simulated; the keypoint, however, is that the proposed MF approximation accurately predicts the locationsof the clusters. In the previous section we showed that the class-based MF is needed to accurately ap-proximate the opinion distribution on networks with community structure. However, ourexamples were limited to large synthetic networks. We now compare the class-based MFapproximation with simulations on three real-world networks with community structure:Zachary’s Karate Club network [21], a network of books on politics sold by Amazon.com[11] and two co-voting networks from the U.S. House of Representatives [12, 19]. Thenetworks chosen have ground-truth communities which offer a natural partition of thenetwork into classes.For each network we average over 10 Monte Carlo simulations. Each node takes an12 .00 0.25 0.50 0.75 1.00 x P b = 0. 02 x P b = 0. 04 x P b = 0. 06 Simulations Class−based MF Original MF
Figure 8: Opinion distributions on SBM networks for p b = 0 . , .
04 and 0 .
06 with p w = 0 .
1, all at t = 25.initial opinion from a truncated normal distribution with a mean that depends on theclass of the node and a standard deviation of 0.25. We calculate the edge probabilities forthe class-based MF equations by summing the number of edges between the two classesand dividing by the number of possible edges ( N q k q l for different classes, N q k ( N q k − Zachary’s Karate Club network [21] documents the friendships of 34 members of a karateclub. Two communities correspond to a split in the club after a disagreement betweenthe administrator of the club and the club’s instructor. We assign initial opinions tocommunity one (two) from a truncated normal distribution with mean 0.2 (0.8) andstandard deviation 0.25. Simulations of the dynamics on this network show that twoclusters form in the opinion space, which correspond to the two communities, see Fig. 10.The class-based MF equations capture these clusters, although the opinion profile startsto diverge from that of the simulations quite early since the network has only 34 nodes.In contrast, the original MF equation incorrectly predicts consensus on this network.13 = t = t = t = x MF N=100 N=1000 N=10000
Figure 9: Opinion distributions on SBM networks with p w = 0 . p b = 0 .
01 for differentnetwork sizes and from the class-based MF approximation. t = t = t = t = x Simulations Class−based MF Original MF
Figure 10: Distribution of opinions on Zachary’s karate club network.14 = t = t = t = x Simulations Class−based MF Original MF
Figure 11: Distribution of opinions on the politics books network.
We next look at a network of 105 books on US politics [11] which were sold by Ama-zon.com. Edges exist between books which were frequently co-purchased by the samebuyers. The network is partitioned into communities based on the book’s classification as‘liberal’, ‘neutral’ or ‘conservative’; we assign a mean of 0.2, 0.5 and 0.8 respectively tothe initial distribution for each community. In this case, much like the karate club case,the class-based MF equations predict the two clusters as per the simulations, while thestandard MF equation predicts consensus as shown in Fig. 11.
Finally, we consider two co-voting networks from the US House of Representatives, the91st (1969-1971) and the 108th (2003-2005) [12, 19]. Edges exist between members whovoted the same way on more than 50% of bills, and the networks are partitioned basedon party membership. We chose the 108th House as this had one of the highest ratios ofwithin-party edges to between-party edges, and the 91st as it had one of the lowest. Thesenetworks are shown in Fig. 12. Following our other studies, we assign initial mean opinionsaccording to the group membership with 0.2 for Democrats and 0.8 for Republicans.For the 108th House network we obtain similar results to those of the karate club andthe politics books networks, with two clusters forming in the opinion space, see Fig. 13.Note, however, that the class-based MF approximation matches the simulation results forlonger here than in the previous two cases, which is expected for a larger network. Fig 14shows that on the network for the 91st House, which has very low modularity, consensusis formed. As there are almost as many edges between groups as there are within groups,15igure 12: Co-voting networks in the 91st and 108th U.S. House of Representatives. Edgesexist between members who voted the same way on at least 50% of bills. t = t = t = t = x Simulations Class−based MF Original MF
Figure 13: Distribution of opinions on the 108th House of Representatives co-votingnetwork.the dynamics evolve on this network in a similar way to the dynamics on a completegraph. While the class-based MF equations provide a slightly better approximation thanthe standard MF equation, both approaches match the simulation results quite well.16 = t = t = t = x Simulations Class−based MF Original MF
Figure 14: Distribution of opinions on the 91st House of Representatives co-voting net-work.
The class-based MF equations accurately predict the qualitative behaviour of the dynam-ics on the four real-world networks we have studied. They are also quantitatively veryaccurate, although as expected this accuracy decreases at later times due to finite-sizeeffects. Figure 15 shows the root mean square error (RMSE) as a measure of distancebetween the density from the simulations and the density from the MF equations for eachnetwork over time. The error is much lower for the class-based MF approximation thanthe original MF approximation on the networks with higher modularity, echoing whatwe saw earlier. The difference in error is much lower on the 91st House of Representa-tives network since this has very low modularity and the original MF is already a goodapproximation to the dynamics in this case.On the Karate Club network the RMSE for the class-based MF begins to exceed theRMSE for the original MF at t ≈ .
5. If we take the difference in RMSE (class-based MF − original MF) then we see negative values at later times, as Table 1 shows. However, wealso see these negative values on the SBM network with N = 100 nodes. As previouslymentioned, the quantitative behaviour of the MF approximation is only accurate up toa certain time, which depends on the network size, and this should be kept in mindwhen using metrics that directly compare the opinion distributions. At later times thequalitative behaviour should be considered instead, and it is clear from Fig. 10 that theclass-based MF approximation correctly predicts the emergence of two distinct clustersin the opinion space, which the original MF approximation fails to do.17able 1: Network size, modularity and performance metrics for the MF approximationson 4 real world networks and SBM networks with p w = 0 .
1. The modularity for eachSBM network is the average over 10 simulations. The difference in RMSE is the RMSEfor the class-based MF minus the RMSE for the original MF. Positive values indicate thatthe proposed class-based MF was a better approximation to the simulation distributionthat the original MF.Network Number Modularity Difference in MF correctly predictsof nodes RMSE consensus/polarizationt = 3 t = 10 Class-based OriginalKarate club 34 0.37 0.04 -0.68 Yes NoPolitics books 105 0.41 0.17 0.04 Yes No108th House 440 0.47 0.30 1.12 Yes No91st House 448 0.05 0.01 0.05 Yes YesSBM p b = 0.01 10 < .
01 0.00 0.00 Yes Yes p b = 0 .
01 10 .0 2.5 5.0 7.5 10.0 t r m s e Class−based MFOriginal MF
Network
Karate clubPolitics books108th House91st House
Figure 15: Root mean square error between the density from the simulations and thedensity from the MF approximation.
In this paper we have considered mean-field approximations for the Deffuant opinion dy-namics on networks. We derived a system of equations for the evolution of degree-baseddensity functions and showed that the solution of these equations improves over the origi-nal, fully-mixed, mean-field approximation of [1] in cases where the network is sufficientlydifferent from a complete graph. We extended the scope of the MF approximation bygeneralizing from degree-based classes to arbitrary class labels, and demonstrated theutility of this method for describing dynamics on networks with community structure.One limitation of the MF approximation is that it is derived under the assumption ofinfinite network size (i.e., in the limit N → ∞ ). Indeed, our comparisons with Monte Carlosimulations show that the accuracy of the approximation is better for large networks thanfor small ones, see Fig. 9. Despite this, and other limitations of MF approximations onreal-world networks [15], we find reasonable qualitative agreement between the predictionsof the MF equations and Monte Carlo simulations on real-world networks of modest size( N ranging from 34 to 448). The quantitative agreement is reduced at later times asthe finite-size effects cause the long-term opinion density to differ from that of the MFapproximation.A MF approach is useful because it is more computationally efficient than Monte Carlosimulation of dynamics, particularly on large networks. We can also gain some insightfrom a mathematical analysis of the MF equations, and simply writing down the equationsfor a given network can afford some understanding of the dynamics. On an Erd˝os R´enyigraph, for example, the class-based MF equations reduce to the original MF equation,19ndicating that the dynamics on these networks are the same as on a complete graph. Onstochastic block model networks, we can deduce that a bifurcation occurs at some valueof p b p w , the ratio of between community edges to within community edges. Below this valuethe network becomes polarized while above it consensus is reached.The success of the MF approximation for Deffuant dynamics opens the possibility offurther extensions of the methods used here. An abundance of opinion dynamics modelsexist, and understanding how these models differ is an important challenge in computa-tional social science [8]. Even the Deffuant model has several variants on networks. Take,for example, the selection of the interacting agents in each timestep: in our work, as inthe original formulation of the model, an edge is chosen at random from the network [7],while in other studies an agent is chosen at random together with one of their neighbours[20, 16]. Applying a similar approach as used here to derive the generalised MF approxi-mation for other cases could aid in understanding how these apparently small changes inthe model specifications impact the dynamics.We hope that this work has demonstrated the potential usefulness of generalized MFapproximations for dynamics with continuous-valued nodal variables, and we anticipatefurther extensions of the approximation scheme to a range of dynamics on networks. Acknowledgements
This work is partly supported by the Irish Research Council (S.F.), by Science FoundationIreland (grant numbers 16/IA/4470, 16/RC/3918, 12/RC/2289 P2 and 18/CRT/6049)with co-funding from the European Regional Development Fund (J.G.) and by the Eu-ropean Research Council (ERC) under the European Union’s Horizon 2020 research andinnovation programme (M.Q., grant agreement No. 802421).
References [1] E. Ben-Naim, P.L. Krapivsky, and S. Redner. Bifurcations and patterns in compro-mise processes.
Physica D: Nonlinear Phenomena , 183(3-4):190–204, 2003.[2] Ginestra Bianconi.
Multilayer Networks . Oxford University Press, 2018.[3] Christian Bick, Marc Goodfellow, Carlo R Laing, and Erik A Martens. Understandingthe dynamics of biological and neural oscillator networks through exact mean-fieldreductions: a review.
The Journal of Mathematical Neuroscience , 10(1):1–43, 2020.[4] Adri´an Carro, Ra´ul Toral, and Maxi San Miguel. The noisy voter model on complexnetworks.
Scientific Reports , 6(1), 2016.[5] Claudio Castellano, Matteo Marsili, and Alessandro Vespignani. Nonequilibriumphase transition in a model for social influence.
Physical Review Letters , 85(16):3536–3539, 2000.[6] Hanshuang Chen and Guofeng Li. Phase transitions in a multistate majority-votemodel on complex networks.
Physical Review E , 97(6), 2018.207] Guillaume Deffuant, David Neau, Frederic Amblard, and G´erard Weisbuch. Mixingbeliefs among interacting agents.
Advances in Complex Systems , 03(01n04):87–98,2000.[8] Andreas Flache, Michael M¨as, Thomas Feliciani, Edmund Chattoe-Brown, GuillaumeDeffuant, Sylvie Huet, and Jan Lorenz. Models of social influence: Towards the nextfrontiers.
Journal of Artificial Societies & Social Simulation , 20(4), 2017.[9] Y´erali Gandica, Marcelo del Castillo-Mussot, Gerardo J. V´azquez, and Sergio Rojas.Continuous opinion model in small-world directed networks.
Physica A: StatisticalMechanics and its Applications , 389(24):5864–5870, 2010.[10] Paul L Krapivsky and Sidney Redner. Dynamics of majority rule in two-state inter-acting spin systems.
Physical Review Letters https://voteview.com/ , 2020.[13] X Flora Meng, Robert A Van Gorder, and Mason A Porter. Opinion formation anddistribution in a bounded-confidence model on various networks.
Physical Review E ,97(2):022312, 2018.[14] Romualdo Pastor-Satorras and Alessandro Vespignani. Epidemic spreading in scale-free networks.
Physical Review Letters , 86(14):3200–3203, 2001.[15] Mason Porter and James Gleeson.
Dynamical Systems on Networks . Springer Inter-national Publishing, 2016.[16] D. Stauffer and H. Meyer-Ortmanns. Simulation of consensus model of Deffuantet al. on a Barab´asi-Albert network.
International Journal of Modern Physics C ,15(02):241–246, 2004.[17] F Vazquez and S Redner. Ultimate fate of constrained voters.
Journal of Physics A:Mathematical and General , 37(35):8479–8494, 2004.[18] D. Vilone, A. Vespignani, and C. Castellano. Ordering phase transition in the one-dimensional Axelrod model.
The European Physical Journal B - Condensed Matter ,30(3):399–406, 2002.[19] Andrew Scott Waugh, Liuyi Pei, James H Fowler, P Mucha, and Mason AlexanderPorter. Party polarization in congress: A network science approach. 2011.[20] G. Weisbuch. Bounded confidence and social networks.
The European PhysicalJournal B - Condensed Matter , 38(2):339–343, 2004.[21] Wayne W Zachary. An information flow model for conflict and fission in small groups.