1 Introduction

Opinion dynamics (for short, dynamics) are simplistic mathematical models for the competition of agents’ opinions on social networks [51]. In a nutshell, given a network where each agent initially supports an opinion (from a finite set), a dynamics is a simple rule which agents apply to update their opinion based on that of their neighbors. Proving theoretical results on dynamics is a challenging mathematical endeavor which may require the development of new analytical techniques [9, 12].

As dynamics are aimed at modeling the spread of opinions, a central issue is to understand under which conditions the network reaches a consensus, i.e., a state where the whole network is taken over by a single opinion [52]. In this respect, most efforts have been directed toward obtaining topology-independent results, which disregard the initial opinions’ placement on the network [10, 11, 22].

The first example of dynamics is the so-called Voter Model, in which in each round each agent copies the opinion of a random neighbor. We refer to it as the trivial dynamics, not in terms of its evolution or analysis, but with respect to the operation that agents perform in each round. This classical model arises in physics and computer science and, despite its apparent simplicity, some properties have been proven only recently [14, 37, 49]. The simplest non-trivial example is then arguably the 2-Choices dynamics, in which agents choose two random neighbors and switch to their opinion only if they coincide [19] (see Definition  1) instead of copying the color a priori as in the Voter Model. Still, the analysis of the 2-Choices dynamics has been limited to networks with good expansion properties, and the theoretical guarantees provided so far are essentially independent from the positioning of initial opinions [20]. Only recently the 2-Choices dynamics has also been analyzed on classes of graphs presenting a clustered structure [27, 57], as discussed in more detail in Sect. 2.

In this work, we aim at contributing to the general understanding of the evolution of simple opinion dynamics in richer classes of network topologies by studying their behavior theoretically and empirically on core–periphery networks. Core–periphery networks are typical economic and social networks which exhibit a core–periphery structure, a well-known concept in the analysis of social networks in sociology and economics [16, 28], which defines a bipartition of the agents into core and periphery, such that certain key features are identified. Informally, the core (or elite), is a dense and cohesive small set of powerful nodes at the center of the network, while the periphery (or the masses) is the sparse, less organized, and weakly-connected rest of the network. A very related notion to that of a core, is that of a k-rich club, namely the set of k nodes with highest degree that forms a hub of highly influential nodes [61]. In fact, such a set is usually considered as the core of a network.

We consider an axiomatic framework that has been introduced in [5], and we base our analysis and experiments on two of their axioms’ parameters, namely dominance and robustness. The ranges for these parameters in the theorems we obtain include the values used in the experimental part of this work, in which our results are validated on important datasets of real-world networks. Intuitively, the core is a set of agents that dominates the rest of the network. In order to do so, it maintains a large amount of external influence on the periphery, higher than or at least comparable to the internal influence that the periphery has on itself. Similarly, to maintain its robustness, namely to hold its position and stick to its opinions, the core must be able to resist the “outside” pressure in the form of external influence. To achieve that, the core must maintain a higher (or at least not significantly lower) influence on itself than the external influence exerted on it by the periphery. Both, high dominance and high robustness, are essential for the core to be able to maintain its dominating status in the network. Moreover, it seems natural for the core size to be as small as possible. In social-network terms this is motivated by the idea that if membership in a social elite entails benefits, then keeping the elite as small as possible increases the share for each of its members.

The above requirements are formalized in the following axioms [5]. Given a network \(G=(V,E)\) and two subsets of agents \(A,B\subseteq V\), let \(e(A,B) := \{\{u,v\}\in E \,:\, u\in A,\,v\in B\}\) be the set of cut edges between A and B. The log-density of a set \(X \subseteq V\) is defined as \(\delta (X)= \log \vert e(X, X) \vert / \log |X|\). Let \(c_d\) and \(c_r\) be two positive constants and let \(V = {\mathcal {C}}\mathbin {\dot{\cup }}{\mathcal {P}}\), where \({\mathcal {C}}\) is the set of agents in the core and \({\mathcal {P}}\) the set of agents in the periphery. Then, the axioms are as follows:

  • Dominance: The core’s influence dominates the periphery, i.e., \(\vert e({\mathcal {C}}, {\mathcal {P}}) \vert \ge c_d \cdot \vert e({\mathcal {P}}, {\mathcal {P}}) \vert \), for a fixed positive constant \(c_d\).

  • Robustness: The core can withstand outside influence from the periphery, i.e., \(\vert e({\mathcal {C}}, {\mathcal {C}}) \vert \ge c_r \cdot \vert e({\mathcal {P}}, {\mathcal {C}}) \vert \), for a fixed positive constant \(c_r\).

  • Density: The core is denser than the whole network, i.e., \(\delta ({\mathcal {C}}) \ge 1 + c_c\), for a fixed positive constant \(c_c\).

Another interesting property often observed in core–periphery networks, but not assumed to be an axiom in [5], is compactness, namely the core is a minimal set satisfying the above dominance and robustness axioms.Footnote 1

Note that the concepts of dominance and robustness are strictly related to the concept of conductance: As described in the Appendix A, the conductance of the cut between \({\mathcal {C}}\) and \({\mathcal {P}}\) is \( \varphi ({\mathcal {C}}, {\mathcal {P}}) = \frac{|e({\mathcal {C}}, {\mathcal {P}})|}{\min \{\mathrm {vol}({\mathcal {C}}), \mathrm {vol}({\mathcal {P}})\}} = \max \left\{ \frac{c_d}{1+c_d}, \frac{1}{1+c_r} \right\} . \) Moreover, whenever \(\mathrm {vol}({\mathcal {C}})=\mathrm {vol}({\mathcal {P}})\) the two terms in the maximum coincide and \(\varphi ({\mathcal {C}}, {\mathcal {P}}) = \frac{1}{1+c_r}\).

Our analytical and experimental results leverage the dominance and robustness axioms only (see Definition 4), showing how assumptions on the values of \(c_d\) and \(c_r\) are sufficient to provide a good characterization of the behavior of the dynamics. We consider the 2-Choices dynamics in core–periphery networks when starting from natural initial configurations in which the core and the periphery have different opinions. Our theoretical results and experiments on real-world networks show that the execution of the 2-Choices dynamics tends to fall mainly within two opposite kinds of possible behavior:

  • Consensus: The opinion of the core spreads in the periphery and takes over the network in a short time.

  • Metastability: The periphery resists and, although the opinion of the core may continuously “infect” agents in the periphery, most of them retain the initial opinion.

Note that, within our assumptions on the dominance and robustness of the core in Theorem 2, the opinion initially held by the periphery never takes over the network. Interestingly, our experimental results generally support such a behavior, indicating a superiority of the core in spreading opinions, even in the case in which the volumes of core and periphery are approximately equal (see Sect. 4.2 for more details).

By comprehending the underlying principles which govern the aforementioned phenomena, we aim at a twofold contribution:

  • We seek for the first results on basic non-trivial opinion dynamics, such as 2-Choices, in order to characterize its behavior: (i) on new classes of topologies other than networks with strong expansion; (ii) as a function of the process’ initial configuration.

  • We look for a dynamic explanation for the axioms of core–periphery networks: By investigating the interplay between the core–periphery axioms and the evolution of simple opinion dynamics, we want to get insights on dynamical properties which are implicitly responsible for causing social and economic agents to form networks with a core–periphery structure.

1.1 Original contribution

In order to understand what network key properties are responsible for the aforementioned dichotomy between a long metastable and a fast consensus behavior, we theoretically investigate a class of networks belonging to the core–periphery model.

To further simplify the theoretical analysis, in Theorem 1 we initially consider the setting in which agents in the core are stubborn, i.e., they don’t change their initial opinion. We later show, in Theorem 2, how to substitute this assumption with milder hypotheses on the core’s structure. We remark that the evolution of the 2-Choices dynamics, together with the latter assumption on the stubbornness of the core, can be regarded as a SIS-like epidemic model [38, 53]. In such a model, the network is the subgraph induced by the periphery and the infection probability is given by the 2-Choices dynamics, which also determines a certain probability of spontaneous infection (that in the original process corresponds to the fact that agents in the periphery interact with agents in the core). This interpretation of our results may be of independent interest.

The common difficulty in analyzing opinion dynamics is the lack of general tools which allow to rigorously handle their intrinsic nonlinearity and stochastic dependencies [11, 19, 22, 51, 52]. Hence, the difficulty usually resides in identifying some crucial key quantities for which ad-hoc analytical bounds on the expected evolution are derived. Our approach is yet another instance of such efforts: In Sect. 3 we provide a careful bound on the expected change of the number of agents supporting a given opinion. Together with the use of Chernoff bounds, we obtain a concentration of probability around the expected evolution. Rather surprisingly, our analysis on the concentrated probabilistic behavior turns out to identify a phase transition phenomenon:

There exists a universal constant \(c^{\star } = \frac{\sqrt{2} - 1}{2}\) such that, on any core–periphery network of n agents , if the dominance parameter \(c_d\) is greater than \(c^{\star }\), an almost-consensus is rapidly reached, with high probability;Footnote 2 otherwise, if \(c_d\) is less than \(c^{\star }\), a metastable phase in which the periphery retains its opinion takes place, namely, although the opinion of the core may continuously “infect” agents in the periphery, most of them will retain the initial opinion for superpolinomially-many rounds, with high probability.Footnote 3

We validate our theoretical predictions by extensive experiments on real-world networks chosen from a variety of domains including social networks, communication networks, road networks, and the web. We thoroughly discuss our results in Section 4.2, however, we briefly want to highlight the key results of our experiments in the following. The experiments showed some weaknesses of the core extraction heuristic used in [5], namely the k-rich club method. To avoid those drawbacks, we designed a new core extraction heuristic which repeatedly calculates densest-subgraph approximations. Our experimental results on real-world networks show a strong correlation with the theoretical predictions made by our model. They further suggest an empirical threshold larger than \( c^{\star }\) for which the aforementioned correlation is even stronger. We discuss which aspects of the current theoretical model may be responsible for such discrepancy, and thus identify possibilities for a model which is even more accurate.

We remark that our investigation represents an original contribution with respect to the line of research on consensus discussed in Sect. 2, as it shows a drastic change in behavior for the 2-Choices dynamics on an arguably typical broad family of social networks which is not directly characterized by expansion properties. In particular, the convergence to the core’s opinion in our theoretical and experimental results is a highly non-trivial fact when compared to previous analytical works (see Sect. 4.2 for more details).

Overall, our theoretical and experimental results highlight new potential relations between the typical core–periphery structure in social and economic networks and the behavior of simple opinion dynamics—both, in terms of getting insights into the driving forces that may determine certain structures to appear frequently in real-world networks, as well as in terms of the possibility to provide analytical predictions on the outcome of simplistic models of interaction in networks of agents.

1.2 Roadmap

In Sect. 2 we present related work on opinion dynamics and core–periphery networks. In Sect. 3 we analyze the Biased-2-Choices dynamics , proving a phase transition on general dense graphs. We complete our results by analyzing the behavior of the dynamics on the threshold of the phase transition. In Section 4.1 we show how to translate the results of Theorem 1 in a formal analysis of the 2-Choices dynamics on a family of Core–Periphery networks. In Sect. 4.2 we propose a new heuristic for extracting the Core from real networks and we present simulations of the 2-Choices dynamics when the starting color configuration reflects our Core–Periphery partitioning.

2 Related work

Simple models of interaction between pairs of nodes in a network are studied since the first half of the twentieth century in statistical mechanics where mathematical models of ferromagnetism led to the study of Ising and Potts models [48]. A different perspective later came from diverse sciences such as economics and sociology where averaging-based opinion dynamics such as the DeGroot model were investigated [29, 32, 35, 36, 40].

More recently, computer scientists have started to contribute to the investigating of opinion dynamics for mainly two reasons. First, with the advent of the Internet, huge amounts of data from social networks are now available. As the law of large numbers often allows to assume crude simplifications on the agents’ behavior in such networks [28], investigating opinion dynamics allows for a more fine-grained understanding of the evolution of such systems. Second and somehow complementary to the previous motivation, technological systems of computationally simple agents, such as mobile sensor networks, often require the design of computationally primitive protocols. These protocols end up being surprisingly similar, if not identical, to many opinion dynamics which emerge from a simplistic mathematical modeling of agents’ behavior in fields such as sociology, biology, and economy [9, 37, 52].

A substantial line of work has recently been devoted to investigating the use of simple opinion dynamics for solving the plurality consensus problem in distributed computing. The goal in this problem setting is for each node to be aware of the most frequent initially supported opinion after a certain time [9,10,11, 13, 18, 21, 23, 30, 34]. The seminal work by Hassin and Peleg [37] introduced for the first time the study of a synchronous-time version of the Voter Model in statistical mechanics. In this model, in each discrete-time round, each node looks at a random neighbor and copies her opinion. The Voter Model is considered the trivial opinion dynamics, in the sense that it is arguably the simplest conceivable rule by which nodes may meaningfully update their opinion as a function of their neighbors’ opinion. Many properties of this process are understood by known mathematical techniques such as an elegant duality with the coalescing random walk process [1]. In particular, it is known that the Voter Model is not a fast dynamics as for the time it takes before consensus on one opinion is reached in the network. For that reason, the 2-Choices dynamics has been considered [19]. In such dynamics, in each round, each node looks at the opinion of two random neighbors and, if these two are the same, adopts it. This process can arguably be considered the simplest non-trivial type of opinion dynamics, in that nodes compare for equality of the two sampled opinions before updating.

The authors of [19] consider any initial configuration in which each node is supporting one out of two possible opinions. They proved that in such a configuration, under the assumption that the initial bias (i.e., advantage of an opinion) is greater than a function of the network’s expansion (measured in terms of the second eigenvalue of the network) [39], the whole network will support the initially most frequent opinion with high probability after a polylogarithmic number of rounds. The results of [19] on the 2-Choices dynamics were later refined with milder assumptions on the initial bias with respect to the network’s expansion [20] and generalized to more opinions [22]. Their techniques should be easily adaptable in order to handle similar dynamics, such as the 3-Majority dynamics [10, 11, 33]. The 2-Choices dynamics constitutes one of the few processes whose behavior has been characterized on non-complete topologies, typically assuming good expansion properties. Few works analyze the non-trivial behavior of such a dynamics on other classes of topologies which present a clustered structure, e.g., on regular clustered graphs [27] and on graphs sampled from the Stochastic Block Models [57], proving non-trivial behaviors of the dynamics. In particular, [57] leverages the Kim-Vu concentration of probability inequality and the theory of competitive dynamical systems to obtain a precise description of the phase transition behavior of the 2-Choices dynamics on the aforementioned model.

On a different note, for the deterministic Majority dynamics where in each round each node updates her opinion with the most frequent one among her neighbors: Substantial effort has been devoted to investigating how small the cardinality of a monopoly can be, i.e., a set of nodes supporting a given opinion \({\mathcal {O}}\) such that, when running the Majority dynamics, eventually the network reaches consensus on \({\mathcal {O}}\) [54, 55]. The previous line of investigation has focused on determining the existence of network classes on which the monopoly has a size which is upper bounded by a small function. In [4], the authors prove that many real-world networks contain a group of \(\sqrt{m}\) nodes, with m being the number of edges of the graph, that are monopolies with disproportionate power with respect to the rest of the network, namely their opinion wins the Majority voting and they remain stable over time. In [15], the existence of a family of networks with constant-size monopoly is shown. We emphasize that this line of investigation is peculiar as it deals with existential questions related to specific network classes, as opposed to the typical research questions that we discussed so far, which ask for general characterizations of the behavior of the considered process.

Recently, a more systematic and general study of opinion dynamics has been carried out in [12, 51, 52]. It characterizes the evolution and other mathematical aspects of dynamics—such as the Majority dynamics, the Voter Model, the DeGroot model, and others—on different network classes, such as Erdős-Rényi random networks and expander networks. We follow [52] in adopting the term “opinion dynamics” to refer to the class of processes discussed above.

Majority dynamics have also been studied as local interaction in bootstrap percolation processes, where nodes of graphs, typically lattices that exhibit very regular structures, interact with their neighbors until the process stabilizes, i.e., the diffusion started from an initial set of nodes stops. The typical setting considers an initial configuration where each node is in one of two possible states with probability p, and analyzes the convergence time of the process. Typical results show sharp phase transitions on p, i.e., a drastic change in the behavior of the process if p is greater or smaller than some threshold, in specific graph topologies such as the hypercube [6], binomial random graphs [41], random regular graphs [7], tori [59], or infinite trees [42].

A similar perspective to ours has been adopted also in other works. In [45] the authors show a phase-transition in a mean-field analysis of the behavior of deterministic majority in an asynchronous-update model, in which only few nodes update their opinion at each round, on “coupled fully connected networks” composed of overlapping complete graphs. Voter Model and deterministic majority dynamics are also analyzed in [2], where it is considered a setting in which a superior opinion exists; using tools from the birth-and-death Markov Chains theory, it is shown the interplay between network topology and opinion dynamics in the time needed for the process to reach a consensus on the superior opinion. In [24, 25] a similar analysis as ours has been carried out for the synchronous k-majority dynamics, in which nodes update their opinion to the majority opinion of k randomly selected neighbors, proving similar phase transitions; in the same work results for the synchronous Voter Model and Majority dynamics are also presented.

2.1 Core–periphery model

It has long been observed in sociology that many economic and social networks exhibit a core–periphery structure [16, 56, 58, 60], namely, it is generally possible to group nodes into two classes, a core and a periphery, such that the former exhibits a dense internal topology while the latter is sparse and loosely connected, with specific properties relating the two. Such architectural principle has been linked, for example, to the easiness with which individuals solve routing problems in networks subject to the small-world phenomenon [28].

The qualitative notion of core–periphery structure was translated into quantitative relations in the axiomatic approach of [5], which later also applied the algorithmic properties that follow from the core–periphery structure to the design of efficient distributed networks [3]. In some sense, our theoretical and empirical results may be regarded as a functional justification for the presence of a core–periphery structure in networks, as the latter turns out to play a decisive role in determining a certain kind of evolution for basic opinion dynamics such as the 2-Choices.

3 Analysis of the biased-2-Choices dynamics

We now present the 2-Choices dynamics and an alternative process, based on it, that will be analyzed in this section. The results on such an alternative process will be exploited later, in Sect. 4, to describe the behavior of the 2-Choices dynamics on core–periphery networks. We are going to use use colors, instead of opinions, to give an intuitive explanation of the processes and facilitate its understanding.

Definition 1

(2-Choices dynamics) Let \(G=(V,E)\) be a network and let each agent u have a color \(c^{(t)}(u) \in \{red, blue\}\) in every synchronous round t. In each round t, the 2-Choices dynamics proceeds as follows: each agent u picks two neighbors vw uniformly at random and with replacement; if \(c^{(t)}(v)=c^{(t)}(w)\), then u updates its color to that color, namely \(c^{(t+1)}(u) = c^{(t)}(v)\); otherwise u keeps its previous color, namely \(c^{(t+1)}(u) = c^{(t)}(u)\).

Definition 2

(Biased-2-Choices \((p-\sigma )\) dynamics) Let \(p \in [0,1]\) be a constant and let \(\sigma \in \{red, blue\}\) be a color. We define the Biased-2-Choices(p, \(\sigma \)) dynamics as a variation of the 2-Choices dynamics in which every time an agent picks a neighbor, that neighbor supports color \(\sigma \) with probability p regardless of its actual color. As in the 2-Choices dynamics, in every round t, each agent u picks two neighbors vw uniformly at random and with replacement. Formally, for every round t, every agent u, and every agent \(x \in \{v, w\}\), let us define an independent Bernoulli random variable \(M^{(t)}_{ux}\) parametrized by p. Let \({\bar{c}}_u^{(t)}(x)\) be the color of the sampled neighbor x seen by u, namely \({\bar{c}}_u^{(t)}(x) = \sigma \) if \(M^{(t)}_{ux}=1\) (with probability p) and \({\bar{c}}_u^{(t)}(x) = c^{(t)}(x)\) if \(M^{(t)}_{ux}=0\) (with probability \(1-p\)). Each node u updates its state as follows: If \({\bar{c}}_u^{(t)}(v) = {\bar{c}}_u^{(t)}(w)\), then \(c^{(t+1)}(u) = {\bar{c}}_u^{(t)}(v)\); otherwise \(c^{(t+1)}(u) = c^{(t)}(u)\).

We start with some notation and preliminaries. In the following, we will make use of the asymptotic notation in order to bound the limiting behavior of some of the quantities analyzed in the paper. In particular we will use \({\mathcal {O}}\), o, \(\varTheta \), \(\varOmega \), and \(\omega \). This means that our results hold for networks with sufficiently many agents.

Let \(G=(V,E)\) be a network. For a set of agents \(A \subseteq V\), let the volume of A be \(\mathrm {vol}(A) := \sum _{v \in A} d_v\), where \(d_v\) is the degree of v. We call \(d_{_{\min }} = \min _{v \in V} d_v\). In this section we only consider dense graphs, i.e., graphs of n agents where \(d_{_{\min }} = \omega (\log n)\). Let \({\mathbf {c}}^{(t)} \in \{red,\, blue\}^n\) be the configuration of the colors of the agents at time t. Let the agents of G run the Biased-2-Choices(p, blue) dynamics starting from an initial configuration \({\mathbf {c}}^{(0)}\) where all nodes support color red. Let \(B^{(t)}\) be the set of blue agents and \(R^{(t)} = V \setminus B^{(t)}\) be the set of red agents at time t. For any agent v, let \(N_R(v) = N(v) \cap R^{(t)}\) be the set of red neighbors and \(N_B(v) = N(v) \cap B^{(t)}\) the set of blue neighbors of v. Furthermore, let \(r^{(t)}_v\) and \(b^{(t)}_v\) respectively be the number of red and blue neighbors of v at time t, i.e., \(r^{(t)}_v = |N_R(v)|\) and \(b^{(t)}_v = |N_B(v)|\). Let \(\phi ^{(t)}_v = \frac{r^{(t)}_v}{d_v}\) be the fraction of red agents in the neighborhood of v; let \(\phi _{_{\min }}^{(t)} = \min _{v \in V} \phi ^{(t)}_v\) and \(\phi _{_{\max }}^{(t)} = \max _{v \in V} \phi ^{(t)}_v\) be, respectively, the minimum and maximum fractions of red neighbors among all agents in V. In the following, for the sake of readability, whenever we omit the time index, we refer to the value at time t, e.g., \(\phi _v\) stands for \(\phi ^{(t)}_v\). Similarly, we concisely denote with \({\mathbf {P}}_{R} \left( v \right) = {\mathbf {P}}_{ } ( v \in R^{(t+1)} \,|\, {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}})\) the probability that agent v will be supporting the red color in the next round of the Biased-2-Choices(p, blue) conditioned to the event that the configuration at time t is equal to \(\bar{{\mathbf {c}}}\), i.e.,

$$\begin{aligned} {\mathbf {P}}_{R} \left( v \right) = \left\{ \begin{array}{ll} 1 - \big ( p+(1-p)(1 - \phi _v) \big )^2 &{} \text {if } v \in R,\\ (1-p)^2\phi _v^2 &{} \text {if } v \in B. \end{array} \right. \end{aligned}$$

In particular, given the conditioning \({\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}}\) that makes \(\phi _v\) deterministic for each v, the previous probability can be read in the following terms: if the agent v was red, it will remain red only if it does not sample a blue neighbor twice (where the probability of sampling a blue neighbor is \(p + (1-p)(1-\phi _v)\), i.e., either the bias p has an effect or the bias p has no effect and v actually samples a blue neighbor); instead, if the agent v was blue, it will become red only if it samples a neighbor in state red twice (where the probability of sampling a red neighbor is \((1-p)\phi _v\), i.e., the bias p has no effect and v actually samples a red neighbor). Furthermore, note that:

$$\begin{aligned} \min _{w\in R} {\mathbf {P}}_{R} \left( w \right)&= 1 - \big ( p+(1-p)(1 - \phi _{\min }) \big )^2,\\ \min _{w\in B} {\mathbf {P}}_{R} \left( w \right)&= (1-p)^2\phi _{\min }^2. \end{aligned}$$

Conditioning to the configuration \({\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}}\), we can give a lower bound for the expected fraction of red neighbors of any agent v as follows:

$$\begin{aligned}&{\mathbf {E}}\left[ \phi ^{(t+1)}_v \ \big | \ {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}} \right] \\&\quad = \frac{1}{d_v} \left( \sum _{w \in N_R(v)} {\mathbf {P}}_{R} \left( w \right) + \sum _{w \in N_B(v)} {\mathbf {P}}_{R} \left( w \right) \right) \\&\quad \ge \frac{1}{d_v} \left( \vert N_R(v) \vert \min _{w\in R} {\mathbf {P}}_{R} \left( w \right) + \vert N_B(v) \vert \min _{w\in B} {\mathbf {P}}_{R} \left( w \right) \right) \\&\quad = \frac{r_v}{d_v} \min _{w\in R} {\mathbf {P}}_{R} \left( w \right) + \left( 1 - \frac{r_v}{d_v}\right) \min _{w\in B} {\mathbf {P}}_{R} \left( w \right) \\&\quad = \frac{r_v}{d_v} \left( 1 - \big ( p+(1-p)(1 - \phi _{_{\min }}) \big )^2 \right) \\&\qquad + \left( 1 - \frac{r_v}{d_v}\right) (1-p)^2\phi _{_{\min }}^2 \\&\quad = \frac{r_v}{d_v} \left( 1 - \big ( p+(1-p)(1 - \phi _{_{\min }}) \big )^2 - (1-p)^2\phi _{_{\min }}^2 \right) \\&\qquad + (1-p)^2\phi _{_{\min }}^2\\&\quad \ge \phi _{_{\min }}\!\left( 1 - \big ( p+(1-p)(1 - \phi _{_{\min }}) \big )^2 - (1-p)^2\phi _{_{\min }}^2 \right) \\&\qquad + (1-p)^2\phi _{_{\min }}^2 \\&\quad = \phi _{_{\min }}\!\left( 1\!-\!\big ( p+(1-p)(1\!-\!\phi _{_{\min }}) \big )^2\!+\! (1-p)^2 (1 - \phi _{_{\min }})\phi _{_{\min }}\!\right) \\&\quad = \phi _{_{\min }}\!\left( 1 - 2(1-p)^2 \phi _{_{\min }}^2+(1-p)(3-p) \phi _{_{\min }}-1 \right) . \end{aligned}$$

Note that we could cancel out 1 and \(-1\), however, leaving them facilitates the analysis. In the steps above, we can lower bound \(\frac{r_v}{d_v}\) because its coefficient, i.e., \((1 - \big ( p+(1-p)(1 - \phi _{_{\min }}) \big )^2 - (1-p)^2\phi _{_{\min }}^2)\), is non-negative for any \(p, \phi _{_{\min }} \in [0,1]\).

Conversely, we can upper bound the expectation using \(\phi _{_{\max }}\), i.e.,

$$\begin{aligned}&{\mathbf {E}}\left[ \phi ^{(t+1)}_v \ \big | \ {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}} \right] \nonumber \\&\quad \le \phi _{_{\max }}\!\left( 1 - 2\left( 1-p\right) ^2 \phi _{_{\max }}^2\!+(1-p)(3-p) \phi _{_{\max }}\!-1 \right) . \end{aligned}$$
(1)

Note that the lower and the upper bound for the expectation have the same form. In fact, defining the functions

$$\begin{aligned} f_p(\phi ):= & {} 2\left( 1-p\right) ^2\phi ^2-(1-p)(3-p)\phi +1, \\ g_p(\phi ):= & {} \phi ( 1 - f_p(\phi ) ), \end{aligned}$$

the lower and the upper bound for the expectation can respectively be written as \(g_p(\phi _{_{\min }})\) and \(g_p(\phi _{_{\max }})\). Thus, analyzing \(f_p(\phi )\), we can see for which values of p the function \(g_p(\phi )\) is increasing or decreasing.

Before analyzing the actual behavior of the Biased-2-Choices(p, blue) on G, we study \(f_p(\phi )\) in order to characterize the bounds for the expectation. The roots of \(f_p(\phi )\) are in \(\frac{3-p\pm \sqrt{p^2-6p+1}}{4(1-p)}\) while its derivative is \( f_p'(\phi ) = 4\left( 1-p\right) ^2\phi - (1-p)(3-p). \) It follows that \(f_p(\phi )\) has a minimum point in \({\bar{\phi }} = \frac{3-p}{4(1-p)}\). Moreover, the sign of \(f_p({\bar{\phi }})\) exclusively depends on p. In fact

$$\begin{aligned} f_p({\bar{\phi }})> 0&\qquad \text {if } p > 3 - 2\sqrt{2}, \end{aligned}$$
(2)
$$\begin{aligned} f_p({\bar{\phi }})< 0&\qquad \text {if } p < 3 - 2\sqrt{2}, \end{aligned}$$
(3)

since \(f_p(\phi )\) is convex and in (2) the discriminant of \(f_p(\phi )\) is negative, while in (3) the discriminant is positive.

Before stating and proving the main theorem of this work, we give the definition of almost-consensus (\((1-\kappa (n))\)-consensus), i.e., one of the configurations of interest that are reached by the dynamics.

Definition 3

(\((1-\kappa (n))\)-consensus) Let \(\kappa (n) : {\mathbb {N}} \rightarrow [0,1]\). Given a network \(G=(V,E)\) and a color \(\sigma \), we say a dynamics reaches a \((1-\kappa (n))\)-consensus in round t if the volume of agents supporting color \(\sigma \) is \((1 - \kappa (n))\mathrm {vol}(V)\).

We are now ready to state the main theorem, that will be proved in the following subsections.

Theorem 1

(Phase Transition) Let \(G = (V,E)\) be a network of n agents such that each agent v has a color \(\sigma _v\) and \(d_v = \omega (\log n)\) neighbors. Let \(p \in [0,1]\) be a constant and \(p^\star = 3 - 2\sqrt{2}\). Then, starting from a configuration where all agents initially support the red color and letting the agents run Biased-2-Choices(p, blue), it holds that:

  • \((1-\kappa (n))\)-consensus: If \(p > p^\star \), then there exists a constant \(\lambda \) such that for every \(\kappa (n) : {\mathbb {N}} \rightarrow [0,1]\) with \(\kappa (n) \ge \lambda \cdot \frac{\log n}{d_{_{\min }}}\), the dynamics reaches a \((1-\kappa (n))\)-consensus on color blue within \({\mathcal {O}}(\log (1/\kappa (n)))\) rounds, w.h.p.

  • Metastability: If \(p < p^\star \), then the volume of the blue agents never exceeds \(\frac{1-3p}{4(1-p)} \mathrm {vol}(V)\) for any \( {\mathrm {poly}}(n)\) number of rounds, w.h.p.

  • Critical value: If \(p = p^\star \) and G is the complete graph, the dynamics reaches a consensus on color blue in round \(t \in \varOmega (\root 4 \of {n/\log n}) \cap {\mathcal {O}}(n \log n)\), w.h.p.

Note that in the \((1-\kappa (n))\)-consensus result there is a lower bound on the function \(\kappa (n) = \varOmega (\frac{\log n}{d_{_{\min }}})\). Indeed, given no topological assumption on the graph other than the minimum degree, our proof techniques cannot guarantee a stronger consensus. As a consequence, the higher the minimum degree, the closer to a complete consensus our analysis can get.

3.1 Almost-consensus

Let \(p > 3 - 2\sqrt{2}\). Let \(f_p({\bar{\phi }}) = \varepsilon \) be the local minimum of \(f_p\). Note that \(\varepsilon \) is positive because of (2) and it is a constant since it only depends on p and \({\bar{\phi }}\), which are both constants. Due to the convexity of \(f_p(\phi )\), it holds that \(f_p(\phi ) \ge \varepsilon \) for every \(\phi \in [0,1]\). Thus, for every \(v \in V\), we have that

$$\begin{aligned}&{\mathbf {E}}\left[ \phi ^{(t+1)}_v \ \big | \ {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}} \right] \\&\quad \le g_p(\phi _{_{\max }}^{(t)}) = \phi _{_{\max }}^{(t)} (1 - f_p(\phi _{_{\max }}^{(t)})) \le \phi _{_{\max }}^{(t)} (1 - \varepsilon ). \end{aligned}$$

Thus, we can apply a multiplicative form of the Chernoff bounds directly to the upper bound of the expected fraction of red neighbors at the next round, as shown in [31, Exercise 1.1], and obtain

$$\begin{aligned}&{\mathbf {P}}_{} \left( \phi ^{(t+1)}_v> (1-\varepsilon ^2) \phi _{_{\max }}^{(t)} \ \big | \ {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}} \right) \\&\quad ={\mathbf {P}}_{} \left( \phi ^{(t+1)}_v> (1+\varepsilon )(1-\varepsilon ) \phi _{_{\max }}^{(t)} \ \big | \ {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}} \right) \\&\quad = {\mathbf {P}}_{} \left( r^{(t+1)}_v > (1+\varepsilon )(1-\varepsilon ) \phi _{_{\max }}^{(t)} d_v \ \big | \ {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}} \right) \\&\quad \le e^{-\frac{\varepsilon ^2}{3}(1 - \varepsilon ) \phi _{_{\max }}^{(t)} d_v} \le e^{-\frac{\varepsilon ^2}{3}(1 - \varepsilon ) \phi _{_{\max }}^{(t)} d_{_{\min }}} \\&\quad \le e^{-2\log n} = n^{-2}, \end{aligned}$$

where the last inequality only holds for configurations \({\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}}\) such that \(\phi _{_{\max }}^{(t)} \ge \kappa (n)\), since by hypothesis we have that \(\kappa (n) \ge \lambda \cdot \frac{\log n}{d_{_{\min }}}\) where we set \(\lambda = \frac{6}{\varepsilon ^2 (1 - \varepsilon )}\). Thus, using the union bound over all the agents, we get that \(\phi _{_{\max }}^{(t+1)} \le (1-\varepsilon ^2)\phi _{_{\max }}^{(t)}\), w.h.p. Formally, for all t such that \(\phi _{_{\max }}^{(t)} \ge \kappa (n)\),

$$\begin{aligned}&{\mathbf {P}}_{} \left( \exists v \in V: \phi ^{(t+1)}_v> (1-\varepsilon ^2)\phi _{_{\max }}^{(t)} \ \big | \ {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}} \right) \\&\quad \le \sum _{ v \in V}{\mathbf {P}}_{} \left( \phi ^{(t+1)}_v > (1-\varepsilon ^2)\phi _{_{\max }}^{(t)} \ \big | \ {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}} \right) \\&\quad \le \sum _{ v \in V} n^{-2} = n^{-1}. \end{aligned}$$

Starting from a configuration where all agents are in state red and thus \(\phi _{_{\max }}^{(0)} = 1\), we get that after T rounds \(\phi _{_{\max }}^{(T)} \le (1-\varepsilon ^2)^{T}\) and, considering \(T={\mathcal {O}}(\log (1/\kappa (n)))\), it follows that \(\phi _{_{\max }}^{(T)} \le \kappa (n)\). Indeed,

$$\begin{aligned}&\phi _{_{\max }}^{(T)} \le (1-\varepsilon ^2)^T \le \kappa (n) \\&\quad \iff T \log (1-\varepsilon ^2) \le \log (\kappa (n)) \\&\quad \iff T \ge \log (\kappa (n)) / \log (1-\varepsilon ^2) \\&\quad \iff T \ge \log (1/\kappa (n)) / \log (1/(1-\varepsilon ^2)), \end{aligned}$$

which implies \(T = {\mathcal {O}}(\log (1/\kappa (n)))\) since \(\varepsilon \) is a positive constant.

N   ote that if the configuration \({\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}}\) is such that \(\phi _{_{\max }}^{(t)} < \kappa (n)\), i.e., after \({\mathcal {O}}(\log (1/\kappa (n)))\) rounds of the Biased-2-Choices(p, blue) dynamics, the process has reached a \((1-\kappa (n))\)-consensus on color blue. Indeed,

$$\begin{aligned} \mathrm {vol}(R^{(t)})&= \sum _{v \in R} d_v = \sum _{v \in V} (d_v - b_v^{(t)}) \\&= \sum _{v \in V} d_v \left( 1-\frac{b_v^{(t)}}{d_v}\right) = \sum _{v \in V} d_v \phi _v^{(t)} \\&\le \phi _{_{\max }}^{(t)} \sum _{v \in V} d_v = \kappa (n) \mathrm {vol}(V). \end{aligned}$$

3.2 Metastability

Let \(p < 3 - 2\sqrt{2}\). Define \(f_p({\bar{\phi }}) = -\varepsilon \) to be the local minimum of f. Recall that \(\varepsilon \) is positive because of (3) and it is a constant since it only depends on the constants p and \({\bar{\phi }}\).

Then, using the fact that \(g_p(\phi )\) is monotonically nondecreasing for \(\phi \in [0,1]\), for every \(\phi \ge {\bar{\phi }}\) we have that

$$\begin{aligned} g_p(\phi ) \ge g_p({\bar{\phi }}) = {\bar{\phi }}(1- f_p({\bar{\phi }})) = {\bar{\phi }}(1 + \varepsilon ). \end{aligned}$$

We can now use a multiplicative form of the Chernoff bounds in order to show that if the fraction of red neighbors of an agent v is at least \({\bar{\phi }}\), then the probability that the number of red neighbors of v in the next round is lower than \({\bar{\phi }}\) is negligible. Formally, let \({\mathbf {c}}^{(t)}\) be an arbitrary configuration such that \(\phi _{_{\min }}^{(t)} \ge {\bar{\phi }}\), e.g., the initial configuration \({\mathbf {c}}^{(0)}\) has this property. First, note that due to \(g_p(\phi ) \ge g_p({\bar{\phi }})\), we have that

$$\begin{aligned} {\mathbf {E}}\left[ \phi ^{(t+1)}_v \ \big | \ {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}} \right] \ge g_p(\phi _{_{\min }}^{(t)}) \ge g_p({\bar{\phi }}) = {\bar{\phi }}(1 + \varepsilon ). \end{aligned}$$

Then, it follows that

$$\begin{aligned}&{\mathbf {P}}_{} \left( \phi ^{(t+1)}_v\!<\!{\bar{\phi }} \ \big | \ {\mathbf {c}}^{(t)} \right) \\&\quad = {\mathbf {P}}_{} \left( \phi ^{(t+1)}_v\!<\!\frac{1}{1 + \varepsilon } {\bar{\phi }} (1 + \varepsilon ) \!\ \big | \ \!{\mathbf {c}}^{(t)}\!=\!\bar{{\mathbf {c}}} \right) \\&\quad = {\mathbf {P}}_{} \left( \phi ^{(t+1)}_v\!<\!\left( 1 - \frac{\varepsilon }{1 + \varepsilon }\right) {\bar{\phi }} (1 + \varepsilon ) \ \big | \ {\mathbf {c}}^{(t)}\!=\!\bar{{\mathbf {c}}} \right) \\&\quad \le {\mathbf {P}}_{} \left( \phi ^{(t+1)}_v\!<\!\left( 1 - \frac{\varepsilon }{1 + \varepsilon }\right) {\mathbf {E}}\left[ \phi ^{(t+1)}_v\!\ \big | \ \!{\mathbf {c}}^{(t)}\!=\!\bar{{\mathbf {c}}} \right] \!\ \big | \ \!{\mathbf {c}}^{(t)}\!=\!\bar{{\mathbf {c}}} \right) \\&\quad = {\mathbf {P}}_{} \left( r^{(t+1)}_v\!<\!\left( 1 - \frac{\varepsilon }{1 + \varepsilon }\right) d_v {\mathbf {E}}\left[ \phi ^{(t+1)}_v\!\ \big | \ \!{\mathbf {c}}^{(t)}\!=\!\bar{{\mathbf {c}}} \right] \!\ \big | \ \!{\mathbf {c}}^{(t)}\!=\!\bar{{\mathbf {c}}} \right) \\&\quad \le \exp \left( -\frac{\varepsilon ^2}{3(1 + \varepsilon )^2} d_v {\mathbf {E}}\left[ \phi ^{(t+1)}_v\!\ \big | \ \!{\mathbf {c}}^{(t)}\!=\!\bar{{\mathbf {c}}} \right] \!\ \big | \ \!{\mathbf {c}}^{(t)}\!=\!\bar{{\mathbf {c}}} \right) \\&\quad \le \exp \left( -\frac{\varepsilon ^2}{3(1 + \varepsilon )^2} d_v {\bar{\phi }} (1 + \varepsilon )\right) \\&\quad = e^{-\varOmega (d_v)} = e^{-\omega (\log n)} = n^{-\omega (1)}. \end{aligned}$$

Applying the union bound over all the agents, we get

$$\begin{aligned}&{\mathbf {P}}_{} \left( \exists t \in {\mathrm {poly}}(n), \exists v \in V : \phi ^{(t+1)}_v< {\bar{\phi }} \ \big | \ {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}} \right) \\&\quad \quad \le \sum _{\begin{array}{c} t \in {\mathrm {poly}}(n)\\ v \in V \end{array}} {\mathbf {P}}_{} \left( \phi ^{(t+1)}_v < {\bar{\phi }} \ \big | \ {\mathbf {c}}^{(t)} = \bar{{\mathbf {c}}} \right) \\&\quad = \sum _{\begin{array}{c} t \in {\mathrm {poly}}(n)\\ v \in V \end{array}} n^{-\omega (1)} = n^{-\omega (1)}. \end{aligned}$$

Thus, with high probability we have that \(\phi _{_{\min }}^{(t)} \ge {\bar{\phi }}\) for every round polynomial number of rounds. Before we can use this to finish the proof, note that \(\sum _{v \in B^{(t)}} d_v = \sum _{v \in V} (d_v - r_v^{(t)})\), by simply counting the number of blue endpoints of an edge in two different ways. Using that \(\phi _v^{(t)} \ge \phi _{_{\min }}^{(t)} \ge {\bar{\phi }}\) for each v, we have

$$\begin{aligned} \mathrm {vol}(B^{(t)})&= \sum _{v \in B} d_v = \sum _{v \in V} (d_v - r_v^{(t)}) \\&= \sum _{v \in V} d_v \left( 1-\frac{r_v^{(t)}}{d_v}\right) \\&\le (1-{\bar{\phi }}) \sum _{v \in V} d_v = \frac{1-3p}{4(1-p)} \mathrm {vol}(V). \end{aligned}$$

This means, the volume of the blue agents never exceeds a fraction of \(\frac{1-3p}{4(1-p)}\) of the total volume of the graph, w.h.p.

3.3 Critical value

In this section we prove the critical-value part of Theorem 1. The analysis of the behavior of the dynamics becomes harder if \(p = 3 - 2\sqrt{2}\). Indeed in this case the expected evolution of the dynamics cannot describe accurately its real evolution. For this reason we consider the simplest case where the underlying graph G is a clique (assuming it also has self-loops, to further simplify the analysis). In this scenario we prove both an upper and a lower bound on the converge time of the dynamics to a consensus.Footnote 4

In the upper bound the main idea is to use the variance of the process to show that, in near-linear time, the color configuration is unbalanced enough toward color blue so that the process quickly reaches the blue monochromatic configuration. The main part of the lower bound, instead, is where we show that there is a time-frame where the drift toward the blue configuration gets smaller and smaller, and the bound then follows by applying known results on submartingales. In both analyses, many events happen with constant probability, so it is not possible to apply the same technique used in the previous sections where \(p \ne p^\star \), i.e., giving bounds neighborhood by neighborhood and “merge” them through a union bound.

Even if we restrict the analysis to the case where G is the complete graph, we observe that in this context the convergence time of the dynamics is quite different from both the previous cases, being closer to the convergence time of Voter [8].

Upper bound We first show an upper bound to the time that the process needs to reach a configuration in which the number of blue nodes is big enough, e.g., 3/4 of the total, exploiting the variance of the process. Then, starting from a configuration where 3/4 of the nodes are blue, we can rely on previous results on the unbiased version of the 2-Choices dynamics [20], which is stochastically dominated by the Biased-2-Choices(p, blue) (having no help of the bias p in reaching a blue consensus and, thus, being slower).

  1. 1.

    Let \(b^{(t)} = n (1 - \phi ^{(t)})\) be the random variable counting the number of blue nodes at time t and let \(\tau := \inf \{t \in {\mathbb {N}} : b^{(t)} \ge \frac{3}{4}n\}\) be a stopping time. We first show in Lemma 1 that starting from any configuration where \(b^{(0)} < \frac{3}{4}n\), it holds that \({\mathbf {E}}\left[ \tau \right] = {\mathcal {O}}(n)\). As a simple application of the Markov inequality we get that \({\mathbf {P}}_{} \left( \tau > 2{\mathbf {E}}\left[ \tau \right] \right) \le \frac{{\mathbf {E}}\left[ \tau \right] }{2{\mathbf {E}}\left[ \tau \right] } \le \frac{1}{2}\), using Lemma 1. As an application of the Union Bound we get that, w.h.p., the hitting condition is satisfied at least once within \(\log n\) attempts. This shows that the stopping time \(\tau = {\mathcal {O}}(n \log n)\) w.h.p., namely the process reaches a configuration such that the number of blue nodes is at least \(\frac{3}{4}n\) within \({\mathcal {O}}(n \log n)\) rounds, w.h.p.

  2. 2.

    Starting from such a set of configurations we apply the results on the 2-Choices dynamics [20, Theorem 1], which is stochastically dominated by the Biased-2-Choices(p, blue). There the authors show that the dynamics converges to the all-blue configuration in \({\mathcal {O}}(\log n)\) rounds, w.h.p., if the initial unbalance toward the blue color is big enough with respect to some function of the spectral expansion of the graph.

In detail, we first apply our previous equations on the complete graph G. Since G is the complete graph with self-loops we have that the set of neighbors for each \(v \in V\) is \(N_v=V\). Thus, for each \(v,w \in V\) the number of red neighbors is equal, i.e., \(r_v = r_w\), and therefore also the ratio of red neighbors is equal, i.e., \(\phi _v = \phi _w\). Therefore, for the sake of simplicity, we will just look at the number of red neighbors \(r^{(t)}\) and at the fraction of red neighbors

$$\begin{aligned} \phi ^{(t)} := \frac{r^{(t)}}{n}. \end{aligned}$$

The topology of G also implies that a configuration \({\mathbf {c}}^{(t)}\) at time t is completely determined by the number (or fraction) of red nodes at time t. Thus, for this scenario, it follows from Equation (1) that

$$\begin{aligned} {\mathbf {E}}\left[ \phi ^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] = \phi \left( 1-f_{p^\star }(\phi )\right) , \end{aligned}$$
(4)

since the minimum and maximum fraction of red neighbors are the same for all nodes and equal among them, i.e., \(\phi _{_{\min }} = \phi _{_{\max }} = \phi \). Since in this scenario

$$\begin{aligned} p = p^\star = 3 - 2\sqrt{2}{}, \end{aligned}$$

we get that

$$\begin{aligned} f_{p^\star }(\phi ) = 2\left( 1-p^\star \right) ^2\phi ^2-(1-p^\star )(3-p^\star )\phi +1. \end{aligned}$$
(5)

Note that \(f_{p^\star } \in [0,1]\) for every \(\phi \in [0,1]\) and thus it holds that \({\mathbf {E}}\left[ \phi ^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] \le \phi ^{(t)}\). Thus the converse must also hold, i.e.,

$$\begin{aligned} {\mathbf {E}}\left[ 1-\phi ^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] \ge 1-\phi ^{(t)}. \end{aligned}$$
(6)

Lemma 1

Let \(b^{(t)}\) the random variable counting the number of blue nodes at time t and let \(\tau := \inf \{t \in {\mathbb {N}} : b^{(t)} \ge \frac{3}{4}n\}\) be a stopping time. Starting from any configuration where \(r^{(0)} \ge \frac{1}{4}n\), it holds that \({\mathbf {E}}\left[ \tau \right] = {\mathcal {O}}(n)\).

Proof

We start by proving that

$$\begin{aligned} \mathbf {Var}\left[ b^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] \ge r^{(t)} \xi _r (1-\xi _r) \ge \delta n, \end{aligned}$$
(7)

where \(\delta := \frac{(p^\star )^2(1-p^\star )}{16}\) and \(\xi _r \ge (p^\star )^2\) are constant w.r.t. n. The core of the proof are indeed Eqs. (6) and (7), that allow us to show that when the number of blue nodes is sufficiently large, i.e., \(b^{(t)} \ge \frac{3}{4}n\), the dynamics is a submartingale with conditional variance \(\varTheta (n)\). Then we show that \(\tau := \inf \{t \in {\mathbb {N}} : b^{(t)} \ge \frac{3}{4}n\}\) is a hitting time with linear expectation w.r.t. the number of nodes n.

Since \(b^{(t)} := n(1-\phi ^{(t)})\), Eq. (6) implies that

$$\begin{aligned} {\mathbf {E}}\left[ b^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] \ge b^{(t)}. \end{aligned}$$

Let X(v) be an indicator random variable for the event “node v is blue in the next round”. We have \(X(v) = 1\) if v is currently red and sees two blue nodes; we denote the probability of this event with \(\xi _r\). We also have \(X(v) = 1\) if v is currently blue and does not see two red nodes; we denote the probability of this event with \(\xi _b\). By indicating with \(\text {Bin}(n,\,p)\) a random variable sampled from a binomial distribution with parameters n (trials) and p (probability of success), it follows that

$$\begin{aligned}&\mathbf {Var}\left[ b^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] \\&\quad = \mathbf {Var}\left[ \sum _{v \in V} X(v) \ \big | \ \phi ^{(t)}=\phi \right] \\&\quad = \mathbf {Var}\left[ \sum _{v \in r^{(t)}} X(v) + \sum _{v \in b^{(t)}} X(v) \ \big | \ \phi ^{(t)}=\phi \right] \\&\quad = \mathbf {Var}\left[ \text {Bin}(r^{(t)},\,\xi _r) + \text {Bin}(b^{(t)},\,\xi _b) \ \big | \ \phi ^{(t)}=\phi \right] \\&\quad = \mathbf {Var}\left[ \text {Bin}(r^{(t)},\,\xi _r) \ \big | \ \phi ^{(t)}=\phi \right] +\\&\qquad + \mathbf {Var}\left[ \text {Bin}(b^{(t)},\,\xi _b) \ \big | \ \phi ^{(t)}=\phi \right] \\&\quad \ge \mathbf {Var}\left[ \text {Bin}(r^{(t)},\,\xi _r) \ \big | \ \phi ^{(t)}=\phi \right] \\&\quad = r^{(t)} \xi _r (1-\xi _r). \end{aligned}$$

Recall that, by hypothesis, \(r^{(t)} \ge \frac{1}{4}n\). Moreover, note that: (i) \(\xi _r\) (i.e., the probability of seeing blue twice), is greater than that of seeing blue twice only considering the bias and thus \(\xi _r \ge (p^\star )^2\); (ii) \((1-\xi _r)\), (i.e., the probability of seeing at least one red), is greater than the probability that the first node that we see is red, thus \( (1-\xi _r) \ge (1-p^\star )\phi \ge \frac{1-p^\star }{4}. \) Therefore it follows that \( \mathbf {Var}\left[ b^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] \ge r^{(t)} \xi _r (1-\xi _r) \ge \frac{(p^\star )^2(1-p^\star )n}{16} = \delta n, \) where \(\delta := \frac{(p^\star )^2(1-p^\star )}{16}\).

Let us now define a new random variable \(Z^{(t)} := (b^{(t)})^2 - \delta n t\). We show that the random process defined by \(\{Z^{(t)}\}_{t \in {\mathbb {N}}}\) is a submartingale. Observe that

$$\begin{aligned}&{\mathbf {E}}\left[ Z^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] \\&\quad = {\mathbf {E}}\left[ (b^{(t+1)})^2 \ \big | \ \phi ^{(t)}=\phi \right] - \delta n (t+1) \\&\quad = {\mathbf {E}}\left[ b^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] ^2 + \\&\qquad +\mathbf {Var}\left[ b^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] - \delta n (t+1) \\&\quad {\mathop {\ge }\limits ^{(a)}} {\mathbf {E}}\left[ b^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] ^2 + \delta n - \delta n (t+1) \\&\quad = {\mathbf {E}}\left[ b^{(t+1)} \ \big | \ \phi ^{(t)}=\phi \right] ^2 - \delta n t \\&\quad {\mathop {\ge }\limits ^{(b)}} (b^{(t)})^2 - \delta n t = Z^{(t)}, \end{aligned}$$

where in (a) we used the lower bound on the conditional variance [Eq. (7)], and in (b) we used the fact that the fraction of blue nodes is a submartingale [Eq. (6)].

Let us define the stopping time \(\tau := \inf \{t \in {\mathbb {N}} : b^{(t)} \ge \frac{3}{4}n\}\). Note that \(\tau \) meets the conditions of the Optional Stopping Theorem [47, Corollary 17.7], in its version for submartingales. Indeed:

  • \({\mathbf {P}}_{} \left( \tau < \infty \right) = 1\) holds because the probability of jumping in the configuration where all nodes are blue at any time time t is lower bounded by a nonzero value independent from t, namely \({\mathbf {P}}_{} \left( b^{(t+1)}=n \right) \ge (p^\star )^{2n}\) (in words, it is at least the probability for each node to see twice color blue).

  • \(|Z^{(t)}| \le K\), for every \(t \le \tau \) and for some value K independent from t, holds because \(|Z^{(t)}| = |(b^{(t)})^2 - \delta n t| \le |(b^{(t)})^2| + |\delta n t| \le n^2 + cn\), where the last inequality holds from previous point, i.e., since \(\tau < \infty \) almost surely.

The Optional Stopping Theorem states that \({\mathbf {E}}\left[ Z^{(\tau )} \right] \ge {\mathbf {E}}\left[ Z^{(0)} \right] \); it then follows that

$$\begin{aligned} {\mathbf {E}}\left[ Z^{(\tau )} \right] = {\mathbf {E}}\left[ (b^{(\tau )})^2 \right] - \delta n {\mathbf {E}}\left[ \tau \right] \ge {\mathbf {E}}\left[ Z^{(0)} \right] = 0 \end{aligned}$$

and, thus, we can conclude that

$$\begin{aligned} {\mathbf {E}}\left[ \tau \right]&\le \frac{{\mathbf {E}}\left[ (b^{(\tau )})^2 \right] - {\mathbf {E}}\left[ Z^{(0)} \right] }{\delta n} = \frac{{\mathbf {E}}\left[ (b^{(\tau )})^2 \right] }{\delta n} \\&\le \frac{n^2}{\delta n} \le \frac{n}{\delta }. \end{aligned}$$

\(\square \)

We now apply previous results on the 2-Choices dynamics dynamics [20, Theorem 1], that claim that the 2-Choices dynamics dynamics converges in \({\mathcal {O}}(\log n)\) rounds to a consensus on the initial majority, w.h.p., if the second largest eigenvalue of the transition matrix of a random walk on the underlying graph is less or equal to \(1/\sqrt{2}\), and if the difference between the number of supporters of blue and red colors is \(\varOmega (n)\). Thanks to Lemma 1, we know that after \({\mathcal {O}}(n \log n)\) rounds the dynamics reaches a configuration where \(|B^{(t)}| \ge \frac{3}{4} n\), even if starting from an initial worst-case configuration where all nodes supported state red. This implies the \(\varOmega (n)\) condition on difference between blue and red colors support. Moreover note that the transition matrix of the clique with self loops is \(P = \frac{1}{n} J\), where J is the \(n \times n\) matrix of all ones and the eigenvalues of P are 1, with multiplicity 1, and 0 (including the second largest), with multiplicity \(n-1\).

Since the 2-Choices dynamics dynamics is equivalent to the Biased-2-Choices(p, blue) when \(p=0\), it follows from a stochastic domination argument that also the Biased-2-Choices(p, blue) dynamics converges in \({\mathcal {O}}(\log n)\) rounds to a blue consensus, w.h.p., since we lowered the bias p from \(p=p^\star =3 - 2\sqrt{2}\) to \(p=0\).

Lower bound The proof for the lower bound is divided in two parts. Note from Eq. (5) that \(f_{p^\star }\) has a root in \({\bar{\phi }} = \frac{1}{1+p^\star }\). Combining this fact with Eq. (4), it follows that when \(\phi ^{(t)} = {\bar{\phi }}\) the process is stationary in expectation, namely \({\mathbf {E}}\left[ \phi ^{(t+1)} \ \big | \ \phi ^{(t)}={\bar{\phi }} \right] = {\bar{\phi }}\). We essentially show a lower bound on the time the process needs to reach a configuration where the number of red nodes is \({\bar{\phi }}n\), starting from the initial configuration in which all nodes are red. In order to do this we use the following strategy:

  1. 1.

    We look at the evolution over time of the difference between the number of red nodes and the target number of red nodes, namely

    $$\begin{aligned} \varDelta ^{(t)} := r^{(t)} - {\bar{\phi }} n. \end{aligned}$$
    (8)

    Note that the closer \(\varDelta ^{(t)}\) is to zero, the smaller is the drift of the dynamics since it goes closer to the saddle point \({\bar{\phi }}\) where it is a martingale.

  2. 2.

    In Lemma 2 we prove an upper bound to the difference \(\varDelta ^{(t)}-\varDelta ^{(t+1)}\) in two consecutive rounds, namely that \(\varDelta ^{(t)}-\varDelta ^{(t+1)}\le [8p^\star + \sqrt{2}]\sqrt{n\log n}\) (we recall that \(p^\star = 3 - 2\sqrt{2}\)), starting from a configuration in which \(\varDelta ^{(t)} \le n^{\frac{3}{4}}\root 4 \of {\log n}\). The lemma allows us to give a lower bound on the time that the process needs to reach the saddle point in which \(\varDelta ^{(t)}\) is close to 0, w.h.p. In fact, if the process lies in a configuration such that \(\frac{1}{2} n^{\frac{3}{4}}\root 4 \of {\log n} \le \varDelta ^{(t)} \le n^{\frac{3}{4}}\root 4 \of {\log n}\), it needs \(({\frac{1}{2} n^\frac{3}{4}\root 4 \of {\log n}})/({[8p^\star + \sqrt{2}]\sqrt{n\log n}}) = \varOmega (\root 4 \of {n/\log n})\) rounds to reach a configuration such that \(\varDelta ^{(t)} = {\mathcal {O}}(1)\), w.h.p.

  3. 3.

    In Lemma 3, instead, we prove that at any time t such that \(\varDelta ^{(t)} = \omega (n^{\frac{3}{4}}\root 4 \of {\log n})\), e.g., at the beginning of the process in which \(\varDelta ^{(0)} = \varTheta (n)\), then the process either jumps in the desired range of values for \(\varDelta \) or the dynamics does not converge at all, w.h.p.

The proof follows from the two lemmas and from an application of the Union Bound for \({\tilde{{\mathcal {O}}}}(n^{\frac{1}{4}})\) rounds.

Lemma 2

If \(\varDelta ^{(t)} \le n^\frac{3}{4}\root 4 \of {\log n}\), then \((\varDelta ^{(t)}-\varDelta ^{(t+1)}) \le [8p^\star + \sqrt{2}]\sqrt{n\log n}\).

Proof

We first lower bound the decrease of the number of red nodes at each round by using a Chernoff Bound (Eq. (9)); then we express the result as a function of \(\varDelta ^{(t)}\).

Let \(r^{(t)}\) be the random variable counting the number of red nodes at time t. Let \(\varepsilon := \sqrt{\frac{2\log n}{{\mathbf {E}}\left[ r^{(t+1)} \right] }}\). Note that \(\varepsilon \in (0,1)\) since \(\varDelta ^{(t)} \le n^\frac{3}{4}\root 4 \of {\log n}\) that implies that \({\mathbf {E}}\left[ r^{(t+1)} \right] > 2 \log n\).

By applying a multiplicative form of the Chernoff bound, it holds that

$$\begin{aligned}&{\mathbf {P}}_{} \left( r^{(t+1)} < {\mathbf {E}}\left[ r^{(t+1)} \right] (1-\varepsilon ) \ \big | \ \varDelta ^{(t)} \le n^\frac{3}{4}\root 4 \of {\log n} \right) \nonumber \\&\quad \le e^{-\frac{\varepsilon ^2}{2}{\mathbf {E}}\left[ r^{(t+1)} \right] } = \frac{1}{n}. \end{aligned}$$
(9)

Recall that \({\bar{\phi }} = \frac{1}{1+p^\star }\) is the root of \(f_{p^\star }(\phi )\). Let us define the extra number of red nodes w.r.t. the critical number, i.e., the number of red nodes such that \(f_p(\phi ) = 0\), as

Thanks to Eq. (9) the following holds w.h.p.

$$\begin{aligned}&r^{(t+1)}&\ge {\mathbf {E}}\left[ r^{(t+1)} \right] (1 - \varepsilon ) \nonumber \\ \iff&r^{(t+1)} - {\bar{\phi }}n&\ge {\mathbf {E}}\left[ r^{(t+1)} \right] (1 - \varepsilon ) - {\bar{\phi }}n \nonumber \\ \iff&\varDelta ^{(t+1)}&\ge {\mathbf {E}}\left[ \varDelta ^{(t+1)} \right] - \varepsilon {\mathbf {E}}\left[ r^{(t+1)} \right] \\ \iff&-\varDelta ^{(t+1)}&\le - {\mathbf {E}}\left[ \varDelta ^{(t+1)} \right] + \varepsilon {\mathbf {E}}\left[ r^{(t+1)} \right] \nonumber \\ \iff&\varDelta ^{(t)}-\varDelta ^{(t+1)}&\le \varDelta ^{(t)} - {\mathbf {E}}\left[ \varDelta ^{(t+1)} \right] + \varepsilon {\mathbf {E}}\left[ r^{(t+1)} \right] \nonumber \\ \iff&\varDelta ^{(t)}-\varDelta ^{(t+1)}&\le \varDelta ^{(t)} - {\mathbf {E}}\left[ \varDelta ^{(t+1)} \right] \nonumber \\&\qquad + \sqrt{2\log n} \sqrt{{\mathbf {E}}\left[ r^{(t+1)} \right] } \nonumber \\ \iff&\varDelta ^{(t)}-\varDelta ^{(t+1)}&{\mathop {\le }\limits ^{(a)}} \varDelta ^{(t)} - {\mathbf {E}}\left[ \varDelta ^{(t+1)} \right] + \sqrt{2n\log n}, \nonumber \end{aligned}$$
(10)

where in (a) we use that \({\mathbf {E}}\left[ r^{(t+1)} \right] \le n\). In order to conclude the proof, we show in the next claim a suitable formulation for the expectation of \(\varDelta ^{(t+1)}\) that will be used in the last steps.

Claim

It holds that

$$\begin{aligned} {\mathbf {E}}\left[ \varDelta ^{(t+1)} \ \big | \ \varDelta ^{(t)}, r^{(t)} \right] = \varDelta ^{(t)}\left[ 1- 8p^\star \frac{\varDelta ^{(t)}}{n}\frac{r^{(t)}}{n}\right] . \end{aligned}$$

Proof

By using Eq. (4), we get that

$$\begin{aligned} {\mathbf {E}}\left[ \varDelta ^{(t+1)} \right]&= {\mathbf {E}}\left[ r^{(t+1)} \right] - {\bar{\phi }}n \\&= r^{(t)}\left[ 1 - f_{p^\star }\left( \frac{r^{(t)}}{n}\right) \right] - {\bar{\phi }}n \\&= r^{(t)} - r^{(t)}\cdot f_{p^\star }\left( \frac{r^{(t)}}{n}\right) - {\bar{\phi }}n \\&= \varDelta ^{(t)} - r^{(t)}\cdot f_{p^\star }\left( \frac{r^{(t)}}{n}\right) \\&= \varDelta ^{(t)} \left[ 1 - \frac{r^{(t)}}{\varDelta ^{(t)}}\cdot f_{p^\star }\left( \frac{r^{(t)}}{n}\right) \right] . \end{aligned}$$

Moreover, by using the definition of \(\varDelta \) (Equation (8)), we have that

$$\begin{aligned} f_{p^\star }\left( \frac{r^{(t)}}{n}\right)&= \left( (1+p^\star ) \frac{r^{(t)}}{n} - 1 \right) ^2 \\&= \left( (1+p^\star ) \left( \frac{\varDelta ^{(t)} + {\bar{\phi }}n}{n} \right) - 1 \right) ^2 \\&= \left( (1+p^\star ) \left( \frac{\varDelta ^{(t)}}{n} + {\bar{\phi }} \right) - 1 \right) ^2 \\&= \left( (1+p^\star ) \frac{\varDelta ^{(t)}}{n} + 1 - 1 \right) ^2 \\&= (1+p^\star )^2 \left( \frac{\varDelta ^{(t)}}{n}\right) ^2. \end{aligned}$$

By combining the last two equations, and noticing that \((1+p^\star )^2 = 8p^\star \), we get

$$\begin{aligned}&{\mathbf {E}}\left[ \varDelta ^{(t+1)} \right] \nonumber \\&\quad = \varDelta ^{(t)} \left[ 1 - \frac{r^{(t)}}{\varDelta ^{(t)}}\cdot 8p^\star \left( \frac{\varDelta ^{(t)}}{n}\right) ^2\right] \nonumber \\&\quad = \varDelta ^{(t)} \left[ 1 - 8p^\star \frac{\varDelta ^{(t)}}{n} \frac{r^{(t)}}{n} \right] . \end{aligned}$$
(11)

\(\square \)

Using the previous claim we conclude that

$$\begin{aligned} \varDelta ^{(t)}-\varDelta ^{(t+1)}&\le \varDelta ^{(t)} - \varDelta ^{(t)} + 8p^\star \frac{(\varDelta ^{(t)})^2}{n}\frac{r^{(t)}}{n} \\&\qquad + \sqrt{2n\log n} \\&{\mathop {\le }\limits ^{(a)}} 8p^\star \frac{(\varDelta ^{(t)})^2}{n} + \sqrt{2n\log n} \\&{\mathop {\le }\limits ^{(b)}} [8p^\star + \sqrt{2}]\sqrt{n\log n}, \end{aligned}$$

where in (a) we use that \(r^{(t)} \le n\) and in (b) that \(\varDelta ^{(t)} \le n^\frac{3}{4}\root 4 \of {\log n}\). \(\square \)

Lemma 3

The process does not jump from a configuration where \(\varDelta \ge n^\frac{3}{4}\root 4 \of {\log n}\) to a configuration where \(\varDelta < \frac{1}{2} n^\frac{3}{4}\root 4 \of {\log n}\), w.h.p.

Proof

Starting from Eq. (11) we get

$$\begin{aligned} {\mathbf {E}}\left[ \varDelta ^{(t+1)} \right]&= \varDelta ^{(t)} \left[ 1 - 8p^\star \frac{\varDelta ^{(t)}}{n} \frac{r^{(t)}}{n} \right] \nonumber \\&= \varDelta ^{(t)} \left[ 1 - 8p^\star \cdot \left( \frac{r^{(t)}-{\bar{\phi }}n}{n}\right) \frac{r^{(t)}}{n} \right] \nonumber \\&\ge \varDelta ^{(t)} \left[ 1 - 8p^\star \cdot \left( \frac{n-{\bar{\phi }}n}{n}\right) \right] \nonumber \\&\ge \varDelta ^{(t)} \left[ 1 - 8p^\star \cdot (1-{\bar{\phi }}) \right] . \end{aligned}$$
(12)

Note that \(1 - 8p^\star \cdot (1-{\bar{\phi }}) \approx 0.8 > 0\). Thus, conditioning with respect to the complement of the event of Eq. (9) and using Eq. (10) as starting point, we get the following bound to the value of the random variable \(\varDelta ^{(t+1)}\), assuming a suitably large value of n:

$$\begin{aligned} \varDelta ^{(t+1)}&\ge {\mathbf {E}}\left[ \varDelta ^{(t+1)} \right] - \varepsilon {\mathbf {E}}\left[ r^{(t+1)} \right] \\&{\mathop {\ge }\limits ^{(a)}} {\mathbf {E}}\left[ \varDelta ^{(t+1)} \right] - \sqrt{2n\log n} \\&{\mathop {\ge }\limits ^{(b)}} (1 - 8p^\star \cdot (1-{\bar{\phi }})) \varDelta ^{(t)} - \sqrt{2n\log n} \\&{\mathop {\ge }\limits ^{(c)}} (1 - 8p^\star \cdot (1-{\bar{\phi }}) - \varepsilon ') \varDelta ^{(t)} \\&\ge \frac{1}{2}\varDelta ^{(t)} \ge \frac{1}{2}n^\frac{3}{4}\root 4 \of {\log n}, \end{aligned}$$

where in (a) we used that \(\varepsilon = \sqrt{\frac{2\log n}{{\mathbf {E}}\left[ r^{(t+1)} \right] }}\) and that \({\mathbf {E}}\left[ r^{(t+1)} \right] \le n\), in (b) we used Inequality (12), and in (c) we used that \(\sqrt{n\log n} = o(\varDelta ^{(t)})\) since \(\varDelta ^{(t)} \ge n^\frac{3}{4}\root 4 \of {\log n}\) and thus for any \(\varepsilon ' > 0\) there exists a suitably large n. \(\square \)

4 Results on core–periphery networks

In this section we present theoretical and experimental results about the behavior of the 2-Choices dynamics on networks exhibiting a core–periphery structure. In particular, in Sect. 4.1 we apply the technical result of Theorem 1 on a suitably defined class of Core–Periphery networks. In Sect. 4.2, instead, we introduce a new heuristic to identify a good core–periphery partition and simulate the behavior of the 2-Choices dynamics in the same setting we theoretically analyzed.

4.1 Theoretical results

Let us start by giving a formal definition of Core–Periphery networks on which it is possible to apply the results of Theorem 1.

Definition 4

Let \(n \in {\mathbb {N}}\) and \(\varepsilon ,c_r,c_d \in {\mathbb {R}}^+\), with \( \frac{1}{2} \le \varepsilon \le 1\). We define an \((n, \varepsilon , c_r,c_d)\)-Core–Periphery network \(G=(V, E)\) as a network where each agent either belongs to the core \({\mathcal {C}}{}\) or to the periphery \({\mathcal {P}}{}\), i.e., \(V = {\mathcal {C}}\mathbin {\dot{\cup }}{\mathcal {P}}\), with \(\vert {\mathcal {C}} \vert = n^\varepsilon \) and \(\vert {\mathcal {P}} \vert = n\), and such that:

  • for each agent \(u \in {\mathcal {C}}\), it holds that \(\vert N(u) \cap {\mathcal {C}}\vert = c_r \cdot \vert N(u) \cap {\mathcal {P}}\vert \),

  • for each agent \(v \in {\mathcal {P}}\), it holds that \(\vert N(v) \cap {\mathcal {C}}\vert = c_d \cdot \vert N(v) \cap {\mathcal {P}}\vert \),

where N(v) is the set of neighbors of agent v.

Note that the definition we just provided matches the requirements of the core–periphery structure as axiomatized by Avin et al. [5]. However, observe that it is more restrictive: The values \(c_r\) and \(c_d\) define properties that hold for each agent of the network and not only globally, i.e., for the partition induced by the core.

Let \(G = (V, E)\) be an \((n, \varepsilon , c_r, c_d)\)-Core–Periphery network with \(d_{_{\min }} = \omega (\log n)\). Note that the minimum degree assumption might seem strong for periphery agents that are usually weakly-connected. On the one hand, nowadays the social networks follow a densification trend [43], namely the number of connections grows faster than the number of agents, thus making the average degree increase. On the other hand, the assumption is made to simplify the analysis and to be able to use concentration arguments to show that the actual behavior of all agents is close to the expected one w.h.p. In fact, allowing a few agents in the periphery to have sublogarithmic degree does not change their expected behavior, but it is just not sufficient to use concentration of probability arguments.

We consider the natural setting in which, w.l.o.g., the agents belonging to the core \({\mathcal {C}}\) initially support the color blue while the remaining agents, from the periphery \({\mathcal {P}}\), support the color red. With the following theorem, we prove a phase transition of the 2-Choices dynamics on Core–Periphery networks, showing how to apply the technical results provided in Theorem 1.

Theorem 2

Let \(c^\star = \frac{\sqrt{2}-1}{2}\) be a universal constant. Let \(G=(V, E)\) be an \((n, \varepsilon , c_r, c_d)\)-Core–Periphery network such that \(d_{_{\min }} = \omega (\log n)\) and let G run the 2-Choices dynamics starting from an initial configuration where all the nodes in the core support color blue, while all the nodes in the periphery support color red. It holds that:

  • \((1-\kappa (n))\)-consensus: There exists a constant \(\lambda \) such that for all \(\kappa (n) : {\mathbb {N}} \rightarrow [0,1]\) with \(\kappa (n) \ge \lambda \cdot \frac{\log n}{d_{_{\min }}}\), there exists a round \(t \in {\mathcal {O}}(\log (1/\kappa (n)))\) such that:

    • if \(c_d > c^\star \) by a constant, and \(c_r > n^{(\varepsilon + \delta )/2}\) for a suitable constant \(\delta \), then \(\mathrm {vol}(B^{(t)}) = (1 - \kappa (n))\mathrm {vol}(V)\), w.h.p.

  • Metastability: For each round \(t \in {\mathrm {poly}}(n)\) it holds that:

    • if \(c_d < c^\star \) by a constant, then \(\mathrm {vol}(R^{(t)}) \ge \frac{3}{4}\mathrm {vol}({\mathcal {P}})\), w.h.p.

    • if \(c_r > \frac{1}{c^\star }\) by a constant, then \(\mathrm {vol}(B^{(t)}) \ge \frac{3}{4}\mathrm {vol}({\mathcal {C}})\), w.h.p.

Proof

Let \(q_{_{\mathcal {C}}} = \frac{| N(u) \cap {\mathcal {P}}|}{d_u}\) be the probability that an agent \(u \in {\mathcal {C}}\) picks a neighbor in the periphery, and let \(q_{_{\mathcal {P}}} = \frac{| N(v) \cap {\mathcal {C}}|}{d_v}\) be the probability that an agent \(v \in {\mathcal {P}}\) picks a neighbor in the core. The relations below follow from Definition 4:

$$\begin{aligned} \bullet \ c_r&= | N(u) \cap {\mathcal {C}}| \,/\, | N(u) \cap {\mathcal {P}}| = (1-q_{_{\mathcal {C}}}) \,/\, q_{_{\mathcal {C}}} \nonumber \\&\forall u \in {\mathcal {C}}, \end{aligned}$$
(13)
$$\begin{aligned} \bullet \ c_d&= | N(v) \cap {\mathcal {C}}| \,/\, | N(v) \cap {\mathcal {P}}| = q_{_{\mathcal {P}}} \,/\, (1-q_{_{\mathcal {P}}}) \nonumber \\&\forall v \in {\mathcal {P}}. \end{aligned}$$
(14)

Let \(c^\star = \frac{\sqrt{2} - 1}{2}\) be the constant which later defines a threshold on \(c_d\) between almost-consensus and metastability behavior. We get

$$\begin{aligned} c_r = 1 \,/\, (c^\star + \delta _r)&\implies q_{_{\mathcal {C}}} = 3 - 2\sqrt{2}+ \delta _r' \end{aligned}$$
(15)
$$\begin{aligned} c_d = c^\star + \delta _d&\implies q_{_{\mathcal {P}}} = 3 - 2\sqrt{2}+ \delta _d' \end{aligned}$$
(16)

for \(\delta _r\) and \(\delta _r'\) (\(\delta _d\) and \(\delta _d'\)) which are either both positive or both negative.

Almost-consensus For the almost-consensus result, we require a high robustness of the core such that it remains monochromatic for \({\mathcal {O}}(\log (1/\kappa (n)))\) rounds, where \(\kappa (n) : {\mathbb {N}} \rightarrow [0,1]\) with \(\kappa (n) \ge \lambda \cdot \frac{\log n}{d_{_{\min }}}\) by hypothesis. The following lemma is needed to link the robustness with this property.

Lemma 4

Let \(\varepsilon \) and \(\delta \) be two positive constants. Let \(G = (V,E)\) be a graph of \(n^\varepsilon \) agents, and let \(0 \le p \le n^{-{(\varepsilon + \delta )}/{2}}\). Starting from a configuration such that each agent initially supports the blue color, no agent becomes red within \({\mathcal {O}}(\log (1/\kappa (n)))\) rounds of the Biased-2-Choices(p, red), w.h.p.

Proof

The probability that an agent v changes its color to red at time t, given that all the other agents are still blue, is

$$\begin{aligned}&{\mathbf {P}}_{} \left( v \in R^{(t+1)} \ \big | \ V = B^{(t)} \right) = p^2 \\&\quad \le \left( n^{-(\varepsilon + \delta )/2}\right) ^2 = n^{-(\varepsilon + \delta )}. \end{aligned}$$

Applying the union bound over all the agents and over \(\tau = {\mathcal {O}}(\log (1/\kappa (n)))\) rounds, we get

$$\begin{aligned}&{\mathbf {P}}_{} \left( \exists t \le \tau ,\exists v \in V : v \in R^{(t+1)} \ \big | \ V = B^{(t)} \right) \\&\quad \le \frac{n^\varepsilon \cdot \tau }{n^{\varepsilon +\delta }} = {\mathcal {O}}(n^{-\delta /2}), \end{aligned}$$

since \(\tau = {\mathcal {O}}(\log (1/\kappa (n)))\) and \(\kappa (n) \ge \lambda \cdot \frac{\log n}{d_{_{\min }}}\). Thus, all agents in the graph remain blue for any logarithmic number of rounds, w.h.p. \(\square \)

If \(c_r \ge n^{(\varepsilon + \delta )/2}\), by Eq. (13) it follows that \( q_{_{\mathcal {C}}} = 1 \,/\, (c_r + 1) < 1 \,/\, c_r \le n^{-(\varepsilon + \delta )/2}. \) Thus, we can apply Lemma 4 which essentially claims that, if the core is robust enough, then the agents in the core never changes color for \({\mathcal {O}}(\log (1/\kappa (n)))\) rounds, w.h.p., even in the worst case scenario in which the nodes in the periphery always stay red. Therefore, for any \({\mathcal {O}}(\log (1/\kappa (n)))\) number of rounds, the process is, w.h.p., equivalent to a Biased-2-Choices(\(q_{_{\mathcal {P}}}\), blue) run by the subgraph induced by the nodes in the periphery. Since \(c_d > c^\star \) and thus \(q_{_{\mathcal {P}}} > 3 - 2\sqrt{2}\) by Eq. (16), we can apply Theorem 1 and get a \((1-\kappa (n))\)-consensus on the blue color within \({\mathcal {O}}(\log (1/\kappa (n)))\) number of rounds, w.h.p.

Metastability Consider the following worst case scenario: Every time an agent in the core (periphery) chooses a random neighbor belonging to the periphery (core), then that neighbor is red (blue). In this scenario, the 2-Choices dynamics can be thought of as two independent Biased-2-Choices(p, \(\sigma \)) in which for the core \(p = q_{_{\mathcal {C}}}\) and \(\sigma = red \), and for the periphery \(p = q_{_{\mathcal {P}}}\) and \(\sigma = blue \). From \(c_r > \frac{1}{c^\star }\) and \(c_d < c^\star \) and Eqs. (15) and (16), it follows that \(q_{_{\mathcal {C}}}\) and \(q_{_{\mathcal {P}}}\) are less than \(3 - 2\sqrt{2}\). By applying the metastability result of Theorem 1, we get that the volume of the adversary never exceeds \(\frac{1-3p}{4(1-p)}\) of the network’s volume. Since both \(q_{_{\mathcal {C}}}\) and \(q_{_{\mathcal {P}}}\) are smaller than \(3 - 2\sqrt{2}\), we have that \(\frac{1-3p}{4(1-p)} \le \frac{1}{4}\) (as the inequality is tight for \(p=0\) and its value is decreasing). Thus, the volumes of red (blue) agents in the core (periphery) are at most a fraction of \(\frac{1}{4}\). Therefore, the volumes of blue and red agents in the whole network are at least \(\frac{3}{4}\) of the volumes of \({\mathcal {C}}\) and \({\mathcal {P}}\), respectively. \(\square \)

4.2 Experimental results

In the previous Sect. 3 we formally studied the 2-Choices dynamics on Core–Periphery networks, observing a phase transition phenomenon that appears on a dominance threshold \(c^\star = \frac{\sqrt{2}-1}{2}\). Here, we report the results of the empirical data obtained by simulating the 2-Choices dynamics on real-world networks. Furthermore, we discuss our results and compare them with our theoretical analysis. The source code of the experiments is freely available.Footnote 5

We simulated the 2-Choices dynamics on 70 real-world networks, out of which 25 taken from KONECT [44] and 45 from SNAP [46]. Detailed information regarding the networks and the results of the experiments are reported in Table 1. The networks chosen for the experiments are drawn from a variety of domains including social networks, communication networks, road networks, and web graphs; moreover, they range in size from thousands of nodes and thousands of edges up to roughly one million of nodes and tens of millions of edges. Before simulating the 2-Choices dynamics , we pre-process the networks in order to match the theoretical setting. In particular, for all the networks, we remove the orientation of the edges and all loops, and we work on the largest (w.r.t. the number of nodes) connected component.

The first issue we faced simulating the 2-Choices dynamics was the extraction of the set of agents representing the core. In fact, there is no exact definition of what a good core is with respect to dominance and robustness values. We started by using a simple heuristic to extract the core, namely the k-rich-club method [61]: This method establishes the core \({\mathcal {C}}\) as the set of k agents with highest degree and the periphery \({\mathcal {P}}\) as the remaining agents. Avin et al. [5] empirically show that when k is at the balance point, i.e., k is chosen such that \(vol({\mathcal {C}}) \approx vol({\mathcal {P}})\), the core found by this method is sublinear in size with respect to the number of agents of the network. We remark that if \(vol({\mathcal {C}}) = vol({\mathcal {P}})\) then, from the definitions of robustness and dominance, it follows that \( c_r = \frac{1}{c_d} \) and the conductance of the cut dividing \({\mathcal {C}}\) from \({\mathcal {P}}\) is \(\varphi ({\mathcal {C}}, {\mathcal {P}}) = \frac{1}{1+c_r}\). In particular, a high robustness \(c_r\) and, thus, a low dominance \(c_d\) have direct implications on the topological structure of core and periphery. On the one hand, a high robustness implies that nodes in the core have a high number of neighbors in the core w.r.t. the neighbors in the periphery; on the other hand, a low dominance implies that nodes in the periphery have a low number of neighbors in the periphery w.r.t. the neighbors in the core. From the point of view of the conductance of the cut between the two sets, the higher the robustness (hence, the lower the dominance), the lower the conductance \(\varphi ({\mathcal {C}}, {\mathcal {P}})\), i.e., the two sets are well-separated.

We initially used the k-rich-club method to extract the core but noted that this simple heuristic produces a core with very low robustness values, contrary to what common sense would suggest to be a good core. In particular, low robustness values imply that the dominance values never go below our theoretical threshold \(c^\star \) (see columns \({\bar{c}}_r\) and \({\bar{c}}_d\) in Table 1), which hinders the comparison between theoretical and experimental results. Indeed, in our theoretical analysis we assume that the core never changes color, i.e., that the robustness is high; however, in the experiments the core was very unstable when using the k-rich-club method. The main issue of this method is that it does not take into account the topological structure of the network, e.g., if we consider a regular graph with a well defined core–periphery structure (which satisfies Definition 4) the k-rich-club method would identify the core to be a random subset of nodes.

Table 1 Experimental data. Source reports the source of the dataset, i.e., SNAP (S) or KONECT (K)

Therefore, we introduce a novel heuristic for extracting the core which takes the network topology into account by prioritizing the robustness of the core over its dominance. The procedure, which we refer to as densest-core method, is described in Algorithm 1. Informally, it iteratively extracts the densest subgraph from the network and adds it to the core unless the core’s volume becomes too large. In order to compute this constrained densest subgraph, it uses a variation of the 2-approximation algorithm [17], which chooses every time the densest subgraph that will not make the core’s volume larger than the periphery’s volume. A similar idea has been used in [50], where the concept of a k-rich club is used together with that of a random walk on the graph, by examining the probability of visiting rich nodes, in order to identify rich-cores.

figure b

We apply the densest-core method to the networks and, as expected, we obtain higher robustness and lower dominance values compared to the k-rich-club method. The data reported in Table 1 shows that the robustness of the core extracted by our method is higher in all the considered datasets but one. Indeed, we finally obtain dominance values below the theoretical threshold \(c^\star \).

We proceed as follows: We initialize all the agents in \({\mathcal {C}}\) with blue and all the agents in \({\mathcal {P}}\) with red. Then, we simulate the 2-Choices dynamics on each network, keeping track of the volumes of blue and red agents in each iteration. We declare an almost-consensus on the majority’s color if within \(\vert V \vert \) iterations either the red or the blue agents reach a volume greater than 95% of the network’s volume. Otherwise we consider the simulation metastable—waiting for a superpolynomial number of rounds would be infeasible. The experiments were repeated 50 times for each network.

Fig. 1
figure 1

Almost-consensus and metastability of the experiments compared to the theoretical and empirical thresholds \(c^\star \) and \(\sigma \). In 81% of the runs there is an almost-consensus if \(c_d > \sigma \); the 86% of them are metastable when \(c_d < \sigma \). The value t is the arithmetic mean of the number of rounds until almost-consensus/metastability was declared

As can be observed in Fig. 1, there exists an empirical threshold \(\sigma = \frac{1}{2}\) which is different from the theoretical one. In fact, in \(81\%\) of the datasets with a dominance above the threshold the 2-Choices dynamics converges to an almost-consensus while in \(86\%\) of the datasets with a dominance below the threshold, the 2-Choices dynamics ends up in a metastable phase. The empirical threshold is greater than the theoretical threshold because of several factors: (i) in the experiments the core actually changes color to a small extent (while in the theoretical part we ignored such small perturbations thanks to a high robustness assumption), and it consequently lowers the probability for an agent in the periphery to pick the core’s color; (ii) the real-world network we used in the experiments do not have the regularity assumptions of the networks that we consider in the analysis; (iii) in the experiments we declare metastability only after |V| iterations and this increases the likelihood of false positive metastable runs. The gap between the theoretical and the empirical threshold should be closed in future work by providing a more fine-grained theoretical analysis which does not assume the adversary’s color to be monochromatic and considers more general networks.

We want to highlight that the dynamics only converged to the color initially held by the periphery in two snapshots of the Gnutella P2P network, probably due to some specific topological features exhibited by those two networks. The protocol’s convergence to the core’s color (as shown in Table 1) is remarkable in light of the fact that the densest-core method ensures that the sum of the agents’ degrees of the core and of the periphery are equal. More precisely, note that equal volumes of core and periphery, starting from an initial configuration where two sets support different colors, is sufficient in the Voter Model to say that the two initial colors have the same probability to be the one eventually supported by all agents [37], regardless of the topological structure. Previous work on the 2-Choices dynamics [19] provided convergence results which are parametrized only in the difference of the volumes of the two sets, suggesting a similar behavior. Our experimental results highlight the insufficiency of the initial volume distribution as an accurate predictive parameter, showing that the topological structure of the core plays a decisive role.

5 Conclusions

We analyzed the 2-Choices dynamics on a class of networks with core–periphery structure, where the core, a small group of densely interconnected agents, initially holds a different opinion from the rest of the network, the periphery. We formally proved that a phase-transition phenomenon occurs: Depending on the dominance parameter \(c_d\) characterizing the connectivity of the network, either the core’s opinion spreads among the agents of the periphery and the network reaches an (almost-)consensus, or there is a metastability phase in which none of the opinions prevails over the other.

We validated our theoretical results on several real-world networks. Introducing an efficient and effective method to extract the core, we showed that the same parameter \(c_d\) is sufficient to predict the convergence/metastability of the 2-Choices dynamics most of the time. Surprisingly, even if the volumes of core and periphery are equal, the core’s opinion wins in most of the cases. These behaviors suggest that in many real-world networks there actually is a core whose initial opinion has a great advantage of spreading in simple opinion dynamics such as the 2-Choices. We think that these results are a relevant step towards understanding which dynamical properties are implicitly responsible for causing social and economic agents to form networks with a core–periphery structure.