1 Introduction

Human behavior is governed by many aspects, related to social context, culture, law and other factors. Most of these aspects tend to indicate that our behavior is heavily influenced by the behavior of the other people with whom we are in contact, either directly or indirectly by means of communication devices, information media, etc. Behavior refers here to any kind of action, decision to be taken, or opinion to be held on a given topic. As our environment is constantly changing, behavior and opinion of people, including us, are evolving with time, which makes central the following question: Given a society of agents in a network, given a mechanism of influence for each agent, how the behavior/opinion of the agents will evolve with time, and in particular can it be expected that it converges to some stable situation, and in this case, which one?

Evidently the question has been studied by sociologists and psychologists, and a number of pioneering models of “opinion dynamics” have been proposed by them, e.g., Granovetter [14], Abelson [1], French Jr [7], Friedkin and Johnsen [8], Taylor [25], but it has also attracted the attention of many physicists, assimilating agents to particles (this field is usually called “sociophysics”, after the work of Galam [11]; see a survey in Castellano et al. [6]), economists (see, e.g., the monograph of Jackson [16], and the survey by Acemoglu and Ozdaglar [2]), computer scientists and probabilists (by analogy with (probabilistic) cellular automata, see, e.g., Gravner and Griffeath [15] and the survey by Mossel and Tamuz [20]), etc.

One of the simplest model of behavior/opinion dynamics when the opinion or behavior is binary (yes/no, active/inactive, action 1 or 0, etc.) is the threshold model, also called the majority rule model [9], proposed by Granovetter [14], Schelling [24], among others. This model simply says that an agent takes action 1 if sufficiently enough people in his neighborhood takes action 1. The simplicity of the model allows for a deep analysis (see the surveys by Mossel and Tamuz [20] and Castellano et al. [6]), and one remarkable result already observed in the pioneering work of Granovetter [14] was that a cascade effect occurs, supposing that the population of agents starts from an initial state where nobody is active, and that the distribution of the threshold value is uniform over the population. Then, after a finite number of steps, all agents become active. Interestingly, the latter study was done in the context of a mob, where the available actions were “to riot” (action 1) or to be inactive (action 0). Then, agents with threshold 0 were called “instigators” as they start to riot alone, and this indeed forms the seed of the cascade effect, ending in a mob rioting. This topic has been very much studied, as demonstrated by a recent monograph on mob control [4], written by researchers in control theory.

So far, most models make the basic assumption that agents tend to follow the trend (they are conformist) and that nobody will have a kind of opposite behavior (anti-conformism), choosing action 0 if too many people take action 1. Although the literature on opinion dynamics is vast, very few studies consider that agents may be anti-conformist. In game theory, such kind of opposite behavior has been studied however, in what is called anti-coordination games, see, e.g., Bramoullé et al. [3], López-Pintado [18], congestion games [23], and fashion games [5]. In sociophysics, the first idea about anti-conformist agents seems to have been introduced by Galam [10] under the name of contrarians. Later works include those of Sznajd-Weron and also Juul and Porter. In Nyczka and Sznajd-Weron [22], the q-voter model is studied, where it is supposed that agents may adopt with some probability an anti-conformist attitude, while the threshold model is considered under this assumption in Nowak and Sznajd-Weron [21]. Close to this model is the recent study of Juul and Porter [17] about the spreading of two competing products, say A and B, where anti-conformist agents are called hipsters (see Touboul [26] where this terminology has been introduced). In Juul and Porter [17], starting from a network with all nodes inactive, a single node is uniformly chosen at random to adopt one product, say A, which buries the seed for the spreading process. They assume the threshold of a player (which can be a conformist or a hipster) as the minimum proportion of their active neighbors such that this player becomes active and the transition from active to inactive is a one-way process. Once the player becomes active, they must adopt one product according to the following rules: if he is a conformist, he will adopt the most popular product over his neighborhood; if he is a hipster, he will adopt the less popular product over the whole population. Under this assumption, they found that even a small proportion of hipsters can lead to a reversal of the popularity of two competing products. The model is similar in Nowak and Sznajd-Weron [21], in the sense that agents are selected at random for updating and their threshold is the same for all agents; however, an agent is not a priori conformist or anti-conformist, but is one or the other with some probability.

The present paper also studies a threshold model where both conformist and anti-conformist agents coexist, but in a rather different setting compared to Juul and Porter [17] and Nowak and Sznajd-Weron [21]. Firstly, we assume that updating is done at every period for all agents. Secondly, in our setting the thresholds are drawn from a distribution which means that they are random and different, in general. In addition, the two possible states of an agent are not treated symmetrically. These are the assumptions of the seminal paper of Granovetter [14].

Our paper is in the line of a previous work by the first author [13], whose results will be used at some point in the present paper. Our study bears essentially in answering the main question raised in the first paragraph, that is, on the convergence of the process, analyzing if absorbing states exist (stable state of the society) or if a cycle occurs, or even more chaotic situations. Also, we are interested by the existence of cascade effects, as this may constitute a undesirable phenomenon in collective behavior. We divide our study into two parts. In the first one, we basically study the threshold model supposing a fixed complete network, where every one is connected to every one, like in the work of Granovetter [14] (Sect. 2). We begin by giving a game-theoretic foundation to this model, by means of a mix of coordination and anti-coordination games. Then, we study the case of a uniform distribution of the threshold, of a Gaussian distribution, and finally give a result for arbitrary distributions, supposing there is one type of anti-conformist. In a second part (Sect. 3), we suppose that the neighborhood of an agent is random, drawn at each time step from a distribution. We distinguish the case where the degree (number of links) of an agent is fixed, and where there is an arbitrary degree distribution. Most of the proofs can be found in Appendix.

2 The Deterministic Threshold Model with Anti-conformists

2.1 The Model

Let \(N=\{1,\ldots , n\}\) be the society of agents. We suppose the existence of an underlying (exogenous) network \(G =(N,E)\) whose nodes are the agents and E is the set of (undirected) edges or links. Each agent i has a set of neighbors \(\varGamma _i=\{j\in N\,:\,\{i,j\}\in E\}\), and \(|\varGamma _i|=:d_i\) is the degree of agent i. We consider that \(i\in \varGamma _i\) for every agent i.

Two actions (or opinions, states) are available to each agent at every stage: 1 (agree, adopt, join, be active, etc.) and 0 (disagree, refuse, disjoin, be inactive, etc.). The action taken by agent i at stage t is denoted by \(a_i(t)\). For short, we will often use the term “active” for agents taking action 1, and “inactive” for agents taking action 0.

In the classical threshold model introduced by Granovetter [14], and Schelling [24] among others, agent i will take action 1 at next stage if the proportion of his neighbors taking action 1 exceeds some threshold \(\mu _i\in [0,1]\), otherwise action 0 is taken:

$$\begin{aligned} a_i(t+1) = {\left\{ \begin{array}{ll} 1, &{} \text { if } \frac{1}{|\varGamma _i|}\sum _{j\in \varGamma _i}a_j(t)\ge \mu _i\\ 0, &{} \text { otherwise.}\end{array}\right. } \end{aligned}$$
(1)

Note that unlike some threshold models, e.g., in Juul and Porter [17], Watts [27], an agent having adopted action 1 may return to action 0, because not enough neighbors take action 1.Footnote 1

Such behavior exhibits a tendency to follow the trend, and we call this type of agent a conformist. The tendency to do the opposite of the trend is called anti-conformism and can be modeled as follows:

$$\begin{aligned} a_i(t+1) = {\left\{ \begin{array}{ll} 0, &{} \text { if } \frac{1}{|\varGamma _i|}\sum _{j\in \varGamma _i}a_j(t)\ge \mu _i\\ 1, &{} \text { otherwise.}\end{array}\right. } \end{aligned}$$
(2)

When too many people take action 1, then an anti-conformist agent takes action 0, and vice-versa. In the rest of the paper, we denote by \(N_a\) the set of anti-conformist agents, and by \(N_c:=N\setminus N_a\) the set of conformist agents.

Observe that thresholds 0 and 1 play a particular role. For a conformist agent (respectively, an anti-conformist agent), a threshold equal to 0 means that he takes always action 1 (respectively, 0), while a threshold strictly greater than 1 implies to always take action 0 (respectively, 1). We call these agents constant 0-player and constant 1-player.

Our aim is to study the evolution of the dynamics of actions taken by the agents. To this aim, we define the state of the society at stage t, as the set S (or S(t)) of agents taking action 1 at stage t. Depending which one is more convenient, a state is either denoted as a set \(S\subseteq N\) or as its characteristic vector \(\mathbb {1}_S\) in \(\{0,1\}^N\). The process is deterministic and Markovian, i.e., transitions from S to T (denoted by \(S\rightarrow T\)) are with probability 1 and do not depend on states before S.

We are interested in finding absorbing states, i.e., such that \(S(t)=S(t+1)\) for some value of t, and cycles, i.e., sequences of transitions \(S_1\rightarrow S_2\rightarrow \cdots \rightarrow S_k\) where \(S_k=S_1\).

2.2 A Game-Theoretic Foundation of the Threshold Models

It is well-known that the classical threshold model can be explained by a local coordination game (see, e.g., Morris [19]). We show that the anti-conformist threshold model can be explained in a similar way via a local anti-coordination game. We recall first the result for the classical model.

Consider two players (row, column) whose set of strategies is \(\{0,1\}\) with the following payoff matrix:

figure a

with \(0<q<1\). This is a coordination game since the two pure Nash equilibria arise when the players choose the same action. It can be checked that the best response of one player is 1 if he assigns a probability at least q that the other player chooses 1. Consider now our network \(G=(N,E)\) and a given player i. Given that player \(j\in \varGamma _i\) takes action \(a_j\), player’s i best response is to choose action a iff

$$\begin{aligned} \sum _{j\in \varGamma _i}u^c(a,a_j)\ge \sum _{j\in \varGamma _i}u^c(1-a,a_j) \end{aligned}$$

where the utility \(u^c(a,a_j)\) is given in the above table. Taking \(a=1\) we find, assuming that m players in \(\varGamma _i\) choose action 1:

$$\begin{aligned} \sum _{j\in \varGamma _i}u^c(1,a_j)&= \sum _{\begin{array}{c} j\in \varGamma _i\\ a_j=1 \end{array}}u^c(1,1) + \sum _{\begin{array}{c} j\in \varGamma _i\\ a_j=0 \end{array}}u^c(1,0) = m(1-q)\\ \sum _{j\in \varGamma _i}u^c(0,a_j)&= q(d_i-m). \end{aligned}$$

Therefore, player i’s best response is 1 iff \(m\ge qd_i\), assuming that in case of tie, 1 is chosen. This is exactly (1) with \(\mu _i=q\). This yields an interpretation for the threshold \(\mu _i\): it is the minimum probability that player i assigns to players in his neighborhood for choosing action 1.

We consider now the 2-players anti-coordination game given by the following matrix defining the utility \(u^a\) (2-dimensional with coordinates \(u_1^a,u_2^a\) for row and column players, respectively):

figure b

The game is symmetric in the sense that \(u^a_1(a,b)=u^a_2(b,a)\) for all actions ab, and there are two pure Nash equilibria arising when the players take different actions. It can be checked that the best response of one player is 1 if he assigns a probability at mostq that the other player chooses 1. Assuming that in case of tie, action 0 is taken, player i’s best response is 1 iff

$$\begin{aligned} \sum _{\begin{array}{c} j\in \varGamma _i \\ a_j=1 \end{array}}u^a_1(1,1) + \sum _{\begin{array}{c} j\in \varGamma _i \\ a_j=0 \end{array}}u^a_1(1,0)>\sum _{\begin{array}{c} j\in \varGamma _i \\ a_j=1 \end{array}}u^a_1(0,1) + \sum _{\begin{array}{c} j\in \varGamma _i \\ a_j=0 \end{array}}u^a_1(0,0) \end{aligned}$$

which leads to the condition \(m< qd_i\). We recover the anti-conformist model (2) with the same threshold as above \(\mu _i=q\). Now, the threshold of player i is the maximum probability that he assigns to players in his neighborhood for choosing action 1.

We now combine both types of players and consider the 2-players game with one conformist (row player) and one anti-conformist (column player) given by the following payoff matrix defining utility \(u^m\) (\(u^m\) is 2-dimensional, with coordinates \(u^m_1\) and \(u^m_2\) for the row and column players, respectively, but not symmetric):

figure c

In this game, there is no pure Nash equilibria, but one can check that the best response of the conformist player (respectively, the anti-conformist player) is 1 if he assigns a probability at least q (respectively, at most q) that the other player chooses 1. Consider now a given conformist player i in the network \(G=(N,E)\). Assuming that in case of a tie action 1 is taken, player i’s best response is 1 iff

$$\begin{aligned}&\sum _{\begin{array}{c} j\in \varGamma _i\cap N_c\\ a_j=1 \end{array}}u^c(1,1) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_a\\ a_j=1 \end{array}}u^m_1(1,1) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_c\\ a_j=0 \end{array}}u^c(1,0) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_a\\ a_j=0 \end{array}}u^m_1(1,0) \\&\quad \ge \sum _{\begin{array}{c} j\in \varGamma _i\cap N_c\\ a_j=1 \end{array}}u^c(0,1) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_a\\ a_j=1 \end{array}}u^m_1(0,1) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_c\\ a_j=0 \end{array}}u^c(0,0) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_a\\ a_j=0 \end{array}}u^m_1(0,0) \end{aligned}$$

which leads to the condition \(m\ge qd_i\), while if i is anti-conformist, best response is 1 iff

$$\begin{aligned}&\sum _{\begin{array}{c} j\in \varGamma _i\cap N_c\\ a_j=1 \end{array}}u^m_2(1,1) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_a\\ a_j=1 \end{array}}u^a_2(1,1) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_c\\ a_j=0 \end{array}}u^m_2(0,1) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_a\\ a_j=0 \end{array}}u^a_2(0,1)\\&\quad > \sum _{\begin{array}{c} j\in \varGamma _i\cap N_c\\ a_j=1 \end{array}}u^m_2(1,0) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_a\\ a_j=1 \end{array}}u^a_2(1,0) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_c\\ a_j=0 \end{array}}u^m_2(0,0) + \sum _{\begin{array}{c} j\in \varGamma _i\cap N_a\\ a_j=0 \end{array}}u^a_2(0,0) \end{aligned}$$

assuming that action 0 is taken in case of tie. This leads to the condition \(m<qd_i \).

Therefore, we can recover the threshold model with the same thresholds as above \(\mu _i=q\) for both conformists and anti-conformists. For conformists (respectively, anti-conformists), the threshold is the minimum (respectively, maximum) probability that player i assigns to players in his neighborhood for choosing action 1.

2.3 A General Result on Cycles

There is a well-known result on the threshold model saying that the state converges to either a fixed state (absorbing) or a cycle of length 2. The most general form of this result is provided by Goles and Olivos [12], where the process has the form

$$\begin{aligned} a_i(t+1) = {\left\{ \begin{array}{ll} 1, &{} \text { if } \sum _{j\in N}\alpha _{ij}a_j(t)\ge \theta _i\\ 0, &{} \text { otherwise,}\end{array}\right. } \end{aligned}$$

with \(\alpha _{ij}=\alpha _{ji}\in \mathbb {R}\), \(\theta _i\in \mathbb {R}\) for all ij. Then there exists \(t\in \mathbb {N}\) such that \(a_i(t+2)=a_i(t)\).

This general result applies to the case of a network of conformists, taking \(\alpha _{ij}=1\) if \(\{i,j\}\in E\) and 0 otherwise, and \(\theta _i=\mu _i|\varGamma _i|\), but it also applies to the case of a network where all agents are anti-conformist: just put \(\alpha _{ij}=-1\) if \(\{i,j\}\in E\) and 0 otherwise, and \(\theta _i=-\mu _i|\varGamma _i|+1\). Hence we have obtained:

Theorem 1

Suppose \(N_c=\emptyset \) or \(N_a=\emptyset \). Then the process converges to either an absorbing state or to a cycle of length 2.

The result is no more true if the network contains both conformists and anti-conformists, as the following example shows:

Example 1

Consider a graph with \(n=4\), where agents 1 and 3 are conformist, while 2 and 4 are anti-conformist, situated as in the figure below, and take \(\mu _i=1/2\) for all \(i\in N\). Then we have the following cycle of length 4:

$$\begin{aligned} (0,0,0,0) \rightarrow (0,1,0,1) \rightarrow (1,1,1,1)\rightarrow (1,0,1,0) \rightarrow (0,0,0,0). \end{aligned}$$
figure d

2.4 Study of the Complete Network

We suppose in this section that the graph G is complete, i.e., every agent is connected to every other agent, so that the neighborhood \(\varGamma _i\) is N for every agent i.

We begin by recalling the classical result of Granovetter on absorbing states [14]. Suppose \(N=N_c\) and consider the cumulative distribution function F of the threshold of the agents:

$$\begin{aligned} F(x) = \frac{1}{n}|\{i\in N\,:\,\mu _i\le x\}| = \frac{1}{n}\sum _{i\in N}\mathbb {1}_{\mu _i\le x}. \end{aligned}$$

This function is right-continuous, nondecreasing and has fixed points. It gives the proportion of agents whose threshold is below or equal to some quantity x, or put otherwise, the proportion of agents that will take action 1 when the current proportion of agents taking action 1 is x. As a consequence, if \(x^*\) is a fixed point of F, then \(S^*:=\{i\in N\,:\,\mu _i\le x^*\}\) is an absorbing state, and conversely as well.

We generalize this result by incorporating anti-conformism as follows. We express by G(x) the proportion of agents that will take action 1 when the current proportion of agents taking action 1 is x (hence \(G(x)=F(x)\) is the cumulative distribution function of the threshold when there is no anti-conformists):

$$\begin{aligned} G(x) = \frac{1}{n}\left( \sum _{i\in N_c}\mathbb {1}_{\mu _i\le x}+\sum _{i\in N_a}\mathbb {1}_{\mu _i>x}\right) , \end{aligned}$$
(3)

with \(x\in [0,1]\). This function, which we call the transition function, is still right-continuous but is no more nondecreasing in general, and as a consequence, does not necessarily have fixed points (see Fig. 3). Denote the list of all threshold values of conformist agents (respectively, anti-conformist agents) as \(\mu _1^c,\mu _2^c,\ldots ,\mu _\alpha ^c\) (respectively, \(\mu _1^a,\mu _2^a,\ldots ,\mu _\beta ^a\)) in a strict increasing order with fractions \(q_1^c,q_2^c,\ldots ,q_\alpha ^c\) (respectively, \(q_1^a,q_2^a,\ldots ,q_\beta ^a\) ). The transition function G(x) (Eq. 3) can also be written as

$$\begin{aligned} G(x)=\sum _{\mu _i^c \le x}q_i^c+\sum _{\mu _j^a > x}q_j^a. \end{aligned}$$
(4)

The following is an immediate generalization of Granovetter [14]. It establishes that the absorbing states of the process are the fixed points of G.

Theorem 2

The process converges to either absorbing states or cycles. It has absorbing state only when G has fixed point(s). The absorbing states of the dynamic process coincide with the fixed points of G as follows: if \(x^*\) is a fixed point of G, then

$$\begin{aligned} S^*=\{i\in N_c\,:\,\mu _i\le x^*\}\cup \{i\in N_a\,:\,\mu _i>x^*\} \end{aligned}$$
(5)

is an absorbing state, and vice versa each absorbing state \(S^*\) is associated with the fixed point \(x^*=|S^*|/n\) of G where absorbing state reached is dependent on the initial state (when multiple absorbing states exist).

The theorem will be illustrated by several examples in the sequel. We begin our study by supposing that the distribution of the threshold is uniform, then the Gaussian case and the general case will be studied.

2.4.1 Uniform Distribution

The case of a uniform distribution permits to get explicit results. It has been studied by Granovetter [14], in order to explain riot phenomena (action 1: take part to a riot, action 0: be inactive). Supposing at the initial state that all agents are inactive, the presence of agents with threshold 0 (called “instigators” as they start rioting alone) initiates the phenomenon of rioting, which by a domino or cascade effect extends to the whole population if the distribution is uniform.

Specifically, we consider the thresholds are uniformly distributed over the set \(\{0,1/n,2/n,\ldots ,n-1/n\}\), as in Granovetter [14],Footnote 2 and that w.l.o.g. we may consider that agent 1 has threshold 0, agent 2 has threshold \(1/n\), etc., and agent n has threshold \(n-1/n\).Footnote 3 We denote by \(\mu _\ell =\ell /n\) the threshold of agent \(\ell +1\).

Consider first that \(N_a=\emptyset \). As expected, function G (which is in this case the cumulative distribution function F) has only one fixed point, which is \(x^*=1\), corresponding to the absorbing state \(S^*=N\) (see Fig. 1).

Fig. 1
figure 1

The transition function G for uniform distributed threshold model of conformists (i.e., \(N_a=\emptyset \)). In this example, \(n=10\). G has a unique fixed point, which is \(x^*=1\), corresponding to the absorbing state \(S^*=N\)

Introducing one anti-conformist agent Imagine now the conformist agent \(k+1\) with threshold \(k/n\) becoming anti-conformist with the same threshold, denoted by \(\mu _a=k/n\). Suppose for example that \(n=10\) and \(k=3\), which makes agent 4 to be anti-conformist (see Fig. 2). According to Theorem 2, the absorbing states correspond to the fixed points of G, which are, in set notation:

$$\begin{aligned} \{1,2,3\}, \ \{1,2,3,5\}, \ \{1,2,3,5,6\},\ldots , \{1,2,3,5,6,7,8,9,10\}. \end{aligned}$$

where absorbing state is reached depends on the initial condition. For example, starting from the state vector \((0,\ldots ,0)\), agent 1 and 4 become active, which makes agent 2 and 3 to become active in addition, then agent 4 becomes inactive and no more changes occurs: the absorbing state \(\{1,2,3\}\) has been reached. If now we start from the state vector \((1,\ldots ,1)\), agent 4 becomes inactive but all the other remain active, so that the absorbing state \(\{1,2,3,5,6,7,8,9,10\}\) is reached.

Fig. 2
figure 2

The transition function G for uniform distributed threshold model of conformists and anti-conformists when one anti-conformist agent is introduced. In this example, \(k=3\) (i,e., agent 4 is anti-conformist) and \(n=10\). There are seven fixed points of G, which are \(3/10, 4/10, 5/10, \ldots , 9/10\), corresponding to the absorbing states, in set notation:\( \{1,2,3\}, \ \{1,2,3,5\}, \ \{1,2,3,5,6\},\ldots , \{1,2,3,5,6,7,8,9,10\}\) where absorbing state is reached depends on the initial condition

The following proposition summarizes the uniform case with one anti-conformist.

Proposition 1

Consider a group of agents whose thresholds follow a uniform distribution as described above, and suppose that there is only one anti-conformist, say agent \(k+1\), \(k \in \{0,1,\ldots , n-1\}\), with threshold \(\mu _a:=k/n\). Then the opinion dynamic has \(n(1-\mu _a)=n-k\) absorbing states corresponding to the fixed points \(k/n,\ldots ,n-1/n\) of G, specifically:

$$\begin{aligned} \{1,\ldots ,k\}, \{1,\ldots ,k,k+2\},\{1,\ldots ,k,k+2,k+3\},\ldots , N\setminus \{k+1\}. \end{aligned}$$

Moreover, starting from any initial state with the group opinion \(x^*=k^*/n\), \(k^*\in \{0,1,\ldots ,n\}\), if \(k^*=n\), the reachable fixed point is \(n-1/n\); if \(k^* \ge k\) and \(k^* \ne n\), the reachable fixed point is \(x^*\); if \(k^* < k\), then the reachable fixed point is \(k/n\) or \(k+1/n\) depending on which has the same parity as \(k^*\).

Introducing only one anti-conformist already considerably changes the dynamic. What is interesting is that the domino effect of the classical case is in a sense “stopped” by the anti-conformist: conformist agents become active one by one starting from the agent with threshold 0, till the threshold of the anti-conformist is reached, causing it to become inactive, which stops the cascade. Many other absorbing states exist, though, including \(N_c\).

Introducing two anti-conformist agents Imagine now that two conformist agents, say \(k_1+1,k_2+1\) with thresholds \(\mu _a^1=k_1/n, \mu _a^2=k_2/n\) become anti-conformist with the same thresholds. Assume w.l.o.g. that \(k_1<k_2\).

Suppose for example that \(n=10\) and \(k_1=3\) and \(k_2=5\), which makes agent 4 and agent 6 to be anti-conformists (see Fig. 3). According to Theorem 2, the dynamic has no absorbing states since there is no fixed points of G. Instead, there will be a cycle \(S_1 \rightarrow S_2 \rightarrow S_1\) with \(S_1=\{1,2,3,5\}, \quad S_2=\{1,2,3,5,6\}.\) For example, starting from the state vector \((0,\ldots ,0)\), agent 1, 4 and 6 become active, which makes agent 2 and 3 to become active in addition, then agent 4 becomes inactive, which will again activate agent 5 at the next stage, i.e., the state \(S_1=\{1,2,3,5,6\}\) has reached with \(x=5/10\). Thus agent 6 becomes inactive at the next stage with the state \(S_2=\{1,2,3,5\}\) and the cycle \(S_1 \rightarrow S_2 \rightarrow S_1\) has been reached.

The following proposition summarizes the uniform case with two anti-conformists.

Fig. 3
figure 3

The transition function G for uniform distributed threshold model of conformists and anti-conformists when two anti-conformist agents are introduced. In this example, \(n=10\), \(k_1=3\) and \(k_2=5\) (i.e., agent 4 and agent 6 are anti-conformists). The dynamic has no absorbing states since there is no fixed points of G. Instead, there will be a cycle materialized in green, which is \(S_1 \rightarrow S_2 \rightarrow S_1\) with \(S_1=\{1,2,3,5\}\) and \(S_2=\{1,2,3,5,6\}\) (Color figure online)

Proposition 2

Consider a group of agents whose thresholds follow a uniform distribution as described above, and suppose that there are only two anti-conformists, say agents \(k_1+1,k_2+1\) with thresholds \(\mu _a^1=k_1/n\) and \(\mu _a^2=k_2/n\), respectivelyFootnote 4, and without loss of generality, assume that \(k_1 < k_2\). Then there is no absorbing state but a cycle \(S_1 \rightarrow S_2 \rightarrow S_1\) with

$$\begin{aligned} S_1=\{1,\ldots ,k_1,k_1+2,\ldots ,k_2\}, \quad S_2=\{1,\ldots ,k_1,k_1+2,\ldots , k_2+1\}, \end{aligned}$$

corresponding to group opinion \(k_2/n \rightarrow (k_2-1)/n \rightarrow k_2/n\), regardless of the initial state.

The result with two anti-conformists is very different from the case with one anti-conformist: several absorbing states vs. a unique cycle. However, the cycle is of length 2 and involves two states which differ only by one agent. Therefore, it looks like an oscillation between these two states, which in addition look similar to the absorbing states which would have been obtained without the first anti-conformist.

The general case The previous results tend to indicate that with an odd number of anti-conformists, there are absorbing states, while there is no with an even number (only cycles occur). The main result of this section shows that this is indeed the case.

Theorem 3

Consider a society N of agents whose thresholds follow a uniform distribution on \(\{0,1/n,\ldots ,n-1/n\}\) and suppose that some agents are anti-conformists (\(N_a\ne \emptyset \)). The following holds.

  1. (i)

    Suppose that there are \(2\ell +1\) (\(\ell \ge 1\)) anti-conformist agents with thresholds \(\mu _a^1, \cdots , \mu _a^{2\ell +1}\), respectively, with \(\mu _a^i = k_i/n, (i=1,\ldots ,2\ell +1) \) and \(k_1< k_2< \cdots < k_{2\ell +1}\).Footnote 5 Then G has fixed points \(k_{\ell +1}/n,\cdots ,(k_{\ell +2}-1)/n\), whose corresponding absorbing states are given by (5).

  2. (ii)

    Suppose there are \(2\ell \) (\(\ell \ge 1\)) anti-conformist agents with thresholds \(\mu _a^1, \cdots , \mu _a^{2\ell }\), respectively, with \(\mu _a^i = k_i/n, (i=1,\ldots ,2\ell ) \) and \(k_1< k_2< \cdots < k_{2\ell }\).Footnote 6 Then there is no absorbing state, but there exist cycles of length 2, corresponding to the pairs of points (xG(x)), (yG(y)) such that \(G(y)=x\) and \(y=G(x)\), i.e., x is a fixed point of \(G^{(2)}=G\circ G\). Moreover, there is no cycle of length greater than 2.

The results are qualitatively similar to those obtained with 1 or 2 anti-conformists. Basically, no cascade to \(N_c\) or \(N_a\) is possible in generalFootnote 7, and cycles, which are all of length 2 (the major part of the proof is devoted to show this fact), can be seen as oscillations between two states.

When the uniform distribution is on \(\{1/n,\ldots ,1\}\), it is easy to see that the results are the same as in Theorem 3, except that the cases of odd and even numbers of anti-conformists are inverted: there are absorbing states when there is an even number of conformists, and no absorbing states but cycles otherwise. This is because in that case, the function G is shifted of \(1/n\) to the right, and \(G(0)=p\), the number of anti-conformists.

We illustrate the above result in the case of cycles with the following example.

Example 2

\(n=10\), \(\ell =2\), \(k_1=0\), \(k_2=1\), \(k_3=2\), \(k_4=3\) (see Fig. 4). There is no absorbing state but cycles such as: \(\{1,2,3\} \rightarrow \emptyset \rightarrow \{1,2,3\}\) with group opinion x: \(3/10 \rightarrow 0 \rightarrow 3/10\). Other cycles might also exist, e.g., \(\{3,4\} \rightarrow \{4\} \rightarrow \{3,4\}\) with group opinion x: \(1/10 \rightarrow 2/10 \rightarrow 1/10\).

Fig. 4
figure 4

The transition function G for uniform distributed threshold model of conformists and anti-conformists when an even number of anti-conformist agents are introduced. In this example 2, \(k_1=0\), \(k_2=1\), \(k_3=2\), \(k_4=3\) and \(n=10\). The cycles are materialized in red and green, which is \(\{1,2,3\} \rightarrow \emptyset \rightarrow \{1,2,3\}\) and \(\{3,4\} \rightarrow \{4\} \rightarrow \{3,4\}\), respectively (Color figure online)

Applying the results above, we get the case where the society is purely anti-conformist.

Corollary 1

Consider a group of agents whose thresholds follow a uniform distribution. If all agents are anti-conformists, then there exist at most one absorbing state. The existence of absorbing state is decided by the parity of n. If n is even, then there is no absorbing state; if n is odd, then the absorbing state is the action profile associated to the fixed point \((n-1)/2\).

Note that this is in accordance with the general result on cycles (Theorem 1).

2.4.2 Gaussian Distribution

In this section, we explore the dynamics of the process for a Gaussian distributed threshold in a complete network. Assume that the thresholds of conformists (respectively, anti-conformists), identically and independently distributed, follow the Gaussian distributions \(\mathbf {N}(m_c,\sigma _c)\), \(\mathbf {N}(m_a,\sigma _a)\), respectively, with the corresponding cumulative distribution functions \(F_c\), \(F_a\). Then

$$\begin{aligned} G(x)=qF_c(x)+(1-q)(1-F_a(x)) \end{aligned}$$

where q is the proportion of conformists, and

$$\begin{aligned} F_c(x) = \frac{1}{\sigma _c\sqrt{2\pi }}\int _{-\infty }^x\exp \left( -\frac{(t-m_c)^2}{2\sigma _c^2}\right) \mathrm {d}t = \frac{1}{2} + \frac{1}{2}\mathrm {erf}\left( \frac{x-m_c}{\sigma _c\sqrt{2}}\right) \end{aligned}$$

and similarly for \(F_a\), with \(\mathrm {erf}(x)\) the error function defined by \(\mathrm {erf}(x)=\frac{2}{\sqrt{\pi }}\int _0^x e^{-u^2}\mathrm {d}u\). Letting \(m_c=m_a=:m\) and \(\sigma _c=\sigma _a=:\sigma \) permit to derive some properties. We obtain for the transition function

$$\begin{aligned} G(x) = \left( q-\frac{1}{2}\right) \mathrm {erf}\left( \frac{x-m}{\sigma \sqrt{2}}\right) + \frac{1}{2}, \end{aligned}$$
(6)

from which we deduce that we always have \(G(m)=1/2\). Hence \(1/2\) is a fixed point and therefore an absorbing state when \(m=1/2\). We also notice that when \(\frac{x-m}{\sigma \sqrt{2}}\) tends to infinity (that is, when x tends to 1 and \(\sigma \) tends to 0), G(x) tends to q (all conformists take action 1). Similarly, when \(\frac{x-m}{\sigma \sqrt{2}}\) tends to \(-\infty \) (i.e., x and \(\sigma \) tend to 0), G(x) tends to \(1-q\).

Let us examine if other absorbing states exist. First and second derivatives of the transition function are

$$\begin{aligned} G'(x)&= \frac{2q-1}{2\sigma \sqrt{2}}\exp \left( -\frac{(x-m)^2}{2\sigma ^2}\right) \\ G''(x)&= -\frac{(2q-1)(x-m)}{2\sigma ^3\sqrt{2}}\exp \left( -\frac{(x-m)^2}{2\sigma ^2}\right) . \end{aligned}$$

The function has an inflection point at \(x=m\). If \(q<1/2\), it is decreasing, concave when \(x\le m\), and convex when \(x\ge m\). If \(q=1/2\), G(x) is constant and equal to \(1/2\), while if \(q>1/2\), it is increasing, convex when \(x\le m\), and concave when \(x\ge m\).

Let us first consider the case \(q<1/2\) (majority of anti-conformists). G being decreasing and passing through the value \(1/2\), it has a single fixed point \(x_*\) solution of the equation

$$\begin{aligned} \mathrm {erf}\left( \frac{x-m}{\sigma \sqrt{2}}\right) =\frac{1-2x}{1-2q}. \end{aligned}$$
(7)

We have \(m<x_*<1/2\) when \(m<1/2\), and \(1/2<x_*<m\) when \(m>1/2\). If the magnitude of the slope of G at \(x^*\) is greater than 1, \(x^*\) is an unstable fixed point, otherwise it is stable (this is a general observation). When it is unstable, the process reaches a limit cycle of length 2 formed by the points \((x_0,G(x_0)), (G(x_0), G(G(x_0)))\), where \(x_0\) is a fixed point of \(G\circ G\).

We consider now that \(q>1/2\) (majority of conformists). G being increasing makes the study more complex as several intersections with the diagonal may occur. As \(\mathrm {erf}(x)\in ]-1,1[\), we have in general

$$\begin{aligned} 1-q<G(0)<G(m)=\frac{1}{2}<G(1)<q. \end{aligned}$$

Therefore, if \(m<1/2\), there is a fixed point \(x_*>1/2\) solution of (7), and possibly two other ones (only one when G is tangent to the diagonal) smaller than \(1/2\) solution of the same equation. If \(m>1/2\), the situation is symmetric: there is a fixed point \(x_*<1/2\) and possibly two other ones greater than \(1/2\), both solutions of (7). As a general observation, if there is a single fixed point, it is stable, while in case of three fixed points, the one in the middle is unstable, as a small negative (respectively, positive) variation makes it converge to the left one (respectively, the right one).

The case \(m=1/2\) is particular, because \(1/2\) is a fixed point, and depending whether the tangent at \(1/2\) is above or below the diagonal, there are two other fixed points, one greater than \(1/2\) and the other one smaller, or no other fixed point. Observe that when \(1/2\) is not the unique fixed point, it is unstable, as starting from state \(x<1/2\) (respectively, \(>1/2\)) makes the process converge to the lower fixed point (respectively, the upper one). The condition for the tangent reads

$$\begin{aligned} G'(m)\ge 1 \Leftrightarrow \sigma \le \frac{1}{\sqrt{2}}\left( q-\frac{1}{2}\right) . \end{aligned}$$
(8)

We summarize our findings in the next proposition.

Proposition 3

Suppose that \(m_a=m_c=:m\), \(\sigma _a=\sigma _c=:\sigma \). Then

  • If there are more conformists than anti-conformists (\(q>1/2\)), there always exists a stable fixed point \(x_*\) (and possibly two other unstable fixed points) such that \(x_*\ge m\) if \(m\le 1/2\) and \(x_*\le m\) if \(m\ge 1/2\), being solution of (7). When \(m=1/2\), \(1/2\) is a fixed point and two other fixed points exist, also solutions of (7), provided the variance is not greater than \(\frac{1}{\sqrt{2}}\left( q-\frac{1}{2}\right) \). The fixed point \(\frac{1}{2}\), when it is not unique, is unstable. No cycle can occur.

  • If there are more anti-conformists than conformists (\(q<1/2\)), there is a unique fixed point \(x_*\) given by solving (7). It is stable if \(|G'(x_*)|\le 1\), otherwise there exists a limit cycle of length 2.

  • If there are exactly as many conformists as anti-conformists, then there is convergence in one shot from any state S to the absorbing state \(S^*\)corresponding to the fixed point \(1/2\) by (5).

Interestingly, cycles (always of length 2) occur only when there are more anti-conformists than conformists, and under the condition that the variance of the threshold distribution is small enough. Otherwise, there is always a stable absorbing state, and there is no cascade effect leading to \(N_c\) or \(N_a\).

The following examples illustrate the above results.

Example 3

\(q=0.9\); \(m=0.5\); \(\sigma =0.1, 0.2, \ldots , 0.9, 1\) (see Fig. 5). This is the case of a majority of conformists and \(m=1/2\). One can observe the fixed point \(1/2\) and the possible existence of 2 others. The limit value of \(\sigma \) for the tangent condition (8) is 0.283. Also, one can observe the asymptotic values q and \(1-q\) for G(x).

Fig. 5
figure 5

The transition functions for the Gaussian distributed threshold model with a small proportion of anti-conformist agents (\(q=0.9\)). In this example 3, \(m=0.5\), \(\sigma =0.1, 0.2, \ldots , 0.9, 1\)

Example 4

\(q=0.95\); \(m=0.3\); \(\sigma =0.1, 0.2, \ldots , 0.9, 1\) (see Fig. 6). This is the case of a majority of conformists and \(m<1/2\). There is fixed point greater than \(1/2\), whose value is negatively related to the variance, and two other possible ones smaller than \(1/2\).

Fig. 6
figure 6

The transition functions for the Gaussian distributed threshold model with a small proportion of anti-conformist agents (\(q=0.95\)). In this example 4, \(m=0.3\), \(\sigma =0.1, 0.2, \ldots , 0.9, 1\)

Example 5

\(q=0.9\); \(m=0.8\); \(\sigma =0.1, 0.2, \ldots , 0.9, 1\) (see Fig. 7): majority of conformists and \(m>1/2\). There is fixed point smaller than \(1/2\), whose value is positively related to the value of the variance.

Fig. 7
figure 7

The transition functions for the Gaussian distributed threshold model with a small proportion of anti-conformist agents (\(q=0.9\)). In this example 5, \(m=0.8\), \(\sigma =0.1, 0.2, \ldots , 0.9, 1\)

Example 6

\(q=0.1\); \(m=0.2\); \(\sigma =0.1, 0.2, \ldots , 0.9, 1\) (see Fig. 8). This is the case of a majority of anti-conformists and \(m<1/2\). There is fixed point \(x_*\) smaller than \(1/2\). Its value is positively related to the value of the variance. For \(\sigma =0.1\) and \(\sigma =0.2\), the slope at \(x_*\) begin greater than 1, the fixed point is unstable and there is a limit cycle corresponding to the fixed points of \(G\circ G\). The plot of \(G\circ G\) is shown in Fig. 9. One can see that \(G\circ G\) has 1 or 3 fixed points, one of them being the fixed point of G. When there are 3 fixed points (for \(\sigma =0.1\), 0.15 and 0.2), the extreme ones give the coordinates for the limit cycle. For \(\sigma =0.1\) the coordinates are (0.1, 0.7731) and (0.7731, 0.1), while for \(\sigma =0.2\) they are (0.1116, 0.6366) and (0.6366, 0.1116). The cycles are materialized in Fig. 8.

Fig. 8
figure 8

The transition functions for the Gaussian distributed threshold model with a large proportion of anti-conformist agents (\(q=0.1\)). In this example 6, \(m=0.2\), \(\sigma =0.1, 0.2, \ldots , 0.9, 1\)

Fig. 9
figure 9

Plot of \(G\circ G\) for the Gaussian the distributed threshold model with a large proportion of anti-conformist agents (\(q=0.1\)). In this example 6, \(m=0.2\), \(\sigma =0.1, 0.2, \ldots , 0.9, 1\)

2.4.3 General Distribution

Recall that if \(N_a \ne \emptyset \), the function G may not have fixed points because the presence of anti-conformists makes it nonmonotonic. It is therefore difficult to get precise results in the general case. The next proposition elucidates the situation when there is only one type of anti-conformist agent.

Proposition 4

Consider the following case where there is only one type of anti-conformists with threshold \(\mu _a\) and assume its fraction among all players is \(\delta _a\). The list of all threshold values of conformists is \(\mu _1,\mu _2,\ldots ,\mu _p\) (in a strict increasing order) with fractions \(q_1,q_2,\ldots ,q_p\) respectively. Denote by k the largest number such that \(\mu _k \le \mu _a\) (see Table 1). The following holds.

  1. (i)

    If there is no agent i such that \(\mu _i=\mu _a\), there exist absorbing states if and only if the thresholds and corresponding fractions violate one of the following inequalities:Footnote 8

    $$\begin{aligned} \left\{ \begin{aligned}&\delta _a \ge \mu _1 \\&\delta _a + \displaystyle \sum _{i=1}^{i_0} q_i \ge \mu _{i_0+1}&(i_0=1,2,\ldots ,k-1)\\&\delta _a + \displaystyle \sum _{i=1}^{k} q_i \ge \mu _a\\&\displaystyle \sum _{i=1}^{k} q_i< \mu _a\\&\displaystyle \sum _{i=1}^{i_0} q_i < \mu _{i_0}&(i_o=k+1,k+2,\ldots ,p) \\ \end{aligned} \right. \end{aligned}$$
    (9)
  2. (ii)

    Otherwise, there exist absorbing states if and only if the thresholds and corresponding fractions violate one of the following inequalities:Footnote 9

    $$\begin{aligned} \left\{ \begin{aligned}&\delta _a \ge \mu _1 \\&\delta _a + \displaystyle \sum _{i=1}^{i_0} q_i \ge \mu _{i_0+1}&(i_0=1,2,\ldots ,k-1)\\&\displaystyle \sum _{i=1}^{i_0} q_i < \mu _{i_0}&(i_o=k,k+1,\ldots ,p) \\ \end{aligned} \right. \end{aligned}$$
    (10)
Table 1 Distribution of agents’ thresholds with conformists and one type of anti-conformists

Proposition 4 gives the necessary and sufficient conditions by a system of inequalities for the existence of absorbing states for general distributions when there is only one type of anti-conformist agent. Figure 10 gives the possible absorbing states for different ranges of \(\mu _a\) and \(\delta _a\) based on Proposition 4 and its proofs. In the left area filled with only north west lines, i.e., \(\mu _a \le \sum _{i=1}^{k}q_i\), the process has only one absorbing state where only conformists with thresholds \(\mu _1, \ldots , \mu _k\) saying yes, i.e., \(x=\sum _{i=1}^{k}q_i\). In the right area filled with only north east lines, i.e., \(\delta _a <\mu _a - \sum _{i=1}^{k} q_i \), the process has only one absorbing state where the anti-conformists and conformists with thresholds \(\mu _1, \ldots , \mu _k\) saying yes, i.e., \(x=\delta _a+\sum _{i=1}^{k}q_i\). In the bottom area filled with only horizontal lines, there are three possible absorbing states. The overlapped area means that absorbing states of both cases are possible. All the details can be found in Proof of Proposition 4.

Fig. 10
figure 10

Existence of absorbing states for general distributions when there is only one type of anti-conformist agent with threshold \(\mu _a\) and proportion \(\delta _a\) (the variables in each area filled with lines indicates the values of the possible fixed points corresponding to each case.)

The following example illustrates the case where there is no absorbing state.

Example 7

We consider \(n=10\), with \(N_c=\{1,2,3,4,5,6\}\) and 4 anti-conformists. The parameters are \(\mu _a=\delta _a=4/10\), \(\mu _1=q_1=q_2=q_3=q_4=q_5=q_6=1/10\), \(\mu _2=2/10\), \(\mu _3=3/10\), \(\mu _4=5/10\), \(\mu _5=6/10\), \(\mu _6=7/10\) (see Fig. 11). There is no absorbing state but a cycle: \(\{1,2,3,4,5,6\} \rightarrow \{1,2,3,4,5\} \rightarrow \{1,2,3,4\} \rightarrow \{1,2,3\} \rightarrow \{1,2,3\}\cup N_a \rightarrow \{1,2,3,4,5,6\}\) with group opinion x: \(6/10 \rightarrow 5/10 \rightarrow 4/10 \rightarrow 3/10 \rightarrow 7/10 \rightarrow 6/10\).

Fig. 11
figure 11

G(x) of Example 7, with a cycle of length 5: \(\{1,2,3,4,5,6\} \rightarrow \{1,2,3,4,5\} \rightarrow \{1,2,3,4\} \rightarrow \{1,2,3\} \rightarrow \{1,2,3\}\cup N_a \rightarrow \{1,2,3,4,5,6\}\), which is materialized in green (Color figure online)

The previous example has shown the existence of cycles. The next theorem establishes that there could be at most one cycle, whose length has an upper bound.

Theorem 4

Consider the same assumptions and notation as in Proposition 4. Then the process has either absorbing states or a unique cycle of length at most \(m+2\), where m is the number of values \(\mu _i\) in the interval \(\big ]\sum _{i=1}^k q_i,\sum _{i=1}^k q_i+\delta _a\big ]\). The upper bound of the length of the cycle, considering any possible values for the thresholds and fractions, is \(n_a+1\), where \(n_a=n\delta _a\) is the number of anti-conformists.

Compared to the case of the uniform and the Gaussian distributions, we see that it is possible to obtain cycles of length greater than 2. However, as in the uniform case with one type of anti-conformist, there could be several absorbing states, but only one cycle.

The next example illustrates the theorem and shows that the cycle can be shorter than \(m+2\) and that its length can be far below the upper bound \(n_a+1\). Note that in Example 7, this bound is attained.

Example 8

We consider \(n=100\), with the following parameters: \(\delta _a=0.4\) (40 anti-conformists), \(\mu _a=0.5\), \(\mu _1=0.2\), \(q_1=0.1\), \(\mu _2=0.3\), \(q_2=0.15\), \(\mu _3=0.7\), \(q_3=0.3\), \(\mu _4=0.8\), \(q_4=0.05\). Then \(k=2\), and by the theorem, the cycle should be of length at most 3, while the upper bound \(n_a+1\) yields 41. One sees in Fig. 12 that the cycle (in green) has in fact length 2 and is formed of the two points (0.25, 0.5), (0.5, 0.25).

Fig. 12
figure 12

G(x) of Example 8, with a cycle of length 2: \((0.25,0.5) \rightarrow (0.5,0.25) \rightarrow (0.25,0.5) \), which is materialized in green (Color figure online)

3 Random Sampling Models

The previous section considered a mechanism of diffusion with a complete and undirected network, where each agent was permanently in contact with all other agents. As this assumption may be unrealistic in some situations, we consider here a different mechanism where agents meet other agents at random (random neighborhood), with a certain size of the neighborhood to be either fixed or drawn from a distribution. When the size is fixed and identical for all agents, we speak of a homogeneous neighborhood. We make the following assumptions: (1) the agents in a given neighborhood are picked uniformly at random in N (2) There is no symmetry in the sense that if i selects j in its neighborhood, it does not necessarily imply that j has i in its neighborhood. We denote by P(k) the distribution of the degree of each agent, who are supposed to have the same distribution.

This can be interpreted in two ways. In the first one, at each time step, a random graph on N realizes, where directed links are picked at random so as to follow the specified degree distribution. In the second one, we consider the network to be the complete graph on N, meaning that any agent may potentially meet any other agent. Then, at each time step, for each agent a subset of agents is chosen randomly (i.e., links are drawn from the uniform distribution), so as to obey the specified degree distribution. We follow in the sequel the latter interpretation.

This model is a good approximation of many real-life situations, especially communication via online social networks like Twitter, Sina weibo, etc. Taking Twitter as an example, an individual receives at some time several tweets not only from his/her friends but also from strangers by checking the latest or hottest tweets. Moreover, he/she also can access information proactively on a certain topic by searching keywords or hashtags. At a different time, different users post some new tweets that attract this individual’s attention, which can be seen as a random sample (neighborhood) whose size obeys some distribution. Another example is that we meet different people everyday and obtain information either by communicating directly with each other or observing their behavior.

To avoid intricacies, it is convenient to consider that the random neighborhood of agent i, knowing that its degree is d, is taken as a random subset of N, of size d. This means that sometimes i is in its neighborhood, sometimes it is not. Still, the agents are considered to have a threshold, which can be drawn from a distribution or is fixed.

An important consequence of the model is that the process of updating of the opinion is no more deterministic, but still obeys a Markov chain. Its analysis is therefore much more complex, as not only absorbing states and cycles can exist but also aperiodic and periodic absorbing classes, where a class is a set of states such that a chain of transitions exists from any state to any other state in the set, and which is maximal for this property. It is easy to see that a state T different from \(\emptyset \) and N cannot be absorbing anymore: this is because the neighborhood being random and smaller than N, it is not guaranteed that it will contain T at each period. However, \(\emptyset \) and N can still be absorbing. The next lemma clarifies this point.

Lemma 1

\(\emptyset \) is absorbing (resp., N is absorbing) iff all anti-conformists are constant 0-players (resp., constant 1-players), while there is no constant conformist player (i.e., \(0<\mu _i\le 1\) for all \(i\in N_c\)).

Proof

Suppose \(T=\emptyset \). By assumption, every conformist will take action 0 with certainty. Now, \(i\in N_a\) takes action 0 iff \(\mu _i=0\). Hence, any anti-conformist must be a constant 0-player.

The argument for \(T=N\) is much the same. \(\square \)

The existence of non-trivial absorbing classes will be shown in Sect. 3.1.1, where a complete analysis is done in a simple case (only two different thresholds, one for conformists and one for anti-conformists). The complexity of the results shows that it seems out of reach to get a complete study in more general cases. Nevertheless, general results, although not exhaustive, can be obtained (see Sect. 3.1.2).

We start by focusing on the case of fixed degree (homogeneous neighborhood).

3.1 Homogeneous Neighborhood

We suppose in this section that the neighborhood of every agent has a fixed size d. A complete study of this case is possible when all conformist agents have the same threshold \(\mu _c\), and all the anti-conformist agents have threshold \(\mu _a\). Then we give a result in the general case. We begin by some general considerations.

Let us express the probability of transition \(\mathbb {P}(S\rightarrow T)\) from one state S to another state T. We have by the independence assumption that \(\mathbb {P}(S\rightarrow T)= \prod _{i\in T}p_i^1(S)\prod _{i\not \in T}p_i^0(S)\), where \(p_i^e(S)\) is the probability for agent i to take action \(e\in \{0,1\}\) knowing that the current state is S. To compute these probabilities, it is necessary to compute the distribution of the average opinion \(\overline{a_i}\) in the neighborhood of i knowing the current state S. It is easy to check that

$$\begin{aligned} \mathbb {P}(\overline{a_i}=\frac{k}{d}\mid S) = {\left\{ \begin{array}{ll}\displaystyle \frac{\left( {\begin{array}{c}s\\ k\end{array}}\right) \left( {\begin{array}{c}n-s\\ d-x\end{array}}\right) }{\left( {\begin{array}{c}n\\ d\end{array}}\right) }, &{} \text {if } d-n+s\le k\le s\\ 0, \text {otherwise,} \end{array}\right. } \end{aligned}$$
(11)

for \(k=0,1,\ldots , d\). Observe that these probabilities do not depend on i; therefore, we can omit the subscript i and write \(\overline{a}\), the average opinion in a neighborhood. Then,

$$\begin{aligned} \text {If } i\in N_c, \ \&p_i^1(S) = \mathbb {P}(\overline{a}\ge \mu _i\mid S) \text { and } p_i^0(S) = 1-p_i^1(S) \end{aligned}$$
(12)
$$\begin{aligned} \text {If } i\in N_a, \ \&p_i^1(S) = \mathbb {P}(\overline{a}<\mu _i\mid S) \text { and } p_i^0(S) = 1-p_i^1(S). \end{aligned}$$
(13)

As these probabilities depend only on the cardinality of S, we may write \(p_i^1(s)\) for simplicity.

3.1.1 Case with Two Thresholds \(\mu _a,\mu _c\)

We assume here that there are two types of agents: anti-conformist agents with threshold \(\mu _a\) and conformist agents with threshold \(\mu _c\), where \(0<\mu _a, \mu _c \le 1\).

Observe that \(p_i^1(s)\) depends only on whether i belongs to \(N_a\) or \(N_c\). Specifically, for a conformist agent i, \(p_i^1(S)= \mathbb {P}(\overline{a}\ge \mu _c\mid S)\) is a nondecreasing function of \(s=|S|\in \{0,1,\ldots ,n\}\) to [0, 1], depending only on \(\mu _c\), n and d. In addition, we have \(p_i^1(0)=0\) and \(p_i^1(n)=1\). Similarly, if i is anti-conformist, \(p_i^1(s)\) is a nonincreasing function of s, starting at 1 with \(s=0\) and finishing at 0 with \(s=n\). Thus, we fall into the framework studied in Grabisch et al. [13] on an anonymous model of anti-conformism where each agent i has the probability \(p_i(s)\) to take action 1 at next step knowing that the current state is S, with \(s=|S|\), and \(p_i(s)\) is a nondecreasing (respectively, nonincreasing) function reaching values 0 and 1 when i is conformist (respectively, anti-conformist).

In the model of Grabisch et al. [13], all functions \(p_i\) can be different among the agents, but it is required that for all conformists, the functions \(p_i\) have the same domain where they take value 0 and 1, and similarly for the anti-conformists. These domains are characterized for the conformists by the quantities \(l^c\) (firing threshold) and \(n-r^c\) (saturation threshold) which are the rightmost and leftmost values of s for which \(p_i^1(s)\) is 0 and 1, respectively, given by

$$\begin{aligned} l^c:=\min \{s\,:\,p_i(s)>0\}-1, \quad n-r^c = \min \{s\,:\,p_i(s)=1\}, \end{aligned}$$

and similarly for the anti-conformists:

$$\begin{aligned} l^a:=\min \{s\,:\,p_i(s)<1\}-1, \quad n-r^a = \min \{s\,:\,p_i(s)=0\}. \end{aligned}$$

Our case satisfies these requirements as \(p_i^1(s)\) depends only on \(\mu _a, \mu _c\) and d. We easily obtain:

$$\begin{aligned} l^c=&\displaystyle \max _{i\in N_c}\{s\mid \overline{a}<\mu _c\}= \lceil d \mu _c\rceil -1\\ n-r^c=&\displaystyle \min _{i\in N_c}\{s\mid \overline{a}\ge \mu _c\}= n-d+\lceil d\mu _c\rceil \\ l^a=&\displaystyle \max _{i\in N_a}\{s\mid \overline{a}<\mu _a\}= \lceil d \mu _a\rceil -1\\ n-r^a=&\displaystyle \max _{i\in N_a}\{s\mid \overline{a}\ge \mu _a\}= n-d+\lceil d\mu _a\rceil . \end{aligned}$$

From Grabisch et al. [13], we know that in full generality 20 possible absorbing classes can occur, depending on the values of \(l^c,r^c,l^a,r^a\). Since it holds that in our case \(l^c+r^c=l^a+r^a=d-1<n-1\), 5 among the 20 are not possible. Denoting by \(n_c\) the number of conformist agents, we give below the list of the remaining 15 absorbing classes, put into categories.

Polarization: the society of agents is divided into two groups, one taking action 1, the other taking action 0.

  1. (1)

    \(N_a\) if and only if \(n_c \ge \max \{n-l^c, n-l^a\}\);

  2. (2)

    \(N_c\) if and only if \(n_c \ge \max \{n-r^c, n-r^a\}\);

    Cycles: sequence of states made of the infinite repetition of a pattern.

  3. (3)

    \(N_a \xrightarrow {1} \emptyset \xrightarrow {1} N_a\) if and only if \(n-l^c \le n_c \le r^a\);

  4. (4)

    \(N_c \xrightarrow {1} N \xrightarrow {1} N_c\) if and only if \(n-r^c \le n_c \le l^a\);

  5. (5)

    \(N_a \xrightarrow {1} N_c \xrightarrow {1} N_a\) if and only if \(n_c \le \min \{l^c,l^a, r^c, r^a\}\);

  6. (6)

    \(\emptyset \xrightarrow {1} N_a \xrightarrow {1} N_c \xrightarrow {1} \emptyset \) if and only if \(n_c \le \min \{r^c,r^a, l^c\}\) and \(n_c \ge n-r^a\);

  7. (7)

    \(N_a \xrightarrow {1} N \xrightarrow {1} N_c \xrightarrow {1} N_a\) if and only if \(n_c \le \min \{l^c, l^a, r^c\}\) and \(n_c \ge n-l^a\);

    Fuzzy cycles: the pattern contains states but also intervals of states. This means that there is no exact repetition of the same pattern, but at each repetition a state is picked at random in the interval.

  8. (8)

    \(N_a \xrightarrow {1} [\emptyset ,N_c] \xrightarrow {1} N_a \) if and only if \(n_c \le \min \{l^c,l^a,r^a\}\) and \(r^c< n_c < n-l^c\);

  9. (9)

    \(N_c \xrightarrow {1} [N_a,N] \xrightarrow {1} N_c \) if and only if \(n_c \le \min \{r^c,r^a,l^a\}\) and \(l^c< n_c < n-r^c\);

  10. (10)

    \([\emptyset , N_c] \xrightarrow {1} [N_a,N] \xrightarrow {1} [\emptyset , N_c] \) if and only if \(\max \{r^c,l^c\} < n_c \le \min \{r^a, l^a, n-l^c-1, n-r^c-1\}\);

    Fuzzy polarization: the polarization is defined by an interval, which means that at each time step, a state is picked at random in the interval, representing the set of active agents.

  11. (11)

    \([\emptyset , N_a]\) if and only if \(\max \{n-l^c, r^a+1\} \le n_c < n-l^a\);

  12. (12)

    \([N_c, N]\) if and only if \(\max \{n-r^c, l^a+1\} \le n_c < n-r^a\);

    Chaotic polarization: similar to the previous case but more complex as several intervals are involved.

  13. (13)

    \([\emptyset , N_a] \cup [\emptyset , N_c]\) if and only if \(l^c \ge n-r^a\) and \(n_c \in (]r^c, n-l^c[ \cap ]l^a, n-r^c[) \cup ((]l^a, n-r^a[ \cup ]l^c, n-r^c[) \cap ]0,r^c[)\);

  14. (14)

    \([N_a, N] \cup [N_c, N]\) if and only if \(l^a \ge n-r^c\) and \(n_c \in (]l^c, n-r^c[ \cap ]r^a, n-l^c[) \cup ((]r^a, n-l^a[ \cup ]r^c, n-l^c[) \cap ]0,l^c[)\);

    Chaos: at each time step a state is picked at random among all possible states.

  15. (15)

    \(2^N\) otherwise.

These results are exhaustive and exact (no approximation); however, it is difficult to get an intuitive idea of the behavior. More concrete results can be obtained by making the number of agents tend to infinity and by choosing special cases of parameters.

Whenntends to infinity Assume that the number of agents tends to infinity. For simplicity, divide the previous parameters \(n^a, n^c, l^a, l^c, r^a, r^c, d\) by n, keeping the same notation so that these parameters now take value in [0, 1]. Thus \(l^c=d\mu _c\) and \(r^c=d(1-\mu _c)\), and similarly for \(l^a,r^a\).

We examine different typical situations for the value of the parameters, taking advantage of the study made in Grabisch et al. [13] (full detail can be found in this reference).

  • Situation 1: \(l^a=l^c=:l\) and \( r^a=r^c=:r\). This implies \(\mu _c=\mu _a=:\mu \), i.e., all agents have the same threshold. Only the following four absorbing classes remain possible in this situation:

    • \(N^a\) iff \(n^a \le l\)

    • \(N^c \) iff \(n^a \le d-l=d(1-\mu )\)

    • cycle \(N^a \xrightarrow {1} N^c \xrightarrow {1} N^a\) iff \(n^a \ge 1-d\mu \) and \(n^a \ge 1-d(1-\mu )\)

    • \(2^N\) otherwise

    The general tendency is that as the proportion of anti-conformist agents increases, the society goes from consensus, to polarization or cascade, then to a chaos, finally to a cycle. A cascade effect (i.e., a convergence with probability 1 to \(N_c\) or with probability 1 to \(N_a\), whatever the initial state) is likely to occur, all the more \(l+r\) is close to 1 (i.e., the functions \(p_i^1\) are close to threshold function). When l is smaller than \(1/2\) and \(n^a\) is greater than l but sufficiently below \(1-l\), it will lead to a cascade with all conformist agents saying yes. When l is greater than \(1/2\) and \(n_a\) between \(1-l\) and l, it will lead to a cascade with all anti-conformist agents saying yes.

  • Situation 2: \(l^a=l^c= r^a=r^c=\frac{d}{2}\). This implies \(\mu _c=\mu _a=1/2\). The three possible absorbing classes in this situation are:

    • \(N^a\), \(N^c\) iff \(n^a \le d/2\) (“polarization”)

    • cycle \(N^a \xrightarrow {1} N^c \xrightarrow {1} N^a\) iff \(n^a \ge 1-d/2\) (“cycle”)

    • \(2^N\) otherwise (“chaos”)

    The possible absorbing classes of “fuzzy cycle” and “fuzzy polarization” mentioned in Grabisch et al. [13] become impossible since there is a constraint \(l^a+r^a=l^c+r^c\) in this special context. Note that polarizations \(N^c\) and \(N^a\) always appear together, implying that there is no cascade effect.

  • Situation 3: \(n^a\) tends to 0. Assume that \(n^a=\epsilon >0 \) arbitrarily small, therefore \(n^c = 1- \epsilon \). Among the initial 15 possible absorbing classes, only 7 of them remain possible:

    • (1) \(N^a\) iff \(\min (l^a, l^c) \ge \epsilon \);

    • (2) \(N^c \) iff \(\min (r^c,r^a) \ge \epsilon \)

    • (3) \(N^a \xrightarrow {1} \emptyset \xrightarrow {1} N^a\) iff \(l^c \ge \epsilon \) and \(r^a \ge 1- \epsilon \);

    • (4) \(N^c \xrightarrow {1} N \xrightarrow {1} N^c\) iff \(r^c \ge \epsilon \) and \(l^a \ge 1- \epsilon \);

    • (11) \([\emptyset , N^a]\) iff \(l^a < \epsilon \), \(l^c\ge \epsilon \) and \(r^a<1-\epsilon \);

    • (12) \([N^c, N]\) iff \(r^a < \epsilon \), \(r^c \ge \epsilon \) and \(l^a < 1- \epsilon \);

    • (15) \(2^N\) otherwise.

    Again there is no cascade effect in this situation since two possible polarizations always appear together. When \(l_c,r_c<\epsilon \), which means that d is very small, only chaos (\(2^N\)) appears.

3.1.2 General Case

With more than two thresholds, the complexity of the previous study indicates that it seems to be hopeless to get exact and complete results. This negative conclusion is tempered by our next result, established with an arbitrary distribution of thresholds. It shows that in most cases, only chaos can occur, i.e., the only absorbing class is \(2^N\).

Theorem 5

Suppose \(n_a\ge d\), \(n_c\ge d\) and suppose that there is no constant player (i.e., \(0<\mu _i\le 1\) for every player i). Then \(2^N\) is the only absorbing class, i.e., the transition matrix is irreducible.

For example, if the distribution of thresholds has support \(\{1/d,\ldots , 1\}\) for the conformists and the anti-conformists. Then \(2^N\) is the only absorbing class. Indeed, the assumption implies that there are at least d members in \(N_a, N_c\).

This result is in accordance with those found in the previous section with two thresholds \(\mu _a,\mu _c\). Indeed, one can check that under the condition \(n_a,n_c\ge d\), none of the absorbing classes from (1) to (14) is possible. This is because we always have all four quantities \(l^c,l^a,r^c,r^a\) strictly smaller than d. Therefore, \(n_a\ge d\) implies that \(n-n_a=n_c\ge n-l^c\) and \(n_c\ge n-r^c\) are impossible (and similarly with \(n_c\ge d\)).

3.2 Arbitrary Degree Distribution

We suppose now that the degree of the neighborhood is not fixed but follows a distribution P(d). We try to generalize the results of the homogeneous case.

The probabilities of taking action 1 or 0 for the conformist and anti-conformist agents given in (12) and (13) become:

$$\begin{aligned} \text {If } i\in N_c, \ \&p_i^1(S) = \sum _{d}\mathbb {P}(\overline{a}_i\ge \mu _i\mid S;d)P(d) \text { and } p_i^0(S) = 1-p_i^1(S) \end{aligned}$$
(14)
$$\begin{aligned} \text {If } i\in N_a, \ \&p_i^1(S) = \sum _d\mathbb {P}(\overline{a}_i<\mu _i\mid S;d)P(d) \text { and } p_i^0(S) = 1-p_i^1(S), \end{aligned}$$
(15)

where the summation over d is taken over the support of P(d), and \(\mathbb {P}(\overline{a}_i\ge \mu _i\mid S;d)\) is given by (11).

3.2.1 Case with Two Thresholds \(\mu _a,\mu _c\)

The introduction of a distribution over the degree does not change the behavior of \(p^1_i(S)\): there are still nonincreasing or nondecreasing functions of s taking boundary values 0 and 1. The identification of the absorbing classes depends only on the width of the domain where these functions take values 0 and 1, hence their exact form is unimportant for this purpose.

By (14) we see that \(p^1_i(S)=0\) for conformist agents iff every term in the summation is equal to 0. We have established in Sect. 3.1.1 that \(\mathbb {P}(\overline{a}_i\ge \mu _i\mid S;d)=0\) iff \(s\le l^c(d_i):=\lceil d_i\mu _c\rceil -1\) and \(\mathbb {P}(\overline{a}_i\ge \mu _i\mid S;d)=1\) iff \(s\ge n-r^c(d_i):=n-d_i+\lceil d_i\mu _c\rceil \). Introducing

$$\begin{aligned} l^c&:=\min \{l^c(d) \,:\,d \in \text { support of } P(d)\}, r^c = \min \{r^c(d) \,:\,d \in \text { support of } P(d)\} \\ l^a&:=\min \{l^a(d) \,:\,d \in \text { support of } P(d)\}, r^a = \min \{r^a(d) \,:\,d \in \text { support of } P(d)\}, \end{aligned}$$

the results of Sect. 3.1.1 can be readily extended to the general case by using the above quantities \(l^c,r^c\) in all the conditions of existence of the 15 absorbing classes.

An important consequence is the following: suppose that the distribution of d gives a positive probability to \(d=1\). Then we find \(l^c=r^c=l^a=r^a=0\). By inspection of the conditions of existence of the 15 absorbing classes, it follows that only the case of the chaos (\(2^N\)) remains possible. Note that this assumption is often satisfied (e.g., for the Poisson distribution, which arises when any pair of vertices is connected with a fixed probability).

3.2.2 General Case

We suppose now that each agent has a fixed threshold but possibly different among agents. A generalization of Theorem 5 is possible: under mild assumptions, only chaos can occur. Let us denote by \({\underline{d}},\overline{d}\) the lowest and greatest values of d with a positive probability, and by \({\underline{\mu }},{\overline{\mu }}\) the lowest and highest threshold values among the agents.

Theorem 6

Suppose that \({\underline{\mu }}>0\) (no constant player) and that the number of conformist and anti-conformist agents satisfy

$$\begin{aligned} {\overline{\mu }}{\underline{d}}\le n_a,\ n_c < n-{\underline{d}}(1-{\underline{\mu }}) \end{aligned}$$

Then \(2^N\) is the only absorbing class, i.e., the transition matrix is irreducible.

Note that the conditions on \(n_a,n_c\) can be written equivalently as \(n_a\ge {\overline{\mu }}{\underline{d}}\) and \(n_a> {\underline{d}}(1-{\underline{\mu }})\) (same for \(n_c\)). Again, observe that if \({\underline{d}}=1\), these conditions are always satisfied.

4 Concluding Remarks

We have performed in this paper a detailed study of convergence of the threshold model incorporating anti-conformist agents. Two models were considered: a deterministic model supposing a complete graph, and a random neighborhood model, both corresponding to useful real situations. The first one represents a connected society where every agent is informed about the number of agents being in state 1 or 0 (active or inactive) at the present time, through media, etc. It is to be noted that no other information about the society is possessed by an agent, e.g., if there are anti-conformists and how many. The second model represents a society communicating via social networks like Twitter, receiving randomly messages from other agents indicating their state. Here also, a given agent has no information on the type of his neighbor (conformist or anti-conformist). We have given a game-theoretic foundation of the threshold mechanism with anti-conformists, using coordination and anti-coordination games, which permits to interpret the threshold value of an agent as a minimum or maximum probability that this agent assigns to agents in his/her neighborhood for choosing action 1.

For the deterministic model, we have found that, generally speaking, the presence of anti-conformists causes the appearance of much more absorbing states, and cycles of length possibly greater than 2 (when only (anti-)conformist agents are present cycles can only be of length 2). We have performed a complete and exact study when the distribution of threshold is uniform, generalizing the results of Granovetter [14]. We have also studied the case of a Gaussian distribution, where we showed the existence of unstable fixed points and limit cycles of length 2, and the case of an arbitrary distribution, where it is possible to find cycles of length greater than 2.

Based on a previous study, we have performed a complete and exact analysis of the random model when there are only two thresholds, one for the conformists, and another for the anti-conformists. The introduction of randomness causes a variety of absorbing classes to appear: polarization, periodic classes of more or less complex structure, and chaos, i.e., any state of the society can be reached. When thresholds are randomly distributed, such an analysis is no more possible, however, we have shown that in most cases, only chaos occurs.

The initial aim of the paper was to analyze the effect of the presence of anti-conformists in a society regarding the convergence of the state or opinion of the agents in the long run. The most remarkable findings in this respect are:

  • The presence of anti-conformists introduces instability in the process, causing a multiplicity of absorbing states and a variety of cycles, periodic classes and chaos. Also, small variations in the parameters defining the society may induce important changes in the convergence: the model is highly sensitive, e.g., in the number of anti-conformists, the threshold values, etc. For example, it has been seen in the case of a uniform threshold distribution that introducing or deleting only one anti-conformist agent changes the convergence from a stable state to a cyclic behavior or vice versa.

  • In the case of a random neighborhood, the process converges to chaos (every state is possible) for most values of the parameters defining the society (it suffices that there are more conformists and more anti-conformists than the size of a smallest neighborhood). Otherwise, cascades may occur: we have proved their existence in the case of fixed thresholds for conformists and anti-conformists. This shows that introducing a small proportion of anti-conformists in a society may lead, not only to chaotic situations, but also to permanent opinion reversal.