Bayesian Updating Rules in Continuous Opinion Dynamics Models
BBayesian Updating Rules in Continuous OpinionDynamics Models
Andr´e C. R. MartinsGRIFE -EACHUniversidade de S˜ao PauloOctober 26, 2018
Abstract
In this article, I investigate the use of Bayesian updating rules appliedto modeling social agents in the case of continuos opinions models. Givenanother agent statement about the continuous value of a variable x , we willsee that interesting dynamics emerge when an agent assigns a likelihoodto that value that is a mixture of a Gaussian and a Uniform distribution.This represents the idea the other agent might have no idea about whathe is talking about. The effect of updating only the first moments of thedistribution will be studied. and we will see that this generates resultssimilar to those of the Bounded Confidence models. By also updating thesecond moment, several different opinions always survive in the long run.However, depending on the probability of error and initial uncertainty,those opinions might be clustered around a central value. Opinion Dynamics [2, 3, 6, 7, 12, 11, 5, 8] aims to understand how simpleinteractions between artificial agents can describe the aspects we observe on theopinions of social groups. Typical models describe opinions as either discrete [6,7, 12, 11] or continuous [5, 8, 1, 14, 4] variables. Under those models, theinteracting agents observe the complete opinion of each of the other agents theyinteract with. However, this is not necessarily the case and agents might notexpress their opinions fully, due to verbalization problems[13].In an earlier work, I have explore the use of Bayesian updating rules in thecontext of binary expression of choices, with a continuous underlying proba-bility associated to each choice, the Continuous Opinions and Discrete Actions(CODA) model [9, 10]. That is, the verbalization in CODA is limited to twochoices. Each agent had a continuous opinion, a probability that one of twochoices was the best one, but only observed the discrete choices of its neigh-bors. That allowed the modelling of the emergence of extremism, even when noextremist agents were observed initially.1 a r X i v : . [ phy s i c s . s o c - ph ] J u l n this paper, the application of Bayesian rules to a purely continuous prob-lem, with no verbalization problems, will be studies. The objective is to comparethe results we obtain when using Bayesian rules, as in the CODA model, withthe results of traditional continuous opinion models. Here, agents tell their con-tinous estimate about the value of a variable x to each other and change theirminds according to update rules obtained as approximations to the Bayesianinference problem. By comparing the results of the Bayesian update with tra-ditional continuous models, we will see that bounded confidence models corre-spond to the case where only the first moment of the opinion distribution isupdated. In that case, we will see that Bayesian models provide basically thesame qualitative features of the bounded confidence models and that one canrecover the bounded confidence update rule as an approximation. By also up-dating the second moment, new features of opinion evoltuion will be observedand we will see that, in the long run, the agents tend to become very certainabout their own choices. Draw two agents at random and let them exchange their views on the valueof a continuous variable x , where 0 ≤ x ≤
1. This might represent the casewhere agents speak about their inner probabilities or when they try to reacha consensus about the value of some continuous parameter, rescaled to thatinterval. In bounded confidence models [5, 8], this problem is represented byeach agent i having a continuous opinion x i about the value of a parameter θ .As they interact, they change their opinions towards that of the other agent (oragents), as long as the difference between their opinions, | x i − x j | is not abovea certain threshold (cid:15) .To obtain an approximation to a Bayesian inference of this problem, we needto express the initial opinion of each agent as a prior probability distribution f i ( θ ), such that E i [ θ ] = x i , where E i means the expected value agent i associateswith θ , given its probabilistic opinion f i . The function f i ( θ ) will, of course, bealtered as the agent observes the average estimates x j of other agents, leadingto a new, posterior distribution, f ( θ | x j ). One of the simplest possible choicesis to model the initial prior opinion as a Normal distribution. That means thatthe opinion f i ( θ ) of agent i should include not only an average x i , but also anuncertainty σ i , to be used as the standard deviation of the Normal opinion.As an agent observes that his neighbor average estimate is x j , it will need alikelihood funtion that models how likely it is for the neighbor to have thataverage estimate as a function of the true value of the parameter θ , that is, anestimate for f ( x j | θ ).A true likelihood would have to model how the value of θ influences x j . Since x j is also influenced by j interactions with other agents, that fact, in a completemodel, would also have to be included. And that means agent i would have tomodel how agent j models every other agent and how many interactions j hashad so far, including his model of how i reasons. However, although correct,2rom a Bayesian point of view, this regress might not be a reasonable descriptionof real agents. And one should not forget the goal of looking for simple models.Therefore, simpler likelihoods are needed.The first simple idea is, of course, to use a Normal distribution for thelikelihood, with an average at x j . One extra level of detailing is still needed todefine the likelihood and that is how close x j is likely to be to the true value of θ .A natural candidate for that role is the uncertainty σ j of neighbor j . Assuming i knows the value of σ j , this likelihood N ( x j , σ j ) will change f i ( θ ) to f ( θ | x j , σ j )that is also a Normal distribution. The average opinion of agent i becomes x (cid:48) i ,given by the weighted average of x i and x j x (cid:48) i = x i σ i + x j σ j σ i + σ j . (1)If one assumes that agents do not share information about their uncertainty, aswe will, from this point on, a reasonable assumption for agent i is that σ i = σ j .That is, agent i assumes that the neighbor knowledge is as good as its own. Inthis case, Equation 1 becomes a simple average between x i and x j .Unfortunately, the model that we get from this is trivial, even when σ i (cid:54) = σ j .If one assumes no social structure and that both interacting agents updatetheir opinions, as in the bounded confidence models, it is easy to see that thisdescription will converge to a single value in the long run. The introduction of asocial structure will not solve the problem, since no true boundaries will appear.In the CODA model, the dissention and the opposing extremist opinions appearbecause when an agent observes a neighbor that disagrees, that agent will moveonly a fixed step towards the opposite direction. For Equation 1, the furtherthe opinions are, the larger the movement each agent makes towards each otherand, therefore, there is no strenghtening of the domains. Two agents who havefar opinions have a stronger influence on each other than agents with similaropinions. This needs to be corrected, if we mean to model the way real peoplethink. In order to get a more interesting and realistic model, a mechanism similar tothose of the bounded confidence models is required. In those models, agents i and j would only change their opinions when their opinions were not too distant,that is, when | x i − x j | is smaller than a threshold (cid:15) . It is this lack of influenceof too distant opinions that allows different points of view to survive in the longrun. Therefore, it would be interesting to develop a similar mechanism.We can understand that the reason why agents with very different opinionsfail to interact is related to the fact that agents might not trust someone whoseopinion is too different of their own. For a Bayesian model, there is a natural wayto express the same concern. This can be achieved by introducing a probability p that the other agent actually knows something about θ . When that happens,3he likelihood can be modelled as the Normal distribution of the the non-errorcase. But there will be a 1 − p chance that the other agent has no real informationabout θ . In this case, instead of a Normal likelihood, peaked around the opinion x j of the other agent, it would make more sense to choose a non-informativelikelihood. Therefore, we can use the likelihood f ( x j | θ ) = pN ( θ, σ j ) + (1 − p ) U (0 , , (2)where N ( θ, σ j ) represents the Normal distribution centered around θ and U (0 , x i is ex-changed. Therefore, the values of σ i need to be guessed. Again, we can makethe reasonable assumption that all agents have similar uncertainty. From nowon, whenever an agent interacts with another, it will assume that the uncertaintyassociated with the Normal part of the likelihood of the other agent is equal toits own uncertainty. With this, we can multiply the likelihood in Equation 2 bythe Normal prior discussed before, in order to obtain a posterior distribution.Each term in Equation 2 contributes as one Normal term in the posterior, thatis a mixture of two Normals. That is, f ( θ | x j ) ∝ pe − σ i [( θ − x i ) +( x i − θ ) ] + (1 − p ) e − ( xi − xj )22 σ i (3)It is important to notice that, since we are actually using hierarchical Bayesianmodels, the normalization constants have to be used and can no longer beignored in teh calculations. The second term is a Normal distribution withan average equal to the prior average x i ; it is equivalent to the result whereno change happens, because the agent believes the other agent might knowsnothing. The other Normal corresponds to the interaction case, where the agentsopinions tend to each other. After rearranging the terms in the exponentials,we can calculate the expected value of θ in Equation 3, E i [ θ ], and we see that x i ( t ) is transformed to x i ( t + 1) = p ∗ x i ( t ) + x j ( t )2 + (1 − p ∗ ) x i ( t ) (4)where p ∗ = p √ πσ i e − ( xi ( t ) − xj ( t ))22 σ i p √ πσ i e − ( xi ( t ) − xj ( t ))22 σ i + (1 − p ) . (5)Notice that the posterior average is an average between x i ( t )+ x j ( t )2 , the resultone would expect if there were no agents who know nothing about θ , and just x i ( t ), that corresponds to the possibility that the other agent knows nothing.However, the weight to each possibility is not given by p , but by an alteredvalue p ∗ . If x i ( t ) − x j ( t ) is small when compared to √ σ i , the first term inthe denominator of Equation 5 will be larger than the second term and p ∗ will4ecome closer to 1 than p , meaning that agents with similar minds will tend tothe average between their opinions. On the other hand, as x i ( t ) − x j ( t ) becomeslarger, the numerator becomes smaller and, for x i ( t ) − x j ( t ) large enough, itwill tend to zero, while the denomiator tends to a constant value (1 − p ). Underthese circumstances, the agents i and j will influence each other very weakly.Some influence will always exist, unlike the bounded confidence models, but itcan be negligible.A number of simulations were performed where each agent only updates itsaverage opinion about θ , that is, its value x i and nothing else. Simulations wererun for p = 0 . p = 0 .
99, and only minor quantitative differences wereobserved. This seems to suggest that the exact value of p is not so important.Apparently, p has an impact in the velocity agents change their minds. Figure 1shows the evolution of the opinions of 10,000 agents when all of them keeptheir uncertainty constant, for p = 0 .
7. It shows two cases, for σ = 0 . σ = 0 .
1, that represents a larger uncertainty. We can see that, in the firstcase, the final state converges to seven different opinions and that this finalstate is stable. For a larger uncertainty, on the other hand, the agents are ableto reach consensus. Those results are qualitatively the same as that previouslyobserved in the bounded confidence models [5, 8].In the bounded confidence case, the threshold (cid:15) was the parameter thatcontrolled how many opinions survived in the end. Here, the initial uncertainty σ plays the role of the threshold. The use of Normal distribution as basis for theinteraction was studied by Deffuant [4], in the Gaussian Bounded Confidencemodel, but the actual details of the update rule in that study are different fromEquation . For small values of the uncertainty, p ∗ will tend to zero even for smalldistances between the opinions, while a large σ means that distant opinions canstill influence each other. Figure 2 shows the average number of final observedopinions as a function of the uncertainty σ . Notice that for σ ≥ .
1, only onefinal opinion was observed in all cases; as σ →
0, the surviving number ofopinions increases fast.
It is interesting to notice that one simple next step towards a more complexagent is to update one more variable as the agents interact. After updatingthe first momentum of the distribution for θ , it is natural to ask what happenswhat happens when the second momentum is also updated, that is, when theuncertainty associated with that value also changes. It is easy to see that Equa-tion 3 is still valid, since it is the correct inference about the first momentum.The only difference now is that the agents will also update their uncertainty tomatch the variance of the posterior and this will influence the future evolutionof the first momentum. A similar change in the threshold (cid:15) was implementedby Weisbuch et al [14] in the context of bounded confidence models.By estimating σ i = E [ θ ] − E [ θ ] from the posterior in Equation 3, the new5ncertainty σ i ( t + 1) becomes, after some straightforward calculations, σ i ( t + 1) = σ i ( t ) (cid:18) − p ∗ (cid:19) + p ∗ (1 − p ∗ ) (cid:18) x i ( t ) − x j ( t )2 (cid:19) . (6)Figure 3 shows the time evolution of the opinion of the agents when they alsoupdate their uncertainty. Here we observe a different dynamics than those wehave observed for constant uncertainty. The agents tend to the central opinion.However, while most of the agents end near 0.5 (in that specific run, the finalaverage of the opinions of the agents was 0.4977 and the standard deviation,0.0072), we still observe a few agents who final opinion is far from the averagevalue. As a matter of fact, the smallest observed value of p in that run was p = 0 . p = 0 . t = 0.This dimishing tendency is easy to see by analysing the two terms of Equa-tion 6. Notice that the first term causes the uncertainty to either remain thesame (when p ∗ = 0) or to decrease. The minimum value for one interactionis half the previous one, when p ∗ ≈
1. The second term could, in principle,make the uncertainty becomes larger, since it is always a positive contribution.However, when p ∗ is close to 1 or 0, the second term becomes close to zero. Forintermediary values of p ∗ , it actually slows down the diminishing of σ i , but itseffect is not strong enough and, in the long run, σ i →
0. In the simulation runshown in Figure 4, the initial uncertainty was 0.1 and, at the end of the simu-lation, the agents had an average uncertainty of ¯ σ i = 1 . · − . This meansthat only very close opinions will be able to influence each other and, as theydo, σ i will become even smaller. In the n → ∞ limit, of infinite agents, there6hould always be a close enough agent so that some change might still happen,but, those changes will be smaller and smaller.While the final opinions become rigid, it is interesting to measure the spreadof the final state. Figure 5 shows the standard deviation of the final opinions fordifferent values of the initial uncertainty. We can see that, as the initial uncer-tainty becomes smaller and closer to zero, the final opinions tend not to changeand the initial uniform standard deviation (1 / √ ≈ . σ i . The problem is related with the factthat the uncertainty of the agents decrease fast when they actually change theiropinions and, therefore, a state with small uncertainty is soon achieved. Thatstate prevents the final standard deviation of decreasing further and it seems itnever becomes really zero. It can still be very small, of course, indicating a finalstate where the population have close, but not identical, opinions.Finally, it is interesting to notice that the behavior of the standard deviationshown in Figure 5 do not depend or depend only very weakly on the numberof agents. A simulation with as little as n = 200 agents obtained not only thesame general shape of the curve, but, basically, the same final values with onlyvery small differences, whithin the error bars. We have seen that Bayesian rules can also provide a way to model the changein the opinion of agents when the information that is exchanged between theagents is continuous. If we approximate Equation 5 by a step function, withvalues of 0 or 1, depending on how close x i and x i are, we recover the resultsof bounded confidence models. That is, the bounded confidence models canbe seen an approximation to a fixed uncertainty model described here. Wehave seen that the same qualitative description is obtained and that the ini-tial uncertainty σ is the parameter that is equivalent to the threshold (cid:15) of thebounded confidence models. We have also shown that, by updating the secondmomentum, we get a model that is analogous to the update of the threshold inWeisbuch et al [14]. This makes it possible to clearly identify the threshold as anapproximation to the second momentum of the probability distribution an agentmight have about the variable that is discussed. With the current exercise, oneof the good qualities of using Bayesian rules became evident. By understandingwhat approximations we have to do in order to obtain the traditional results ofbounded confidence models, we gain a better understanding of those models aswell as a natural way to propose more complex models. This can be achievedby avoiding one or more approximations.We should notice that, even when updating the uncertainty, we are stillfar from a correct inference, since the true posterior distribution is a mixture7istribution but the agents only record the two first moments. By forgettingeverything but the two momenta from one interaction to the next one, a Normaldistribution is actually the choice that maximizes entropy. Therefore, it makessense to use it to approximate the inference proccess, but it is important tonotice that the prior used in the next interaction is not the posterior of the pre-vious one. Still, this new, a little more sophisticated, model showed interestingproperties. In particular, we have seen that the agents tend to become morecertain about their opinions with time and more interactions. After a while,even the opinions of other agents with close opinions are disregarded as wrong,since each one is very certain about their own ideas. Therefore, it is possibleto have some convergence of the population to a common value, but the agentsbecome stubborn and less capable of learning.Two different kinds of extremism can be discussed this way. One, as observedin the CODA model, correspond to a society where the agents have wildlydifferent opinions. This case is similar to what we have observed here whenthe initial uncertainty is very small, since very different opinions can surviveat the end. But we have also observed a second, less dangerous kind, whenmost agents have similar opinions, but are no longer capable of influencing eachother after a while. Since the social effect is basically agreement, it seems this isbetter described as stuborness rather than true extremism and true extremismshould really be identified as extreme values of x i . In the evolving uncertaintymodel, what we have observed is that, with time, agents may converge to closeopinions, but they become more and more stubborn about their own positions.It is important to stress once more that these agents here are not Bayesianagents and don’t have any higher cognitive abilities. The Bayesian rules wereactually used only in order to find reasonable rules of interactions. Once thoseare found, the agents follow them in a dumb way. Modelling rational agents canbe an interesting project, but that was not the approach of this paper. We haveseen that there is another less complex option and simple rules can be a goodchoice when we are interested only in the description of the population and notthe details of specific agents. The author would like to thank Funda¸c˜ao de Ampara `a Pesquisa do Estado deS˜ao Paulo (FAPESP), for the support to this work, under grant 2008/00383-9.
References [1] E. Ben-Naim, P.L. Krapivsky, F. Vazqueza, and S. Redner. Unity anddiscord in opinion dynamics.
Physica A , 330:99–106, 2003.[2] C. M. Bordogna and E. V. Albano. Statistical methods applied to the studyof opinion formation models: a brief overview and results of a numerical8tudy of a model based on the social impact theory.
J. Phys.: Condens.Matter , 19:065144, 2007.[3] C. Castellano, S. Fortunato, and V. Loreto. Statistical physics of socialdynamics. arxiv:0710.3256 , 2007.[4] G. Deffuant. Comparing extremism propagation patterns in continuousopinion models.
JASSS-The Journal Of Artificial Societies And Social Sim-ulation , 9:no. 3, 2006.[5] G. Deffuant, D. Neau, F. Amblard, and G. Weisbuch. Mixing beliefs amonginteracting agents.
Adv. Compl. Sys. , 3:87–98, 2000.[6] S. Galam, Y. Gefen, and Y. Shapir. A new approach of sociological collec-tive behavior.
J. Math. Sociol. , 9:1–13, 1982.[7] S. Galam and S. Moscovici. Towards a theory of collective phenomena:Consensus and attitude changes in groups.
Eur. J. Soc. Psychol. , 21:49–74, 1991.[8] R. Hegselmann and U. Krause. Opinion dynamics and bounded confidencemodels, analysis and simulation.
Journal of Artificial Societies and SocialSimulations, vol. 5, no. 3 , 5(3), 2002.[9] Andr´e C. R. Martins. Continuous opinions and discrete actions in opiniondynamics problems.
International Journal of Modern Physics C , 19(4):617–624, 2008.[10] Andr´e C. R. Martins. Mobility and social network effects on extremistopinions. arXiv:0801.2411, 2008.[11] D. Stauffer. How to convince others? monte carlo simulations of the sznajdmodel. In J. E. Gubernatis, editor,
AIP Conf. Proc. v. 690: The MonteCarlo Method in the Physical Sciences: Celebrating the 50th Anniversaryof the Metropolis Algorithm , pages 147–155. American Institute of Physics,2003.[12] K. Sznajd-Weron and J. Sznajd. Opinion evolution in a closed community.
Int. J. Mod. Phys. C , 11:1157, 2000.[13] D. Urbig. Attitude dynamics with limited verbalisation capabilities.
Jour-nal of Artificial Societies and Social Simulations , 6(1), 2003.[14] G. Weisbuch, G. Deffuant, and F. Amblard. Persuasion dynamics.
PhysicaA , 353:555–575, 2005. 9igure 1: Time evolution of opinions for the fixed variance case, for 10,000agents. 10
Uncertainty A v e r age Average Number of Final Opinions
Figure 2: Number of final opinions as a function of σ . Each point correspondsto the average number of opinions for 10 realizations of the problem and theerror bars correspond to the standard deviation of that number.11igure 3: Time evolution of the opinions in the changing variance case. Thecase shown corresponds to 10,000 agents, after a total of 1,000,000 interactions,with initial uncertainty of 0.5. 12igure 4: Fine details of the time evolution of the opinions in the changingvariance case. The case shown corresponds to 20,000 agents, after a total of10,000,000 interactions, with initial variance of 0.01.13 A v e r age S t anda r d D e v i a t i on Final Opinions Spread
Initial uncertainty
Figure 5: Standard deviation of the final opinions as a function of initial un-certainty. For an initial uncertainty of zero, the distribution is uniform and,therefore, the standard deviation is 1 / √ ≈ ..