Introduction

The rise of social media has led to unprecedented changes in the scale and speed at which people share information. Social media feeds are key tools for accessing high volumes of news, opinions, and public information. However, just by fostering such a proliferation of information to which people are exposed, social media may interfere with cognitive selection biases, amplifying undesirable phenomena such as extremism and the spread of misinformation [1]. Further, they may introduce new biases in the way people consume information and form beliefs, which are not well understood yet.

Theories about group decision-making and problem-solving suggest that aggregating knowledge, insights, or expertise from a diverse group of people is an effective strategy to solve complex problems, a notion called collective intelligence [2, 3]. While the Web and social media have often been hailed as striking examples of this principle in action [4, 5], some of the assumptions upon which these systems are predicated may harm the very diversity that makes them precious sources of collective intelligence [6]. Social media mechanisms, in particular, tend to use popularity signals as proxies of quality or personal preference, despite evidence that rewarding engagement may come at the expense of viewpoint diversity and quality [7]. Worse, the community structure of information flow networks can distort decisions and increase vulnerability to malicious actors such as social bots [8].

There is increasing empirical evidence of these phenomena: polarization is observed in social media conversations [9,10,11] and low diversity is found in online news consumption [12,13,14,15]. These observations have in common two features: network segregation (the splitting of the social network in two or more disconnected or poorly connected groups) and opinion polarization (the high homogeneity of opinions within such groups). Figure 1 shows what an information diffusion network with those two features looks like. Human factors such as homophily [16,17,18] (the tendency to form ties with similar people) and social influence [19] (the tendency of becoming more similar to somebody as a result of social interaction) are often thought to drive the emergence of polarization and segregation.

Fig. 1
figure 1

Example of a polarized and segregated network on Twitter. The network visualizes retweets of political hashtags from the 2010 US midterm elections. The nodes represent Twitter users and there is a directed edge from node i to node j if user j retweeted user i. Colors represent political preference: red for conservatives and blue for progressives [20]. For illustration purposes, only the nodes in the \(k=3\) core are visualized. See Methods for more details

Some of the consequences of socio-cognitive biases have been explored in social dynamics models [21] and in the social psychology literature [1]. Yet, the interplay between these and additional biases introduced by social media mechanisms is not clear. The algorithms at the heart of social media make a number of assumptions to deliver their recommendations. For example, news feed algorithms favor stories with which users are more likely to engage in the future, based on past engagement [22]. Friendship recommendation engines suggest new ties based on common interests, beliefs, and friends, often resulting in the closure of open triads [23,24,25,26]. And finally, social media empower users to dissolve ties that, although not by design, often tend to be the ones connecting them with those with whom they disagree [27]. Indeed, estimates suggest that tie decay in social networks is a relatively common occurrence [28, 29]. The Appendix provides further empirical evidence of the dissolution of social connections on Twitter.

By curating the information to which users are exposed and by facilitating their management of social ties, social media platforms may enhance homophily and confirmation bias, the tendency to pay attention only to information that aligns with prior beliefs [30]. This would have the net effect of leading social media users to connect preferentially with like-minded individuals, which would then result in selective exposure to only that information which conforms to their pre-existing beliefs, as opposed to more diverse points of view [31]. Ultimately, these dynamics would drive users of social media toward polarization and segregation [32], more so than users of legacy media like TV, radio, or newspapers, where social sharing and link management mechanisms are not at play [33].

The risk that online communication networks could splinter into different ‘tribes’ was recognized at the dawn of cyberspace, and given the name of cyber-balkanization [34, 35] as an analogy to the well-known phenomena of cultural, racial, and ethnic segregation [36]. With the rise of modern personalization technologies, there has been renewed interest in understanding whether algorithmic bias is accelerating the fragmentation of society. The terms filter bubble [37] and echo chamber [38] have been coined to refer to two different algorithmic pathways to opinion fragmentation, both related to the way algorithms filter and rank information. The first refers to search engines [39], the second to social media feeds [40, 41].

The literature about the effects of technology on echo chambers presents a complicated picture, with inconsistent and somewhat contradictory evidence [42]. This is not entirely surprising when one considers the enormous heterogeneity in news sources, social media characteristics and usage, and human information-consumption behaviors. Lab experiments show that people consistently exhibit a preference for congenial information over uncongenial information, especially in the domain of politics [43]. Surveys find mixed evidence of partisan selectivity [44, 45]. On social media, opinion-reinforcing information promotes news story exposure [46]. Analysis of online consumption of political news by Facebook users shows that exposure to cross-cutting ideological information is reduced by comparable amounts when one considers platform algorithms and individual click choices [12]. Behavioral data on online consumption of political news suggest that selective exposure is mostly concentrated among a minority of the population—those who drive most of the traffic to partisan sources [47, 48]. Even if polarized media consumption may not be the norm for most people, it is common among the most politically active, knowledgeable, engaged, and influential individuals [49]. This can favor the spread of misinformation from partisan media and increase animosity within the population. It is therefore important to understand how specific social media mechanisms may facilitate the formation of ideological echo chambers.

Here, we study the emergence of joint opinion polarization and network segregation in online social media, specifically focusing on the interplay between the mechanisms of influence and unfriending. One novel contribution of our approach is to model how these mechanisms are mediated by the basic activity of information sharing in social media. Furthermore, we explore how biases in recommendation algorithms may exacerbate the dynamics of echo chambers. Although our model is idealized, it captures some key features of social media sharing—limited attention, social influence, and social tie curation. In particular we investigate the role of selective unfollowing, which has not been studied in the literature. Through a series of simulations that compare different scenarios by exploring two key parameters, we find conditions under which opinion polarization and network segregation coevolve. This provides a generative mechanism to interpret the formation of echo chambers in social media. We also check the consistency of our model against empirical data from Twitter. This allows us to test the micro-level assumptions underpinning our model as well as its macro-level predictions [50].

Model

Let us introduce a model of opinion dynamics in an evolving social network. We incorporate various ingredients from models in the literature: information diffusion via social sharing [51], opinion influence based on bounded confidence [52], and selective rewiring of social ties [53].

The model begins with a random directed graph with N nodes and E directed edges, representing an online social network over which messages spread. Nodes represent social media users and edges represent follower ties, as in Twitter and Instagram. In the initial step, each user’s opinion (o) is randomly assigned a value in the interval \([-1, +1]\). Each user has a screen that shows the most recent l messages posted (or reposted) by friends being followed. A message conveys the identity and opinion value m of the user who originated the post, together with the information about who reposted it. Users can see this information. A message’s opinion m is concordant with an opinion o if they are within a bounded confidence distance \(\epsilon \) (that is, when \(|o - m| < \epsilon \)). It is discordant otherwise. In addition, each user can unfollow a friend by rewiring the connection, thus following someone else in their place. These mechanisms allow us to capture two common ingredients of social media platforms: the possibility to share information with one’s friends, and the possibility to form a new connections.

At every time step t, user i is selected at random, and sees messages on the screen that are posted or reposted by friends. The opinion of user i then changes based on the concordant messages on the screen:

$$\begin{aligned} o_i(t+1) = o_i(t) + \mu \frac{\sum _{j=1}^{l}I_{\epsilon }(o_i(t), m_j)(m_j - o_i(t))}{\sum _{j=1}^{l}I_{\epsilon }(o_i(t), m_j)}, \end{aligned}$$
(1)

where \(\mu \) is an influence strength parameter, the sum runs over the messages in i’s screen, and \(I_{\epsilon }\) is an indicator function for concordant opinions based on the confidence bound \(\epsilon \):

$$\begin{aligned} I_{\epsilon }(o,m) = \left\{ \begin{array}{ll} 1 &{} \text {if } |o - m| < \epsilon \\ 0 &{} \text {otherwise.} \end{array} \right. \end{aligned}$$
(2)

Equation 1 provides a simple mechanism for modeling social influence based on an individual’s tendency to favor information that is similar to their pre-existing opinions (\(o_i \pm \epsilon \)), such as the confirmation bias and selective exposure mentioned earlier. This is referred to as bounded social influence and its breadth and strength are controlled by the parameters \(\epsilon \) and \(\mu \). Larger \(\epsilon \) indicates broader-minded users, and larger \(\mu \) indicates stronger social influence.

Two more actions may be taken by user i at each time step t. First, with probability p, the user reposts a concordant message from the screen, if any are available; otherwise, with probability \(1-p\), they post a new message reflecting their own opinion. Second, with probability q, the user selects a random discordant message from the screen, if one exists, and unfollows the friend who (re)posted the message, following a new friend in their place. We explore three different rewiring strategies for selecting the new friend:

  • random: a user is selected at random among all nodes in the network that are not already friends of i’s;

  • repost: a user is selected at random among the originators of reposts, if any are on i’s screen;

  • recommendation: a user is selected at random among non-friends who recently posted concordant messages.

Note that the size, density, and out-degree sequence of the network stay the same throughout each simulation, while the in-degree distribution can change over time.

As we mentioned earlier, our model incorporates various elements that have been explored in the literature. Both opinion dynamics and the rewiring of social ties (unfriending) are notably present in the model proposed by Holme and Newman [53], which first explored the roles of the two mechanisms. There are however a few key differences between the model presented here and previous models. One is that in our model, opinions take continuous values and unfriending is based on bounded confidence. More importantly, when links are rewired, they do not necessarily select nodes with concordant opinion (this is only one of the three rewiring strategies we consider); rather, the targets of the selection are the links to be broken—those outside the opinion confidence bound. Finally, our model aims to capture the crucial features of information diffusion in social sharing platforms, where influence may take place indirectly. Consider for example the following scenario: user A posts a piece of information that reflects A’s opinion; user B reshares the message to their followers, which include user C. Now user C may be influenced by A’s post, even though A and C are not directly connected, and irrespective of whether C’s opinion was concordant with or influenced by B’s opinion. This indirect influence mechanism is asymmetric: the opinion of the consumer of a post changes, while the opinion of the originator of the post does not. The average opinion is therefore not conserved, unlike in the model proposed by Deffuant [52].

Fig. 2
figure 2

Screenshot of the echo-chamber model demo

The code to simulate our model and reproduce our findings is available online at http://www.github.com/soramame0518/echo_chamber_model.

To facilitate the exploration of our model, we developed an interactive demo allowing one to run Web-based simulations with different realizations of the model parameters. The demo makes certain simplifications to be accessible to a broad audience: it is based on an undirected network, nodes can see all messages from their neighbors, and unfriending only occurs by random rewiring. Figure 2 provides a screenshot of the demo, which is available online at http://www.osome.iu.edu/demos/echo/.

Results

Emergence of echo chambers

Fig. 3
figure 3

Coevolution of opinion polarization and network segregation. a Average diversity of messages on the screen, measured using Shannon entropy with the opinion range divided into 10 bins. b Temporal changes in population opinions. c Temporal changes in the social network structure. We use parameters \(N=100\), \(E=400\), \(\epsilon =0.4\), \(\mu =0.5\), \(p=0.5\), \(q=0.5\), and \(l=10\). A random rewiring strategy is applied, but similar dynamics are observed with different strategies

To illustrate the dynamics of the model, in Fig. 3 we show one simulation run. Over time, due to social influence and unfriending, each user is increasingly exposed to similar messages endorsed by friends (Fig. 3a), and the system reaches a steady state characterized by two distinctive features often observed in reality: opinion polarization (Fig. 3b) and network segregation (Fig. 3c). Note that by “polarization” we mean a division of opinions into distinct homogeneous groups, which are not necessarily at the extremes of the opinion range.

Fig. 4
figure 4

Dependence of stationary opinions on bounded confidence parameter \(\epsilon \): a number of opinion peaks and b maximum distance between opinions [54]. The plots consider opinions at the steady state and show averages and standard deviations across 20 simulation runs with \(N=100\), \(E=400\), \(\mu =0.5\), \(p=0.5\), and \(q=0.5\)

We wish to examine the conditions under which opinion polarization and network segregation coevolve. Recall that our model has two mechanisms that appear to be relevant to this process: social influence (regulated by parameters \(\epsilon \) and \(\mu \)) and rewiring (regulated by q). Let us first examine the role of the confidence bound parameter \(\epsilon \). This threshold affects the number of final opinion clusters and the diversity of surviving opinions, in a manner consistent with the original bounded confidence model [52] and some of its extensions [55]. As shown in Fig. 4a, b, the smaller \(\epsilon \), the more opinion clusters with more heterogeneous opinions. If \(\epsilon \) is large enough, the network converges to a single homogeneous opinion cluster.

Role of influence and rewiring

Fig. 5
figure 5

Conditions for the coevolution of opinion polarization (top) and network segregation (bottom). Left: \(\mu =0.1\) and \(q=0\). Center: \(\mu =0\) and \(q=0.1\). Right: \(\mu =0.1\) and \(q=0.1\)

Next, let us explore the joint effects of influence and rewiring. Here we limit our attention to the case \(\epsilon = 0.4\), which yields, on average, two segregated opinion groups as illustrated in Fig. 3. In the presence of social influence alone without rewiring (Fig. 5a), the network structure is unaffected, but opinions may become polarized after a long time. In the presence of rewiring alone (Fig. 5b), no opinion change can happen but like-minded users cluster together making polarization inevitable; the network may become segregated after a very long time. The joint effect of social influence and rewiring accelerates the joint emergence of both polarization and segregation (Fig. 5c).

Fig. 6
figure 6

Time until emergence of echo chambers as a function of a influence strength \(\mu \) and rewiring rate q and b network size (N). In a, we use a logarithmic scale to explore small parameter values. For each \((\mu , q)\) parameter configuration we ran 200 simulations with \(N=100\), \(E=400\), \(\epsilon = 0.4\), and \(p=0.5\). A few simulations were excluded (see text), so that the median number of runs is 197. Colors represent averages across these simulation runs. The simulations were stopped after \(t_{\text {max}}=10^5\) steps in cases when segregation and convergence have not both occurred yet. In b, we use the same network density as in a and plot means and standard deviations across 10 simulation runs

To further explore how influence and rewiring jointly affect the speed of emergence of echo chambers, we plot in Fig. 6a the time until two conditions are both satisfied: (i) the network clusters are segregated and (ii) opinions are homogeneous, i.e., any two nodes within the same cluster have opinions that differ by less than the bounded confidence \(\epsilon \). In some cases, a cluster may form that is smaller than the out-degree of one or more of its nodes, so that links from these nodes cannot be rewired to their own cluster; these cases are excluded because segregation can never occur. With these exceptions, segregated clusters always form when \(q>0\) and \(\mu >0\). This may take a long time if q and \(\mu \) are exceedingly small. However, even relatively small amounts of influence and rewiring greatly accelerate the emergence of segregated and polarized echo chambers. When both the rewiring rate q and the influence strength \(\mu \) are above 0.1, echo chambers appear in a fraction of the time. We therefore observe a synergistic effect in which influence and unfollowing reinforce each other in leading to the formation of echo chambers. Time until the emergence of echo chambers also shows an expected linear dependence on network size, as shown in Fig. 6b.

Effects of rewiring strategies

All three rewiring strategies used in the model (random, repost, recommendation) produce comparable stable states in terms of the number and diversity of stationary opinion clusters. In other words, what leads to an echo chamber state is selective unfollowing and not the specific mechanism by which one selects a new friend to follow. However, the emergence of echo chambers is greatly accelerated by the rewiring strategy based on recommendations of users with concordant opinions. The speed of convergence to the steady state is more than doubled compared to the other rewiring strategies.

Fig. 7
figure 7

Effects of different rewiring strategies on evolved social networks. a The number of closed triads is averaged across 20 simulations with \(N=100\) and \(E=400\); all differences are statistically significant (\(P<0.01\)). b Cumulative in-degree distributions with \(N=10^4\) and \(E=10^5\)

The rewiring strategy also affects the development of closed social triads. A closed social triad is a network motif with three nodes ABC and links \(A \rightarrow B, A \rightarrow C, C \rightarrow B\). It can be thought as the smallest unit of an echo chamber network [56], since it enables the same information to be transmitted from a source A to a recipient B through different paths, directly and via an intermediary C. As shown in Fig. 7a, rewiring strategies based on recommendations of users with concordant opinions and on exposure via reposts—both common mechanisms in social media—result in significantly more closed triads than following users at random. Repost-based rewiring, in particular, leads to doubling the number of directed closed triads, making it much more likely that users are exposed to the same opinions from multiple sources. The number of users posting/reposting a message can affect its ranking and be displayed to the user through platform-dependent interface elements, boosting user attention and exposure.

Finally, the rewiring strategy affects the in-degree distribution of the network in the stable state. Compared to random rewiring, the other two methods yield more skewed in-degree distributions, indicating the spontaneous emergence of popular users with many followers, whose messages have potentially broader reach (Fig. 7b). Again, the effect on hubs is stronger in the case of repost-based rewiring. This is consistent with the copy model for network growth, which approximates preferential attachment [57]. However, unlike the copy model, the number of nodes and links is fixed in our model; only the patterns of connection change. Thus, the skewed in-degree distribution arises due to the spread of information. Since recipients can see who originally posted each message, the originators of popular messages have the best chance of receiving new followers and becoming hubs.

Empirical validation

It is tempting to use our model to reproduce a few stylized facts about empirical echo chambers. To this end, let us consider data about an empirical retweet network of US political conversations (see Methods A). To fit the model against this data, we plug in values of known parameters estimated in prior work, and then perform a sweep of the remaining parameters (Methods B). We simulate the resulting calibrated model to see if the synthetic network snapshot generated at the end of the simulation is in agreement with the observed snapshot of the empirical network (Methods C). As a stopping criterion for the simulations, we check that the simulated network has reached the same level of segregation as the empirical one (Methods D).

Fig. 8
figure 8

Comparison between model and empirical retweet networks. The solid blue lines represent the evolution of three metrics as a function of simulated time (epochs). The dashed line represents the empirical value for the segregation index (left) and fraction of closed directed triads (center), defined in Methods D and E respectively. Diversity (right) is the average distance between neighbor opinions

Figure 8 shows the results. The segregation is one feature of the network structure that the model can reproduce. Aside from this, the random rewiring scheme used in the model cannot produce networks with heterogeneous degree. However we can draw a comparison between the empirical data and our simulations based on two other metrics. The first is the fraction of closed triads in the network. To compute the number of triads, we record each time a user reposts something in our model as a ‘retweet,’ and build a simulated retweet network. We then count all instances of closed directed triangles in both networks (Methods E). The central panel in Fig. 8 shows that the fraction of triads in the synthetic network is consistent with that observed in the empirical data.

Fig. 9
figure 9

Distribution of pairwise opinion distances. The calibrated model was simulated until the segregation of the synthetic retweet network matched the observed one (see Methods E and Fig. 8). The main plot shows the distribution of opinion distances \(d_o\) across pairs of users in the simulated network. The inset shows the distribution of opinion distances \(d_t\) among Twitter users from the empirical data

The second metric is the distribution of opinion distances. We infer the latent opinions of the Twitter users in our data from their hashtag usage (Methods F), and define a distance \(d_t\) in hashtag binary vector space. In the model, we simply consider the distance \(d_o(o_i, o_j) = | o_i - o_j |\) between two users in the opinion space. Figure 8 shows that the average distance between neighbor opinions decreases, but we also want to compare the distributions. Figure 9 shows that both distance distributions have peaks around low values of distance for users in the same cluster and around high values for users in different clusters. While the ways in which the distances are measured and consequently the distributions are necessarily different, the qualitatively similar bimodal behaviors suggest that the calibrated model attains an analogous level of opinion polarization in correspondence of the level of network segregation observed in the empirical data.

Fig. 10
figure 10

Simulation of model on a large empirical network. a Heavy-tailed in-degree distribution in the initial network. b Initial (\(t=0\)) and final (\(t=10^6\)) opinion distributions, showing the emergence of polarization. c Visualization of the follower network after \(t=10^6\) steps, showing strong segregation

To confirm that the proposed model yields echo chambers when applied to larger networks with realistic degree distributions, we conducted a simulation using an empirical Twitter follower network with \(N=14{,}818\) nodes and \(E=428{,}557\) edges (Methods A). As shown in Fig. 10, the simulation results confirm that both opinion polarization and network segregation emerge from this empirical network.

Discussion

In studying an idealized social media platform using an agent-based model, we followed the rich tradition of several models of opinion dynamics under social influence [21], in which agents adjust their opinions based on those of the ones with whom they are connected (social influence), and rewire their ties with peers based on their shared opinions (social selection). Other models have explored the essential tension between social influence and social selection [53, 58,59,60,61]. The effect of the interaction between these two mechanisms on the emergence of opinion clusters has also been studied within a bounded confidence framework similar to the one presented here [62, 63].

All of these models present extremely simplified versions of real social networks. While the model presented here is no exception, it seeks to capture more closely the key components of social media by focusing on indirect interactions enabled by information diffusion, in addition to disagreement-driven dissolution of ties via unfollowing/unfriending. Furthermore, our model combines social influence and selection with the competition for limited attention, which has been shown to explain the empirical scale-free distribution of content popularity in social media [51, 64].

The results presented here suggest that the proliferation of online echo chambers may be an inevitable outcome of basic cognitive and social processes facilitated by social media: namely, the human tendency to be influenced by information and opinions to which one is exposed, and that of disliking disagreeable social ties. Social influence and rewiring appear to provide synergistic conditions for the rapid formation of completely segregated and polarized echo chambers; this phenomenon is accelerated by an order of magnitude in the presence of both relatively strong influence and relatively common unfollowing, compared to cases when either mechanism is weak.

A social network that is both segregated and polarized can be also generated with a variant of the Schelling model [36] on networks, proposed by Henry et al. [65]. This model is based on aversion-driven rewiring, but starts from a bimodal distribution of opinions. Our approach shows how both polarization and segregation emerge without assuming that opinions are already polarized.

The literature has explored other factors and mechanisms that foster the emergence of isolated cultural or political subnetworks as well as polarization of opinions. Network transitivity, which is also incorporated in our model, has been shown to lead to the formation of groups when combined with reciprocity [66] or with one-to-many communication [67]. Pressures toward stronger opinions [68] or more radical opinions [69] are not included in our model, nor are repulsion effects driving opinions farther apart [13, 55]. Echo chambers can also emerge from cognitive mechanisms, such as confirmation bias, when information propagates through centralized channels reaching a large portion of the population [70]. Finally, geographic segregation in urban areas may promote polarization in both physical and online spaces by fracturing the social space of mutual exposure [71]. Our model focuses exclusively on information spreading mechanisms that are characteristic of online social media platforms.

Focusing on the rewiring of social ties, we tested three different selection mechanisms: two inspired by triadic closure and social recommendation—intended to model the ways in which social media work in practice—and one based on purely random choice. All variations yield qualitatively similar steady states, suggesting that disagreement-driven unfollowing is a sufficient rewiring condition for echo chamber emergence. The number of groups does depend on the tolerance to different opinions, as predicted by bounded confidence models [52]. This suggests that the extent to which social media allow users to exercise their preferences in determining their connections will either integrate or fragment interaction [72].

The more realistic selection mechanisms help explain two additional features of online social networks. First, the presence of users with many followers. These hub nodes affect the dissemination of the same messages in many cases, but not always [73]. Second, the large number of closed triads [26]. Triadic closure connects individuals to friends of their friends, facilitating repeated exposure to the same opinion. Such “echoes” are a powerful reinforcing mechanism for the adoption of beliefs and behaviors [74].

Although our model does not account for the adoption of false information, it has been speculated that echo chambers may make social media users more vulnerable to this kind of manipulation [75, 76]. There are multiple ways in which echo-chamber structure may contribute to the spread of misinformation. First, because people are repeatedly exposed to homogeneous information inside an echo chamber, the selection of belief-consistent information and the avoidance of belief-inconsistent information are facilitated, reinforcing confidence in minority opinions, such as conspiracy theories and fabricated news, even in the presence of preponderant contrary evidence [1]. Second, echo chambers foster herding, which may lead to quick and premature convergence to suboptimal solutions of complex problems and simplistic interpretations of complex issues [1, 7]. Third, the threshold for perceiving a piece of content as novel may be lower within echo chambers by virtue of the reduced diversity of viewpoints to which people are exposed. The crafting of false news with perceived novelty may thus be promoted, leading to faster and broader consumption of misinformation [77] and triggering the production of more information about similar topics [78]. Finally, echo chambers may reinforce the influence bias of personalized filtering algorithms toward a user’s current opinions [79]. On the other hand, recent experimental results suggest that social information exchange in homogeneous networks increases accuracy and reduces polarization [80], casting doubt on theories that political echo chambers reduce belief accuracy. More work is certainly needed to understand the relationship between online echo chambers and misinformation.

Our results suggest possible mitigation strategies against the emergence of echo chambers on social media. Often-recommended solutions involve exposure to content that increases a user’s social distance from their preferences. However, such strategies must be consistent with current understanding of cognitive biases [1]. For example, it does not help to promote content that will be disregarded [76]. A more neutral possibility suggested by our findings (Fig. 7a) is to discourage triadic closure when recommending the formation of new social ties. By exposing the sources of information reposted by our friends and recommending similar users, social media platforms encourage linking choices that maximize triadic closure. While exact knowledge about recommendation algorithms is not available, we know that triadic closure plays a key role. But even among the many friends of our friends, an algorithm could optimize for diversity of opinions. Moreover, the complete dissolution of ties with those users with whom one disagrees should be discouraged, for example by providing alternative mechanisms—some social media platforms are experimenting with solutions like snooze buttons [81]—or the possibility to block only certain types of information, but not others. Another approach is to alert users who are about to unfollow their only conduits to certain types or sources of information.

As we better understand the unintended consequences of social media mechanisms, ethical and transparent user studies are needed to carefully evaluate countermeasures before they are deployed by platforms. We must not only ensure that new mechanisms mitigate undesired outcomes, but also that they do not create new vulnerabilities.

Methods

A. Data

To evaluate the model’s prediction, we use empirical data from Conover et al. [9], who studied the political polarization of Twitter users. The data comprises a sample of public tweets about US politics, collected during the 6 weeks prior to the 2010 US midterm elections. The tweets were obtained from a 10% random sample of all public tweets. The dataset is available online at http://www.cnets.indiana.edu/groups/nan/nan-datasets-and-data-tools/#icswm2011_2.

Tweets with hashtags about US politics were included in the dataset. The hashtags were drawn from a list, which was obtained by expanding a manually curated seed set of then-popular political hashtags, such as #TCOT (‘Top conservatives on Twitter’) and #P2 (‘Progressives 2.0’). This initial set was recursively expanded with co-occurring hashtags above a minimum frequency, until no additional hashtag could be found. Finally, the list was manually checked and any hashtag that was not about US politics was expunged. The final list included 6372 hashtags about US politics.

Three networks are provided in the dataset: retweets, mentions, and retweets plus mentions combined. We used the largest strongly connected component of the retweet network (\(N = 18{,}470\) and \(E = 48{,}365\)), which is known to be polarized in two groups, roughly corresponding to the two main US political factions—conservatives and progressives. The network is the same shown in Fig. 1.

For the larger empirical network, we started from a follower network with \(N = 41{,}652{,}230\) nodes and \(E = 1{,}468{,}364{,}884\) edges [82]. To produce a more manageable dataset, we first randomly sampled edges from the graph and focused on the network spanned by these edges, and then applied k-core decomposition [83] with \(k = 30\). This yielded a reduced network with \(N=14{,}818\) nodes and \(E=428{,}557\) edges, which was used to initialize the simulation.

B. Parameter fitting

Our model includes several parameters that need to be estimated. The rate of reposting was set to \(p = 0.25\) based on empirical results from Twitter [84]. Similarly, the screen length was set to \(l = 10\), which is close to the average number of times that a user stops on a post during a scrolling session on a social blogging platform [84].

The number of nodes in the simulations was taken to be the same as the number of Twitter users in the empirical retweet network. Edges were drawn at random between any two nodes with probability chosen so that the density of the follower graph is \(d=1.8 \times 10^{-4}\). This value is within the range observed in the literature [85, 86].

We performed a parameter scan for the rest of the parameters, finding the following values: influence strength \(\mu = 0.015\) and tolerance \(\epsilon = 0.65\). Note that the tolerance value to reproduce the two opinion clusters in the US-based online political conversations is larger than the value \(\epsilon = 0.4\) found for smaller networks (Fig. 4). Finally, for simplicity, we use the random rewiring rule.

C. Model evaluation

Our goal is to compare model predictions about the emergence of echo chambers with empirical data from social media. Unfortunately, lacking a probability distribution over the data, our model does not allow us to compute the likelihood of a given network or distribution of opinions. Thus we need to devise a method to evaluate our approach. This has become a common challenge, especially with the rise of agent-based modeling in the social sciences [87]. There is a vast literature devoted to developing rigorous methods to test simulation models on empirical data of social phenomena [88, 89]. Although no single universal recipe exists, we adopt the common approach of generating synthetic data from our agent-based model and comparing them to the empirical data under appropriate distance measures.

Our main hypothesis is that both social influence and rewiring are required to reproduce patterns consistent with the empirical data. Under those conditions, the system will always reach a state in which there will be no ties connecting users with discordant opinions (see Fig. 5). However, the empirical network is not completely disconnected in two communities. Therefore, we simulate our model until the system reaches the same level of segregation observed in the empirical data, and compare the two networks.

The empirical and model networks are however different. The former is a network of retweets, while the latter is a network of ‘follower’ ties. Therefore we cannot compare these two networks directly, but instead we generate a synthetic retweet network from the simulated data. Every time a user performs a ‘repost’ action in our simulations, we count it as a retweet, and add the corresponding edge in the simulated retweet network.

The plots in Figs. 8 and 9 are based on snapshots of this synthetic retweet network, taken at evenly spaced time intervals of 10 epochs each. Each epoch consists of N steps of the model, so that each user performs one post and/or rewiring action per epoch on average. At the end of each tenth epoch we consider the latest E distinct retweet edges, so that each simulated network snapshot is guaranteed to have the same number of edges as the empirical one. We then consider the largest strongly connected component of each simulated network snapshot. Therefore, the two networks do not generally match in the number of nodes.

D. Segregation

To measure the segregation in both the simulated and empirical networks, we group users into two clusters \((C_-, C_+)\). In the simulated network, \(C_-\) is defined as the set of users having opinion \(o < 0\) and \(C_+\) as the set with \(o \ge 0\). In the empirical network, the two clusters correspond to the labels obtained via label propagation [20]. Let \(E_b\) denote the set of edges connecting nodes in different clusters. We define the segregation index as:

$$\begin{aligned} s = 1 - \frac{| E_b |}{2d \, | C_+ | \, | C_- |}. \end{aligned}$$
(3)

The segregation index compares the actual number of edges across the two clusters with the number we would observe in a random network with the same density d. When the network is completely segregated, \(s=1\).

E. Closed triads

Let us denote by \(i \rightarrow j\) a directed edge from node i to node j. A closed directed triangle or closed triad is any node triplet \(i, j, k \in V\) such that \(\{i \rightarrow j, j \rightarrow k, i \rightarrow k\} \subseteq E\). An open directed triangle or open triad is any node triplet for whom only a proper subset of those edges exists in E. Let us denote by T the set of closed triads and by \(T_u\) the set of open triads. We compute the frequency of closed triads as the ratio

$$\begin{aligned} f_T = \frac{|T|}{|T \cup T_u|} = \frac{|T|}{N_T! / (N_T-3)!}, \end{aligned}$$

where \(N_T = \left( {\begin{array}{c}N\\ 3\end{array}}\right) \) is the number of all node triplets.

F. Latent opinion inference

Our model generates opinions in the \([-1,+1]\) range, while the empirical network has binary labels (‘liberal’ or ‘conservative’) inferred from a training set and propagation through the network [20]. Comparing the opinions predicted by the model to these labels would not be meaningful, since the labels are trivially correlated with the network structure, by construction.

A more meaningful comparison is between pairwise opinion distances, which we can generate for the Twitter users using a criterion that is not induced by the network’s community structure. Since hashtag usage is also polarized [9], we infer opinions distances from adopted hashtags. We say that a hashtag is adopted by a user if it is found either in tweets retweeted by the user (incoming edges), or in tweets by the user that were retweeted by someone else (outgoing edges). Let us consider the i-th user and the k-th hashtag. We define an empirical opinion vector \(\hat{o}_i\in \{0,1\}^{D}\) where \(\hat{o}_{ik} = 1\) if user i adopted hashtag k, and 0 otherwise. We define the empirical opinion distance between two opinion vectors based on shared tags:

$$\begin{aligned} d_t\left( \hat{o}_{i}, \hat{o}_{j}\right) = 1 - \frac{\hat{o}_{i} \cdot \hat{o}_{j}}{\min \left\{ \Vert \hat{o}_{i}\Vert ,\Vert \hat{o}_{j}\Vert \right\} }, \end{aligned}$$
(4)

where \(\Vert \cdot \Vert \) is the \(\mathcal {L}_1\) norm, or number of shared tags. To mitigate the effects of sparsity and noise, we use only the \(D=20\) most popular hashtags to define the vectors. The selected hashtags were adopted by 93% of the users. We restrict the retweet network to the subgraph spanned by those users, but the overall results do not change significantly if we select enough hashtags to cover 100% of the users.