Quantitative Philosophy: Why Simulate Ideas Numerically?

Link post

Adapted from my blog. I ar­gue that nu­mer­i­cal simu­la­tions are an effec­tive yet un­der­used tool in philos­o­phy (and ra­tio­nal­ity) and give a con­crete ex­am­ple of a nu­mer­i­cal toy model, from as­sump­tions to de­sign to im­ple­men­ta­tions to re­sults, in­clud­ing the source code and a live site to play with.

It used to be that logic was king. A con­vinc­ing ar­gu­ment was all that was nec­es­sary to get one’s ideas taken se­ri­ously and of­ten ac­cepted. After all, if it makes sense, it must be right, right? Right? The thought of ac­tu­ally check­ing the ideas ex­per­i­men­tally is not very old, and, while firmly en­trenched in the sci­en­tific method, some­times earnestly, some­times as a lip ser­vice, it is still not the com­monly ac­cepted prac­tice in many “softer” sci­ences.

This fo­rum is a site de­voted to ra­tio­nal­ity, and has plenty of in­ter­est­ing in­sights, but very few of them have been ac­tu­ally tested. There is a good rea­son for it: think­ing ideas up is much eas­ier than check­ing them! Eliezer Yud­kowsky, the origi­nal con­trib­u­tor, set this tone of us­ing rea­son­ing as an ar­gu­ment, with­out ever clos­ing the feed­back loop of check­ing the con­clu­sions with num­bers. There were a few ex­cep­tions to this pat­tern, such as the Iter­ated Pri­soner’s Dilemma bot tour­na­ments, but in gen­eral the fo­cus is on rea­son­ing and some­times math­e­mat­i­cal proofs, where pos­si­ble and war­ranted, not on mak­ing testable pre­dic­tions and ac­tu­ally test­ing them.

This leaves out one of the most pow­er­ful tools of check­ing val­idity of an idea: nu­mer­i­cal simu­la­tion. If the idea is any good, one ought to be able to for­mal­ize it to the de­gree where its con­clu­sions can be tested by cre­at­ing simu­la­tions and study­ing their be­hav­ior.

The situ­a­tion is some­what bet­ter at Slate Star Codex: Scott Alexan­der has lots of won­der­ful ideas, and he is more aware of the need to check them by some­thing other than more logic. But his ap­proach for test­ing them is gen­er­ally liter­a­ture search or polls/​sur­veys. Those are use­ful, but they fo­cus on the ideas as black boxes, rather than on their in­ter­nal me­chan­ics.

Some ex­am­ples of in­ter­est­ing ideas ripe for nu­mer­i­cal mod­el­ing:

In the fol­low­ing I fo­cus on one idea, similar to the out­group one listed above:

PEOPLE FEEL MORE AFFINITY TO THOSE WHOSE VIEWS ARE CLOSE TO THEIR OWN, AND ARE OFTEN REPULSED BY THOSE WHOSE VIEWS DIVERGE A LOT FROM THEIRS. WHAT IS THE RESULTING DYNAMICS OF THESE HUMAN PREFERENCES?

An ob­vi­ous con­clu­sion that peo­ple form co­he­sive groups that are hos­tile to other co­he­sive groups. A set of lo­cal (of­ten sub­op­ti­mal in some sense) equil­ibria forms that is hard to change.

How would one go about mod­el­ing these ideas nu­mer­i­cally? My at­tempt at do­ing so is de­scribed be­low.

First, ob­vi­ously we can­not model this seg­men­ta­tion and aliena­tion pro­cess in full gen­er­al­ity, there are too many fac­tors to con­sider. The art of mod­el­ing is in pick­ing those that are both im­por­tant and easy to de­scribe quan­ti­ta­tively. The re­sults of such an ap­proach look pretty nat­u­ral in ret­ro­spect, but are any­thing but easy to con­verge on. So, be­low I will en­deavor to de­scribe not just the fi­nal model, but how I got there, with­out the benefit of a hind­sight.

  • How does in­ter­ac­tion be­tween peo­ple work? At a very ba­sic level peo­ple ex­change ideas, opinions, thoughts and, more of­ten than not, praise and in­sults.

  • This used to hap­pen mostly be­tween those who are in phys­i­cal prox­im­ity, but, the world be­ing global and con­nected, at least (mis)in­for­ma­tion­ally, the in­ter­ac­tion is no longer limited by distance

  • Even peo­ple who are fairly close in views to each other tend to have a bit of vari­a­tion, and their views may shift ran­domly a lit­tle here and there

To de­scribe what hap­pens to peo­ple’s views as a re­sult of an in­ter­ac­tion be­tween them, we need some sim­plified de­scrip­tion that can be mod­eled nu­mer­i­cally. Peo­ple tend to fall prey to the con­fir­ma­tion bias a lot, which gives us two ba­sics char­ac­ter­is­tics of the in­ter­ac­tion:

  • In­ter­ac­tion be­tween two peo­ple who are fairly close in their views on a given topic pro­vides the con­fir­ma­tion they crave, and re­sults in fur­ther con­ver­gence of the views. This phe­nomenon can be de­scribed as a force of at­trac­tion.

  • In­ter­ac­tion be­tween peo­ple with wildly di­ver­gent views also pro­vides the con­fir­ma­tion of their own opinions, only in con­trast to the other per­son’s hor­ribly mis­guided and wrong one. This can be mod­eled as a, well, re­pul­sive force, push­ing peo­ple fur­ther apart.

What hap­pens when peo­ple’s views are very far from or very close to each other?

  • When the views have al­most con­verged, there is very lit­tle change as a re­sult of the in­ter­ac­tion, so the force of at­trac­tion is, counter-in­tu­itively, gets weaker at “shorter dis­tances”

  • When the views are so far apart, we can no longer re­late to them, or maybe even take them se­ri­ously, the re­sult of the in­ter­ac­tion is very lit­tle change in our own views, so the force of re­pul­sion is weaker, as well.

  • Po­ten­tially, since we are all hu­mans, there are limits to how far the views can di­verge, be­cause there are gen­er­ally some ba­sic shared ideas that most peo­ple sub­scribe to, like, say, the de­sire for hu­man­ity to sur­vive and pros­per. So, at the very large di­ver­gences the re­pul­sion again turns into at­trac­tion, if very weak.

Hu­mans have opinions on a wide va­ri­ety of top­ics, and, while there is a cor­re­la­tion, even if they are in agree­ment on one is­sue, they do not nec­es­sar­ily agree on ev­ery is­sue. This com­pli­cates the situ­a­tion, mak­ing it multi-di­men­sional, and adding com­pli­ca­tions to a po­ten­tial nu­mer­i­cal model of it. So, at this point, as a toy model, fo­cus­ing on a sin­gle di­men­sion should be a good enough start.

It is a well known phe­nomenon that peo­ple some­times rad­i­cally change their views, for ex­am­ple un­der­go­ing re­li­gious con­ver­sion or de-con­ver­sion, and chang­ing group alle­giances as a re­sult. It is not im­me­di­ately clear how to model this nu­mer­i­cally, and, un­less this pro­cess mag­i­cally emerges from the re­sults of the simu­la­tions, is best left for fu­ture in­ves­ti­ga­tions.

Another point to keep in mind is the ini­tial dis­tri­bu­tion of views be­fore the in­ter­ac­tion. If ev­ery­one starts agree­ing with ev­ery­one else, it is not likely that any­thing would change, given the above as­sump­tions. So, some spread of the views is nec­es­sary to get a non-triv­ial dy­nam­ics. The na­ture of this spread is prob­a­bly some­thing to play with once the model is im­ple­mented. Po­ten­tial op­tions to con­sider:

  • Sym­met­ric vs. asym­met­ric dis­tri­bu­tions, cor­re­spond­ing to main­stream vs niche views.

  • Uniform vs. “dumb­bell” dis­tri­bu­tion, where peo­ple are already primed even be­fore the in­ter­ac­tion.

As­sum­ing the above pro­gram is im­ple­mented, what do we ex­pect to learn from run­ning the simu­la­tions?

  • First, val­i­date the model it­self! Always an es­sen­tial step. If the un­der­ly­ing code or math is wrong, the model is worse than use­less, it can force one to make com­pletely un­war­ranted con­clu­sions. (To­tally not speak­ing from ex­pe­rience! Not at all!)

  • Se­cond, figure out the range of pa­ram­e­ters where we get the ex­pected re­sults. Every model has ad­justable nu­mer­i­cal pa­ram­e­ters, and find­ing the pa­ram­e­ter space as the home base to start at is definitely worth­while.

  • It might hap­pen that there is no such home base, and this would be even more ex­cit­ing than get­ting the ex­pected re­sults! It would ei­ther mean that the whole idea is bo­gus, or that our model of it is in­ad­e­quate. In ei­ther case, it is back to the draw­ing board!

  • Once we have a well-be­hav­ing nu­mer­i­cal model, it is play time! Time to reap the re­wards of all the hard work by vary­ing the pa­ram­e­ter space and watch­ing what hap­pens. Hope­fully some­thing new and un­ex­pected would show up!

  • This is where the real pay­off of nu­mer­i­cal mod­el­ing is: find­ing some­thing new and hav­ing those “Aha!” mo­ments, where the un­ex­pected re­sults make us learn some­thing new and gain in­sights that were missed in sim­ply “ap­ply­ing logic”.

So hav­ing put some thought into what to model, what sim­plifi­ca­tion to make and what the goals are, it’s time to get down and dirty.

I have already de­cided that:

  • The ini­tial ver­sion would be one-di­men­sional.

  • The in­ter­ac­tion is at­trac­tive at short dis­tances, re­pul­sive at large dis­tances, and again weakly at­trac­tive at large dis­tances.

Th­ese two as­sump­tions let us pick the shape of the in­ter­ac­tion. Given my back­ground in physics, I nat­u­rally think of forces in terms of po­ten­tials first. The mag­ni­tude of the force cor­re­sponds to the slope of the po­ten­tial. At­trac­tive force cor­re­sponds to the pos­i­tive slope, and re­pul­sive force cor­re­sponds to the nega­tive slope. The com­plete po­ten­tial can be com­bined from those with the ba­sic tools of ad­di­tion and mul­ti­pli­ca­tion. To simu­late the at­trac­tive force, we can use ev­ery­one’s fa­vorite har­monic os­cilla­tor: a stretched spring tends to con­tract. Google helpfully con­structs the graph for it:

This has the ba­sic shape we want:

  • The at­trac­tion (con­ver­gence of views) is low when the views are already similar.

  • The at­trac­tion in­creases when the sep­a­ra­tion is a bit larger.

If you are not fa­mil­iar with the po­ten­tial curves, think of it as a hilly slope, and you and your friend be­ing on the op­po­site sides of it. In the situ­a­tion above you would nat­u­rally roll down to­ward each other.

Now, to get the re­pul­sive side of the in­ter­ac­tion, we can use an­other well-worn tool, the bell curve:

So we have the two out of three fea­tures of the in­ter­ac­tion shape: the at­trac­tion when close to­gether and re­pul­sion when fur­ther apart. Let’s com­pose them to­gether, and the way to do it is sim­ple mul­ti­pli­ca­tion:

We are al­most there! Just need to add the last piece, the weak at­trac­tion at large sep­a­ra­tions. Again, the har­monic os­cilla­tor po­ten­tial to the res­cue! Only we need to add it to the bell curve first:

Uh oh… That didn’t work out as ex­pected! The spring is too stiff and com­pletely over­whelms the lit­tle bell. Let’s loosen the spring up a bit, by di­vid­ing its po­ten­tial by a big num­ber. Say, make 5 times looser:

That looks bet­ter, but clearly the stiff­ness of the spring should be­come one of those ad­justable pa­ram­e­ters once the model is done. Now to put all three to­gether:

Another oops… What hap­pened? The bell curve, again, was too weak to show promi­nently. Need to sup­press the weaker spring a bit more, maybe 10 times more:

This is more like it! Let’s look at it more closely:

  • Peo­ple whose opinions are sep­a­rated by ap­prox­i­mately less than one “unit of dis­agree­ment” would tend to “slide” to­ward each other and maybe slosh a bit around zero-dis­agree­ment.

  • Peo­ple whose opinions a sep­a­rated by some­what more than that, will find each other’s views re­pul­sive enough to feel like the other per­son is a part of an “out­group”, and in­stinc­tively dis­tance them­selves from them.

  • Even­tu­ally the “shared hu­man val­ues” start to mat­ter, and there is a cer­tain sep­a­ra­tion dis­tance where the two par­ties, while re­pulsed by each other, just shrug it off with­out any fur­ther need to dis­tance them­selves from the other. How faith­ful this model is is de­bat­able, of course, but for a first ap­prox­i­ma­tion it does not look too out of place.

Clearly play­ing with the shape of the in­ter­ac­tion po­ten­tial is not done, but it is good enough for now, and it is time to go to the next step. Well, not quite. Let’s have one more chart, con­vert­ing the shape of the po­ten­tial into the shape of the force. Google calcu­la­tor is not up to snuff there quite yet, but Wolfram Alpha is, though the free ver­sion has low re­s­olu­tion and no cus­tomiza­tion:

I don’t find the force graphs as illu­mi­nat­ing as the po­ten­tial graphs, but one can still make sense of it: nega­tive val­ues cor­re­spond to the force pul­ling to the left, and pos­i­tive val­ues cor­re­spond to the force pul­ling to the right. So, again, when the views are close, they con­verge, when they are farther apart, they tend to sep­a­rate to a re­spectable dis­tance, but not in­finitely far. The force, and not the po­ten­tial is what we need to calcu­late how peo­ple’s opinions move af­ter in­ter­act­ing, any­way.

That was the easy part, pick­ing the shape, next we have to figure out how to ac­tu­ally im­ple­ment the dy­nam­ics of in­ter­ac­tions and chang­ing per­sonal views.

I will not dis­cuss it here, an in­ter­ested party can read about it in my blog post:

https://​​quan­ti­ta­tivephilos­o­phy.word­press.com/​​2019/​​04/​​09/​​sep­a­ra­tion-and-clus­ter­ing-of-views-mak­ing-a-step/​​

The code it­self can be found in https://​​quan­ti­ta­tivephilos­o­phy.word­press.com/​​2019/​​04/​​12/​​sep­a­ra­tion-and-clus­ter­ing-of-views-the-app/​​

This site doesn’t seem to al­low em­bed­ded sites or em­bed­ded html+javascript, so I can­not in­sert the ac­tual app in here, in­stead you can go to

https://​​sites.google.com/​​view/​​nu­mer­i­calsi­mu­la­tionof­clus­terin/​​home

to play with the model. I will talk about it more in a com­pan­ion post to fol­low. But here is a video of one simu­la­tion run: https://​​i.imgur.com/​​iDaH9nj.mp4 to give the idea of it, wish I could em­bed it here though.