Dynamics of public and private opinions​
​by Hridey Narula​
Tata Institute of Fundamental Research, Hyderabad, India
Opinion dynamics is the study of how opinions form and evolve in a social context. Every individual has two types of opinions, (a) publicly expressed, and (b) privately held. These opinions need not be the same, although they can influence each other. In this project, a simple agent based kinetic model is implemented in Mathematica, using which we study the transition in opinions of a society. The primary question we are looking at is, when does the society reach a consensus, and when is it polarized, and if a few number of “rogue” agents can affect the entire society. It is found that a high-ego level agents lead to polarization of the society, even if the society is initially at a consensus. A lot of other interesting results are obtained as well.

Introduction

Opinion Dynamics is a subfield of mathematical sociology where we are concerned with how opinions and consensus evolve in a society. In our day to day life, we see that we update our beliefs and opinions primarily through interaction with the rest of the society, by talking to someone, seeing a YouTube video and so on, rather than updating our opinions by ourselves. When we update our opinion by interactions with fellow members of the society (friends, family etc.) inevitably we also influence their opinions a little. A model for these interactions will capture a lot of qualitative features of change in opinions in the real world.
​
A caveat here is that people often publicly represent different beliefs then what they privately believe. This might be due to peer pressure, fear of being seen as the odd one etc. Of course, for rather insignificant opinions, like whether red or blue is better, the public and private opinions are similar. But, for more serious topics, like which ideology is better, which political party to vote for etc., people often tend to have different public and private opinions. Their interaction with others affect both of these. In this computational essay we implement simple agent based models (ABM’s) for public and private opinions.
​
Before going on to the models, it is important to familiarize ourselves with some of the terminology. A society is a collection of agents , or members, which interact with each other and influence each others’ opinions. The number of agents is denoted by
n
. The opinion of every member is real number between -1 and +1. These extreme values represent polar opposites, such as, Conservative and Liberal ideologies, Capitalism and Conservative ideas etc. Each agent is described by (at-least) three parameters. These characterize which opinions does the agent accept or reject (thus, a representation of their ego level) and how much can they influence others. The society evolves in discrete time steps. At each time step, there are total
n
interactions, which may not be unique. During each interaction, two agents randomly interact, and present their opinion to each other. If the opinion received is within the acceptance zone, the agent will accept, if it is in rejection zone, the agent will contrast, and if it is in the neutral zone, the agent will ignore. For incorporating the private opinions, we have to introduce a couple of more parameters. One of these is a measure of how much the individual’s private opinion is affected by their change in public opinion. The other parameter is, in some sense, a measure of hypocrisy of the agent. This is a tolerance, of how vast can the difference between public and private opinion can be.
​
The primary question we want to answer is when does a society reach a consensus, i.e., most of the members have the same (public opinion), as well as, when does a society becomes polarized, agents having extremely opposite views. Besides these, we want to see what happens when the agents have different ego levels. Can a few rogues, that is people with different opinions/ego-levels than the majority of the society switch the opinion of the society?

Agent Based Modelling

Uniform Society

Code Set-up

This model was presented by Jager and Amblard [1]. The main idea of this paper is that people are more likely to accept opinions closer to theirs, termed assimilation, and more likely to reject opinions far away from theirs, termed contrast. To present this model, we first have to set-up a society, and decide (by trial and error), how many time steps we need.
In[]:=
n=100;​​steps=100;
Each individual has a random initial opinion value. To store the opinions, we create an array which has the opinions of every member of the society at every time step.
In[]:=
opinion=ConstantArray[0,{n,steps}];​​opinion[[All,1]]=RandomReal[{-1,1},n];
Every individual has an influence strength, characterized by a real number between 0 and 1, denoted by
μ
. In present context of a uniform society, every individual has the same value of this parameter, we also assume that the influence strength during assimilation and contrast is identical.
Here 0.1 indicates the strength of the influence. All n agents have the same influence strength.
In[]:=
mupluslist=ConstantArray[0.1,n];​​muminuslist=mupluslist;
Every individual has a latitude of acceptance and of rejection. These parameters determine whether an individual would assimilate, or contrast another’s opinion. This is a measure of ego of the individual. Again, we assume at present that the society is uniform, therefore everyone has the same latitudes.
epsplus represents the latitude of acceptance, and epsminus represents the latitude of rejection. The values 1.2 and 1.4 are sample values.
In[]:=
epsplus=ConstantArray[1.2,n];​​epsminus=ConstantArray[1.4,n];
Now that we have set-up the parameters, we now go through over the core of this model. At each time step i we first generate a pair of random numbers to determine which two members interact. Following [1], we are considering the society to be maximally connected, that is, every agent can interact with every other .
In[]:=
i=2;​​{k1,k2}=RandomSample[Range[n],2]
Out[]=
{45,77}
We first evaluate the difference between the opinions of these two agents.
In[]:=
diffe=opinion[[k2,i-1]]-opinion[[k1,i-1]];
If the magnitude of this difference is less than the latitude of the acceptance of agent k1, then this agent will accept the opinion. Else, they will reject the opinion. In the former case, the difference (scaled by
μ
) will be added to agent k1, in the latter, it will be subtracted from the opinion.
In[]:=
If[Abs[diffe]<epsplus[[k1]],opinion[[k1,i]]=opinion[[k1,i-1]]+mupluslist[[k2]]*diffe,​​If[Abs[diffe]>epsminus[[k1]],opinion[[k1,i]]=opinion[[k1,i-1]]-muminuslist[[k2]]*diffe]];
In[]:=
-0.158011
Out[]=
-0.158011
Similar code follows for the second agent. Once this interaction is thus complete, we ensure that the opinion of both the agents is still between -1 and +1 by the following code:
In[]:=
If[Abs[opinion[[k1,i]]]>1,opinion[[k1,i]]=Sign[opinion[[k1,i]]]];
In total, at each time step, n number of such interactions occur.
We can wrap up all of the above snippets inside a module called evolve.
In[]:=
evolver[n_,steps_,mupluslist_,epsplus_,epsminus_,opinionin_]:=Module[{i,j,k1,k2,k,opinion},(​​muminuslist=mupluslist+0;​​opinion=ConstantArray[0,{n,steps}];​​opinion[[All,1]]=opinionin;​​For[i=2,i<=steps,i++,​​opinion[[All,i]]=opinion[[All,i-1]]+0.;​​For[j=1,j<=n,j++,​​{k1,k2}=RandomSample[Range[n],2];​​diffe=opinion[[k2,i-1]]-opinion[[k1,i-1]];​​If[Abs[diffe]<epsplus[[k1]],opinion[[k1,i]]+=mupluslist[[k2]]*diffe,​​If[Abs[diffe]>epsminus[[k1]],opinion[[k1,i]]-=muminuslist[[k2]]*diffe]​​];​​If[Abs[diffe]<epsplus[[k2]],opinion[[k2,i]]-=mupluslist[[k1]]*diffe,​​If[Abs[diffe]>epsminus[[k2]],opinion[[k2,i]]+=muminuslist[[k1]]*diffe]​​];​​​​If[Abs[opinion[[k1,i]]]>1,opinion[[k1,i]]=Sign[opinion[[k1,i]]]];​​If[Abs[opinion[[k2,i]]]>1,opinion[[k2,i]]=Sign[opinion[[k2,i]]]];​​​​]];​​Return[opinion])];
Now that we have finished setting up the code, we can use this to analyze evolution of the opinion of individual under different circumstances.

Analysis of Different Conditions

1. Balanced Society: We first consider a balanced society. Agents in this society have roughly the same amount of acceptance, neutral and rejection. Sample parameters for this can be
+
ϵ
=0.5,
-
ϵ
=1.2
.
In[]:=
epsplus=ConstantArray[0.5,n];​​epsminus=ConstantArray[1.2,n];
We now run our function evolver.
The first two arguments of evolver are number of agents and number of time steps respectively. The different lines represent different agents.
In[]:=
opinionin=RandomReal[{-1,1},n];​​opinion=evolver[100,50,mupluslist,epsplus,epsminus,opinionin];​​ListLinePlot[opinion,PlotRangeAll,PlotLabel"Evolution",AxesLabel{"Time","Opinion"}]
Out[]=
This suggests that in a balanced society individuals clump into groups having similar opinions. It seems that in a balanced society after some iterations the society becomes polarized. We can also check a few more things, such as the number of people leaning towards, say, the +1 opinion as well people who are extremized towards either +1 or -1.
In[]:=
Count[opinion[[All,-1]],u_/;u>0]​​Count[opinion[[All,-1]],u_/;Abs[u]==1]
Out[]=
52
Out[]=
88
This implies that a vast majority of the society are extremized at -1 or +1, and a few are near the center. We can also see how the average opinion of the society as a whole evolves with time.
In[]:=
ListLinePlot[Mean[opinion],PlotRangeAll,PlotLabel"Evolution of Average Opinion",AxesLabel{"Time","Average Opinion"}]
Out[]=
Note that the leaning of the average opinion towards -1 or +1 is entirely due to the initial condition.
​
​2. Low Ego Society: We now consider a society where the members are non-egotistic. This implies that they are more likely to accept others’ opinions, and are themselves non-committed to their initial opinion. The latitude of acceptance is very big. The neutral and rejections are comparatively small.
In[]:=
epsplus=ConstantArray[1.5,n];​​epsminus=ConstantArray[1.6,n];​​opinionin=RandomReal[{-1,1},n];​​opinion=evolver[100,50,mupluslist,epsplus,epsminus,opinionin];​​ListLinePlot[opinion,PlotRangeAll,PlotLabel"Evolution",AxesLabel{"Time","Opinion"}]
Out[]=
Clearly, in this case the society converges to an average opinion. There is a consensus among the members of the society, towards the center.
In[]:=
Count[opinion[[All,-1]],u_/;u>0]​​Count[opinion[[All,-1]],u_/;Abs[u]==1]
No one is polarized towards one opinion. The bent of the agents to be on the positive or negative side, again, is due to the initial set-up.
The average opinion converges very quickly and with less fluctuations.
​
​3. High-Ego Society: Consider now a very egotistic society. In this society, agents have very small regions of acceptance and neutral zones, and a big rejection zone. Agents reject opinions even very slightly different from theirs.
This leads to the society becoming polarized as one would expect. However, notice that unlike the balanced society, there is no clustering around the x-axis (that is, around opinion = 0).
Every single agent is polarized, and half of the society is polarized towards +1 and other half towards -1.
Unlike the previous cases, it takes some time for the average opinion to converge, and there are a lot of fluctuations.
​
​4. Neutral Society: Finally, we consider a neutral society, where the neutral zone is the largest. This is a committed society, where everyone is committed to their initial opinion. The members are mostly unconcerned with others’ opinions. In this case, both the acceptance and rejections regions are very small.
Clearly, there is neither polarization nor convergence in this case. Instead, there are clusters of agents whose initial opinions were similar.
Fraction of agents with extreme opinions is relatively less.
The average opinion fluctuates a lot and settles after a long time, like the previous case.

Presence of Rogues

We now consider the presence of rogues, i.e., a minority of people having different ego levels and/or opinions than the majority.
​
​1. Different Opinions and High-Ego: Consider first a society where most of the agents are already polarized towards one of the views, say +1, and there are a few rogues, whose opinion is in contrast to the majority. These rogues also have high ego, whereas the rest of the society has, say, low ego.
Consider that there are some r number of rogues, who have a contrasting opinion as follows:
We now run our simulation.
The result seems surprising. The single rogue goes to -1, but it seems that this rogue has caused an upward shift in the rest of the society. We can verify this by plotting the average opinion:
From the above plot we can clearly see an upward trend. To verify this conclusion, we can keep on increasing the number of rogues and plot the mean opinion.
Plot only a few specific curves (of r = 0, 1, 10, 20 and 50).
The values r = 22 and r = 23 seem to be the critical values, however, this seems to be a stochastic phenomenon.
The reader can verify by rerunning the above cell multiple times that nearby r = 25 does the opinion of society become polarized to -1. However, this value fluctuates, as sometimes even at r = 22 the society can become polarized. Lastly, we can also plot the steady state value of the mean opinion as a function of number of rogues in the society.
Note that there are a lot of fluctuations in the above graph, and it is not symmetric about r = 50 because the rogues have a different opinion level.
We again plot the average opinion for different r’s as a function of time.
As expected, the “collapse” of the society to -1 now happens with a fewer number of rogues.
The increase in influence of the rogues clearly leads to a decrease in the number of rogues required to switch the average opinion of the society. However, if the influence increases too much it seems that the number of rogues required starts to increase again. Also it seems that there is a threshold number of rogues (4) below which the opinion of the society does not switch. To check these assumptions, we can run the above code once again, but with different parameters.
Both of our claims seem to be verified. No matter how much egotistic the rogues are, unless there are at-least three of them, they cannot change the society’s view. And, if the the influence of rogues is increased, it seems that the number of rogues required to change the opinion of the society increases.
3. High Ego: To conclude this discussion, as a final example we see how do the presence of rogues affect the society when the opinions of rogues match those of the society.
Again, as expected based on the previous simulations, the presence of even a few rogues polarizes the society. We now consider a situation where the society already is polarized, and all members of the society are egotistic.
In this situation, the society is already biased towards +1.
We again plot evolution of opinions of each of the society members as well as the average opinion of the society.
From the above graphs we can deduce that even though originally everyone was bent towards opinion +1, after some time, due to the high ego, a large number of the agents go to -1.
In the next section, we will consider some of the above cases with both the public and the private opinions of the agents.

Agent Based Modelling with Private Opinions

Uniform Society

Update the private opinion of the agent based on change in their public opinion.
After setting up all the variables, we run the module.
We plot both the public and private opinions.
We now plot the results.
In this case, time taken for convergence again is very large. Note that however the private opinions are roughly constant in time. Now we move on to see how presence of rogues affect the society.

Presence of Rogues

1. Extremely Frank : In this society, the members are uncommitted to their initial opinions as well as their public and private opinions are always very close.
The presence of these kind of agents does not affect the rest of the society, and the society still converges to an opinion. However, some of these rogues do not converge with the rest of the society.
2. Frank and Egotistical People: In this case the rogues also are highly egotistical along with being frank.
In this case, the society ends up becoming highly polarized. People also wildly switch their public opinions in the beginning. Note that the bias towards one opinion is due to the initial conditions. The private opinions are also biased towards this.
3. Egotistical and Hypocritical: In this last case, the rogues are egotistical and hypocritical.

Concluding remarks

To summarize the essay, we have observed that the simple agent based model seems to capture a lot of qualitative aspects of how opinions evolve in the real world. The main observations are listed below:
1
.
In a balanced society, agents are clustered into groups having different opinions. In a low-ego society, the society reaches a consensus very quickly, while for a high-ego society the society becomes polarized. Finally, in a neutral society the opinions are more or less frozen in time.
2
.
The presence of rogues leads to polarization of even a low-ego society. It takes about 25% of the population to switch the opinion of the (low-ego) majority.
3
.
When the members of society have a high level of hypocrisy the society reaches some sort of a pseudo-consensus. In this, publicly, the society has converged to an opinion, but privately everyone holds very extreme views.
4
.
Increasing the influence of one’s public opinion on their private opinions leads to the public opinions oscillating wildly about the center, before converging a long time.
The author would like to study deeply about non-uniform societies, where the parameters themselves are distributed randomly. Besides this, it will be interesting to look at a society where agents can interact with only a few nearby agents, not everyone.

Keywords

◼
  • Opinion Dynamics
  • ◼
  • Agent Based Modelling
  • ◼
  • Mathematical Sociology
  • ◼
  • Social Networks
  • Acknowledgment

    I would like to thank first and foremost my mentor Sotiris Michos. His enthusiasm, guidance and patience has been vital to the completion of this project. I had a lot of interesting conversations with him over the past couple of weeks, and am indebted to his support throughout.
    I also acknowledge the support of the TA’s during the school as well as the lecturers.
    Finally, I express my gratitude towards the program directors Tuseeta and Mads, as well as the Wolfram community.
    ​

    References

    ◼
  • Uniformity, Bipolarization and Pluriformity Captured as Generic Stylized Behavior with an Agent-Based Simulation Model of Attitude Change, Jager W. and Amblard F., Computational and Mathematical Organization Theory (2005)
  • ◼
  • Opinion dynamics: Public and private, Roy S. and Biswas S., arXiv/2112.01460 (2021)