1. Home
  2. Explore
  3. Psychology
  4. Bayesian Brain Reasoning

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Bayesian Brain Reasoning

Transcript

Welcome. This week you might feel like you have Bayes for brains, but hopefully today we'll learn that Bayes is for brains. The topic of this week and this particular lecture is how to do probabilistic reasoning that will enable us to understand what the brain should compute and potentially what the brain does compute. So first off, who is your instructor: I'm Paul and this is Xaq and we're going to try to give you an overview of what's happening this week together with an intro to the lessons

of this this week and next week. So, what's happening this week is we're going to cover bayesian foundation today and then extend those basic core concepts so that we can handle increasingly complicated things. How the world evolves over time, how decision making happens over time and then turn to how we control our bodies and how we learn to do so. But what's happening today is we're going to try and explain why Bayes is important for the brain and

in our lessons we'll look at how to combine probabilistic evidence. We'll focus on probabilistic models for variables relevant to behavior. We'll look at how to fit probabilistic models to behavior and we'll look at the importance of weighing risk and in our outro we'll see that there's an exciting future for Bayes in the brain. So, what is the motivation for studying Bayes? It really boils down to normative models which I'll explain in the next few slides.

The role that a probabilistic normative model will have, and hopefully we'll have a few good examples of that... We're going to show you some foundations. Learn about how to think about random variables, probability inference and we'll preview the lessons of the day We could call it "fun with Gaussians", if you think those kinds of things are fun, which of course I do. So, normative analysis is really the cornerstone of Marr's three levels of analysis. Which, you probably know, are: computation,

representation and algorithm and implementation. The highest level of Marr's three levels of analysis handles the kinds of things that the brain needs to do in order to survive, to reproduce and to find and eat food... to forage. So, basically: What problems does the brain solve and why? Those are the computational level problems and that's our focus for today. We'll, also though, see that once we hit the computational level of analysis there are deep applications of

normative analysis in that it gives us key insights into the kinds of representations and algorithms that must be used by the brain. And, also puts constraints on what the brain must do to achieve the computations. So, what is normative modeling and why is it important? Well, normative modeling describes the task that the brain undergoes in and of itself. It gives us guidance about what to expect from behavior: What an animal should do. It gives us a benchmark for judging performance,

so that we know if something is actually as good as it gets or very very far from as good as it gets. But, it doesn't answer how-to questions for that you should probably go see Randall Monroe's how-to. So, normative modeling is something that is easy to illustrate the importance of from a couple of examples. In this example we have the lens of insect eyes, which are compound. That means they have many different tiny lenses called Ommatidia and the Ommatidia sizes

and number are constrained with respect to each other, in a way that you can show is optimal. Barlow first showed this in 1952, demonstrating that the diffraction limits on lensing, for each of the lenses, is counterbalanced by the advantage conferred by having many of these lenses in a way that this this trade-off fits exactly a theoretical optimal. Even more interesting is that behaviorally we can detect down to a single photon of light and what this really means

is that our behavior is fundamentally no more limited than our ability to absorb a single photon in our cones. So, normative modeling in this setting provides us with an absolute bound on what can be achieved and there's really no wiggle room for the brain to mess that up, because we're achieving essentially what we absorb. So, why probabilistic normative models? Well, fundamentally the world is uncertain... you don't know everything that's out

there. So, as an example: If I gave you a bitcoin and you know that a bitcoin is more likely to come up heads than tails then you can play the odds and do better and if, more importantly, you know that bitcoin is going to go up rather than down then you can invest and do better. In general the fittest brains will use probabilistic reasoning. A probabilistic normative model says how an animal should draw inferences and this is a useful benchmark for judging animal behavior and brain computations.

So, why are we using probability? What probability does is it provides a language that allows us to relate things that you can observe directly to things that you really would want to know about. So, in this example of Plato's allegory of the cave you directly see the shadow on the wall, but you kind of want to know about the guy behind you that might be doing something dangerous. In general, the world provides us with a set of signals, which are a

reduced, sensory input that is indirectly related to the things that we really want to know about. So, the world and its properties must be estimated in the brain using a kind of model for the relationship between what is sensed and what's out there in the world. And this process is well modeled and well represented by probabilistic reasoning as you'll see today. The interesting thing is that the ideas that we're looking at and their importance are fairly old. They were first realized by Laplace

and Bayes, who recognized that both uncertainty occurs, it's ubiquitous, and you can use a reasoning strategy to overcome it. Now, why is the world uncertain? The world is uncertain, because we don't always have the data that we need, like I was showing in the previous slide. In addition, there is fundamental stochasticity or noise in the world, which limits our ability to accurately measure the things of interest. And finally, during this estimation process

that we employ, the estimation process has to make assumptions, which are often wrong. So, what do I mean by uncertainty from missing data? Well, you can see the shadows on the wall and you'd think based on those shadows that there are a couple of people who would be sitting in chairs rather than a rather complex and interesting art exhibit. But there you have it. What you're looking at on the left here, is the same picture as on the right. Just at a different amount of time for exposure

and what's being revealed is the fundamental stochasticity of light in which photons are coming at a camera, randomly. This doesn't require a brain to inaccurately or stochastically sense, but that's happening, too. All of these processes, these physical processes, introduce stochasticity, which results in uncertainty. Finally, as we try to take our evidence and use it to make inferences about what's out in the world the fact that we may not have an accurate model

will generate errors. If we understand that there are errors then we can understand also that our estimates have uncertainty. They aren't perfect and we can understand and compensate for that. So, what I'd like to do is walk through a few motivating examples that explain why probabilistic normative models can be important in the entire perception-action-cycle. Starting in perception, going through cognition and motor control. What you're looking at here is a very

famous example of your brain trying to sort out what's going on in a luminance profile. Luminance profiles are described by a very simple function. It starts high at the left edge, it is a linear function, with the step in the same linear function. What most people see on the left hand side is a flat surface with two different paint colors, whereas on the right hand side the very same luminance profile is seen as the change in shape in which the variation in lighting is being attributed

to the interaction between a shape and the light direction called shading. This example shows that the inference that you're making from the world is one that isn't direct. Moreover, interestingly, this example is one of the best cases for using Bayesian reasoning. Another interesting example that plays a key role in our lecture today is ventriloquism. Ventriloquism is a kind of creepy sport, at least from my perspective, where you

pretend like an inanimate object is animate, by moving its mouth while the puppeteer talks. The interesting thing is as the puppet's mouth moves the sound source from the puppeteer is close enough that you make a perceptual mistake. This can be modeled again using bayesian reasoning and today's lectures will explain more directly, exactly how this works. In cognition we often have to learn about what a category of something is and often we need to do that from just a few

examples. This is very much unlike cases in which we have lots and lots of data as in machine learning and we learn a function exploiting the fact that we have lots and lots of data. Here, if I give you only a few examples of a "tufa" I bet you can pick out two to three other "tufas" that are in this list. Finally, as a motivating example action problems have uncertainty and probabilistic reasoning in several different, very important places. Perceptual and motor errors generate uncertainty

about where we would like to target our actions like, swinging a racket. Moreover, noise in the sensory and motor systems, time varying properties like muscle fatigue or stochastic sensory delays can result in uncertainty about the outcomes or the course of our action. More subtly, the motor system can achieve the same result in many different ways, generating uncertainty about what plan we should take to accomplish those actions.

In all of these cases probability theory plays a critical role. Now the question is: What is probability theory? And now we turn to foundations. So, what is probability? Probability measures the occurrence of events. In a subjective sense, probability is the belief that an event occurs, but in an objective sense, for a measured sense, the frequentist sense, it's the frequency with which you observe an event occurring. Both of these ideas, subjective and frequentists, are really important

as foundations for probability, but we'll mostly use the subjective sense throughout today's lectures. One of the most important concepts within probability is that of a random variable. A random variable is a variable, which takes on values over a set of events. For example, for the two die that you see in the picture. The dice show particular values. The events are different sides of the die coming up. The random variable are the numbers or the values then associated with that side up. What a random variable allows us to do now, is write down an expression like the probability that die x takes value one is 1/6.

There are two weird rules of probability that, if you know them, you can derive the rest of probability theory. Both of them involve what you do with logical combinations of events, so if we have two events like die x taking on value one and die y taking on value one, we'd like to know the joint probability of both of those occurring. If they're independent then we can compute that probability as the product of the individual event probabilities. Now, if we're interested in

an OR over the values that a random variable can take on, like the probability that die x takes on value one OR two, then we can sum these probabilities. The product rule is particularly important and it has a common shorthand that you really need to know. So, when you look at an expression and you see the probability of x comma y you should think probability x and y and that's called the joint probability. For independent random variables that joint probability is the product.

So, as an example what's the probability of double 1 well it's the probability of x 1/6 times the probability of 1/6 1 over 36. The sum rule tells us what we should do in order to compute the probability of ORs. As an example, what's the probability of an odd number occurring. That's the probability of x1 plus x3 plus x is equal to 5 which is 3/6. The interesting thing about the sum rule is that we can use it to understand how to ignore one variable in the collection of random variables

by ordering over all of the values of the variable we are interested in. As an example, what's the probability that the first die shows one not caring about the second die. If i give you the joint probability on x and y we can take those values and OR them together like shown. The probability of x1 and y1 or x1 and y2 and so on is then equal to the sum of the joint probabilities, that x is equal to 1 for all of the values of y. If we were to put

all of the joint probabilities into a table what we're doing is summing over the column indicated in red. What we get out of it is 6 over 36, which of course is 1/6 and it's just the probability that x is equal to 1. And this shows us something rather special and that's that when we marginalize or we OR over a random variable we essentially eliminate it and we get back a the probability of a an individual variable or collection of variables. We call this marginalization, because after we compute the marginal, we can always write that down in the margin of a joint probability table.

One of the more interesting things that we can do is we can also compute the probability of something more complicated like x plus y is equal to a value like four. To do that we can see that we're doing basically the same as marginalization but instead of moving along a column we're moving along this diagonal, summing each one of those values. And we can show fairly easily that we'll get 3 out of 36. One of the most interesting things we can do with probability

theory is called conditioning. What conditioning does, is allows us to take advantage of things that we know, in order to reason about things that we don't have direct access to. So, as an example imagine that somebody throws a pair of dice and you hear that it comes up 4, but now, what you really want to know is: What are the values of each of the individual die? If you're interested in the value of the die x we can write that down as a mathematical expression shown.

The probability of x given you know that x plus y is equal to four. But interestingly, we can now just write out all of the joint probabilities along that diagonal those those red lines and for each we can figure out how many times x comes up one, which is two times. How many times x comes up two, which is two times. And x comes up three. And each one of them is then coming up twice out of six possibilities, which means that they all have a probability of one-third. What's interesting is that the same ideas that hold for tables

extend to continuous random variables. What i'm showing you here is a two-dimensional plane which is the appropriate place for a joint distribution on the set of points x and y. The orange shows us a density function, which gives us the relative probability for each point in the plane. The blue distribution shows us the conditional distribution, so for a particular value of y we get the probability of of x as a slice. Notice that it's renormalized. Renormalization

takes into account the fact that if we're conditioning on y, we know the value of y, we need to divide through the joint by the value of y in order to focus on the probability of x. And finally, the marginal probability can be defined essentially the same way: as the sum over y of the joint distribution. However, whenever you see an expression like this we're using sum, but we really mean integral. So, surprisingly, or maybe not surprisingly,

we can apply just the basic rules of probability and the operations I've shown you in order to manipulate probabilities and understand how observations should affect our subjective beliefs. And that's the core topic of today's lessons. It's actually important that you digest a few bits of terminology. We're going to be interested in a variable x which we don't have direct access to and I'm going to give you a probability over x. What this probability represents is a

prior understanding of how likely different values of x will occur. So, for instance, in our shadow example the various kinds of shapes that might generate those shadows... you might think that actual people are a lot more probable than an art installation, but this is a perception study, so maybe you don't. The next bit of terminology is a likelihood function. The likelihood function is a conditional. It's a particular conditional. It's a conditional of

the thing that you have access to or the measurement, given the thing you really wish you had x. What the likelihood function does is it provides a model for the relationship between the measurement and the variable of the interest. Here, the width of the probability of y indicates something about the measurement stochasticity, because a particular value of y is not telling you everything that you need to know to determine x. Finally, the posterior is the

distribution we're typically interested in to make an inference. The probability of x is our belief about the variable of interest, given the evidence that we might have in the form of a particular measurement y. Those three functions that we saw in the previous slide: prior, likelihood and posterior, are related to each other by something called Bayes rule. It's common to rewrite the variables x and y in the form of h and d so that we can be more concrete about

what role y typically plays in x place y plays the role of data and x plays the role of hypotheses we have about what's out in the world. So, here the probability of our hypothesis given data is equal to the probability of our data given our hypothesis. That's our measurement model times the probability of our hypothesis that's our prior understanding. The divisor term here is something that turns out to be exactly just the marginal over the likelihood times the prior.

So that in order to compute the posterior you only really need the likelihood and the prior. What Bayes rule is really doing is it's allowing us to converge what we know or what we're given data into something we don't know, what's happening out in the world: The evidence for a hypothesis. In order to make decisions though it's not enough just to have a belief about what's likely out in the world. We also need to know what out in the world we value. We can do

that by having a numeric measure of how much value we attach to an outcome and there's a lot of different names for it. The most typical names are utility and reward. What a utility function represents is a relationship between the subjective value that you have on a outcome, as a function of an objective measure on that outcome. So on the left-hand side is a curve that's typical for money, where you either gain money or you lose money and the subjective measure then says: "I like

more money and I don't like less money." But, it's not a direct function of money. The right hand side is actually a measured value utility function on monkeys, who are receiving juice as part of a decision-making task and this provides you with a measure of how good to the monkey different amounts of juice incentivize the monkey's actions. We pull together value and belief into decision theory. Bayesian decision theory describes a normative framework for how

we should make decisions. We should make our decisions and our actions in order to optimize the value, incorporating whatever uncertainty we have about outcomes. So, what we're looking at is hopefully a fun little decision problem or possibly a very scary decision problem. This person has decided to make a great leap into the unknown, presumably under the belief that that isn't a gaping drop-off. So, how do we think about the problem of deciding whether to jump or not?

Well, in a bayesian decision analysis there's almost always several key components. The first is the action of the choice that is the heart of the decision. Here, it's whether or not you want to jump and how far you you both jump. So, we'll call the the action the jump distance and I'll give it the variable "a". The second thing is the outcome that has value for the decision and the outcome of most interest is whether you land your jump. So, we'll say that you either land it or you miss it.

And finally, there's typically a context for a decision, which changes potentially the utilities and the chance of an outcome. Pulling these together will compute the expected utility, for an action, given the context and the uncertainty you have about the the outcome. So, what you're seeing on the the right hand graph is a probability that you'd land as a function of the action that you have to take, the distance that you have to engage in, in order to successfully land.

And on the right-hand side is a made-up utility function that could govern what subjective utility this decision maker might have if they landed the jump. Or if they missed the jump. Combining these together gives us a way of deciding whether or not this jump is worth it. Even though everything we've talked about so far has been normative the three Marr's level of analysis comes back and Bayesian analysis is proven to be useful, not only as a computational

analysis, of the best way to solve a task, but there are a number of really compelling examples that show that behavior is well modeled as being roughly optimally Bayesian. And the closer our behavior is to optimal, the more that we know that the behavior is being generated and represented in ways where probabilities matter and the computations that are the core of Bayesian inference must be somehow implemented in the brain

and that actually then puts constraints on the implementation level as well because the brain must implement whatever manifests in behavior. As a summary of this intro the core concepts... We hope that you have at this point is latent variables... Latent variables are things in the world that you don't directly observe but may be of critical need or interest to the organism. You should understand what sensory evidence is that's the the stuff that the organism has direct access to, through its

sensing apparatus. Probability is something that provides a measure of our uncertain beliefs about what we think will happen in the world. An inference is a computation which allows us to quantify the probability of these latent variables from evidence. Utilities and rewards provides us with a numerical measure of the subjective value of outcomes of interest. And decisions and actions are the the key thing that we're really modeling in behavior. It's the choices and interventions that an organism makes on the world in order to obtain value. Well, we hope that you will enjoy the Bayes for brains and that your brains

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent