diff --git a/blog/2023/02/04/just-in-time-bayesianism/.src/build/index.html b/blog/2023/02/04/just-in-time-bayesianism/.src/build/index.html deleted file mode 100644 index 3168209..0000000 --- a/blog/2023/02/04/just-in-time-bayesianism/.src/build/index.html +++ /dev/null @@ -1,163 +0,0 @@ -

Just-in-time Bayesianism

- -

Summary

- -

I propose a variant of subjective Bayesianism that I think captures some important aspects of how humans1 reason in practice given that Bayesian inference is normally too computationally expensive. I compare it to some theories in the philosophy of science and briefly mention possible alternatives. In conjuction with Laplace’s law, I claim that it might be able to explain some aspects of trapped priors.

- -

A motivating problem in subjective Bayesianism

- - - - - - - - - - -

Bayesianism as an epistemology has elegance and parsimony, stemming from its inevitability as formalized by Cox’s theorem. For this reason, it has a certain magnetism as an epistemology.

- -

However, consider the following example: a subjective Bayesian which has only two hypothesis about a coin:

- -

\[ - \begin{cases} - \text{it has bias } 2/3\text{ tails }1/3 \text{ heads }\\ - \text{it has bias } 1/3\text{ tails }2/3 \text{ heads } - \end{cases} -\]

- -

Now, as that subjective Bayesian observes a sequence of coin tosses, he might end up very confused. For instance, if he only observes tails, he will end up assigning almost all of his probability to the first hypothesis. Or if he observes 50% tails and 50% heads, he will end up assigning equal probability to both hypotheses. But in neither case are his hypotheses a good representation of reality.

- -

Now, this could be fixed by adding more hypotheses, for instance some probability density to each possible bias. This would work for the example of a coin toss, but might not work for more complex real-life examples: representing many hypothesis about the war in Ukraine or about technological progress in their fullness would be too much for humans.2

- -

-Original subjective Bayesianism

- -

So on the one hand, if our set of hypothesis is too narrow, we risk not incorporating a hypothesis that reflects the real world. But on the other hand, if we try to incorporate too many hypothesis, our mind explodes because it is too tiny. Whatever shall we do?

- -

Just-in-time Bayesianism by analogy to just-in-time compilation

- -

Just-in-time compilation refers to a method of executing programs such that their instructions are translated to machine code not at the beginning, but rather as the program is executed.

- -

By analogy, I define just-in-time Bayesianism as a variant of subjective Bayesian where inference is initially performed over a limited number of hypothesis, but if and when these hypothesis fail to be sufficiently predictive of the world, more are searched for and past Bayesian inference is recomputed.

- -

-Just-in-time Bayesianism

- -

I intuit that this method could be used to run a version of Solomonoff induction that converges to the correct hypothesis that describes a computable phenomenon in a finite (but still enormous) amount of time. More generally, I intuit that just-in-time Bayesianism will have some nice convergence guarantees.

- -

As this relates to the philosophy of science

- -

The strong programme in the sociology of science aims to explain science only with reference to the sociological conditionst that bring it about. There are also various accounts of science which aim to faithfully describe how science is actually practiced.

- -

Well, I’m more attracted to trying to explain the workings of science with reference to the ideal mechanism from which they fall short. And I think that just-In-Time Bayesianism parsimoniously explains some aspects with reference to:

- -
    -
  1. Bayesianism as the optimal/rational procedure for assigning degrees of belief to statements.
  2. -
  3. necessary patches which result from the lack of infinite computational power.
  4. -
- - -

As a result, just-in-time Bayesianism not only does well in the domains in which normal Bayesianism does well: -- It smoothly processes the distinction between background knowledge and new revelatory evidence -- It grasps that both confirmatory and falsificatory evidence are important—which inductionism/confirmationism and naïve forms of falsificationism both fail at -- It parsimoniously dissolves the problem of induction: one never reaches certainty, and instead accumulates Bayesian evidence.

- -

But it is also able to shed some light in some phenomena where alternative theories of science have traditionally fared better:

- - - - -

Though it is still not perfect

- - - - -

So anyways, in philosophy of science the main advantages that just-in-time Bayesianism has is being able to keep some of the more compelling features of Bayesianism, while at the same time also being able to explain some features that other philosophy of science theories have.

- -

As it relates to ignoring small probabilities

- -

Kosonen 2022 explores a setup in which an agent ignores small probabilities of vast value, in the context of trying to deal with the “fanaticism” of various ethical theories.

- -

Here is my perspective on this dilemma:

- - - - -

Just-in-time Bayesianism might solve this problem by indeed ignoring small probabilities at the beginning, but expanding the search for hypotheses if current hypotheses aren’t very predictive of the world we observe.

- -

Some other related theories and alternatives.

- - - - -

As this relates to the trapped problem of priors

- -

In Trapped Priors As A Basic Problem Of Rationality, Scott Alexander considers the case of a man who was previously unafraid of dogs, and then had a scary experience related to a dog—for our purposes imagine that they were bitten by a dog.

- -

Just-in-time Bayesianism would explain this as follows.

- - - - -

\[ - \begin{cases} - \text{Dogs are fine, this was just a freak accident }\\ - \text{Society is lying. Dogs are not fine, but rather they bite with a frequency of } \frac{2}{n+2}\text{, where n is the number of total encounters the man has had} - \end{cases} -\]

- -

The second estimate is the estimate produced by Laplace’s law—an instance of Bayesian reasoning given an ignorance prior—given one “success” (a dog biting a human) and \(n\) “failures” (a dog not biting a human).

- -

Now, because the first hypothesis assigns very low probability to what the man has experienced, most of the probability goes to the second hypothesis.

- -

But now, with more and more encounters, the probability assigned by the second hypothesis, will be as \(\frac{2}{n+2}\), where \(n\) is the number of times the man interacts with a dog. But this goes down very slowly:

- -

- -

In particular, you need to experience around as many interactions as you previously have without a dog for \(p(n) =\frac{2}{n+2}\) to halve. But note that this in expectation produces another dog bite! Hence the trapped priors.

- -

Conclusion

- -

In conclusion, I sketched a simple variation of subjective Bayesianism that is able to deal with limited computing power. I find that it sheds some clarity in various fields, and considered cases in the philosophy of science, discounting small probabilities in moral philosophy, and the applied rationality community.

-
-
-
    -
  1. -I think that the model has more explanatory power when applied to groups of humans that can collectively
  2. -
  3. -In the limit, we would arrive at Solomonoff induction, a model of perfect inductive inference that assigns a probability to all computable hypothesis. Here is an explanation of Solomonoff induction3.
  4. -
  5. -The author appears to be the cofounder of DeepMind.
  6. -
-
- diff --git a/blog/2023/02/04/just-in-time-bayesianism/index.md b/blog/2023/02/04/just-in-time-bayesianism/index.md index c5ff43b..c74af4e 100644 --- a/blog/2023/02/04/just-in-time-bayesianism/index.md +++ b/blog/2023/02/04/just-in-time-bayesianism/index.md @@ -30,7 +30,7 @@ Now, as that subjective Bayesian observes a sequence of coin tosses, he might en Now, this could be fixed by adding more hypotheses, for instance some probability density to each possible bias. This would work for the example of a coin toss, but might not work for more complex real-life examples: representing many hypothesis about the war in Ukraine or about technological progress in their fullness would be too much for humans.[^2] -pictorial depiction of the Bayesian algorithm +pictorial depiction of the Bayesian algorithm So on the one hand, if our set of hypothesis is too narrow, we risk not incorporating a hypothesis that reflects the real world. But on the other hand, if we try to incorporate too many hypothesis, our mind explodes because it is too tiny. Whatever shall we do? @@ -40,7 +40,7 @@ So on the one hand, if our set of hypothesis is too narrow, we risk not incorpor By analogy, I define just-in-time Bayesianism as a variant of subjective Bayesian where inference is initially performed over a limited number of hypothesis, but if and when these hypothesis fail to be sufficiently predictive of the world, more are searched for and past Bayesian inference is recomputed. This would look as follows: -pictorial depiction of the JIT Bayesian algorithm +pictorial depiction of the JIT Bayesian algorithm I intuit that this method could be used to run a version of Solomonoff induction that converges to the correct hypothesis that describes a computable phenomenon in a finite (but still enormous) amount of time. More generally, I intuit that just-in-time Bayesianism will have some nice convergence guarantees. @@ -84,7 +84,7 @@ Now, because the first hypothesis assigns very low probability to what the man h But now, with more and more encounters, the probability assigned by the second hypothesis, will be as \(\frac{2}{n+2}\), where \(n\) is the number of times the man interacts with a dog. But this goes down very slowly: -![](https://i.imgur.com/UntdNrR.png) +![](https://images.nunosempere.com/blog/2023/02/04/just-in-time-bayesianism/laplace.png) In particular, you need to double the amount of interactions with a dog and then condition on them going positively (no bites) for \(p(n) =\frac{2}{n+2}\) to halve. But note that this in expectation approximately produces another two dog bites[^4]! Hence the optimal move might be to avoid encountering new evidence (because the chance of another dog bite is now too large), hence the trapped priors. diff --git a/blog/2023/02/09/straightforwardly-eliciting-probabilities-from-gpt-3/index.md b/blog/2023/02/09/straightforwardly-eliciting-probabilities-from-gpt-3/index.md index 6bbf365..e561d60 100644 --- a/blog/2023/02/09/straightforwardly-eliciting-probabilities-from-gpt-3/index.md +++ b/blog/2023/02/09/straightforwardly-eliciting-probabilities-from-gpt-3/index.md @@ -16,7 +16,7 @@ At the end of 2023, will Vladimir Putin be President of Russia? [Yes/No] Then we can compare the relative probabilities of completion to the “Yes,” “yes,” “No” and “no” tokens. This requires a bit of care. Note that we are not making the same query 100 times and looking at the frequencies, but rather asking for the probabilities directly: - + You can see a version of this strategy implemented [here](https://github.com/quantified-uncertainty/gpt-predictions/blob/master/src/prediction-methods/predict-logprobs.js). @@ -97,13 +97,13 @@ You can see the first two strategies applied to SlateStarCodex in [this Google Overall, the probabilities outputted by GPT appear to be quite mediocre as of 2023-02-06, and so I abandoned further tweaks. - + In the above image, I think that we are in the first orange region, where the returns to fine-tuning and tweaking just aren’t that exciting. Though it is also possible that having tweaks and tricks ready might help us identify that the curve is turning steeper a bit earlier. ### Acknowledgements - +
This is a project of the [Quantified Uncertainty Research Institute](https://quantifieduncertainty.org/). Thanks to Ozzie Gooen and Adam Papineau for comments and suggestions. diff --git a/blog/2023/02/19/bayesian-adjustment-to-rethink-priorities-welfare-range-estimates/.src/index.html b/blog/2023/02/19/bayesian-adjustment-to-rethink-priorities-welfare-range-estimates/.src/index.html deleted file mode 100644 index ec39297..0000000 --- a/blog/2023/02/19/bayesian-adjustment-to-rethink-priorities-welfare-range-estimates/.src/index.html +++ /dev/null @@ -1,229 +0,0 @@ -

A Bayesian Adjustment to Rethink Priorities' Welfare Range Estimates

- -

I was meditating on Rethink Priorities’ Welfare Range Estimates:

- -

- -

Something didn’t feel right. As I was meditating on that feeling, suddenly, an apparition of E. T. Jaynes manifested itself, and exclaimed:

- -

- -

The way was clear. I should:

- -
    -
  1. Come up with a prior over welfare estimates
  2. -
  3. Come up with an estimate of how likely Rethink Priority’s estimates are at each point in the prior
  4. -
  5. Make a Bayesian update
  6. -
- - -

Three shortcuts on account of my laziness

- -

To lighten my load, I took certain methodological shortcuts. First, I decided to use probabilities, rather than probability densities.

- -

Taking probabilities instead of limits means that there is some additional clarity. Like, I can deduce Bayes Theorem from:

- - - - - - - - - - -

$$ P(A \& B) = P(A) \cdot P(\text{B given A}) $$ -$$ P(A \& B) = P(B) \cdot P(\text{A given B}) $$

- -

and therefore

- -

$$ P(A) \cdot P(\text{B given A}) = P(B) \cdot P(\text{A given B}) $$

- -

$$ P(\text{B given A}) = P(B) \cdot \frac{P(\text{A given B})}{P(A) } $$

- -

But for probability densities, is it the case that

- -

$$ d(A \& B) = d(A) \cdot d(\text{B given A})\text{?} $$

- -

Well, yes, but I have to think about limits, wherein, as everyone knows, lie the workings of the devil. So I decided to use a probability distribution over 10,000 possible welfare points, rather than a probability density distribution.

- -

The second shortcut I am taking is to interpret Rethink Priorities’s estimates as estimates of the relative value of humans and each species of animal—that is, to take their estimates as saying “a human is X times more valuable than a pig/chicken/shrimp/etc”. But RP explicitly notes that they are not that, they are just estimates of the range that welfare can take, from the worst experience to the best experience. You’d still have to adjust according to what proportion of that range is experienced, e.g., according to how much suffering a chicken in a factory farm experiences as a proportion of its maximum suffering.

- -

And thirdly, I decided to do the Bayesian estimate based on RP’s point estimates, rather than on their 90% confidence intervals. I do feel bad about this, because I’ve been pushing for more distributions, so it feels a shame to ignore RP’s confidence intervals, which could be fitted into e.g., a beta or a lognormal distribution. At the end of this post, I revisit this shortcut.

- -

So in short, my three shortcuts are:

- -
    -
  1. use probabilities instead of probability densities
  2. -
  3. wrongly interpret RP’s estimate as giving the tradeoff value between human and animals, rather than their welfare ranges.
  4. -
  5. use RP’s point estimates rather than fitting a distribution to their 90% confidence intervals.
  6. -
- - -

These shortcuts mean that you can’t literally take this Bayesian estimate seriously. Rather, it’s an illustration of how a Bayesian adjustmetn would work. If you are making an important decision which depends on these estimates—e.g., if you are Open Philanthropy or Animal Charity Evaluators and trying to estimate the value of charities corresponding to the amount of animal suffering they prevent—then you should probably commission a complete version of this analysis.

- -

Focusing on chickens

- -

For the rest of the post, I will focus on chickens. Updates for other animals should be similar, and focusing on one example lighten my loads.

- -

Coming back to Rethink Priorities' estimates:

- -

- -

Chickens have a welfare range 0.332, i.e., 33.2% as wide as that of humans, according to RP’s estimate.

- -

Remember that RP has wide confidence intervals here, so that number in isolation produces a somewhat misleading impression:

- -

- -

Constructing a prior

- -

So, when I think about how I disvalue chickens' suffering in comparison to how I value human flourishing, moment to moment, I come to something like the following:

- - - - -

To those specifications, my prior thus looks like this:

- -

Prior over human vs chicken relative values -The lone red point is the probability I assign to 0 value

- -

Zooming in into the blue points, they look like this:

- -

Prior over human vs chicken relative values -- zoomed in

- -

As I mention before, note that I am not using a probability density, but rather lots of points. In particular, for this simulation, I’m using 50,000 points. This will become relevant later.

- -

Constructing the Bayes factor

- -

Now, by \(x\) let me represent the point “chickens are worth \( x \) as much as human,”, and by \(h\) let me represent “Rethink Priorities' investigation estimates that chickens are worth \(h\) times as much as humans”

- -

Per Bayes' theorem:

- -

$$ P(\text{x given h}) = P(x) \cdot \frac{P(\text{h given x})}{P(h) } $$

- -

As a brief note, I’ve been writting “\( P( \text{A given B})\)” to make this more accessible to some readers. But in what follows I’ll use the normal notation “\( P(A|B) \)”, to mean the same thing, i.e., the probability of A given that we know that B is the case.

- -

So now, I want to estimate \( P(\text{h given x}) \), or \( P(\text{h | x})\). I will divide this estimate in two parts, conditioning on RP’s research having gone wrong (\(W\)), and on it having not gone wrong (\( \overline{W} \)):

- -

$$ P(h|x) = P(h | xW) \cdot P(W) + P(h | x \overline{W}) \cdot P(\overline{W}) $$ -$$ P(h|x) = P(h | xW) \cdot P(W) + P(h | x \overline{W}) \cdot (1-P(W)) $$

- -

What’s the prior probability that RP’s research has gone wrong? I don’t know, it’s a tricky domain with a fair number of moving pieces. On the other hand, RP is generally competent. I’m going to say 50%. Note that this is the prior probability, before seing the output of the research. Ideally I’d have prerecorded this.

- -

What’s \( P(h | xW) \), the probability of getting \( h \) if RP’s research has gone wrong? Well, I’m using 50,000 possible welfare values, so \( \frac{1}{50000} \)

- -

Conversely, what is, \( P(h | x\overline{W} ) \) the probability of getting \( h \) if RP’s research has gone right? Well, this depends on how far away \( h \) is from \( x \).

- - - - -

With this, we can construct \( P(h | x) \). It looks as follows:

- -

probability of h conditional on x, for various xs

- -

The wonky increase at the end is because those points don’t have as many other points within one order of magnitude of their position. And the sudden drop off is at 0.0332, which is more than one order of magnitude away from the 0.332 estimate. To avoid this, I could have used a function smoother than “one order of magnitude away”, and I could have used a finer grained mesh, not just 50k points evenly distributed. But I don’t think this ends up mattering much.

- -

Now, to complete the death star Bayesian update, we just need \( P(h) \). We can easily get it through

- -

$$ P(h) = \sum P(h | x) \cdot P(x) = 1.005309 \cdot 10^{-5} $$

- -

That is, our original probability that RP would end up with an estimate of 0.332, as opposed to any of the other 50,000 values we are modelling, was \( \approx 1.005309\cdot 10^{-5} \). This would be a neat point to sanity check.

- -

Applying the Bayesian update

- -

With \(P(x)\) and \( \frac{P(h|x)}{P(h)} \) in hand, we can now construct \( P(x|h) \), and it looks as follows:

- -

posterior

- -

posterior -- zoomed in

- -

Getting a few indicators.

- -

So for example, the probability assigned to 0 value moves from 40% to 39.788…%.

- -

We can also calculate our prior and posterior average relative values, as

- -

$$ \text{Prior expected relative value} = \sum x \cdot P(x) \approx 0.00172 $$ -$$ \text{Posterior expected relative value} = \sum x \cdot P(x | h) \approx 0.00196 $$

- -

We can also calculate the posterior probability that RP’s analysis is wrong. But, wrong in what sense? Well, wrong in the sense of incorrect at describing my, Nuño’s, values. But it may well be correct in terms of the tradition and philosophical assumptions that RP is working with, e.g,. some radical anti-speciesist hedonism that I don’t share.

- -

So anyways, we can calculate

- -

$$ P(W | h) = \sum P(x) \cdot P(w | hx) $$

- -

And we can calculate \( P(w|hx \) from Bayes:

- -

$$ P(w|hx) = P(W) \cdot \frac{P(h|wx)}{P(h)} $$

- -

But we have all the factors: \( P(W) = 0.5 \), \( P(h | wx) = \frac{1}{50000}\) and \( P(h) = 1.005309 \cdot 10^{-5} \). Note that these factors are constant, so we don’t have to actually calculate the sum.

- -

Anyways, in any case, it turns out that

- -

$$ P(W|h) = 0.5 \cdot \frac{\frac{1}{50000}}{1.005309 \cdot 10^{-5}} = 0.9947.. \approx 99.5\%$$

- -

Note that I am in fact abusing RP’s estimates, because they are welfare ranges, not relative values. So it should pop out that they are wrong, because I didn’t go to the trouble of interpreting them correctly.

- -

In any case, according to the initial prior I constructed, I end up fairly confident that RP’s estimate doesn’t correctly capture my values. One downside here is that I constructed a fairly confident prior. Am I really 97.5% confident (the left tail of a 95% confidence interval) that the moment-to-moment value of a chicken is below 1% of the moment-to-moment value of a human, according to my values? Well, yes. But if I wasn’t, maybe I could mix my initial lognormal prior with a uniform distribution.

- -

Takeaways

- -

So, in conclusion, I presented a Bayesian adjustment to RP’s estimates of the welfare of different animals. The three moving pieces are:

- - - - -

In its writeup, RP writes:

- -

“I don’t share this project’s assumptions. Can’t I just ignore the results?”

- -

We don’t think so. First, if unitarianism is false, then it would be reasonable to discount our estimates by some factor or other. However, the alternative—hierarchicalism, according to which some kinds of welfare matter more than others or some individuals’ welfare matters more than others’ welfare—is very hard to defend. (To see this, consider the many reviews of the most systematic defense of hierarchicalism, which identify deep problems with the proposal.)

- -

Second, and as we’ve argued, rejecting hedonism might lead you to reduce our non-human animal estimates by ~⅔, but not by much more than that. This is because positively and negatively valenced experiences are very important even on most non-hedonist theories of welfare.

- -

Relatedly, even if you reject both unitarianism and hedonism, our estimates would still serve as a baseline. A version of the Moral Weight Project with different philosophical assumptions would build on the methodology developed and implemented here—not start from scratch.

- -

So my main takeaway is that that section is mostly wrong, you can totally ignore these results if you either:

- - - - -

But to leave on a positive note, I see making a Bayesian adjustment like the above as a necessary final step, but one that is very generic and that doesn’t require the deep expertise and time-intensive effort that RP has been putting into its welfare estimates. So RP has still been producing some very informative estimates, that I hope will influence decisions on this topic.

- -

Future steps

- -

I imagine that at some point in its work, RP will post numerical estimates of human vs animal values, of which their welfare ranges are but a component. If so, I’ll probably redo this analysis with those factors.

- -

Besides that, it would also be neat to fit RP’s 90% confidence interval to a distribution, and update on that distribution, not only on their point estimate.

- -

Acknowledgements

- -

Thanks to Rethink Priorities for publishing their estimates so that I and others can play around with them. Generally, I’m able to do research on account of being employed by the Quantified Uncertainty Research Institute, which however wasn’t particularly involved in these estimates.

- -

-

- -
-

- - -