In addition to being a collaborative of
mine and some several people here at Yale
is the originator of the hierarchical
Gaussian filter, which is an amazing,
generalizable tool for understanding how
beliefs evolve overtime and not taking into
account information from the environment.
Chris also has an amazing background
I can let you read that in the in
the bio section on the website,
but he's got a quite a history.
He's I didn't actually even
realize before reading this,
Chris, that you were.
That before you did anything with
him in Zurich directly there well
before hand and that you were involved
in music in your image Ng as well.
And you have you have quite a lot of
quite a lot of interesting background,
so anyway,
it's wonderful to see you again as usual,
and I'm glad you're here jokes,
so take it away.
Well, it's great
to be here, it's an honor
to be able to present him.
And I'm going to try to make
up for the last time in just.
Being very efficient and going
right into the middle of it.
Will get out stop so I will be talking about.
Of course hierarchical Gaussian filters.
As you already announced,
and I will be looking at behavioral
modeling and computational psychiatry,
and I won't be talking too
much about theory today.
I will talk be talking more about the
practical aspects of this and how you
can use this and the software tools I.
I want there to be enough time also to
look at the HDF toolbox and the demo there,
so that you can follow along
with what's possible in there.
So as an example,
I'm just going to look at a task
where we looked at learning rate
adaptation in a dynamic environment.
This task was published in Neuron in 2013.
It's basically this adaptation to
dynamic environment is an important
focus of research in computational
psychiatry and neuroscience.
It is a way that allows us to
quantify how people update their
beliefs and how they differ in
the way they do that in a kind of
computational phenotyping that we
ultimately hope will help us too.
Make diagnostic and prognostic decisions and.
Gain insight into the mechanisms at the
root of psychopathological phenomena.
So the task we had was very very simple.
You got a Q which was binary,
either a low tone or a high tone.
And then that was followed by an outcome,
and that was either a face or a house.
Now, before you saw the outcome,
you had to make a prediction.
Would it be a face or a house?
And there was a probabilistic Association
between the Q and the outcome.
So here we have in black the
groundtruth probabilistic Association
between a high tone and a face.
So the black line here represents
the probability of seeing a face
given that the Q was a high tone.
And at first this probability is very
high and then it drops quite low
and then it goes to 1/2 and goes a
bit higher and so on for 320 trials.
What we see in red is the in Ferd learning
trajectory of 1 particular subject.
So this subject started out.
Believing it could go either way
after a high tone could be either
face or a house with.
Probability 1/2,
but then they very quickly learned
that a face was much more likely.
And then when this changed and a
house became much more likely,
they relearned quite quickly.
But of course people differ in this,
and there are many aspects to the
way these learning rates here are
updated in response to changes in the
environment and in response to how
quickly the environment changes also.
This is an important aspect that
we call volatility and the general
modeling framework that we use.
To get a computational grip on
this is 1 where we separate.
The agent from the world with
two interfaces between the two.
So we have the world out there.
That's basically us.
Presenting stimuli to the
participant in the experiment,
so these hidden states
are hidden to the agent.
In our case,
the participant in the experiment,
but they're not into us, so we generate them.
And we generate the sensory input,
for instance,
behind the low tone or the face and
the House for the participant to see.
Because the probabilistic Association in
our experiment is hidden to the participant,
but it has to infer the hidden
state of the current environment.
But of course this changes and.
Based on the infer hidden states.
The participant takes action and
in principle this could change
the state of the environment in
the particular experiment.
That way I'm going to use an
example that wasn't the case,
but in principle this can be
the case in many experience that
this is the case that the action
of the participant effect.
The outside world and of course in
everyday life this is the case.
We have all kinds of influence
on our surroundings and then the
cycle goes around once more.
Participant gets new input,
has to make new inferences and so on,
and I'm going to be dealing with the
computational modeling of the part over here.
We are going to construct a model
that receives sensory input.
Infers hidden states.
And is able to guide action in that way.
And then we're going to look at
how we can from the observed
actions of our participants,
infer on what precisely they were thinking,
why they were doing the task.
And as I already stressed,
we're focused on individual differences
between people in the way they do that.
Moroccan Gaussian filters are a generic
solution to the problem of adapting ones
learning rate in a dynamic environment.
Just imagine you're in a noisy
environment in an environment where your
observations aren't as precise as you
would actually need them to guide action,
so you cannot just rely on your
latest observation, because that was.
Quite noisy, so you have to rely on also.
Observations that are older
than the most recent one,
but if the environment.
Change is too much between the time
you make these observations and now
then they're going to be worthless.
So this dilemma between not being able
to rely just on the latest observation
but having to rely on older ones,
but the older ones becoming obsolete.
That is the problem of learning rate
adaptation and the hierarchical
Gaussian filter class of models gives
you a generic solution to that.
Importantly, the famous common filter
is a special case of the HGF.
So if you use a one level HTF,
then you have a common filter.
Depending on how you count your levels,
that could also be two level HGF.
No, yeah Jeffs.
Our whole family of models.
It's a conceptual framework.
That's modular, extensible.
You can build all kinds of
complex models using HDF's,
but this one that you see net here.
Now is our workhorse.
It's the one I'm going to show in the demo.
It's the one that was in the 2013 paper,
the three level HDF,
four binary observations.
So we have two continuous hidden states.
X2 and X3 and we have a binary.
Observed outcome and this outcome is
basically the Association between high
and low tones and face in houses.
So X one is coded as one if a high
tone is followed by a face or if a
low tone is followed by a house.
And in the other two cases,
it's coded as zero.
This has been used in many published studies.
So one important distinction is.
Between the generative model I'm going
to call that the HFM and its inversion,
the inference model.
That's what people usually just do it.
It's probably my fault,
just sloppily referred to as the HGF,
so the HDF is a set of update
equations that tell you. How?
When you give the model these inputs,
you the inferred hidden states are updated.
We arrive at these update
equations by variationally,
inverting the HGF generative model and all
these nice model graphs with the bubbles.
There they represent the generative model,
so whenever you see X is in
an HF model specification,
we are dealing strictly speaking
with the HGF generative model
with the age FTM and when you see
quantities like Mus and Sigmas Ann.
Pies, so all these Greek letters
they refer to the update equations
and that's something that may
be somewhat confusing at first.
Never mind,
just keep it at the back of your mind.
You need to keep these things apart,
at least later when you delve deeper.
Now you get simple one step
update equations in the HTF.
So you give the HGF and input and
there are these deterministic update
equations that give you the new
infer hidden state based on the
new information you've received,
and that makes it very efficient,
so you don't need a big computer
to use these models.
Your laptop will do fine.
And. This.
Is based on a very general structure,
so these updates have the same full form
everywhere at each level of the model.
They're always precision
weighted prediction errors.
So when I get an input,
this will be slightly different
from the prediction I had,
so I have a prediction error.
Now,
how much does this prediction error mean?
Well, it depends on how precisely
I thought I could make my prediction,
and that's in the numerator.
However,
it also depends on how sure I am.
I already know the truth.
So if I think I can make very
precise predictions and they're off,
I'm going to change my mind a lot.
However,
if I'm sure I already know the truth,
I'm not going to change my mind very much.
So one of these,
the precision of the prediction,
is in the numerator and the position
of the precision of my current
belief is in the denominator,
and they have this antagonistic
relationship together.
They make the weight on the
prediction error and determine
the size of the update.
Now I won't bother with
you with too much math,
but just to show you these are the
simple and beautiful update equations.
Here you have update equations
for the proceedings.
These are denoted as pie and there are
simple sum of the precision of the
prediction and the precision of the input.
And the update to the mean is a
precision weight prediction error
as he saw on the previous slide.
And here we've unpacked the update
at the first level of the continuous
HDF and what we see when we unpack
that is we are taking care of
all kinds of uncertainty that we
have in our environment and that
affects our learning rate because
it has to affect our learning rate.
So if we want to be reasonable
about the way we.
Update I believes we have to make
an assessment of all kinds of
uncertainty in our environment.
We have to take account of this and
pack it into our learning rate and
this is what the HF basically makes
visible in the update equations.
So the three kinds of uncertainty
that we have our outcome uncertainty.
So simply the stochastic nature
of your environment.
Even if you've learned your
environment perfectly,
there will still be some element of
chance in the outcomes you observe,
so that's your outcome uncertainty,
then informational uncertainty.
Well, mostly you haven't learned the
contingencies in your environment perfectly.
There is still something for you to
learn and that information answered
that reducible uncertainty by making
more observations you can reduce this.
And then there's a particularly
insidious kind of uncertainty,
that's environmental uncertainty.
That's the uncertainty you have from the
parameters in your environment changing.
Imagine you've learned them perfectly.
You've reduced your informational
uncertainty to 0,
but certainly the environment changes,
and then you have to start in you.
And all of this is packed into
the learning rates in the HGF.
ABC, the HF in action on a input time series,
the Green dots as will be
the case later in the talk,
will always be the input and the red line
is basically the agents prediction and
we can see how the prediction follows.
The green dots the inputs,
but in places when the inputs
change very quickly.
The prediction deviates quite strongly
from the input and you can see this
in reflected in the volatility.
Here,
because this is an indication that
the environment is changing more
quickly than it changed before,
so the belief about the volatility
shoots on you can see all these
interesting points in the time series.
Yes, increases in the volatility,
and most starkly you can see this in the
precision weights on the prediction errors.
So I showed you this fraction with
the numerator and the denominator
in both were positions and they had
this antagonistic relationship.
And here you can see this in action.
These are the prediction.
The precision weights on the
prediction errors at the first,
second and third level,
as in this time series up here.
And whenever something
really interesting happens,
you see the precision weights shoot up and
the learning rate shoots up with them,
because these precision weights
represent the learning rate.
This is basically an indication
that the model has understood.
It is no longer on top of what's
happening in the environment.
It has to increase its learning,
it it's what it used to know is obsolete,
should be thrown away,
and that's what happens when
you increase your learning rate.
You are throwing away old information
and starting to rely you starting
from scratch in some sense,
and then as you learn your
present weights come down again.
So what we do in an experiment is we
expose our participants to certain
sensory inputs and we record their responses.
And. Basically.
That is what we have.
That's the information we have.
We know what we showed them and
we know what they did in response.
What we have to infer is.
The parameters of the internal model
that they had when they were updating
their beliefs and the parameters
of the decision model that they
use when making their decisions.
So the process when applying.
And HF Model 2 experimental data is this.
We use what we have in green here
to estimate the parameters of the
perceptual model of the model.
That tells us which is in our
case this HGF model proper.
That tells us how our subjects update their
beliefs in response to sensory inputs.
But then we also have a decision model,
A model that said well given
these current beliefs.
What is the most probable action
that our participants will take?
And this response model also has parameters,
and they can also be estimated from
the sensory input and the responses
that we observe and together the
parameters of the perceptual model and
of the response model imply belief
trajectories in the course of the task.
And we saw this right at the start
in that red line that was basically
tracing the ground truth that
represented the learning process
of one of our participants.
Here are some remarks that
I basically already made.
So basically you've got
this written on this slide.
You can download the slide and
you'll have this as a reminder
of the things I just said.
How do we do this practically well?
We can go and download the HDF toolbox.
This is sort of the permanent link here.
1st and this second one is
the more practical one right?
On GitHub you can download it and it is.
Modular, Extensible and Matlab based
and it gives you exactly what I showed
about two slides back parameter
estimates for the perceptual model.
Here oh here they are.
I'm promptu estimates for the
estimates for the observation model.
This is a.
Simple observation model with just one
parameter and that's what the HDF toolbox.
Gives you when you feed it with.
The participants decisions
coded here as why the inputs.
Which is this US dollar Swiss franc
time series that I showed you and then
you have to specify three other things.
Actually,
you don't have to specify all of them.
There are defaults in the toolbox,
but they have to be specified
for the optimization to work.
So here you specify the perceptual model.
Here you specify the decision
model and then you specify
the optimization algorithm.
What do you get in the end? Here is.
One of the results of the 2013 study
with the high tones and the low
tones of the faces in the houses.
This is how much the brain cares
about precision weighted visual
outcome prediction error at
the second level of the model.
So this is quite an abstract
model based quantity.
That we have here, and this is.
The activations and these are whole
brain corrected that you see in
the brain replicated across two
studies and this is the conjunction
between these two studies.
I see there is a remark in the chat.
How many trials do you need to
be able to estimate the model?
This is a page and estimation,
so in principle you can have as few
trials as you like if you make your.
Pryers stronger and stronger and stronger.
That is the dilemma in all
Bayesian parameter estimations,
the weaker the data are,
the stronger the prize have to be.
And if you don't have enough data,
all you will have is the
influence of your priors.
Now, in practice we had 320 binary
outcomes and binary outcomes
carry very little information.
It's just one bit of information.
In this task,
that was basically comfortably enough,
we also had a lot of participants,
so there are about 40 participants in each
of these two studies that we see here.
So we sort of had adequate power here.
So 320 trials with binary
outcomes and 40 participants in
each group for the fMRI study.
Now, if you have outcomes
on a continuous scale.
For instance, if you only just have.
Reaction time outcomes that already
helps you because their one observation
carries much more information
than just a binary decision.
You can also use continuous
HGF's as the inputs.
And then you can use continuous,
a continuous scale for the
decisions your participants make.
And there if they make a
decision on a continuum,
if they don't just say yes or no
or black or white or house or face.
But they say 67 or 55 or something
like that on a continuum,
then you've got much more
information for each trial.
So that is actually something
that I think is the way forward.
Many more continuous outcomes,
continuous in inputs.
They can be modeled just as gracefully.
With a model like the HGF and they
carry much more information and the
advantages you need many fewer trials.
So we have gone as low as 60 trials
with binary inputs and outputs,
and we have found group differences.
If the study is.
Well powered enough then that
can even work with 60.
Binary trials,
but I would sort of be afraid as
the designer of an experiment like
that if I only had 60 trials, so.
It's always best to have as much.
Data as you can.
Given the constraints that you're facing,
and often when you work with patients,
you cannot do an experiment that's
longer than perhaps 1015 minutes.
So given the constraints you have,
I would recommend having as
many trials as you can.
Sort of from about 150 a 160 trials
you can sort of relax a little,
and if you can go up to 304 hundred trials,
that's an almost luxurious situation.
Continuing here with our new
imaging results, here we see.
Midbrain activation also mountain weight
prediction errors at the second level,
so even in the rain we could find
activation in response to these
precision weight prediction errors that
we infer from participants behavior
at the second level of the model.
So this is an indication that the model
actually captures the same things.
The brain also cares about,
and that lead to neural activity
in concert with the model.
Trajectory's at the third level of the model.
So here we are looking at epsilon free
precision way to prediction errors
at the third level of the month.
We still find activity here
in the basal forebrain.
What you can also do,
and this is an important point when
you will designing your experiment is
you can use the tool box to generate
fictitious data and that tells you
a lot about behavior of remodel.
So you give you model some input
and by hand you choose parameters
for the perceptual model and
parameters for the response model.
I said by hand,
but you can also sort of do a grid search.
Ultimate eyes this in some way
just to explore the properties
of your model before hand,
so that's a valuable tool to use simulation
and all the models in the HDF toolbox,
for instance,
have this simulation capacity,
so you can simulate data there.
But now let's just jump
into the HF toolbox demo.
I will stop sharing the.
Presentation and start sharing.
Matlab.
So. After you've downloaded the HF toolbox,
basically what you are downloading is
tapas and tapas is a. It's called tap.
It's because it's a collection of
more or less unrelated but very
appetizing and juicy piece of software.
And the HDF 2 boxes.
One of those pieces of software.
So you go to the HDF folder in your.
Tapas, sweet and you navigate to this
file HGF underscore demo dot MLX&MLX
stands for Matlab Live script and this
basically works like a Jupiter notebook.
For those of you who are familiar
with these and then you can just
click yourself through and get
an impression of what this does,
and then you can use the code that you
have in the demo for your own experiment
for designing your own analysis,
you can build on this here.
There is also a PDF documentation and
the code is extensively documented
and commented in the toolbox,
so the first thing we'll do is we will load.
Some binary input,
and that's exactly the input
from the experiment in 2013.
Here you have the reference
to the publication again,
and we plot this,
so we're going to plot it again.
So this is this U is just a series
of ones and zeros according to
that probability schedule that I
showed you right at the beginning.
Then one thing you can do if you want
to sort of get an idea what reasonable
parameter settings might look like.
In your case, you can try to find.
Bayes optimal parameters and then
use these as your prior means.
When doing your analysis of the data
you've collected on your participants.
So in these configuration files
whose names you can see here,
you always set.
Your priors for all the parameters
you're estimating.
You can decide not to Esta.
It's certain parameters,
but just fix them to a particular value
by setting their prior variants to zero,
and that effectively with a zero variance
prior fixes them to their prior mean.
Now, as I said, often we want to.
Explore the properties of our model before.
Collecting any data.
So what we've done here
is we've taken a binary.
HDF model and we've chosen a
set of parameters by a handful.
The perceptual model then
we've chosen a decision model.
Also chosen a parameter setting
here and then a seed for the
random number generator and we run.
This simulation and this is.
What the simulated believe
trajectory looks like.
So this is basically if
our participant had these.
Parameter values.
Full that perceptual model.
Namely, the most interesting ones are
Omega tuned Omega 3 -- 2.5 and minus six.
Then this participants this simulated
participants believed trajectory would
look like this at the first level.
At the second level at this early.
Until then,
you can go and play around with
these values and you get other
trajectories and that way you
can explore how your model works.
Now we can take our simulated
responses because we also simulated
predictions by this particular agent.
We have a belief updating model.
Actual model and we have a decision
model and that decision model can
be used to generate to simulate.
Actions predictions in this case.
Made by our simulated participant.
So wherever you see an orange dot up here,
the agent said oh after this
high tone I predict the face and
whenever you see the top down here,
they predict a house.
And then their predictions change again.
So the modeling framework covers
all aspects of your participant,
the belief updating and the decision making.
And we can go and simulate
a whole participant here.
Taking these simulated responses,
we can go and estimate.
The parameters we put in back
and we'll see how close we get.
So.
Let us see.
What we get here.
This is the estimation. Now.
As you saw, the two omegas we
put in Omega Two and Omega three
were minus 2.5 and minus six,
and now these are the estimated values on
the basis only of these orange dots here.
So we used minus 2.5 and six to generate.
The orange dots,
and now we feed the orange dots
back into the HF and we try to
estimate these values back and what
we get is minus 2.5 and minus 2.37.
Something an minus 6.3 something
now is that good.
Was it bad or was that you know
can we be happy with this or
should we try to do better?
Well, we don't know from doing it just once.
In order to know how well we
are estimating the parameters,
we put in back, we need to do this.
A few 100 times and then we can
look at the distribution of the
estimates that come out and then
we get an idea of how exactly we
can estimate these parameters.
And then.
Spoiler Alert it is easier to
estimate the parameters that are
lower in the hierarchy of the model.
Those that are higher,
so we would be much better able
to estimate Omega 2 then we are
at estimating Omega 3.
Then you can run all kinds of
diagnostic checks so you can look
at the parameter identifiability and
basically you look at the postira
correlation matrix of your parameters.
There are three parameters
we're estimating here, Omega 2,
Omega Three,
and Zita from the response model
and we can be happy when all
the off diagonal elements here
are somewhere around 0.
So you don't need to worry if you don't
get too close to plus one or minus one.
You're still doing fine.
However,
if you get a posterior parameter
correlation very close to one
or very close to minus one,
that's an indication that these two
parameters that are linked in this
way are basically describing the same thing,
and one of them is redundant,
and that's a sign that you should
fix one of them to a particular value
and only estimate the other one.
But here we're doing fine.
Then you can look at all the
ingredients of the optimization,
the correlation and the.
Covariance answer on an
and you get everything.
It also in numeric form,
not just in these plots that I'm showing you.
Now, what do the infer belief
trajectory's look like?
Let's look at this.
And I mean if we scroll back up and
look at the simulation we put in,
we see that there is quite an exact
correspondence between the belief
trajectories that we put into the model
and the ones that we got out again.
So they correspond very nicely to each other.
And that's also something
that basically you want.
You want this model as a tool
to find the hidden truth about
what you participant.
Is actually doing what their
beliefs about probabilities
in its environment work.
Good.
And you can also extract from your estimate
structure all of these trajectories.
Then if you want to change the priors
or other configuration settings,
of course you can do that.
So we're playing around with the variance.
Sorry with the prior variance
of the parameters, ITA here.
So where reducing it from one to?
Oh point 5. And.
And then you can run this function types
align priors and everything adjusts
itself magically in the background,
and you knew configuration
is basically registered now.
You can sample from your
priors. And use this. 2.
Sample different kinds of.
Participants that you might have that
your priors imply 'cause your priors
are basically an assumption about
the population you will be testing.
So lots of possibilities you
have here and then one quick
remark about the enhanced Age GF.
So we've recently made progress on the way
we derive the update equations in the HGF.
And we've made the discovery that if we turn
around the order in which we do the updates,
so we traditionally first
it the precision update,
and then the mean update.
We do it the other way round.
We actually get better behaved.
Inference, and we can go much
further out in parameter space.
Where both strategies work,
both orders of doing the update,
they have a nice correspondence
between each other.
It is just that everybody who's worked
with the toolbox at Bit knows the
dreaded error message assumptions
of the variational inversion
violated or something like that,
and that's basically an indication
that you've gone too far out in
parameter space for the model
still to work for the assumptions
underlying the derivation of the
update equation still to hold.
Well, now with the enhanced HF,
you can go much further out and you
get more stable update equations.
We have a remark in the chat.
Do you need a functional form of a
prior or can it be based on for instance,
data from another experiment?
This can very well be based on
data from another experiment.
That is the best kind of prior to
have what where you actually have a.
A well informed assumption about
how your population of participants
will be distributed.
How the parameter values will be
distributed and you can use that as a
prior setting for your next experiment,
so so that's entirely good way to perceive.
OK, in all states Jeff.
So this is basically we're at a wild
point here in the parameter space.
You can see the learning rate here
in the fine black line shoots up
to unknown Heights before and you
can see interesting things happen.
Also at the third level in this model.
So it's just to show that you can.
You can basically write this model
much harder than the original HGF.
Chris, really quick,
I'm just to
ask you a question while I'm at it.
Do you get comparable fits?
I mean obviously things are are
probably performing quite well,
but do you see any kind of general
trend in particular kinds of
experiments or particular kinds of
data that you're fitting between the
enhanced versus the standard HTF?
So it's, um, it is just easier to get.
All of your subjects to work
with one parameter setting,
so especially in large studies.
Let's say you have.
100 and 5200 participants.
There are always you know,
whatever modeling framework you
use and there are always going
to be a few weird ones that are
going to be very hard to fit.
And if you face such a situation,
the enhanced AGF reduces the number
of subjects you need to basically
reject on the basis of not being
able to model their behavior.
So, so that's an advantage.
If you combine this with the general
trend that I already mentioned.
That we tend to try and
use continuous inputs,
continuous decisions and so on.
Then you're really in in much better
shape than you were ten years ago when
we started using this because you can.
You can accommodate many more
kinds of behavior that you
observe than with the original,
more brittle models that we have.
We've got data methods,
thanks.
And. Yep, basically everything you
could do with the original models
you can do with the enhanced models.
There's just this in the toolbox.
This little prefix ehf.
So there's an EHF binary.
There's an EHGF for the continuous variant,
and then there is the jacket model.
For ease of time,
I won't go into the J get model, they get,
model is another very versatile model,
and these three between them are
sort of the most important ones and
they have an EHF implementation
up to now and others will follow.
Good and then we estimate them back
again and we can see that even in this
wide corner of parameter space it.
Now actually works yes,
so every simulation is a
little different than this one.
Still worked, we can still estimate
all these parameters nicely.
The confusion matrix looks good.
And then from here we proceed
to the continuous domain.
And I just said before we go to the
continuous domain I just wanted,
I'm maybe jumped over it.
I just wanted to mention that there aren't
doing the AGS models in the ATF toolbox.
There are lots of other models that
you can compare your models with.
You can use a Kalman filter model.
You can use a Sutton.
A variable learning rate
reinforcement learning model.
You can use a simple Rescorla Wagner model.
They were even hidden Markov
models and hierarchical hidden
Markov models in the toolbox.
So you have a wide array of
models you can choose from to.
Yeah,
study how different modeling
approaches compared to each other,
and you also always have these
diagnostics log model evidence.
Akaike information criterion,
Bayesian information criterion
and they will guide you in
choosing a good modeling approach.
You also have lots of residual
diagnostics for the more advanced user.
I am going to Scroll down.
To the bottom you have
residual diagnostics here.
So here you have the time
series of residuals.
You have the auto correlation
of the residuals and you have
a plot of residuals against
predictions and you can apply
these to all the models you fit.
So this is basically the the advanced
diagnostics that we have and here you in
the demo you also have these continuous.
Cases for the HF that I used
in the presentation.
Basically, I can only recommend go to the
Tnu website to alter our GitHub page,
download this and play around with it.
It's easy to play around with and. You can.
Easily find interesting stuff to do,
and if you've on top that also got
interesting data that you like to model,
you'll certainly have hours,
days, months of fun with it.
I ask you to speak a little bit if you
could about estimating priors priors.
I'm particularly interested in
thinking about estimating priors
at the volatility level. Yes so.
Now, when you say estimating priors,
are you referring to the choice
of priors that you want to
use for your final basically?
Basically the analysis that's going
to count in the end I'm interested in.
I'm interested in what the
participants product spec tations
may be about predicted volatility.
In the model,
estimate what participants are are
what their product spec tations maybe yes,
so So what kind of mindset they
enter the task with? Isn't that?
Yeah, bad volatility beliefs yes absolutely.
So you have that right here.
So this is continuous example,
but this particular participant or
simulated participant in this case.
Had an initial volatility belief right here,
and the toolbox estimates this.
Now, just to make a very fine point,
we distinguish between initial beliefs
and priors for the parameter estimation.
So from the strictly basean POV,
this here is a parameter.
The initial belief is a parameter
that we're estimating.
And the priors,
strictly speaking,
are the priors sort of defining the
range within which we expect to find
these parameters from the point
of view of the participant in the
experiment this is slightly different.
These then are actually the priors with
which this participant approaches the
environment in which they do their task so.
The usage of the word prior
is slightly ambiguous here,
so from the point of view of the modeling.
These initial beliefs are parameters.
However,
from the point of view of the experiment,
from the point of view of the participant,
they are priors.
So basically this is what I wanted
to show you about the toolbox and I
think I do have a few slides left.
In the presentation.
May just share that with you.
Yeah, just a very few to actually.
OK. So often.
We do these prompt recovery exercises.
And they are a big topic in computational
modeling in general, so I just.
Put a few remarks on that on this slide.
You can, I guess that.
When you download the slides,
but basically.
The philosophical point.
I'm trying to make here is.
There is actually,
even though you've simulated.
Your data with a certain ground
truth probability distribution.
That doesn't make these values
you simulated with. The true.
Parameters the parameters that
you model would ideally estimate.
I mean, just imagine flipping a
coin 10 Times Now the groundtruth
parameter at work there is 1/2.
But let's imagine you do it once.
And you only get heads three times.
Now how are you going to estimate
that parameter from that data set?
Three heads, 7 tails.
Well, you know you can't blame your
model for judging tails more likely.
Even though the groundtruth
distribution you generated from.
Was had a parameter of 1/2.
So the ground truth is not
always the best explanation.
And what we're doing when we have
fitting models is we're trying
to find the best explanation.
So in some sense,
what the model finds in a Bayesian
parameter estimation is the best explanation,
and in that sense.
It cannot be bested by some truth
that wasn't accessible to the model,
but maybe was hidden in
the generative process,
because how the generative process turns out,
we don't know.
It's a stochastic thing.
So that's the philosophical point.
I wanted to make here so.
Also, if you review papers like this,
don't give the authors too much of
a hard time asking them to Rep.
Produce the parameters they
put in in simulations because.
There is this stochastic nature of
the process and that means that the
best explanation for what you see
may not be the parameters of the
simulation you used to generate the
input model comparison model selection.
There are these formal criteria,
log model evidence,
a kind care information criterion.
Bayesian information criterion and so on.
Also, here I'd like to put in a word
of caution against the reifying these
measures and using them as your soul guide.
There are ways to game these.
Quantities. By making your model worse.
In particular,
you can make your prior predictive
distribution more and more implausible.
By making your priors wider and wider.
And getting a higher and higher model
evidence so high model evidence does
not always mean you have a better model.
You could have.
Got a better model at the cost
of making your prior predictive
distribution implausible?
So. Over the years,
I've come to regard these three
points and the most important,
when judging the appropriateness,
the quality of a model.
The 1st and most important,
the one that Trump's everything
is does the model allow me to
answer my question of interest?
So even if you have a model that scores
better on some model comparison measures?
That model doesn't help you.
If you're interested,
you know, like for instance,
like Sarah is interested in volatility well.
If she uses a model that
doesn't have volatility,
that's not going to help her.
Even if scores better on
some model comparison,
so that's sort of a primary importance.
You have to be able to answer your
question of interest using a model
and then an important point is,
does the prior predictive distribution
of observations make sense?
And there is a way to check that,
and that is to simulate.
Data from your prior and there's a
demonstration of that in the demo,
so that has to make sense,
and in particular it means your
prize shouldn't be too wide.
Your prize should only encompass
a breath that is plausible in the
actual behavior of your subjects.
And that's going to hurt your
model comparison measures.
Having a plausable prior
predictive distribution,
but it's more important to have
a possible prior predictive
distribution than to have a good
model comparison measure the
posterior predictive distribution of
observations also has to make sense,
so you should be able with your
model to Rep produce the interesting
patterns you have in your actual data.
That's the final point there,
and with this basically I am done.
I thank you for joining.
And.
I hope you learn something today
you will have the slides and
just download the toolbox and
play around with that demo.
It's very much Chris.
This is really wonderful and I feel
like we all learned quite a lot today
and it's great to see that you made
this tool so accessible to the general
computational psychiatry interested audience,
which is really wonderful and I'm actually
looking forward to exploring the demo myself
after after everything this is great.
I do want to open up the floor to any
other questions that might remain.
I know we're a little bit over
because we we unfortunately had some
technical difficulties that will take
responsibility for, but do we have?
Any other remaining questions at the moment?
So of course I have questions,
but I don't give other people
opportunity. Ask cursed.
Well, you can break the ice and
yeah so. One of the question
is about convergence. So what
are common issues? Report how much
time does it take? How much time
to converge depends on number of
observations and heterogeneity
of your group, especially if you
don't. Analysis of clinical data. You
kind of from the beginning.
Expect that you're healthy.
Controls are physically different form.
Not that healthy population and.
Convergence, in my experience,
can surprise you.
You just ran into some really
unexpected issues and you just.
It either takes forever or you
just don't get there at all.
So can you comment?
So here we are not sampling,
so the optimization we can be sampling.
There is a sampling solution in
the wider tapas framework in that.
Toolbox that I showed today.
There is an optimization algorithm
that doesn't rely on sampling,
so these convergence issues and
also time issues don't arise there.
So you saw we did everything live here so it.
Went very quickly and also it's much quicker
now than it was just a few years ago.
I think under the hood they've done some work
in Matlab and it now runs much more quickly.
And of course the laptops we have today
are also a bit more powerful, but.
Basically, time used for estimating
parameters that basically you know it
almost you almost won't notice it,
so that works quite.
Efficiently there, however,
of course you can still run into problems.
And those problems mostly arise in
the situation I mentioned where you
are too far out in your parameter.
Space for the assumptions underlying
the derivation of the update
equation still to hold.
And there the toolbox throws an error
if that happens during the optimization.
The algorithm is clever enough
to pull back from there.
And usually finds its way back to
a parameter region it can handle.
The greatest problems arise when you start.
Basically you will search for viable
parameters in a place that is already
too far out and you don't know in
which direction to go to get to a
viable Patch in parameter space.
So that is sort of the most common
problem you can have and there.
I can only say I have a number
of tips in each model definition
in the actual MATLAB code.
Because it's a bit different for
each model for how to go about
getting reasonable parameter settings
that'll get you away in so often.
This involves reducing the
prior mean of the omegas.
For instance, models that have a parameter
theater also benefit from lowering
the upper bound on feet and so on.
Just go into the configuration
file of the corresponding model.
And read to the.
End of the intro sections and there
usually you get a number of tips.
Great, thank you.
Thanks, Chris, really quickly.
One last question I know with with
some models like the Shepherd,
which is incredibly powerful.
Also, many variables that are
that can potentially be fit that
problem that you mentioned earlier,
which is correlated parameters might
well also be a somewhat common problem.
I guess I was wondering if you
might be able to give our listeners
or participants tips in terms of
decreasing or addressing correlated.
Parameters.
So what what you can do then is first
you have to find out that it's the
case and you've got the tool there.
You look at the posterior correlation matrix.
Now sort of the brute force method
that will just make this go away.
Is fixing one of the two
offending parameters.
You can be a bit more subtle in
tightening the prize on either or
both of them and see whether that
already gets you to a well behaved
model where you don't get very high
or very low posterior correlations.
So your main tool there is
the prior variance,
so adjust the prior variance of
both or either of the parameters
and see whether that helps you.
Thank you very much.
I think we probably should end.
Thank you so much for
spending your night with us.
And and for joining us for
this summer series, Helen,
I don't know if you want to make an
announcement about next seminar series
and the slight change in format.
Maybe later, maybe discuss it.
OK, great. There may
well be a change in format next
time we might see a little bit
of a longer talk by request,
but we will see and will
keep you all updated.
Thank you again Chris for
joining us and talk to you.
Thanks, thank you. This was great.