1 Message Passing Optimization of Harmonic Influence Luca Vassio, Fabio Fagnani, Paolo Frasca and Asuman Ozdaglar

Abstract—This paper proposes a new measure of node central- and the rest are regular agents. We define the HIC of node ` ity in social networks, the Harmonic Influence Centrality, which as the asymptotic value of the average opinion when node ` emerges naturally in the study of social influence over networks. switches from a regular agent to a type one stubborn agent. Using an intuitive analogy between social and electrical networks, we introduce a distributed message passing algorithm to compute This measure hence captures the long run influence of node ` the Harmonic Influence Centrality of each node. Although its on the average opinion of the . design is based on theoretical results which assume the network The HIC measure, beside its natural descriptive value, is to have no , the algorithm can also be successfully applied also the precise answer to the following network decision on general graphs. problem: suppose you would like to have the largest influence on long run average opinion in the network and you have the capacity to change one agent from regular to type one I.INTRODUCTION stubborn. Which agent should be picked for this conversion? A key issue in the study of networks is the identification This question has a precise answer in terms of HIC; the agent of their most important nodes: the definition of prominence with the highest HIC should be picked. is based on a suitable function of the nodes, called centrality Though the HIC measure is intuitive, its centralized compu- measure. The appropriate notion of centrality measure of a tation in a large network would be challenging in terms of its node depends on the nature of interactions among the agents informational requirements that involve the network topology situated in the network and the potential decision and control and the location of type zero stubborn agents. We propose objectives. In this paper, we define a new measure of centrality, here a decentralized algorithm whereby each agent computes which we call Harmonic Influence Centrality (HIC) and which its own HIC based on local information. The construction emerges naturally in the context of social influence. We explain of our algorithm uses a novel analogy between social and why in addition to being descriptively useful, this measure electrical networks by relating the Laplace equation resulting answers questions related to the optimal placement of different from social influence dynamics to the governing equations of agents or opinions in a network with the purpose of swaying electrical networks. Under this analogy, the asymptotic opinion average opinion. In large networks approximating real world of regular agent i can be interpreted as the voltage of node i social networks, computation of centrality measures of all when type zero stubborn agents are kept at voltage zero and nodes can be a challenging task. In this paper, we present type one agents are kept at voltage one. This interpretation a fully decentralized algorithm based on message passing for allows us to use properties of electrical circuits and provide a computing the HIC of all nodes, which converges to the correct recursive characterization of HIC in trees. Using this charac- values for trees (connected networks with no cycles), but can terization, we develop a so called message passing algorithm also be applied to general networks. for its solution, which converges after at most a number of Our model of social influence builds on recent work [1], steps equal to the diameter of the tree. The algorithm we which characterizes opinion dynamics in a network consisting propose runs in a distributed and parallel way among the of stubborn agents who hold a fixed opinion equal to zero nodes, which do not need to know the topology of the whole or one (i.e., type zero and type one stubborn agents) and network, and has a lower cost in terms of number of operations regular agents who hold an opinion xi ∈ [0, 1] and update with respect to the centralized algorithm recently proposed it as a weighted average of their opinion and those of their in [15]. Although originally designed for trees, our algorithm neighbors. We consider a special case of this model where can be employed in general networks. For regular networks a fixed subset of the agents are type zero stubborn agents with unitary resistances (corresponding to all agents placing equal weights on opinions of other agents), we prove that this L. Vassio is with Dipartimento di Ingegneria Meccanica e Aerospaziale, algorithm converges (although not necessarily to the correct Politecnico di Torino, Corso Duca degli Abruzzi 24, 10129 Torino, Italy. Tel: +39-339-2868999. [email protected]. HIC values). Moreover, we show through simulations that the F. Fagnani is with Dipartimento di Scienze Matematiche, Politecnico di algorithm performs well also on general networks. Torino, Corso Duca degli Abruzzi 24, 10129 Torino, Italy. Tel: +39-011- 0907509. [email protected]. P. Frasca is with Department of Applied Mathematics, University of Twente, A. Related works Drienerlolaan 5, 7522 NB Enschede, the Netherlands. Tel: +31-53-4893406. [email protected]. In social science and there is a large A. Ozaglar is with LIDS, Massachusetts Institute of Technology, 77 Mas- sachusetts Avenue, Cambridge, 02139 Massachusetts. Tel: +1-617-3240058. literature on defining and computing centrality measures [6]. [email protected]. Among the most popular definitions, we mention 2 centrality, node betweenness, information centrality [11], and be the degree of node i. A graph in which all nodes have Bonacich centrality [3], which is related to the well-known degree d is said to be d-regular. A in G is a sequence Google PageRank algorithm. These notions have proven useful of nodes γ = (j1, . . . js) such that {jt, jt+1} ∈ E for every in a range of applications but are not universally the appropri- t = 1, . . . , s − 1. The path γ is said to connect j1 and js. The ate concepts by any means. Our interest in opinion dynamics path γ is said to be simple if jh 6= jk for h 6= k. A graph thus motivates the choice to define a centrality measure for is connected if any pair of distinct nodes can be connected our purposes. by a path (which can be chosen to be simple). The length As opposed to centralized algorithms, the interest for dis- of the shortest path between two nodes i and j is said to tributed algorithms to compute centrality measures has risen be the between them, and is denoted as dst(i, j). more recently. In [7] a randomized algorithm is used to Consequently, the diameter of a connected graph is defined compute PageRank centrality. In [14] distributed algorithms to be diam(G) := maxi,j∈I {dst(i, j)}. A tree is a connected are designed to compute node and edge betweenness on trees, graph such that for any pair of distinct nodes there is just but are not suitable for general graphs. one simple path connecting them. Finally, given a graph G = Message passing algorithms have been widely studied and (I,E) and a subset J ⊆ I, the subgraph induced by J is are commonly used in artificial intelligence and information defined as G|J = (J, E|J ) where E|J = {{i, j} ∈ E | i, j ∈ theory: they have demonstrated empirical success in numerous J}. applications including low-density parity-check codes, turbo codes, free energy approximation, and satisfiability problems II.OPINIONDYNAMICSANDSTUBBORNAGENT (see e.g. [10] [4] [13] [8]). In such algorithms, nodes are PLACEMENT thought as objects with computational ability which can send Consider a connected graph G = (I,E). Nodes in I will be and receive information from their neighbors. thought as agents who can exchange information through the Interesting connections between message passing algo- available edges {i, j} ∈ E. Each agent i ∈ I has an opinion rithms and electrical networks are discussed in [12]. Moreover, xi(t) ∈ R possibly changing in time t ∈ N. We assume a electrical networks have also been put in connection with splitting I = S ∪ R with the understanding that agents in S social networks: two notable cases are the notion of resis- are stubborn agents not changing their opinions while those in tance distance [5] and the characterization of R are regular agents whose opinions modify in time according betweenness in [9]. to the consensus dynamics X x (t + 1) = Q x (t) , ∀i ∈ R B. Paper outline i ij j j∈I In Section II we review our model of opinion dynamics where Q ≥ 0 for all i ∈ R and for all j ∈ I and P Q =1 with stubborn agents and we define our problem of interest, ij j ij for all i ∈ R. The scalar Q represents the relative weight that is the optimal placement of a stubborn agent. In Section III ij that agent i places on agent j’s opinion. We will assume that we review basic notions of electrical circuits and explain Q only uses the available edges in G, more precisely, our their connection with social networks. Section IV is devoted standing assumption will be that to apply this electrical analogy on tree graphs and to study the optimal placement problem in this important case. Next, Qij = 0 ⇔ {i, j} 6∈ E (1) in Section V we describe the message passing algorithm to compute the optimal solution on trees, while in Section VI A basic example is obtained by choosing for each regular agent i.e. Q = d−1 we consider its extension to general graphs: we provide both uniform weights along the edges incident to it, , ij i i ∈ R {i, j} ∈ E theoretical results, in Section VI-A, and numerical simulations, for all and . Assembling opinions of regular xR(t) xS(t) in Section VI-B. Final remarks are given in Section VII. and stubborn agents in vectors, denoted by and , we can rewrite the dynamics in a more compact form as R 11 R 12 S C. Notation x (t + 1) = Q x (t) + Q x (t) xS(t + 1) = xS(t) To avoid possible ambiguities, we here briefly recall some notation and a few basic notions of which are where the matrices Q11 and Q12 are nonnegative matrices of used throughout this paper. The cardinality of a (finite) set E appropriate dimensions. is denoted by |E| and when E ⊂ F we define its complement Using the adaptivity assumption (1), it is standard to show as Ec = {f ∈ F | f∈ / E}. A square matrix P is said to be that Q11 is a substochastic asymptotically stable matrix (e.g. R R nonnegative when its entries Pij are nonnegative, substochastic spectral radius < 1). Henceforth, x (t) → x (∞) for t → P when it is nonnegative and j Pij ≤ 1 for every row i, and +∞ with the limit opinions satisfying the relation stochastic when it is nonnegative and P P = 1 for every j ij xR(∞) = Q11xR(∞) + Q12xS(0) (2) i. We denote by 1 a vector of whose entries are all 1. An (undirected) graph G is a pair (I,E) where I is a finite set, which is equivalent to whose elements are said to be the nodes of G and E is a xR(∞) = (I − Q11)−1Q12xS(0) (3) set of unordered pairs of nodes called edges. The neighbor 11 −1 12 P 11 n 12 set of a node i ∈ I is defined as Ni := {j ∈ I|{i, j} ∈ Notice that [(I − Q ) Q ]hk = [ n(Q ) Q ]hk is E}. The cardinality of the neighbor set di := |Ni| is said to always non negative and is nonzero if and only if there 3 exists a path in G connecting the regular agent h to the where 1 is all ones vector with appropriate dimension, the −1 stubborn agent k and not touching other stubborn agents. extension is obtained by putting Q = DC1C. The matrix Q is Moreover, the fact that P is stochastic easily implies that said to be a time-reversible stochastic matrix in the probability P 11 −1 12 k[(I − Q ) Q ]hk = 1 for all h ∈ R: asymptotic jargon. The special case of uniform weights considered before opinions of regular agents are thus convex combinations of fits in this framework, by simply choosing C = AG, where the opinions of stubborn agents. AG is the of the graph. In this case all In this paper we will focus on the situation when S = edges have equal strengths and the resulting time-reversible 0 S ∪ {`} and R = I \ S assuming that xi(0) = 0 for all stochastic matrix Q is known as the simple random walk 0 i ∈ S while x`(0) = 1, i.e., there are two types of stubborn (SRW) on G. agents: one type consisting of those in set S0 that have opinion 0 and the other type consisting of the single agent ` that III.THEELECTRICALNETWORKANALOGY has opinion 1. We investigate how to choose ` in I \ S0 in such a way to maximize the influence of opinion 1 on the In this section we briefly recall the basic notions of electrical limit opinions. More precisely, let us denote as xR,`(∞) the circuits and we illustrate their relation with our problem. A i connected graph G = (I,E) together with a conductance asymptotic opinion of the regular agent i ∈ R under the above I×I stubborn configuration, and define the objective function matrix C ∈ R can be interpreted as an electrical circuit where an edge {i, j} has electrical conductance Cij = Cji X R,` −1 H(`) := xi (∞) (4) (and thus resistance Rij = Cij ). The pair (G, C) will be i∈R called an electrical network from now on. An on G is any matrix B ∈ Notice that the subset R itself is actually a function of `, {0, +1, −1}E×I such that B1 = 0 and B 6= 0 iff i ∈ e. however we have preferred not to indicate such dependence ei It is immediate to see that given e = {i, j}, the e-th row of to avoid too heavy notations. The Optimal Stubborn Agent B has all zeroes except B and B : necessarily one of them Placement (OSAP) is then formally defined as ei ej will be +1 and the other one −1 and this will be interpreted as max H(`). (5) choosing a direction in e from the node corresponding to +1 `∈I\S0 E×E to the one corresponding to −1. Define DC ∈ R to be the In this optimization problem, for any different choice of `, diagonal matrix such that (DC )ee = Cij = Cji if e = {i, j}. 11 12 ∗ the block matrices Q and Q change and a new matrix A standard computation shows that B DC B = DC1 − C. inversion (I −Q11)−1 needs to be performed. Such matrix in- On the electrical network (G, C) we now introduce current versions require global information about the network and are flows. Consider a vector η ∈ RI such that η∗1 = 0: we not feasible for a distributed implementation. In this paper, we interpret ηi as the input current injected at node i (if negative propose a fully decentralized algorithm for the computation of being an outgoing current). Given C and η, we can define asymptotic opinions and for solving the optimization problem the voltage W ∈ RI and the current flow Φ ∈ RE in such which is based on exploiting a classical analogy with electrical a way that the usual Kirchoff and Ohm’s law are satisfied on R,` circuits. Under such analogy, we can interpret xi (∞) as the the network. Compactly, they can be expressed as 0 voltage at node i when nodes in S are kept at voltage 0 while  B∗Φ = η ` is kept at voltage 1. This interpretation results to be quite D BW = Φ useful as it allows to use typical “tricks” of electrical circuits C (e.g. parallel and series reduction, glueing). Notice that Φe is the current flowing on edge e and sign is In order to use the electrical circuit analogy, we will need positive iff flow is along the conventional direction individu- to make an extra “reciprocity” assumption on the weights Qij ated by B on edge e. Coupling the two equations we obtain assuming that they can be represented through a symmetric (DC1 − C)W = η which can be rewritten as I×I matrix C ∈ R (called the conductance matrix) with non −1 L(Q)W = DC1η (7) negative elements and Cij > 0 iff {i, j} ∈ E by imposing where L(Q) := I − Q is the so called Laplacian of Q. Since Cij Qij = , i ∈ I , j ∈ I (6) L(Q) |I|−1 L(Q)1 = 0 P C the graph is connected, has rank and . j ij This shows that (7) determines W up to translations. Notice The value Cij = Cji can be interpreted as a measure of the that (L(Q)W )i = 0 for every i ∈ I such that ηi = 0. For this “strength” of the relation between i and j. For two regular reason, in analogy with the Laplacian equation in continuous nodes connected by an edge, the interpretation is a sort of spaces, W is said to be harmonic on {i ∈ I | ηi = 0}. Clearly, reciprocity in the way the nodes trust each other. Notice that given a subset S ⊆ I and a W ∈ RI which is harmonic c Cij when i ∈ S is not used in defining the weights, but is on S , we can always interpret W as a voltage with input anyhow completely determined by the symmetry assumption. currents given by η = DC1L(Q)W which will necessarily be Finally, the terms Qij when i, j ∈ S do not play any role supported on S. Actually, W is the only voltage harmonic on and for simplicity we can assume they are all equal to 0. By Sc and with assigned values on S. the definition (6) and from matrix C we are actually defining It is often possible to replace an electrical network by a a square matrix Q ∈ RI×I . Compactly, if we consider the simplified one without changing certain quantities of interest. I×I diagonal matrix DC1 ∈ R defined by (DC1)ii = (C1)i, An useful operation is gluing: if we merge vertices having 4 the same voltage into a single one, while keeping all existing I edges, voltages and currents are unchanged, because current ij< >ji never flows between vertices with the same voltage. Another I =I useful operation is replacing a portion of the electrical network I connecting two nodes h, k by an equivalent resistance, a Ii c nodes at voltage 0. For any ` ∈ I \ S0, W denotes the We also define I := I , I := (I ) ∪ {j}, voltage on I such that W (`)(i) = 0 for every i ∈ S0 and I>ij := Iji<, and Iiij. Figure 1 illustrates W (`)(`) = 1. Using this notation and the association between these definitions. limiting opinions and electric voltages provided in (7) and (8), The induced subtrees is denoted using the same apex T := R

T

i j S0 i j

eff eff B. Further properties in case of unitary resistances R

Proposition 2 (Tree decomposition). For every h = 1, . . . , n, K = {i ∈ I|∃s0, s00 ∈ S0such that i belongs to a simple path and for very ` ∈ I h between s0 and s00}. Hbh(`) = H(`) ∀ ` ∈ Ih. Then, (`) Proof. Given ` ∈ Ih, the voltage W (j) is zero for every j argmax H(`) = argmax H(`). such that the (unique) path from j to ` goes through a type `∈I `∈K (`) 0 stubborn node. This implies that W (j) = 0 for every 0 Moreover, if K := {i ∈ K|di ≥ 3}= 6 ∅, then j ∈ I \ Ih. This observation proves the result. Thanks to this property it is sufficient to study the Harmonic argmax H(`) = argmax H(`). `∈I `∈K0 Influence Centrality on the subtrees Tch and then compute Proof. Let j 6∈ K. Then, there exists i ∈ K such that every max H(`) = max max H(`). 0 0 b path from j to S contains i. We claim that H(i) > H(j), `∈I\S h∈{1,...,n} `∈Ih 6

T=(I,E) 0 si є S , iє{1,…,5} s 1 s5 s1 s5 ^ T1 T1 T2 ^ T2

s s 2 4 s4 s2 s4

s3 s3

Fig. 3. A tree with type 0 stubborn nodes in blue, together with its decomposition according to Proposition 2. proving that the optimum must belong to K. Harmonic influ- compute that ences can be computed as follows | − 1 ∂x2 x (R ab> Rab>+1 2R (H (b) − 2 ) X (i) + . H(i) = W (y) + |I | + |I | − 1 . (Rab> + x)2 y∈I(b) ≥ Rab> + 1, this second derivative is nonnegative formula (10), and then H(jx) is convex in x. We conclude that the value

X (j) X (i) in a or in b of the HIC is greater or equal than the value on W (y) < W (y), the nodes having degree two. By this statement, the proof is y∈I. (MPA), which computes the HIC of every node of a tree in a distributed way. We begin by outlining the structure of a Combining these equations with Example 1, we can compute general message passing algorithm on a tree. Preliminarily, define any node i in the graph as the root. In the first phase, X (jx) X (jx) X (jx) H(jx) = W (`) + W (`) + W (`) messages are passed inwards: starting at the leaves, each `∈I `∈Ij1(b) root node. The tree structure guarantees that it is possible to 1 + W 1 + W obtain messages from all other neighbor nodes before passing + a (x − 1) + b (n − x) + 1. 2 2 the message on. This process continues until the root i has obtained messages from all its neighbors. The second phase eff eff R Since, by (11), W (a) = eff and W (b) = eff , involves passing the messages back out: starting at the root, R+n−x+1 we deduce that messages are passed in the reverse direction. The algorithm is completed when all leaves have received their messages.  n − x n − x j ∈ N , notice the following iterative structure of the subtree + Hab>(b) + + + 1. i Rab> + n − x + 1 2 2 rooted in i and not containing j: [ Notice that the above expression naturally determines an I

0 S0 ={v} |S |=2 , S0={v’,v’’} |S |=2 , S ={v’,v’’}

v' v'' a b c d v' v w a b c d v''

K={a,b,c,d} K={a,b,c,d} K’=Ø K’={b,c}

Fig. 4. Three different trees: blue nodes are stubborn and the ones with green stripes are the candidate solutions.

This relation, together with (10), yields Clearly this algorithm terminates in finite time, because as X X soon as a node i has received all messages from its neighbors, H

0 h i j S0 h i j S i j

eff m Rji m Rji R

Fig. 5. Equivalent representation of parallel paths between i and S0. section how to apply the MPA to every graph, with suitable focus on a ‘root’ node, and for all t ∈ N we let the nodes modifications in order to manage the new issues. Namely, we at distance t from the root (the level t of the tree) be the design an “iterative” version of the message passing algorithm nodes whose messages reach the root after t iterations of the of Section V, which can run on every network, regardless message-passing algorithm. Note that if the graph G is a tree, of the presence of cycles. We show that for regular graphs the computation tree is just equal to G; otherwise, it has a with unitary resistances, this algorithm converges (but not number of nodes which diverges when t goes to infinity. As necessarily to the correct HIC values as we demonstrate next). an example, Figure 6 shows the first 4 levels of a sample We also present simulation results that show the algorithm computation tree. In our MPA, each node i is computing its effectiveness in computing the HIC on families of graphs with own Harmonic Influence Centrality in the computation tree cycles. instead than on the original graph. As the number of levels We let the nodes send their messages at every time step, so of the computation tree diverges, the computation procedure that we denote them as may not converge, and –if converging– may not converge to the harmonic influence in the original graph. W i→j(t),Hi→j(t), for all t ≥ 0. The dynamics of messages are A. MPA on regular graphs X This subsection is devoted to prove the following conver- Hi→j(t + 1) = W k→i(t)Hk→i(t) + 1 (17a) gence result. k∈Ni\{j}  −1 Theorem 6 (Convergence of MPA). Consider a connected X 1 − W k→i(t) 0 W i→j(t + 1) = 1 + R graph G = (I,E) with unitary resistances and S ⊆ I.  ij  0 Rik Assume, moreover, that di = d for all nodes i ∈ I \ S . k∈Ni\{j} (17b) Then, the MPA algorithm described by (17), (18), and (19) converges. (where R = C−1 are the edge resistances) if i∈ / S0 and ij ij We start analyzing the behavior of the W variables which Hi→j(t + 1) = 0 (18a) is independent from the H variables. Notice that under the assumptions of Theorem 6 the relations (17b)-(18b) simplifies W i→j(t + 1) = 0 (18b) to otherwise. The initialization is  !−1  i→j  d − P W k→i(t) if i 6∈ S0 H (0) = 1i6∈S0 W i→j(t+1) = i→j (19) k∈Ni\{j} W (0) = 1i6∈S0   0 otherwise By these definitions of messages we have defined the (20) message passing algorithm for general graphs. Additionally, Lemma 7. Under the assumptions of Theorem 6, there exist we should define a termination criterion: for instance, the numbers W i→j ∈ [0, 1[ satisfying, for all {i, j} ∈ E, the fixed algorithm may stop after a number of steps which is chosen point relations a priori. At every time t, each agent i can compute an  −1 approximate H(i)(t) by the formula !  P k→i 0 i→j  d − W if i 6∈ S (t) X k→i k→i W = (21) H(i) = W (t)H (t) + 1. k∈Ni\{j}  k∈Ni 0 otherwise This new algorithm clearly converges to the HIC if the and such that W i→j(t) → W i→j as t → +∞ for all {i, j} ∈ graph is a tree, and the convergence time is not larger than E. the diameter of the graph. Otherwise, the algorithm is not Proof. We already know that the sequence W i→j(t) is guaranteed to converge: furthermore, if the algorithm happens bounded, 0 ≤ W i→j(t) ≤ 1 for all {i, j} ∈ E and for to converge, then the convergence value may be different from all t ≥ 0. Notice now that W i→j(1) ≤ W i→j(0) for all the HIC. {i, j} ∈ E. On the other hand, it is immediate to check, from In order to illustrate the issues caused by the presence of expression (20), that the following inductive step holds true: cycles, we can use the so called computation trees [13], which are constructed in the following way. Given a graph G, we W i→j(t) ≤ W i→j(t − 1) ⇒ W i→j(t + 1) ≤ W i→j(t) 9

(a) Original graph (b) Computation tree (c) Computation tree (d) Computation tree (e) Computation tree (1st iteration) (2nd iteration) (3rd iteration) (4th iteration) 1 1 0 1 1 0 2 3 0 2 3 1 0 2 3 0 2 3 3 2 3 2 3 2 3 2 1 1 1 1

3 2 0 0 2 3

Fig. 6. A graph (a) and computation trees (b) of a MPA from root 1.

This implies that W i→j(t) is a decreasing sequence for all Proposition 9. Under the assumptions of Theorem 6, there {i, j} ∈ E: we thus get convergence to a limit satisfying (21). exist numbers Hi→j ∈ [0, 1[ satisfying, for all {i, j} ∈ E, the Finally, to show that W i→j < 1 for all {i, j}, we notice that fixed point relations i→j k→i ( P W k→iHk→i + 1 if i 6∈ S0 W = 1 ⇒ W = 1 ∀k ∈ Ni \{j} i→j H = k∈Ni\{j} Iterating this argument and being the graph connected we 0 otherwise obtain the absurd statement that W h→` = 1 for h ∈ S0 and and such that Hi→j(t) → Hi→j as t → +∞ for all {i, j} ∈ some ` ∈ N . h E. i→j We can actually say more on the limit numbers W s. Proof. It is convenient to gather the sequences Hi→j(t) into a E Lemma 8. Under the assumptions of Theorem 6, the numbers vector sequence H(t) ∈ R and rewrite the iterative relation W i→js defined in Lemma 7 satisfy the bounds in (17a) as

X k→i H(t + 1) = W (t)H(t) + 1(S0)c W < 1 ∀i ∈ I, ∀j ∈ Ni. E×E k∈Ni\{j} where W (t) ∈ R is given by Proof. For every {i, j} ∈ E, define W˜ i→j =  W h→k(t) if k = i 6∈ S0, h 6= j W (t) := P W k→i. From (21), we can easily obtain the i→j,h→k 0 otherwise. k∈Ni\{j} iterative relation We know from Lemmas 7 and 8 that W (t) converges to a  −1 E×E matrix W ∈ R with non-negative elements and satisfying i→j X X k→i W˜ = d − W˜  the row relations 0 c k∈(Ni\{j})∩(S ) k∈Ni\{j} ( P h→i 0 X W if 6∈ S Suppose that Wi→j,h→k = h∈Ni\{j} {h,k}∈E 0 otherwise. α = W˜ i→j = max{W˜ h→k | {h, k} ∈ E, h 6∈ S0} Notice that W is an asymptotically stable sub-stochastic matrix Clearly, by Lemma 7 we have α ∈ [0, d − 1[ and we easily such that obtain the relation X ||W ||∞ = max{ Wi→j,h→k | {i, j} ∈ E} < 1. 0 c |(N \{j}) ∩ (S ) | d − 1 {h,k}∈E α ≤ i ≤ (22) d − α d − α Straightforward calculus considerations then yield conver- which yields α ∈ [0, 1]. Suppose by contradiction that α = 1 gence of H(t). and notice that inequalities in (22) would yield

i→j 0 B. Simulations W˜ = 1 ⇒ (Ni \{j}) ∩ S = ∅ We have performed extensive simulations of our algorithm and on well-known families of random graphs such as Erdos-˝ ˜ k→i W = 1 ∀k ∈ Ni \{j}. Renyi´ and Watts-Strogatz, obtaining very encouraging results. First, the algorithm is convergent in every test. Second, in Iterating this argument, we easily obtain the result that there many cases the computed values of HIC are very close to is no path from nodes in S0 to i, contradicting the fact that the correct values, which we can obtain by the benchmark G is connected. algorithm in [15]. In order to make this claim more precise, Finally, we analyze the behavior of the sequences Hi→j(t). we define two notions of error. We denote by H(i) the correct Harmonic Influence Centrality of node i and by Hb (t)(i) the 10

Fig. 8. Mean deviation error and mean ranking error of the MPA as functions Fig. 7. Comparison between the actual values of H in the nodes of an Erdos-˝ of time steps on the same graph as in Fig. 7. The stopping condition is reached Renyi´ graph with 15 nodes and the values estimated by the MPA. Degree and after 13 steps. eigenvector are also shown. output of the algorithm in node i after t steps. We define the mean deviation error at time step t as

P |H(i) − Hb (t)(i)| e (t) = i∈I . dev |I| Additionally, as we are interested in the optimal stubborn agent placement problem, we are specially concerned about obtaining the right ranking of the nodes, in terms of HIC. We thus define the mean rank error at time step t as P |rankH (i) − rank (t) (i)| e (t) = i∈I Hb Fig. 9. Mean deviation error and mean ranking error of the MPA as functions rank |I| of time steps on a large Erdos-R˝ enyi´ graph with low connectivity. where for a function f : I → R, we denote by rankf (i) the position of i in the vector of nodes, sorted according to the closer to the true one. Moreover when the number of iterations values of f. grows the computation tree has an increasing number of nodes: We now move on to describe some simulation results in even if they are far from the node considered, they contribute more detail. As the stopping criterion, we ask that the mean to overestimate its centrality. difference between the output of two consecutive steps is Next, we also present simulations on larger Erdos-R˝ enyi´ below a threshold, chosen as 10−5. As the topology of the random graphs: we let n = 500 and consider (A) p = graphs, we choose random graphs generated according to the ln(n)/n ≈ 0.012 and (B) p = 0.1. It is known [2] that in the well-known Erdos-R˝ enyi´ model: G(n, p) is a graph with n regime of case (A), the graph is guaranteed to be connected for nodes such that every pair of nodes is independently included large n, while in case (B) the graph, besides being connected, in the edge set with probability p (for further details see [2]). has many more cycles and its diameter is smaller. We plot the For simplicity, all resistances are set equal to one. time evolution of the error for cases (A) and (B) in Figures 9 First, we consider an example of Erdos-R˝ enyi´ and 10, respectively. In both cases the node with the higher with n = 15 and p = 0.2; nodes 1, 2 and 3 are stubborn in Harmonic Influence Centrality has been correctly identified by S0. In spite of the presence of several cycles in the sampled the MPA, and the mean ranking error is below 3. graph, the algorithm finds the maximum of the HIC correctly; see Figure 7. Figure 8 plots the mean deviation error and the mean ranking error as functions of time steps in the same experiment: after just 4 steps the ranking error reaches a minimum value. Note that although the obtained ranking is not entirely correct, the three nodes with highest HIC are identified and the HIC profile is well approximated. The true HIC is smaller than the approximated one and the deviation error is localized on some node. These facts, which can be widely observed in our simulations, can be explained by thinking of the computation trees as in Section VI. Indeed, for each node i the MP algorithm actually computes the HIC on the computation tree rooted in i. The computation tree is closer to the actual graph when the node i is farther from cycles or it Fig. 10. Mean deviation error and mean ranking error of the MPA as functions belongs to fewer of them; then also the computed HIC will be of time steps on a large Erdos-R˝ enyi´ graph with high connectivity. 11

In all these examples the deviation error first decreases and [3] P. Bonacich. Power and centrality: A family of measures. The American then slightly increases as a function of time. This observation Journal of Sociology, 92(5):1170–1182, 1987. [4] A. Braunstein, R. Mezard, and R. Zecchina. Survey propagation: corresponds to the evolution of the computation trees: first An algorithm for satisfiability. Random Structures and Algorithms, they grow to represent relatively well the neighbourhood of 27(2):201–226, 2005. the neighbors, but after a certain number of steps too many [5] E. Estrada and N. Hatano. Resistance distance, information centrality, node vulnerability and vibrations in complex networks. In E. Estrada, “ghost” nodes are included, thus worsening the computed M. Fox, D.J. Higham, and G.-L. Oppo, editors, Network Science, pages approximation. 13–29. Springer Verlag, 2010. In order to stress the accuracy of our results we can compare [6] N.E. Friedkin. Theoretical foundations for centrality measures. Ameri- can Journal of Sociology, 96(6):1478–1504, 1991. the HIC computed through the MPA to other centralities, [7] H. Ishii and R. Tempo. Distributed randomized algorithms for the which can be computed in a distributed way and may be PageRank computation. IEEE Transactions on Automatic Control, considered as reasonable approximations of the HIC. The 55(9):1987–2002, 2010. [8]M.M ezard´ and A. Montanari. Information, Physics, and Computation. first naive option is the degree centrality, that is, the number Oxford, 2009. of neighbors. This is exactly what the MPA computes after [9] M.E.J. Newman. A measure of betweenness centrality based on random one time step and the results in terms of deviation and rank walks. Social Networks, 27(1):39–54, 2005. [10] J. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of error can be read on Figures 8, 9 and 10. The experiments Plausible Inference. Morgan Kaufmann, 2nd edition, 1988. indicate that degrees are in general insufficient to describe [11] K. Stephenson and M. Zelen. Rethinking centrality: Methods and the HIC and can at best be used as rough approximations. A examples. Social Networks, 11(1):1–37, 1989. [12] P.O. Vontobel and H.-A. Loeliger. On factor graphs and electrical second option is the eigenvector centrality: our experiments networks. In J. Rosenthal and D.S. Gilliam, editors, Mathematical show it to be an unreliable approximation of the HIC, as Systems Theory in Biology, Communication, Computation, and Finance, it gives fairly large mean rank errors of 1.9, 18.7 and 9.1, pages 469–492. Springer Verlag, 2003. [13] M. Wainwright. Message-passing algorithm that don’t lie. Technical respectively, for the three experiments shown before. Similar report, Department of Electrical Engineering and Computer Science, observations on degree and eigenvector centralities can be UC Berkeley, 2006. drawn from Figure 7, which includes the node-by-node values [14] W. Wang and C.Y. Tang. Distributed computation of node and edge betweenness on tree graphs. In IEEE Conference on Decision and of degree and eigenvector centralities (the latter is re-scaled Control, pages 43–48, Florence, Italy, December 2013. by the maximum of the true HIC). [15] E. Yildiz, D. Acemoglu, A. Ozdaglar, A. Saberi, and A. Scaglione. These measures are inadequate to our problem for the Discrete opinion dynamics with stubborn agents. Technical Report 2858, LIDS, MIT, 2011. To appear in ACM Transactions on Economics and following main reason: both the degree centrality and the Computation. eigenvector centrality evaluate the influence of a node within a network, but they do not consider the different role of stubborn nodes, treating them as normal nodes.

VII.CONCLUSIONS In this paper we have proposed a centrality measure on graphs related to the consensus dynamics in the presence of stubborn agents, the Harmonic Influence Centrality: this definition of centrality quantifies the influence of a node on the opinion of the global network. Although our setting assumes all stubborn except one to have the same value, the approach can be extended to more complex configurations, as discussed in [15]. Thanks to an intuitive analogy with electrical networks, which holds true for time-reversible dynamics, we have obtained several properties of HIC on trees. As an application of these results, we have proposed a message passing algorithm to compute the node which maximizes centrality. We have proved the algorithm to be exact on trees and to converge on any regular graph. Furthermore, numerical simulations show a good performance of the algorithm beyond the theoretical results. Further research should be devoted to extend the analysis of the algorithm beyond the scope of the current assumptions to include general networks with cycles, varied degree distributions, and directed edges.

REFERENCES [1] D. Acemoglu, G. Como, F. Fagnani, and A. Ozdaglar. Opinion fluctua- tions and disagreement in social networks. Mathematics of Operations Research, 38(1):1–27, 2013. [2] R. Albert and A. Barabasi. Statistical mechanics of complex networks. Reviews of Modern Physics, 74(1):47–97, 2002.