Colonization models: a tutorial on computational Bayesian inference (part 2/2)

9lukeprog

0Dreaded_Anomaly

0[anonymous]

3PhilGoetz

0snarles

1Cyan

New Comment

6 comments, sorted by Click to highlight new comments since: Today at 6:55 PM

Currently thinking about the best way to get the credibility regions/MAP estimates.

If anyone wants to do a serious analysis using this type of simulation model, it's possible to code a much more efficient and elegant simulation by making use of continuous time--having the data structure store times and locations of events rather than discrete snapshots. However, the continuous-time model would be harder to tinker with, so I opted for the more transparent discrete-time model for this tutorial.

RecapPart 1 was a tutorial for programming a simulation for the emergence and development of intelligent species in a universe 'similar to ours.' In part 2, we will use the model developed in part 1 to evaluate different explanations of the

Fermi paradox. However, keep in mind that the purpose of this two-part series is for showcasing useful methods, not for obtaining serious answers.We summarize the model given in part 1:

SIMPLE MODEL FOR THE UNIVERSE

s=0.0004units in a time step.a. But this base rate is multiplied by the proportion of the universe which remains uncolonized by Type III civilizations.bof self-destructing, a probabilitycof transitioning to a non-expansionist Type IIa civilization, and a probabilitydof transitioning to a Type IIb civilization.eof transitioning to an expansionist Type III civilization.k * sunits per time step.Section III. Inferential Methodology

In this section, no apologies are made for assuming that the reader has a solid grasp of the principles of Bayesian reasoning. Those currently following the tutorial from Part 1 may find it a good idea to skip to Section IV first.

To dodge the philosophical controversies surrounding anthropic reasoning, we will employ an

impartial observer model.Like Jaynes, we introduce a robot which is capable of Bayesian reasoning, but here we imagine a model in which such a robot is instantaneously created andrandomly injectedinto the universe at a random point in space, and at a random time point chosen uniformly from 1 to 1000 (and the robot is aware that it is created via this mechanism). We limit ourselves to asking what kind of inferences this robot would make in a given situation. Interestingly, the inferences made by this robot will turn out to be quite similar to the inferences that would be made under the self-indication assumption.It is important to precisely specify the observational powers of this robot. The robot can estimate the age of the universe, but it cannot determine its location relative to the center of the universe. The robot can visually detect any Type II+ civilizations within its past light cone. Furthermore, it we specify that the robot can detect Type 0 civilizations which are within a small distance

uof the robot. We also grant the robot the power to deduce the age of any such nearby Type 0 civilizations.(In fact, we grant observational powers to this robot in order so that it has close to the same observational powers that we have. But for now, in order to steer clear of the philosophers, we carry on innocently and say no further.)

Now, at the time of its creation, the robot so happens to notice the following data.

Data

D:D1: The current time ist =500 plus or minus 5D2: From my location, I can detect a single Type 0 civilization, which emerged at this time step. No type II+ civilizations are visible from my location, and therefore, no type II+ civilizations are visible to this nearby Type 0 civilizationThe robot is aware that the universe runs according to the 'simple model of the universe,' but it does not know the values for parameters a, b, c, d, e, and k. Given a hypothesis

Has to the values of those parameters, the robot can calculate theposterior probabilityof observing dataD.We will encode the entire

historyof the universe in the form of a random variableGwhich takes values within the space of all possible histories. Even after we fix a particular history, the space-time location of the robot within this history is still random. This will be an important point to remember when doing inference under this impartial observer model.Define random variable

Nto be the number of new Type 0 civilizations which are outside the sphere of visibility of any type II+ civilizations in existence at timet= 500. Since in our model only one civilization can appear in a time step, the random variableNis in fact a binary random variable. Conditioned onGtaking a particular valueg, the random variableNis a fixed number. Conditioned on a particular historyg,the probability that the robot appears within distanceuof such a civilization isP(D2|H, D1, G=g) = (u^3) (N|H, D1, G=g) = (u^3) (N|H, G=g).We haveN|D1 = Nsince the definition ofNdoes not depend on the current time step.The robot calculates the posterior probability of the data as

P(D|H) = P(D2|H, D1) P(D1|H) = P(D2|H, D1) (1/1000) = E[P(D2|H,D1,G)]/1000=

E[(u^3) (N|H, D1, G)]/1000 = (u^3)/1000E[N|H]Now, supposing we wanted to compare different hypotheses

H1, H2, etc., their posterior probabilities would all share the common constant term(u^3)/1000in front. Since only the ratios of the posterior probabilities are relevant for inference, we drop the constant term and simply remember thatP(D|H)is proportional toE[N|H]All we need to do, then, to evaluate the plausibility of different configurations

H1, H2, etc. of the parameters, is to compute the value ofE[N|H].However, in this case, conditioning on a uniform distribution on a small interval of time

t=[495, 505] is computationally inconvenient, because very few of the histories will have a new Type 0 civilization at those specific times. This means that many simulations have to be performed before we can get an approximation ofE[N|H]to the necessary degree of accuracy.We can make our problem more computationally tractable if we weaken the observational powers of our robot; hopefully, our resulting inferences will not be altered too much by this change. (Readers are invited to check this by implementing the inferences for the original setup.) In the modified problem the robot is unable to determine the age of the universe, nor the age any Type 0 civilization it can detect. The robot observes only the following data.

Data

D:For the modified problem, we redefine the random variable

Nto be the number of Type 0 civilizations outside the sphere of visibility of any Type II+ civilization at random timeT. Similar to before, we haveP(D|H) = u^3 E[E[N|H]|T]or

P(D|H)proportional toE[E[N|H]|T]What is interesting about this conclusion is that it is similar to the Self-Indication Assumption, which, to quote the linked Wikipedia page, is the principle:

Whereas here, from Bayes' rule, we have:

Section IV. Implementation and DemonstrationWe give the code for calculating

E[E[N|H]|T]below.For those who followed part 1, the above code should be straightforward. At the end we calculate a standard error since we have approximately the value of

E[E[N|H]|T]by averaging over random samples of the random variableE[N|H]|T.Now we can get onto the business of comparing Bayes factors for hypotheses. Here we take the term 'Bayes' factor to refer to the quantity

P(D|H). Consider the following example hypotheses.1)

H1:"we are alone in the universe" (small chance of life arising)2)

H2:"great filter ahead" (high chance of life, but high chance of Type 0's self-destructing)3) H3: "burning the cosmic commons" (high chance of life and of surviving to stage III, but high speed of colonization)

EXERCISE: Run Code Block 11 to calculate the Bayes factors for the above hypotheses.

EXERCISE 2: Can you think of a hypothesis which maximizes the Bayes Factor?

EXERCISE: After assigning prior weights to hypotheses of your choosing, modify the code in order to calculate the posterior probability that a Type 0 civ observing the Fermi paradox ultimately:

Section V. Prior Specification; MAP estimation

SOLUTION TO EXERCISE 2: We can maximize the number of Type 0 observers of the Fermi paradox, naturally, by setting

b, c, dto zero so that Type 0 civilizations remain Type 0 civilizations forever, and no Type II+ civilizations ever appear.This 'maximum likelihood' solution is of little value to us, however, since we would probably not give much prior weight to a model in which all Type 0 civilizations survive forever and never go interstellar. Recall that quantity we are actually interested in, the posterior probability of a hypothesis, depends on both the Bayes factor and the prior weight of the hypothesis:

P(H|D)proportional toP(D|H) P(H)The parameters

Hwhich maximizesP(H|D)is called theMaximum A Posteriori (MAP) estimator.The business of determining prior weights of hypotheses, however, is a complicated affair. How can we faithfully represent the state of our knowledge of the propensity for intelligent life to evolve and develop in the universe? [Actually, we are still operating under the ruse that we are assigning priors for our robot, not ourselves, but since in the end we only

careabout the inferences made by the robot insofar as the similarity of our priors and the robot's priors, we might as well make the robot's priors match ours as closely as possible.]As is the custom we will seek convenient mathematical formulations for the prior distributions. As a guide for coming up with priors, we note:

1/ais the expected time for intelligent life to emerge in an uninhabited universe1/bis the expected time for Type 0 civs to destroy themselves, when there's no possibility of ascending to Type II1/(c+d)is the expected time for a Type 0 civ to ascend to Type II, when there's no possibility of self-destructiond/(c+d)is the proportion of Type II civilizations which are not ideologically opposed to becoming expansionist1/eis the expected time it takes for a non-pacifist Type II civilization to develop the technology required for serious large-scale colonization efforts (at which point it becomes Type III)kis the speed limit on colonization relative to the speed of light. It's plausible that some advanced civilizations would colonize planets by sending out tiny robots, which could travel at near light speeds. If you think FTL travel is a possibility, you can even assign prior densities to values of k above 1.In fact, the above analysis suggests that it may be more natural to assign priors on the transformed parameters:

a0 = 1/a, b0 = 1/b, c0 = 1/(c+d), d0 = d/(c+d), e0 = 1/e.Meanwhile, if we want to restrict k to lie between 0 and 1 and vanish on the endpoints, we can do this by assigning a prior to the transformed parameter

k0 = log(k) - log(1-k)From these transformed parameters, we reconstitute the original parameters by

a = 1/a0, b = 1/b0, c = (1-d0)/c0, d = d0/c0, e = 1/e0, k = 1/(1 + exp(-k0))Since

a0, b0, c0, e0have to be positive, natural priors for these would the exponential.d0might have a Beta prior. We also might as well takek0to have a normally distributed prior.All of these priors would be parameterized by 'hyperparameters,' which, for lack of imagination and lack of Greek symbols, we will call

a1, b1, c1, d1_alpha, d1_beta e1, k1at the risk of some confusion.Once we have specified priors for the parameters, the very next thing a Bayesian wants to do is to compute the posterior density of the parameters. In our case, we will estimate the posterior by directly

drawing from the posterior density.[to be contd.]