Bayesian Brain Models Discussions - W2D1

Could you take a look again?

ah you are right about the auditory… will change that to cochlea haha

Not sure if this is what it should’ve been, but it certainly reads more coherent to me… Thanks for the summary. :slight_smile:

First, I think most of the plot with hypothetical x is correct, before Ex.5, the subject has no access to the real stimulus. So everything is just “hypothetical” in this sense.

I think the two most confusing plots are the likelihood plot and the marginalization plot.

For the likelihood plot, it is trying to answer : given a hypothetical location x, what should be the distribution of x_tilde?

For the marginalization plot, I think the labels may be wrong. The y label should be hypothetical x, and x label should be x^. Because we are summing over the hypothetical x. But in the code, we are summing over axis=0. That means the y axis should be the hypothetical x.

I still think these plots are wrong, though, or at least they don’t match the code. As written, the rows of the matrix are always different possible true stimulus values (as you correctly note, there isn’t a distribution of belief over that axis, but there is a distribution of true values over multiple trials. I think this is the original sin that makes everything else confusing). And that’s what the text asks you to do: “We will end up with a 2D array where each row represents a different brain encoding of the stimulus position (𝑥̃ ).” This implies that 𝑥̃ needs to be the x axis label (columns).

It does feel more intuitive to put the variable that you “start with” on the x axis (and actually I think Konrad has it this way in at least one of this videos), but I worry that your walkthrough is going to cause more confusion than it alleviates…

In that case, I don’t think I understand how the y axis ‘becomes’ x_tilde somewhere in exercise 5

I think each column in Ex 5 is a particular instance of x_tilde given the real location x=-2.5. I.e. given the real location is at -2.5, what is the brain presentation? It is independent of the hypothetical location, as you can see from the plot

Hi, thanks for the comment. I agree with you – each row always corresponds to a noisy \tilde{x}. Isn’t this the case in my figures?

But I really don’t have time to consider consistency with videos… The changes I made resulted in only labelling changes for most of the plots though.

Thank you! Glad to help.

Sorry if this is a duplicated question that you answered somewhere else, but can you clarify what does “potential location of the actual stimulus” represents for the prior?

From my understanding of your interpretation, for the prior, if the data is organized as (rows = potential location of the actual stimulus, columns = x [centered around 2.5]), then I feel the multiplication between prior and likelihood does not make sense to me. As you move along the x-axis, or columns, the likelihood is moving along different x_tilde, but prior is moving along the X. How would we interpret the result of this multiplication?

Just to share how I understand the whole process

First we consider given a hypothetical location, what’s the distribution of the x_tilde? That’s the likelihood plot

Then we consider what’s the probability of each hypothetical location? That’s the prior plot.

Multiply these two plots, we have posterior plot. Which tell us given a brain representaiton x_tilde, what’s the probability that it is generated by a hypothetical location x?

With the posterior, we can now make a decision. Now we just take the mean of the posterior, then we have the binary decision array plot.

Up till this point, we haven’t see any real stimulus yet. Everything is still hypothetical. Now we are given a real stimulus, and it generate a x_tilde. That’s the Sample Input Matrix plot that follows.

Since now have the x_tilde from the real stimulus, we can then assign the probability of each hypothetical location. We multply Sample Input Matrix with the decision array, then we get the marginalization array. The y axis of the marginalization plot should be the hypothetical x location instead. Now we have considered all hypothetical position, and we know that some are more likely than others. So we sum all these consideration together (i.e. marginalize over them). Then we have the final probability for each decision.

1 Like

Honestly I am wondering if its possible/reasonable to have prior, likelihood, and posterior to vary consistently along matrices. e.g., have rows vary along different X (estimated X distribution), and columns vary along different X_tilde. Then we can fill the numbers into the matrices as P(X), P(X_tilde|X), and P(X|X_tilde) respectively for prior, likelihood, and posterior. This would make a lot more sense for me to do the multiplication between prior and likelihood, and would make it easier to interpret posterior. Thanks!

I agree with your understanding.

The concern is what’s meant by a “hypothetical” “location”. It is hypothetical because it’s what the brain receives which we can’t access (correct), or is it some true location that one provides in a thought experiment (wrong). And what is location? Is it what the presented stimulus (correct) or our decision (incorrect)? Thus I had to go great length to change the notebook…

I think “hypothetical” in this sense is the one provides as in a thought experiment, like “suppose the stimulus is at x”. The presented stimulus does not exist untill Ex.5.

1 Like

Using a matrix to represent everything is neat in terms of visualisation, but using it to represent a function with a single variable is not intuitive to me… The prior is independent of the presented stimulus, that is fine. But \tilde{x} is independent of x (or anything else?) is quite bizarre.

1 Like

I think there are two types of \tilde{x} here, one is generated by our thought experiment, which depends on the hypothetical x. Another is generated by the real stimulus, which is indepdendent of hypothetical x, but only on the real x.

Perhaps by “suppose the stimulus is at x” you mean the brain receives/perceive x_tilde…? My understanding is that the “hypothetical stimulus” is x_tilde.

No, we still in a thought experiment here. A thought experiment can still generate a brain representation, right? We haven’t perceived anything yet. That’s why we can consider all the possible positions of x. Note that in contrast, the Sample Input Matrix only have one maximum x_tilde. That x_tilde is one caused by perception. The hypothetical stimulus is x, x_tilde is the brain representation.

So the hypothetical stimulus sets/fixes x_tilde at a particular value? Or sets x at a particular value? If it sets x as you said, then the brain does not need to look at anything to make a decision, since x generates x_hat.

If it sets x_tilde, the brain infers p(x|x_tilde) as an uncertain distribution. When a real stimulus is presented, we marginalise out x_tilde by p(x_tilde|x_true). It is important to make a distinction between experimenter’s choice x_true, and the variable to be inferred in the brain x.

but why is x_true uncertain? can’t i just fix it at a single value?