Skip to main content
Advertisement
  • Loading metrics

Opinion polarization from compression-based decision making where agents optimize local complexity and global simplicity

  • Alina Dubovskaya ,

    Roles Formal analysis, Investigation, Methodology, Software, Validation, Visualization, Writing – original draft, Writing – review & editing

    alina.dubovskaya@ul.ie

    Affiliations Centre for Social Issues Research, Department of Psychology, University of Limerick, Limerick, Ireland, Mathematics Applications Consortium for Science and Industry (MACSI), Department of Mathematics and Statistics, University of Limerick, Limerick, Ireland, Lero, the Research Ireland Centre for Software, University of Limerick, Limerick, Ireland

    ⨯
  • David J. P. O’Sullivan,

    Roles Conceptualization, Visualization

    Affiliation Mathematics Applications Consortium for Science and Industry (MACSI), Department of Mathematics and Statistics, University of Limerick, Limerick, Ireland

    ⨯
  • Michael Quayle

    Roles Conceptualization, Funding acquisition, Project administration, Resources, Supervision, Writing – review & editing

    Affiliations Centre for Social Issues Research, Department of Psychology, University of Limerick, Limerick, Ireland, Lero, the Research Ireland Centre for Software, University of Limerick, Limerick, Ireland

    ⨯

Abstract

Understanding social polarization requires integrating insights from psychology, sociology, and complex systems science. Agent-based modeling provides a natural framework to combine perspectives from different fields and explore how individual cognition shapes collective outcomes. This study introduces a novel agent-based model that integrates two cognitive and social mechanisms: the desire to be unique within a group (optimal distinctiveness theory) and the tendency to simplify complex information (cognitive compression). In the model, virtual agents interact in pairs and decide whether to adopt each other’s opinions by balancing two opposing drives: maximizing opinion diversity within their local social group while simplifying the overall opinion landscape, with both evaluated using Shannon entropy. We show that the combination of these mechanisms can reproduce real-world patterns, such as the emergence of distinct heterogeneous opinion clusters. Moreover, unlike many existing models where opinions become fixed once opinion groups form, individuals in our model continue to adjust their opinions after clusters emerge, leading to ongoing variation within and between opinion groups. Computational experiments reveal that polarization emerges when local group sizes are moderate (consistent with Dunbar’s number), while smaller groups cause fragmentation and larger ones hinder distinct cluster formation. Higher cognitive compression increases unpredictability, while lower compression produces more consistent group structures. These results demonstrate how simple psychological rules can generate complex, realistic social behavior and advance understanding of polarization in human societies.

Author summary

When people split into opposing groups, such as political parties with differing views on social issues, it is called social polarization and is a growing global concern. Understanding how it emerges, however, remains challenging. In this study, we use computer simulations to explore how simple psychological tendencies can combine to produce complex social patterns. Our model brings together two ideas from psychology: people’s desire to be unique within a group and their tendency to simplify complicated information. We show that these two forces can drive social polarization. Unlike many existing models, individuals in our model continue to adjust their views after clusters form, leading to ongoing variation within and between opinion groups. The model also demonstrates that the way people simplify information, as well as the typical size of social groups, can make polarization either predictable or chaotic. Our results help explain why polarization may happen and how individual thinking shapes collective division.

Introduction

In today’s interconnected world, people’s opinions play a powerful role in shaping the social, political, and economic landscape. How these opinions are distributed across a population can influence public policy, cultural norms, and the success or failure of businesses. Political and ideological polarization is seemingly becoming increasingly pronounced, raising concerns about its impact on democratic institutions and social cohesion [1–4]. Many social mechanisms have been identified as contributing to opinion polarization, including elite cueing [5], socio-political identity sorting [6], shifts in media environments [7], and socio-economic inequality [8], to name a few. However, how polarization emerges as a dynamic, self-organizing process from individual-level interactions in complex social systems remains less understood. Insights from social psychology, political science, and complexity science may be necessary to uncover the mechanisms through which such emergent polarization arises.

Societies and social groups are complex systems where various mechanisms operate on different scales, ranging from neurological mechanisms (such as cognitive limitations and biases) and individual reasoning and preferences to external factors (such as the information environment in which an individual operates) [9–11]. Mechanisms that work at the level of local interaction are among the major factors shaping the distribution of opinions in a population [12–14].

Various approaches are employed to study the complex system of opinion formation, including behavioral experiments [15–17], survey research [18–21], data analysis of online social platforms [22,23], as well as mathematical and computational modeling [24–29]. Among computational approaches, agent-based models (ABMs) have become a popular tool for testing basic mechanisms that may underlie complex systems. In these models, we prescribe mechanisms that may facilitate decision-making at the individual level during interactions and aim to study how these micro-level mechanisms can lead to the formation of emergent population-level phenomena such as consensus or polarization of opinions [30,31].

Several well-established ABMs have demonstrated that polarization can emerge from individual-level mechanisms such as bounded confidence in the Deffuant-Weisbuch [24] and the Hegselmann-Krause [32] models, cultural similarity in the Axelrod’s model of Cultural Dissemination [26] and by averaging neighboring opinions in the DeGroot model [25]. In these models, opinion group formation arises as a result of limited interaction across different opinion groups and they typically converge to simplistic opinion distributions—either global consensus or a small number of homogeneous clusters where individuals hold same or near the same opinions. Once the opinion clusters are formed, agents stop updating their opinions entirely, becoming locked in rigid opinion groups. In contrast, real-world opinion landscapes are rarely so discrete. Even in strongly polarized societies, individuals within the same group do not hold identical beliefs; instead, there is always a degree of variation and ongoing opinion shifts. Introducing noise into these models addresses some of these limitations and leads to more complex behavior [33,34]. Nevertheless, in their pure form, the mechanisms incorporated in these models lead to oversimplified, static outcomes.

Recent works in social psychology look at polarization as a fundamental process by which groups manage their identity [35–38]. Polarized social systems allow individuals to easily differentiate between in-group and out-group members, recognize their own belonging, and signal their identity. However, even while being motivated to affiliate with clearly differentiable groups, people still value individuality within those groups [39,40]. Theories of uniqueness [39] and individuation [41,42] suggest that individuals strive to balance two opposing drives: the desire to belong to a well-defined social group and the desire to feel unique [43,44]. Thus, individuals prefer attitudinal positions that are close enough to their group to signal affiliation, yet distinct enough to assert personal identity [45]. In other words, when choosing an attitude or opinion, people favor positions that are locally complex but globally comprehensible. Moreover, optimal distinctiveness theory [40,46] argues that these two competing desires lead to social groups that are simultaneously sufficiently inclusive and sufficiently distinct, satisfying both needs in an intricate balance. Certainly, real-world polarization is characterized not by perfect homogeneity within groups, but by stable clusters that retain internal variability and allow for fluidity in opinion within group limits. In this paper, we propose that the desire for optimal distinctiveness may serve as a fundamental mechanisms for polarization and also explain the persistence of opinion diversity within cohesive social groups.

A second mechanism we investigate is cognitive compression. Originating from early work by Lippmann [47], this concept highlights how humans simplify complex information into simplified cognitive representations—such as stereotypes or social categories, to process new information more efficiently. Experimental studies using the “telephone game” (i.e., transmission-chain experiments) have shown that people perceive and reproduce information in increasingly compressed forms as it passes through communication chains [48]. These findings support the observation that humans can comprehend and act in a complex world because they encode it in compressed forms that make it easy to categorize others into groups and identify social outliers [37,49].

In this paper, we develop a novel agent-based model in which individuals seek to balance their need for uniqueness within their social group with their tendency to simplify the broader opinion environment. These two competing desires work in opposite directions since greater local complexity limits the degree to which the opinion space can be simplified, and thus we expect the model to produce complex behavior. The central question of this study is: what population-level opinion patterns emerge when agents simultaneously optimize for local complexity and global simplicity, and under what conditions do these mechanisms lead to polarization? We show that these mechanisms can produce: a) population-level opinion group formation, b) sustained variability of opinions within social groups, and c) individual-level mobility within social groups, i.e., shifting positions within or between groups. By modeling these dynamics, we offer a new theoretical lens on polarization that explains not only the formation of distinct opinion groups, but also why diversity and movement persist within those groups in social systems.

Model of balancing local complexity and global simplicity in the opinion distribution

In the proposed model, agents interact in pairs and have an opportunity to swap their opinions to the opinion of the second interacting agent during Monte Carlo simulations. To decide whether to adopt the second agent’s opinion or to keep their current one, the agent evaluates whether the new opinion would place them in a better position within their local social group or make the overall opinion distribution in the population more comprehensible (or both). A better position within the local group means increased diversity within that group; a more comprehensible global distribution leads to easily identifiable clusters in the population.

Formally, we have N agents in the model that hold a univariate opinion ranging between 0 and 1. The opinion profile at time t is denoted by , where t is the time step of the simulation. Initially, the agents are assigned random opinions drawn from the continuous uniform distribution, . For each agent i we also define a subset, , which contains the opinions of the agents that agent i considers their local social group. How opinions are chosen for the local group will be explained below.

We then perform Monte Carlo simulations where, at each round, two agents are randomly selected for interaction, and the first agent has an opportunity to change their opinion to that of the second agent. To decide whether adopting a new opinion will position them “better” in the opinion space, the agent calculates the complexity of information in the opinion distribution within their local group and the entire population, both before the interaction and after the hypothetical change, using the Shannon entropy [50] Specifically, at each time step of the Monte Carlo simulations:

  1. Two agents are selected at random;
  2. The first agent considers the second agent’s opinion; and if accepting the new opinion would increase the first agent’s ratio of local to global entropy relative to their old one, they do so. Otherwise, they keep their current opinion.

The simulation continues until the bailout time, which allows sufficient time for the long-term behavior to stabilize. Fig 1 illustrates the main steps of the opinion update procedure within a single Monte Carlo step.

thumbnail
Fig 1. Flow chart of the opinion update rule.

At each Monte Carlo step, two agents are randomly selected, and the first agent tentatively adopts the second agent’s opinion. The change is accepted if it increases the ratio of local to global Shannon entropy, meaning either local opinion diversity increases or global complexity decreases (or both).

https://doi.org/10.1371/journal.pcsy.0000115.g001

We now explain in detail how we calculate the entropies. When agent i interacts with agent j, we calculate the Shannon entropy across the sets X(t) and and refer to them as the total and local entropy prior to interaction. We then replace the opinion of agent i with the opinion of agent j and calculate the total and local entropy in the case that agent i decides to switch opinion, and compare their ratio. The opinion update rule then is:

(1)

where and represent the entropy of opinions within the agent’s local group and the entire population, respectively, prior to the interaction, while and are the corresponding entropies in the case that agent i decides to change their opinion. Inequality (1) holds when either the local entropy increases meaning more variability within the local group or the global entropy decreases that indicates a simplified global opinion distribution. Algorithm 1 shows the pseudocode for the opinion updating rule.

To calculate Shannon entropy from the continuous distributions, we first divide the opinion space into nbins discrete intervals, or bins, and calculate the probability distribution across the binned distribution, . The entropy is then evaluated as

(2)

where is the number of opinions in the k-th bin. Algorithm 2 illustrates the algorithm for entropy calculation. This binning process reflects cognitive compression that agents apply when perceiving the opinion distribution in the population. Similar opinions are grouped into the same bin, rendering them indistinguishable for the purpose of entropy evaluation. The number of bins, nbins, reflects the level of cognitive compression: a larger nbins allows more detailed processing, while a smaller nbins leads to more compressed, generalized information.

These bins operationalize psychological “chunking,” a core cognitive mechanism for organizing information across tasks and domains [51]. Classic work by Miller [52] demonstrated that people can reliably maintain roughly chunks of information. Subsequent studies have shown this to be on the higher side of human performance in most tasks; but that the optimal number of chunks remains relatively constant regardless of the complexity or level of abstraction of the task and that memory performance benefits from information compression similarly across both simple and complex material [53]. Thus, we assume that agents use the same level of information compression regardless of the level of abstraction being applied, whether chunking fine-grained (opinions of the local group) or coarse-grained (opinions of the whole population) information. Translating this to our simulation, each agent encodes information, whether about the opinions in their local social group or in the entire population, into a roughly constant number of cognitive units, represented by the number of bins, which naturally yields finer-grained representations for smaller, more homogeneous opinions of the local groups and coarser-grained representations for opinions of the larger, more heterogeneous population.

A compression mechanism based on coarse- and fine-grained representations can be compared with the example of observing a crowd versus an individual: when observing an individual, we perceive finer details; when viewing a crowd, we see only general patterns. The number of bins used in entropy calculation, nbins, is our first control parameter.

Algorithm 1 Opinion update rule

1: Initialize opinions for all agents k. Define the set of all opinions as .

2: while stopping criterion not met do

3:   Select two agents i and j uniformly at random

4:   Construct local group consisting of l nearest opinions of opinion

5:   Discretize opinions in into nbins bins to obtain opinion counts set , where is the number of opinions in bin b

6:   Compute from with algorithm 2 (below)

7:   Discretize opinions in the whole opinion space into nbins bins to obtain opinion counts set

8:   Compute from with algorithm 2

9:   Temporarily substitute

10:   Repeat steps 4 and 5 for the updated opinions set to construct opinion count set accounting for temporarily changed opinion

11:   Repeat steps 7 and 8 for the updated opinions set to construct opinion count set accounting for temporarily changed opinion

12:   Compute from and from with algorithm 2

13:   if then

14:    Accept update:

15:   else

16:    Reject update: keep unchanged

17:   end if

18: end while

Algorithm 2 Shannon entropy of discretised opinions

Require: Discretised opinion counts

Require: Total number of opinions

Ensure: Shannon entropy H

1:

2: for b = 1 to nbins do

3:   if then

4:    

5:    

6:   end if

7: end for

8: return H

We now explain how we determine which agents belong to a given agent’s local group, i.e., how set is defined. Several definitions could be motivated by social psychology; however, for simplicity, we define the local group as the set of individuals whose opinions are closest to the current agent’s opinion. This choice is motivated by the concept of homophily—the tendency of individuals to associate with like-minded others.

The size of the local group, denoted by l, becomes our second control parameter. A larger l represents broader social groups to which individuals typically belong, while a smaller l indicates smaller social groups. By varying l, we can explore how the size of agents’ social groups affects the population-level distribution of opinions. A complete description of the model following the ODD (Overview, Design concepts, Details) protocol is provided in S1 Appendix.

Parameter selection

To choose plausible values for the parameters representing the model’s demographic structure, i.e., the size of the local social groups and the total population size, we look to empirical findings on the typical scale of human social organization. Ethnographic primate research associated with Dunbar’s social brain hypothesis [54,55] suggests that the size of social groups in which people can maintain stable social knowledge of one another, supporting the formation and reinforcement of shared norms through repeated interaction, is approximately 100–200 individuals [56–61]. Empirical studies of offline and online social networks suggest that this number typically lies between 100 and 300 [62,63]. This scale is therefore a suitable range for the individual’s immediate social environment, i.e., what in the model is called a local social group of an agent.

At the same time, archaeological studies of early human populations show that once settlements aggregate beyond this threshold, they expand into populations of several hundreds to low thousands, accompanied by the appearance of institutional or organizational mechanisms that stabilize cooperation among partially unfamiliar individuals [64,65]. Such supra-Dunbar populations correspond to what can be describe as tribal or regional network scales ( people), where social cohesion is no longer maintained solely by direct personal ties but by mesoscale structures (e.g., subgroups, norms, and signaling systems) [64].

The total number of agents in our study is fixed at N = 1000, which is consistent with these estimates of regional population size. This number is also a common choice in agent-based models of opinion dynamics. Model sizes of this order are typically sufficient to avoid finite-size effects while remaining computationally efficient to allow the investigation of emergent collective patterns across repeated simulations [13,24,66]. Strictly speaking, the population size is an additional control parameter; however, due to the computational cost of the simulations, it was not explored systematically. It is worth noting that, instead of considering absolute values, one can use ratios of the local group size to the total population size, as well as the number of bins relative to the population size. This approach ensures that the control parameters remain independent of changes in population size. In that case, the absolute value of the population size would not matter, as long as it is sufficiently large. However, for the sake of clearer presentation of the results, we retain absolute values of the control parameters.

To motivate a plausible range of values for the number of bins used in entropy calculations, nbins, we draw on results from cognitive psychology on information compression and short-term memory capacity [51,52,67,68]. Miller’s work [52] and subsequent studies suggest that humans can reliably process on the order of discrete information units, often referred to as “chunks” [52,67]. We use this range as a reference when selecting values of nbins for numerical experiments.

Results

In this section, we present results from Monte Carlo simulations performed across a range of parameter values. We begin by examining the effect of social group size (l) on emergent population-level opinion patterns, followed by an analysis of how cognitive compression (as controlled by nbins) influences the stability and structure of opinion clusters.

A typical outcome of the simulation is shown in Fig 2. In Fig 2(a) the evolution of agents’ opinions over the course of the simulation is shown. There each line corresponds to the trajectory of the opinion of individual agent and where the color of the line is assigned based on agent’s initial opinion at the start of the simulation. This allows us to see how far each agent’s opinion travels in the opinion space. Trajectories of agents with initial opinions close to zero are shown in purple shades, while those starting near one are in yellow shades. With these model parameters, we observe that agents’ opinions shift considerably before eventually forming a single, well-defined cluster, while a small number of agents remain outside the main group. A notable feature of the model is the variability of opinions within clusters, which distinguishes it from previous models. Agents do not converge on the exact same opinion within a group; instead, we observe a distribution of opinions within each cluster, as shown in Fig 2(b). Moreover, agents continue to adjust their opinions while remaining within the cluster. Occasionally, a few agents shift from the main cluster to outlier positions, and vice versa. In Fig 2(c), we plot the evolution of entropy and compressibility measures for the global opinion distribution. These reveal that entropy decreases as opinion clusters form and the overall distribution becomes more compressible.

thumbnail
Fig 2. Two realizations of the model, both initialized with the same parameter values but different initial conditions.

The top plots correspond to the first realization, while the bottom plots correspond to the second realization. (a, d) Evolution of individual opinions over time, showing the trajectories of each agent’s opinion for runs 1 and 2, respectively. The trajectories for each node are colored according to their initial value. (b, e) Final opinion clusters for runs 1 and 2. (c, f) Evolution of entropy (blue) and compressibility (red) of the entire system. Simulation parameters: Nnodes = 1000, nbins = 10 and local group size = 300.

https://doi.org/10.1371/journal.pcsy.0000115.g002

Fig 2(d,e,f) show the same metrics for another simulation of the model with the same parameter values but a different initial opinion distribution (both drawn from a uniform distribution). Once again, we observe the formation of a single main opinion cluster with internal variability and a few outlier opinions that occasionally move in and out of the main group. However, the position of the main cluster and the outliers differs. This illustrates the model’s sensitivity to the initial opinion distribution. It is possible that as the number of agents increases, the final position of the opinion clusters will become more robust to the choice of initial opinion distribution (in the examples discussed, the total number of agents in the system is 1000).

Since we start with uniformly distributed opinions drawn from the continuous distribution, roughly speaking we had around 1000 unique opinions in the beginning of the simulation. As the model evolves, due to swapping mechanisms, the number of unique opinions decreases (or remains constant), with only a small number of unique opinions surviving by the time a stable cluster is formed.

To quantify how opinion diversity evolves over the course of the simulation, we track the number of unique opinion present in the population over time (Fig 3). We performed 10 independent runs, each starting from opinions drawn uniformly at random from [0, 1] and evolving for 106 steps. All runs exhibit a consistent decay in the number of surviving unique opinions and converge toward a small number (of the order of 10). The logarithmic scale on the y-axis illustrates an approximately exponential decline at early times, which slows as the opinion clusters form.

thumbnail
Fig 3. Evolution of the number of unique opinions over time for each of the 10 independent simulation runs (coloured lines), together with their average (black line).

Simulation parameters: N = 1000 agents, , local group size l = 300.

https://doi.org/10.1371/journal.pcsy.0000115.g003

Effect of social group size on the macro-level opinion distribution

In Fig 2, the local group size was set to 300, which is considered large in our model. For such a large social group, the model tends to settle into what can be described as consensus. Next, we examine examples of outcomes produced by smaller local group sizes.

Fig 4 shows typical model outcomes for local group sizes (l) of 200 and 100. For l = 200, we observe the formation of two well-defined clusters, which illustrates opinion polarization. Agents continue to move within opinion clusters, with occasional jumps between them, and variability persists within each group. As the group size decreases further (l = 100), more opinion clusters emerge—an outcome we describe as opinion fragmentation.

thumbnail
Fig 4. Typical outcome for local group size (l) equal to 200 (a,b,c) and 100 (d,e,f).

(a, d) Evolution of individual opinions over time, showing the trajectories of each agent’s opinion for l = 200 and l = 100, respectively. The trajectories for each node are colored according to their initial value. (b, e) Final opinion clusters for l = 200 and l = 100. (c, f) Evolution of entropy (blue) and compressibility (orange) of the entire system. Simulation parameters: Nnodes = 1000, nbins = 10.

https://doi.org/10.1371/journal.pcsy.0000115.g004

Now that we have seen that the in single realizations of the model produces clusters; we want to assess how the emergence of the number of clusters changes as we vary group size parameter, l. Naturally, as these simulations are stochastic in nature we are not certain to get the exact same behavior, even with the exact same initial conditions. This variability means that we may observe a different number of clusters emerging for the same parameter set. However, we are interested in the general trend over multiple realizations of the simulation.

To allow us to find the number of clusters in a semi‑automated way, we use hierarchical clustering with single linkage [69]. Hierarchical clustering is an agglomerative clustering algorithm that iteratively groups agents based on their pairwise Euclidean distances. At each step, the two closest groups are merged, where “closest” is defined by the smallest distance between any pair of agents belonging to different groups. This process continues until all agents form a single cluster. This procedure produces a tree-like structure, refereed to as a dendrogram, representing the possible cluster membership for each agent if we were to selected a desired number of clusters [69]. This cluster membership can be recovered by “cutting” the tree at a specified height, see Fig 5a) for an example dendrogram. Once we have this tree, we need a way to identify the optimal number of clusters present in it, i.e., which number of clusters best captures the variability in the data a given l, for this we use a Elbow plot [70].

thumbnail
Fig 5.

a) An example dendrogram, in which we can agents are group together via their proxomity in opinion space. In a dendrogram we can recover the cluster membership for the agents by “cutting” the tree a given height. b) Elbow plots of the within-sum of squares found when the number of clusters is fixed across different simulation runs using hierarchical clustering with single linkage. Panels show different group sizes, l, of 100, 200, 300 and 400. Simulation parameters: Nnodes = 1000 and nbins = 10.

https://doi.org/10.1371/journal.pcsy.0000115.g005

A Elbow plot shows how the within‑sum of squares (WSS) varies across different possible cluster numbers. In this setting, the within‑sum of squares (WSS) measures the total squared distance between each agent and the centroid of its assigned cluster. As the number of clusters increases, the WSS decreases, since clusters become smaller and more homogeneous. By examining the rate of decrease in WSS as a function of the number of clusters, we can identify an “elbow” point where additional clusters provide only marginal improvements in fit. This elbow is taken as an estimate of the appropriate number of clusters. We perform this clustering on the last time point for each simulation and construct the Eblow plot from this data (Fig 5b)).

In Fig 5b), we can see how the number of clusters varies across simulations for each group size, where, in general, the number of detected clusters decreases as l increases. Examining each panel in Fig 5b), we see that when the group size is set to 100, we can see that between 3 and 4 clusters is reasonable, while when the group size is set to 200, we observe that two clusters explain almost all the variability within the clusters. Once the group size is set to 300 and 400, it appears that a single cluster is the best explanation of the variability between agents. To see the trajectories for each of these simulations with the clustering solutions, see S2 Appendix.

We observe a similarity between how social group size acts in our model and the role of the confidence bound parameter in the Deffuant model. In both cases, smaller values of the control parameters result in the formation of large number of clusters. In the Deffuant model, an analytical expression can be derived to predict the number of final opinion clusters as a function of the confidence bound [33,71]. However, unlike in the Deffuant model where opinions are drawn toward nearby clusters, in our model, opinions can end up in clusters located on the opposite side of the opinion space from their starting points.

We also observed some exotic outcomes. In some simulations with l = 100, four clusters form midway through the simulation, but one cluster subsequently dissolves into the others due to occasional jumps between clusters. Similar behavior has been observed in the Deffuant model, where such dissolution is attributed to noise [34]. In some simulations with a large group size (e.g., l = 500), no well-defined clusters appeared. Instead, agents kept shifting among a few unique opinions distributed across the entire opinion space.

Effect of information compression on the macro-level opinion distribution

The second mechanism we explore is the level of compression people apply when processing diverse information. In the model, this is represented by the number of bins (nbins) used to compress opinion data before estimating its complexity via entropy. A smaller number of bins implies a higher level of compression.

Given the stochastic nature of the model, we investigate how stable the number, structure, and positions of clusters are across simulations as the level of compression changes. To address this, we run a series of simulations with identical parameter values and starting opinion distribution, varying only nbins.

To analyze the emergent opinion structure, we applied K-means clustering [72] to the final opinion distribution of each simulation run, testing k = 2 to k = 10. The optimal k was selected by maximizing the silhouette score [73]. The resulting cluster assignments are visualized as horizontal box plots (Fig 6), where each row corresponds to an independent simulation run and each box represents the distribution of opinion values within a single cluster. Boxes are colored by cluster identity (purple for cluster 0, orange for cluster 1). The box plots display the median, interquartile range, and whiskers extending to .

thumbnail
Fig 6. Statistical summary of distribution of opinions for 9 different simulations for different values of parameter nbins while keeping the other simulation parameters fixed: a) nbins = 7; b) nbins = 10; c) nbins = 100.

The boxes correspond to the interquartile range of the cluster, central line represents the median with whiskers extending to the most extreme non-outlier points, and outliers shown as individual points. Each simulation resulted in two distinct clusters, where the first cluster is colored in purple while the second cluster is colored in orange. The average mean and standard deviation (Std) across all purple and orange clusters are also printed. Simulation parameters: Nnodes = 1000, and local group size = 200.

https://doi.org/10.1371/journal.pcsy.0000115.g006

Fig 6 presents a statistical summary of opinion clusters across nine simulations for each value of nbins. With a local group size of 200, two distinct opinion clusters consistently form. However, when nbins = 7, both the median and the width of the clusters vary noticeably between simulations. As nbins increases (i.e., compression decreases), both the position and structure of the clusters become more predictable.

Compression level also affects the model’s convergence time. The simulation takes noticeably longer to converge as the number of bins increases and compression decreases, making low-compression scenarios harder to analyze. Nevertheless, we attempted to approximate a no-compression case by using nbins = l for local entropy estimation and (where Nnodes is the total number of agents) for global entropy. We observe two types of outcomes. In one case, the system remains in a disordered state, similar to the case of very large local group sizes. In the other, we see the formation of equally sized, distinct clusters located on opposite ends of the opinion space. However, due to computational limitations, these results were not thoroughly investigated.

Discussion

In this study, we proposed a novel agent-based model of opinion formation inspired by optimal distinctiveness theory and theory of cognitive compression. The model explores how individuals’ competing desires—to be unique within their social group while maintaining a simplified perception of global opinion distributions—can shape population-level patterns such as opinion group formation and polarization. By incorporating cognitive compression alongside these identity-based mechanisms, we aimed to bridge psychological motivations with complex system dynamics.

Our findings demonstrate that the individuals’ desire to having balance between local differentiation and global simplicity of the opinion distributions in the population can lead to the formation of opinion groups and polarization. The model captures several empirically observed features of real-world opinion patterns: (i) the emergence of distinct opinion groups; (ii) variability of opinions within these groups; and (iii) ongoing opinion mobility, even after group structures have formed. These results suggest that investigated individual-level cognitive and social mechanisms can maintain diversity and dynamism within opinion groups, helping to explain why real-world polarization rarely results in total consensus or strictly homogeneous clusters.

With computational experiments performed on the model we found that individual’s social group size plays a critical role in shaping collective outcomes. When social group sizes are moderate (consistent with Dunbar’s number), opinion groups form leading to consensus, polarization or fragmentation in opinions. These findings provide a mechanistic basis for understanding how the size of individuals’ social group constrains or promotes polarization.

We also examined the role of cognitive compression (the degree to which individuals simplify complex information). Higher compression levels increased path dependence in simulations and led to greater unpredictability in the positioning of opinion clusters. Lower compression resulted in more stable and consistent opinion clusters across multiple simulations. These outcomes underscore how cognitive constraints can influence the predictability and variability of population-level opinion distribution.

To isolate the effects of these psychological and cognitive mechanisms, we intentionally adopted a minimal model, including the simplifying assumption of a fully connected population. Since it is well established that social network structure can significantly affect opinion dynamics [74–77], an important direction for future work is to incorporate heterogeneous network structures into the model. This would allow us to examine how various topologies, e.g., clustered, modular, or small-world networks, affect population-level opinion patterns.

Another promising extension of the model is to give agents memory, so that their perception of the global opinion distribution would be limited by their past interactions and memory capacity. In the current model, individuals have access to the full population-level opinion distribution when making a decision about changing their own opinion. In reality, however, individuals only encounter a subset of opinions shaped by past interactions and cognitive limitations. Incorporating limited memory to the agents could reveal how limited exposure affects opinion group formation and stability.

In conclusion, we introduced a new opinion formation model that integrates cognitive compression with identity-driven motivations for uniqueness and inclusion. This framework offers a plausible psychological basis for the emergence of diverse yet structured opinion clusters in society. The model is both simple enough to yield insight into fundamental mechanisms and general enough to be of interest across disciplines including psychology, sociology, mathematics, and complexity science. We hope this work will encourage further interdisciplinary research into the cognitive and social foundations of polarization, and inspire future models that connect individual motivations with emergent collective behavior in more realistic social settings.

Supporting information

S1 Appendix. ODD description of the model.

Full description of the agent-based model following the ODD (Overview, Design concepts, Details) protocol, covering the purpose and patterns of the model; entities, state variables and scales; the process overview and scheduling; the design concepts (basic principles, emergence, adaptation, sensing, interaction, stochasticity and observation); and the details of initialization, input data and submodels.

https://doi.org/10.1371/journal.pcsy.0000115.s001

(PDF)

S2 Appendix. Cluster membership for agents given l.

Detailed description of the cluster assignments obtained for each of the 10 simulation runs at local group sizes l = 100, 200, 300 and 400, with the cluster membership of every agent shown in Fig A, Fig B, Fig C and Fig D respectively.

https://doi.org/10.1371/journal.pcsy.0000115.s002

(PDF)

Acknowledgments

The authors used Claude (Anthropic) as an AI-assisted tool in preparing this work. At an early stage of manuscript preparation, it was used for proofreading and language editing of author-written text, to improve grammar and readability. It also assisted in writing the code that produces the figures. The authors reviewed and verified all edited text to ensure its accuracy, and checked all AI-assisted code by confirming that the resulting figures correctly represented the underlying simulation data. All statements in the article represent the authors’ own ideas, and the authors take full responsibility for the content of the article.

References

  1. 1. DellaPosta D. Pluralistic Collapse: The “Oil Spill” Model of Mass Opinion Polarization. Am Sociol Rev. 2020;85(3):507–36.
  2. 2. Graham MH, Svolik MW. Democracy in America? Partisanship, Polarization, and the Robustness of Support for Democracy in the United States. Am Polit Sci Rev. 2020;114(2):392–409.
  3. 3. Arbatli E, Rosenberg D. United We Stand, Divided We Rule: How Political Polarization Erodes Democracy. Democratization. 2021;28(2):285–307.
  4. 4. Zhou J. Boomerangs versus javelins: How polarization constrains communication on climate change. Environmental Politics. 2016;25(5):788–811.
  5. 5. Druckman JN, Peterson E, Slothuus R. How Elite Partisan Polarization Affects Public Opinion Formation. Am Polit Sci Rev. 2013;107(1):57–79.
  6. 6. Mason L. Ideologues without Issues: The Polarizing Consequences of Ideological Identities. Public Opinion Quarterly. 2018;82(S1):866–87.
  7. 7. Kubin E, von Sikorski C. The role of (social) media in political polarization: a systematic review. Annals of the International Communication Association. 2021;45(3):188–206.
  8. 8. Mutz DC. Status threat, not economic hardship, explains the 2016 presidential vote. Proc Natl Acad Sci U S A. 2018;115(19):E4330–9. pmid:29686081
  9. 9. Davis R, Campbell R, Hildon Z, Hobbs L, Michie S. Theories of behaviour and behaviour change across the social and behavioural sciences: a scoping review. Health Psychol Rev. 2015;9(3):323–44. pmid:25104107
  10. 10. Gavrilets S, Tverskoi D, Sánchez A. Modelling social norms: an integration of the norm-utility approach with beliefs dynamics. Philos Trans R Soc Lond B Biol Sci. 2024;379(1897):20230027. pmid:38244599
  11. 11. Galesic M, Barkoczi D, Berdahl AM, Biro D, Carbone G, Giannoccaro I, et al. Beyond collective intelligence: Collective adaptation. J R Soc Interface. 2023;20(200):20220736. pmid:36946092
  12. 12. Centola D, Baronchelli A. The spontaneous emergence of conventions: an experimental study of cultural evolution. Proc Natl Acad Sci U S A. 2015;112(7):1989–94. pmid:25646462
  13. 13. Castellano C, Fortunato S, Loreto V. Statistical physics of social dynamics. Rev Mod Phys. 2009;81(2):591–646.
  14. 14. Warncke P. What Explains Country-Level Differences in Political Belief System Coherence? Political Behavior. 2025;47:1853–76.
  15. 15. Lüders A, Carpentras D, Quayle M. Attitude networks as intergroup realities: Using network-modelling to research attitude-identity relationships in polarized political contexts. Br J Soc Psychol. 2024;63(1):37–51. pmid:37431984
  16. 16. O’Reilly C, Mannion S, Maher PJ, Smith EM, MacCarron P, Quayle M. Strategic attitude expressions as identity performance and identity creation in interaction. Commun Psychol. 2024;2(1):27. pmid:39242846
  17. 17. Miranda M, Pereda M, Sánchez A, Estrada E. Indirect social influence and diffusion of innovations: An experimental approach. PNAS Nexus. 2024;3(10):pgae409. pmid:39372541
  18. 18. Maher PJ, MacCarron P, Quayle M. Mapping public health responses with attitude networks: the emergence of opinion-based groups in the UK’s early COVID-19 response phase. Br J Soc Psychol. 2020;59(3):641–52. pmid:32621294
  19. 19. Carpentras D, Lüders A, Quayle M. Mapping the global opinion space to explain anti-vaccine attraction. Sci Rep. 2022;12(1):6188. pmid:35589806
  20. 20. Dinkelberg A, O’Reilly C, MacCarron P, Maher PJ, Quayle M. Multidimensional polarization dynamics in US election data in the long term (2012–2020) and in the 2020 election cycle. Anal Soc Iss & Public Policy. 2021;21(1):284–311.
  21. 21. Chen Y, Speer A, de Bruin B, Carpentras D, Warncke P. A “broken egg” of U.S. Political Beliefs: Using response-item networks (ResIN) to measure ideological polarization. Net Sci. 2025;13.
  22. 22. Karsai M, Iñiguez G, Kikas R, Kaski K, Kertész J. Local cascades induced global contagion: How heterogeneous thresholds, exogenous effects, and unconcerned behaviour govern online adoption spreading. Sci Rep. 2016;6:27178. pmid:27272744
  23. 23. Pena CB, MacCarron P, O’Sullivan DJP. Finding polarized communities and tracking information diffusion on Twitter: a network approach on the Irish Abortion Referendum. R Soc Open Sci. 2025;12(1):240454. pmid:39816737
  24. 24. Deffuant G, Neau D, Amblard F, Weisbuch G. Mixing beliefs among interacting agents. Advs Complex Syst. 2000;03(01n04):87–98.
  25. 25. Degroot MH. Reaching a Consensus. Journal of the American Statistical Association. 1974;69(345):118–21.
  26. 26. Axelrod R. The dissemination of culture: A model with local convergence and global polarization. Journal of Conflict Resolution. 1997;41(2):203–26.
  27. 27. Galesic M, Olsson H, Dalege J, van der Does T, Stein DL. Integrating social and cognitive aspects of belief dynamics: towards a unifying framework. J R Soc Interface. 2021;18(176):20200857. pmid:33726541
  28. 28. Friedkin NE, Proskurnikov AV, Tempo R, Parsegov SE. Network science on belief system dynamics under logic constraints. Science. 2016;354(6310):321–6. pmid:27846564
  29. 29. Parsegov SE, Proskurnikov AV, Tempo R, Friedkin NE. A new model of opinion dynamics for social actors with multiple interdependent attitudes and prejudices. In: 2015 54th IEEE Conference on Decision and Control (CDC), 2015. 3475–80.
  30. 30. Flache A, Mäs M, Feliciani T, Chattoe-Brown E, Deffuant G, Huet S, et al. Models of Social Influence: Towards the Next Frontiers. JASSS. 2017;20(4).
  31. 31. Vallacher RR, Read SJ, Nowak A. Computational social psychology. Routledge. 2017.
  32. 32. Hegselmann R, Krause U. Opinion Dynamics Driven by Various Ways of Averaging. Comput Econ. 2005;25(4):381–405.
  33. 33. Pineda M, Toral R, Hernández-García E. Noisy continuous-opinion dynamics. J Stat Mech. 2009;2009(08):P08001.
  34. 34. Pineda M, Toral R, Hernández-García E. Diffusing opinions in bounded confidence processes. Eur Phys J D. 2010;62(1):109–17.
  35. 35. Bliuc A-M, Bouguettaya A, Felise KD. Online Intergroup Polarization Across Political Fault Lines: An Integrative Review. Front Psychol. 2021;12:641215. pmid:34733195
  36. 36. Quayle M. Social identity networks: People holding attitudes are a collective social identity information system and bipartite networks are a useful way to represent them. European Review of Social Psychology. 2025;:1–66.
  37. 37. Durrheim K, Quayle M. Human murmuration: Group polarisation as compression in interaction-language dynamics captured by large language models. European Review of Social Psychology. 2025;36(2):326–65.
  38. 38. Smith LGE, Thomas EF, Bliuc A-M, McGarty C. Polarization is the psychological foundation of collective engagement. Commun Psychol. 2024;2(1):41. pmid:39242857
  39. 39. Snyder CR, Fromkin HL. Uniqueness: The human pursuit of difference. Springer Science & Business Media. 2012.
  40. 40. Brewer MB. The Social Self: On Being the Same and Different at the Same Time. Pers Soc Psychol Bull. 1991;17(5):475–82.
  41. 41. Codol J. On the so‐called ‘superior conformity of the self’ behavior: Twenty experimental investigations. Euro J Social Psych. 1975;5(4):457–501.
  42. 42. Lemaine G. Social differentiation and social originality. Euro J Social Psych. 1974;4(1):17–52.
  43. 43. Pickett CL, Geoffrey J. Using collective identities for. Individuality and the group: Advances in social identity. 2006. p. 56.
  44. 44. Postmes T, Jetten J. Individuality and the group: Advances in social identity. Sage. 2006.
  45. 45. Rubin M, Badea C. They are all the same!… but for several different reasons: A review of the multicausal nature of perceived group variability. Current Directions in Psychological Science. 2012;21(6):367–72.
  46. 46. Leonardelli GJ, Pickett CL, Brewer MB. Advances in experimental social psychology. Elsevier. 2010. p. 63–113.
  47. 47. Lippmann W. Public opinion. 1922.
  48. 48. Tamariz M, Kirby S. Culture: copying, compression, and conventionality. Cogn Sci. 2015;39(1):171–83. pmid:25039798
  49. 49. Chaitin G. The limits of reason. Sci Am. 2006;294(3):74–81. pmid:16502614
  50. 50. Shannon CE. A Mathematical Theory of Communication. Bell System Technical Journal. 1948;27(4):623–56.
  51. 51. Gobet F, Lane PCR, Croker S, Cheng PC-H, Jones G, Oliver I, et al. Chunking mechanisms in human learning. Trends Cogn Sci. 2001;5(6):236–43. pmid:11390294
  52. 52. Miller GA. The magical number seven plus or minus two: some limits on our capacity for processing information. Psychol Rev. 1956;63(2):81–97. pmid:13310704
  53. 53. Mathy F, Chekaf M, Cowan N. Simple and Complex Working Memory Tasks Allow Similar Benefits of Information Compression. J Cogn. 2018;1(1):31. pmid:31517204
  54. 54. Dunbar RI, Shultz S. Bondedness and sociality. Behaviour. 2010;:775–803.
  55. 55. Dunbar RIM. The social brain hypothesis. Evol Anthropol. 1998;6(5):178–90.
  56. 56. Dunbar RIM. Neocortex size as a constraint on group size in primates. Journal of Human Evolution. 1992;22(6):469–93.
  57. 57. Shultz S, Dunbar R. Encephalization is not a universal macroevolutionary phenomenon in mammals but is associated with sociality. Proc Natl Acad Sci U S A. 2010;107(50):21582–6. pmid:21098277
  58. 58. Barton RA. Neocortex size and behavioural ecology in primates. Proc Biol Sci. 1996;263(1367):173–7. pmid:8728982
  59. 59. Lewis PA, Rezaie R, Brown R, Roberts N, Dunbar RIM. Ventromedial prefrontal volume predicts understanding of others and social network size. Neuroimage. 2011;57(4):1624–9. pmid:21616156
  60. 60. Powell J, Lewis PA, Roberts N, García-Fiñana M, Dunbar RIM. Orbital prefrontal cortex volume predicts social network size: an imaging study of individual differences in humans. Proc Biol Sci. 2012;279(1736):2157–62. pmid:22298855
  61. 61. Kanai R, Bahrami B, Roylance R, Rees G. Online social network size is reflected in human brain structure. Proc Biol Sci. 2012;279(1732):1327–34. pmid:22012980
  62. 62. Gonçalves B, Perra N, Vespignani A. Modeling users’ activity on twitter networks: validation of Dunbar’s number. PLoS One. 2011;6(8):e22656. pmid:21826200
  63. 63. Hernando A, Villuendas D, Vesperinas C, Abad M, Plastino A. Unravelling the size distribution of social groups with information theory in complex networks. Eur Phys J B. 2010;76(1):87–97.
  64. 64. Johnson GA. Organizational Structure and Scalar Stress. In: Theory and Explanation in Archaeology. 1982. p. 389–421.
  65. 65. Kuijt I. People and Space in Early Agricultural Villages: Exploring Daily Lives, Community Size, and Architecture in the Late Pre-Pottery Neolithic. Journal of Anthropological Archaeology. 2000;19(1):75–102.
  66. 66. Bonabeau E. Agent-based modeling: methods and techniques for simulating human systems. Proc Natl Acad Sci U S A. 2002;99 Suppl 3(Suppl 3):7280–7. pmid:12011407
  67. 67. Mathy F, Feldman J. What’s magic about magic numbers? Chunking and data compression in short-term memory. Cognition. 2012;122(3):346–62. pmid:22176752
  68. 68. Simon HA. How Big Is a Chunk?: By combining data from several experiments, a basic human memory unit can be identified and measured. Science. 1974;183(4124):482–8. pmid:17773029
  69. 69. Barabási AL, Pósfai M. Network science. Cambridge, United Kingdom: Cambridge University Press. 2016.
  70. 70. Ketchen Jr DJ, Shook CL. The application of cluster analysis in strategic management research: An analysis and critique. Strategic Management Journal. 1996;17(6):441–58.
  71. 71. Dubovskaya A, Fennell SC, Burke K, Gleeson JP, O’Kiely D. Analysis of Mean-Field Approximation for Deffuant Opinion Dynamics on Networks. SIAM J Appl Math. 2023;83(2):436–59.
  72. 72. MacQueen J. In: Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, 1967. 281–97.
  73. 73. Rousseeuw PJ. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. Journal of Computational and Applied Mathematics. 1987;20:53–65.
  74. 74. Fennell SC, Burke K, Quayle M, Gleeson JP. Generalized mean-field approximation for the Deffuant opinion dynamics model on networks. Phys Rev E. 2021;103(1–1):012314. pmid:33601529
  75. 75. Dubovskaya A, Pena CB, O’Sullivan DJP. Modeling diffusion in networks with communities: A multitype branching process approach. Phys Rev E. 2025;111(3–1):034310. pmid:40247590
  76. 76. Meng XF, Van Gorder RA, Porter MA. Opinion formation and distribution in a bounded-confidence model on various networks. Phys Rev E. 2018;97(2–1):022312. pmid:29548086
  77. 77. Karsai M, Kivelä M, Pan RK, Kaski K, Kertész J, Barabási A-L, et al. Small but slow world: how network topology and burstiness slow down spreading. Phys Rev E Stat Nonlin Soft Matter Phys. 2011;83(2 Pt 2):025102. pmid:21405879