Fundamentals of Active Inference (Chapter 7, Session 33) August 4, 2026
Watch on YouTubeVideo summary
Chapter 7 of Active Inference introduces active generalized filtering by integrating action into a continuous time formulation that differs significantly from discrete time models relying on explicit policy rollouts or counterfactuals for planning. Instead of treating actions as part of an agent's generative model where alternatives are weighed, this framework represents future states via a single generalized coordinate vector using Taylor series expansions, allowing agents to unfold action sequences instantaneously similar to pinballs in a machine. The core mechanism minimizes variational free energy through sensory consequences rather than direct differentiation with respect to action; by applying the chain rule, changes in action are derived from how those actions alter observations, which subsequently affect prediction errors and free energy. This creates a unified objective where perception updates beliefs about latent states while active processes update beliefs about actions based on sensory precision and forward models, effectively handling embodied mechanics like muscle tension or gas pedal pressure as continuously unfolding variables rather than discrete events.
The chapter illustrates these principles through practical examples such as thermostats managing homeostasis and countering exogenous forces, emphasizing the framework's ability to distinguish between modeling real empirical data versus simulating specific human behaviors. A key aspect of this approach is its handling of "null" values within continuous processing streams; rather than treating them as missing data points that disrupt inference, the model interprets nulls as reduced attentional weight, thereby allowing for robust inference across diverse domains like cognitive modeling and computational psychiatry. This method ensures that even when specific inputs are absent or diminished in significance, the system maintains stability by adjusting its focus dynamically without breaking down due to incomplete information structures common in complex biological systems.
Beyond theoretical mechanics, the discussion addresses practical challenges regarding data labeling and interpretation within computational neuroscience contexts, highlighting how effective cognitive reappraisal can map null elements into a communicative syntax that reduces errors when mapping multiple agents together. Participants note that this efficient approach facilitates better communication between different agent models by transforming ambiguous or missing inputs into meaningful signals through reinterpretation strategies. Recent successes in model agent testing demonstrate the adaptability of these frameworks to synthetic intelligence settings, showing how beliefs, desires, and intentions can be accurately modeled even under conditions where traditional data completeness assumptions fail.
The session concludes with a forward-looking perspective on adapting such models for advanced synthetic intelligence environments, suggesting that integrating continuous time formulations offers superior capabilities for embodied agents compared to discrete alternatives. By unifying perception and action through the minimization of variational free energy via sensory consequences, this framework provides a robust foundation for understanding how biological systems navigate uncertainty without relying on exhaustive counterfactual simulations. The ability to seamlessly transition between modeling empirical data and simulating specific behaviors while gracefully handling null values positions active generalized filtering as a powerful tool for future research in cognitive science and artificial intelligence, bridging the gap between theoretical rigor and practical application in dynamic environments.
Read the full video transcript
All right, greetings everyone. It's
August 4th, 26 and we're in our third of
four discussions on chapter 7. So, we're
right in the heart of it in the fold of
the book as it were where we have taken
the jump from perceptual generalized
filtering into active generalized
filtering.
We're in this 678
island where we're within the continuous
time formulation which is pleasant
because it has a lot of intuitive though
also very sophisticated analytical
features like extreme differentiability
and a lot of other aspects that make the
smoothness of perception, cognition,
action, external state unfoldings things
very clear and linked their formalism.
And when we get to the next island of
chapter 9 and 10 and we're more in the
discrete time setting, a little bit more
like chess planning, then we will pick
up on some pieces that were not present
in six, seven, and eights like related
to explicit policy rollouts and other
ideas that have to do more with explicit
counterfactuals as a way of dealing with
future states. and uncertainty rather
than tailaylor series like expansions
which have the advantage of this sort of
single generalized coordinate vector
representing indefinite future time
scales but have the limitation that they
don't explicitly admit counterfactuals
and it becomes a second order question
how confident should you be in that
tailaylor series expansion through time
whether you're only interested in the
perceptual component or in the active
component as well. Um, we can go to
>> Hello.
>> Yes, Babin, please.
>> So, yeah. So, by the way, I mean, you
know, you show the picture. So, it has
like a dependencies and dependencies.
So, it's like uh what it means like like
you know cuz I'm from I mean I I used to
develop Android app. So, you know, I
know this one from Android perspective.
It's like library that we can use. But
here you know what this means like you
know you can see the numbers and
everything.
>> The dependencies are which chapters each
chapter builds upon. Beavenon please ask
specific questions. I'm I'm happy to
hear your input but please ask specific
questions.
>> Okay. Okay. Okay. So it's okay or it
means it's like it's to build I didn't
understand very clearly.
>> This figure is from the beginning of the
book. Do you have the book first off?
Just to check.
>> No no no no. I'm in.
>> Okay. Okay. Okay. Okay. Okay. Okay.
Okay. Okay.
Please
>> work with us here in this open science
setting. If you don't have the book,
work with the materials that we're
putting out, but respect that you don't
have the book or you don't have the full
context.
>> Yeah, of course. That's correct.
>> Yeah, absolutely. So, the dependencies
say which chapter each chapter is
building upon. We're in seven and it
builds upon all the previous six
chapters.
>> So,
>> okay. Same like the Android. Okay, I got
it. Now I can understand. Okay,
>> cool. If you have a specific question,
go ahead and unmute. Otherwise, I will
take the honor to
>> Thank you. Yeah. Okay. Is there any part
of seven that anybody wants to go to
like an example or a figure or a
specific question?
Cool. As as usual, Frraasier has added
awesome notes
to um
the top of the page for chapter 7. So,
if you're looking for these kinds of
synopsis
of different variables that are used and
um different summaries, takeaways, this
is great. Um there's so much gets
brought up in this chapter and again
it's just fascinating to see one way
that action gets brought into the
picture and how it connects to
variational free energy and there's
these deferred topics
of adjacencies that aren't exactly
addressed in this chapter. Um and
especially in chapter 8 and 9 or 9 and
10 we see that more familiar policy roll
outbased
approach to doing active inference. Um
so is there any question or topic that
somebody wants to go to or just like a
page or a line that they read that and
thought it was kind of curious or they
felt like there was something there that
they got from it or that they had
uncertainty about?
Yeah, Andrew.
Yeah, sorry. I'm I'm searching for the
page right now, but there's um
particular section in chapter 7 where it
starts going into action and how we're
sort of treating action and how it gets
related to sensory observations since
action is not actually part of the
agent's generative model.
um it's it's just like an interesting
but also like important um kind of
distinction how we're treating action.
But then we also notice that it's
following certain kinds of similar uh
kind of gradient related updates with
Uler's method uh as we're doing within
states too. So, it's kind of like we get
we get this like very similar uh almost
pseudoisomorphic
uh similarity in how we're treating
action versus hidden state inference,
but then they're still quite distinct,
right?
Yes. So let let's um pick up on page
161
and let's really get to the heart of how
actions being brought in and what the
formalisms for actions are. So first we
have on the sidebar on the right side we
have figure 7.2.
So this is the basian network
graphically that we're going to be
discussing. X is the latent external
state. Y is the observation. That's why
it's shaded in gray. And we have some
unfolding of the latent state. The
temperature in the room is changing. And
then we have observations that are being
emitted from that latent state. And
again, that was like the chapter 1
through five setting. That was the
chapter six setting of how do you go in
the generative direction from latent
states to observations? How do you go in
the recognition direction from
observations to latent states? And what
we're adding here is V, which is the
force that is going to be acting upon
these other variables. And again, we're
not explicitly considering
counterfactual actions. So, you're not
going to see something that's like, if
this happens, then the agent believes
this will happen. If that happens, the
agent believes that will happen. We're
just going to be looking at this sort of
like instantaneous
kind of like two dance partners together
without planning where it's just this
unfolding action sequence.
And these next equations are going to
show how that action sequence unfolds.
Okay. So on page 160 and 161
we have the fancy E and the fancy M's
which are defining the
um generative model of the agent and the
generative process or the environment
which is the fancy E.
um
that takes us up to through section 7.1.
So that's just a a short section that's
getting us to this kind of extended
chapter 6 setting where we have the same
generalized filter filtering on a
perceptual setting plus this new
variable V. So all we've done in section
7.1 is introduce V and the possibility
for there to basically be this causal
action of the observer. This is like
chapter six perceptual observer. Chapter
7, it's an active observer. That's the
active inference component. So that how
is the action going to happen and how
are we going to use the gradients that
were established in the perceptual model
to guide the unfolding of action without
the explicit consideration of
alternatives. I keep emphasizing that
because when we think about
reinforcement type discreet time
policies like chess, go robotics,
those are very often based upon explicit
rollouts of alternative considered
policies and the evaluation of different
policies in some way either in a
reinforcement or reward learning setting
based upon like basically a score. How
good is this policy? Single number or in
the discrete time chapters we'll get to
in D and 10 making a ranking or a
waiting of policies based upon their
contributions to utility or epistemic
oriented goals.
But here we're just looking at this sort
of unfolding. It's almost like there's a
um pinball in the pinball machine and
it's just going to be engaging with its
environment
without consideration of alternatives.
But you can get some surprisingly
complex behavior through that type of
setting. Okay, so we get to and raise
your hand or or write in the chat if you
have any um questions.
Okay, so we get to 7.2.
So first we see equation 7.5.
So
a is action
triangle over the equals [snorts] means
defined as
and then here we have the change in free
energy change in vf over the change in
action. So we're just looking at this
local gradients like we have the
thermometer. we have for an incremental
interval of increasing temperature or
decreasing temperature. Which one of
those will contribute more
um directionally to
taking the variational free energy in a
gradient descending direction.
Um and
side note 9 at the top of 162 says a
learning rate specific to action kappa
sub a has been added to the equation.
um which basically allows you to
um control the inertia of action in this
setting ranging from super high learning
rates kind of like the infinite learning
rate asmtote is just
a memoryless process that
instantaneously updates all the way to
the direction of flow. So that'd be like
if the pinball had no inertia mass, just
instantly go the direction of the
gradient
entirely. Or a very slow learning rate
would be equivalent to like a heavier
pinball where the rate of change of
action is relatively slowed down
relative to the gradient.
Okay.
between 7.5 and 7.6
we get the usage of a um time step time
interval incrementbased method for
determining what is the action going to
be at the next calculated time step. So,
we're going to say action at the next
time step is action at this time step
plus
a small interval of time
and the rate over that small interval of
time. It's literally like delta t, delta
x, and delta t. And this is kind of an
approximative way where especially if
we're dealing with a function that
doesn't have an analytical derivative,
we can use different delta t intervals
and just estimate basically rise over
run and then add that rise over run to
the current value of the action. So in
this setting, action isn't like a event
that occurs. It's something that's
continuously unfolding through time like
the um extent to which you're pushing on
the gas pedal in the car. There's some
unfolding through time. Even if it's at
zero and then it's non zero and then it
goes down and it's back to zero, there's
still at every single time point,
there's some value of that. Or like a
joint in your body, every single time
step, there's some value for that
joint's action or a muscle, there's some
amount of tension in the muscle, even if
it's zero.
And that's the characteristic of the
continuous time formulation is that
every single moment in this setting
action is unfolding. Whether it's the
thermometer um or whether it's the air
conditioner's choice how actively to be
firing or whether it's the um car
engine's amount of RPM or the joint
angle action is just something that's
always occurring.
Equation 7.6 Six is giving us this
heristic approach where we don't need a
d differentiable
anything. We just take some tiny
increment delta t look at rise over run
and adjust our action that way. But as
following we run into a problem.
Variational free energy is not a
function of a since action is not part
of the generative model. So variational
free energy is based upon the
relationship between the observations
and the inferences about latent states.
So it would not be possible to
differentiate VF in the manner specified
by 7.5 by itself.
Um but there's a workaround. We can
optimize actions through sensory
observations.
The reason why this works is our actions
have sensory consequences. So let's go
back to that pinball bouncing around.
Let's just say that its observation is
like the G forces that are acting on it.
And then it is able to make uh
unfolding of action without considering
alternatives
just based upon its instantaneous
experience of the gene forces.
Um
that
intuition
gets extended
greatly
and once we get to discrete time where
we get like explicit cognitive
counterfactuals
we will get another layer of depth and
richness. But it's really important to
remember in this initial kind of kernel
setting, we're dealing without the
explicit consideration of alternatives,
just a gradient. Like there's a set
point for the room's temperature,
there's a set point for the
propriception of a muscle joint, there's
a set point for the G forces experienced
by some sort of pinball. And then it's
just a question of more or less within
this um value of that actions can take.
And from 76 well really from um 75 to 77
we get the application of the chain
rule. And you can sort of see how that
works where
the
delta y of a so this is change in
sensory observation as a function of
action. So this is like will you
experience more geforce if you will you
experience more tension in your bicep if
you
lengthen your joint or if you close the
joint. And then it's kind of like funny.
It's just like if it were um regular
fractions.
We have delta f over delta n. That's
what we want to calculate. We want to
know how will the free energy gradients
change as a function of change in
action. And then by doing we can't
calculate that directly. That was the
previous paragraph. And so we multiply
it by basically deltay of a over delta y
of a which is just whatever that value
is. It's one. It's like one over one.
And then split that fraction back up
so that we have these two
values
that can be discussed separately. So on
the left side of the right hand side we
have how do we expect perception to
change as a function of action as a
function of action. So this is like dy
of x over delta x.
On the right side, we have this more
decision-making
objective where we have the value, the
free energy, which is what we're going
to use as our sort of top level gradient
to actually pursue because the units of
the change in observation or the change
in action are denominated in those
currencies.
whereas it's going to be the change in
free energy that is going to be our
guide
in a generic way.
Um
so let's focus on this. So so this this
left term again is saying how will
observations change as a function of
changes in action that relates to kind
of like domain specific or observation
action specific features of the world.
Whereas how we're going to make choices
about action is going to relate to how
they their consequences are on the
variational free energy. That's what it
means for variational free energy to be
used as a heristic or loss function or
kind of unified objective
for perception, cognition, and action.
And this is just zooming in on what it
means for it to do that in action in
this continuous unfolding way.
So we
get to
7.8.
So we have left hand side is that term
that we're interested in.
we have successfully
um removed the the naked delta A which
would have been nice to know. I mean if
we could just simply know how will free
energy change with respect to changes in
action. Great. But here we're closing
the loop and integrating the sensory
consequences of action which keeps the
variational free energy being about what
it's about which is grounded in the
sensory observation
and we get to the derivative of VF with
respect to sensory data which is to say
this
left hand side
and we get this lambda I
uh epsilon or e y
and
that
I don't think those were defined earlier
in the chapter
but let's check if we have it in
this All right.
Yeah. Um, I don't see those specifically
defined.
Wait, let me
I don't see them as specifically
defined. So, I'm not going to um
give them a name, but we can see that
7.9
has a really similar format to 7.5.
We have this K A
um something over delta A. So in 7.9
we have taken out from the top the delta
f and replaced it with this delta y of a
which is like the left hand side of 7.7
and then we have used 7.8 8 and plugged
it into 7.7
to get this lambda y
for the derivative of the vf which is
what we we're symbolizing with the right
side of 77.
Um
yeah thank you. Thank you Andrew. And
that's described it's described in um
7.12
which is interestingly a equation
but it's it's written as an equation.
Well it has a letter in it. Yes but but
it's but the variables are used before
they're described. But we have 7.12
describing
7.9
which is change in action
equals the negative learning rate
multiplied by the forward model which is
what are the change in perceptions as a
function of action with respect to
changes in action. That's that bold
forward term.
lambda y is the sensory precision that
corresponds to the mapping between
observations and latent states and the
sensory prediction error.
E pretty much means error.
Um so we get to
7.10 10
a and b where we have change in beliefs
about latent states mu mu dot subx
and change in action. So it's like these
are the two things. This is the change
your mind and change the world type
thing happening. This is the continuous
updating of beliefs in a generalized
filtering way just like chapter 6 plus
this gradient
that has to do with equation 7.5
which has to do with again this learning
rate scaled gradient on free energy. So
this is how free energy optimization
can include
perception and action within a unified
objective here within this single
observation channel, single latent
belief channel, single action channel
setting. But everything else with more
channels and more other thought
experiments is predicated on exactly
these equations, which is why they're in
a box.
Any thought or comment or a question on
this?
Yeah, Andrew.
Yeah, I guess I just add briefly um that
we we see that through going this this
like somewhat indirect route where we're
relating action to sensory observations.
Why? Um we're kind of meeting that
definition of action that we're given in
the chapter where the idea is you know
we have action and perception. So
perception is to sort of change your
mind uh and action is to change the
world. So you can see that if we you
know if we produce an action that is
then sort of evoked or you know elicited
into the environment
that changes the environment state and
then that releases you know potentially
new observations for us to receive. So
it is we're quite literally you know
undertaking action to change the
observations we receive. And so Daniel
gave nice experience uh um examples of
that earlier. Another one that we're
given in the book is, you know, whenever
we take action to uh look a different
way, right, in our environment that
we're in that that tends to produce, you
know, different observations. If I'm
looking directly at my computer screen,
I'm seeing my screen. Uh if I look, you
know, at the sky, I'm seeing very
different things. Um, so it's kind of
like, you know, we we take action to
sort of change the the sensory responses
that we ultimately end up perceiving.
And then finally, because we're still in
this realm of using variational free
energy, albeit in a slightly indirect
route, um, we're doing this in reference
to things like, well, what prediction
errors are currently going on? What did
I expect versus what really happened? So
hidden states are still kind of part of
the equation, though much more deeply
baked into the variational free energy
that we're already well aware of. So
while there's some conceptual new things
going on here whenever we introduce
action, we're still in the same world of
looking at variational free energy,
we're still looking at the same kinds of
prediction errors that we saw in chapter
5, like sensory prediction error and
hidden state uh prediction error and and
all the rest. Um, yeah, just wanted to
add that.
Great.
Page 163,
we basically get this written procedural
list that should remind us of basically
any loop from programming. But here
applied to that single channel, single
latent belief, single action setting.
Initialize in step one.
Generative process initialize in step
two. The generative model just when it
gets to your program, you can look at
it. That's where like the variables are
put into memory and they're checked for
their shape. And then you get the for
loop in step three where you step
forward the generative process.
The generative model computes a
gradient,
updates its prediction errors and then
applies action and emits it which gets
um into effect at the next time step. So
>> any comment or or anything anybody wants
to add here? Just getting through 72.
Okay.
So, I'll I'll I'll copy your question to
seven.
Um
like
just so it can be addressed is like yes
active inference is applied often to
physical navigation as well as to mental
states. That's called cognitive
modeling. And cognitive modeling can
deal with a variety of inputs ranging
from exterception, which are the
external oriented senses, to
interosception,
which are like the internal body
signals,
on through introspection,
which is like interosception for the
mind. And that can take one into ideas
like metacognition and awareness and
things like that.
Are there different design criteria to
consider [laughter]
in the sense that it's an active
inference model?
Thankfully, no. There's so much in
similar to how the variables are going
to be tracked and accounted for and
optimized. But in terms of the variables
being different, it's like yet as
different as can be. It's kind of like
we have two different um dishes we could
make, but they're going to go into the
same container. So they're similar in
that we're going to put them in the same
container, maybe run them in the same
software, but they're as different as
they can entirely be because you're
studying possibly a different input,
cognitive process, and action output.
>> Okay. So, we get two
>> and andrew's explored these these kinds
of modeling
>> topics um a lot.
>> So, we get to 7. Yeah, Andrew.
>> Yeah, sorry. I uh yeah this could
definitely become a whole thing. So I'll
try to be uh brief but I I really like
that question that was asked and uh like
in the cases of computational psychiatry
and the other fields that Daniel
mentioned um you know there are a lot of
people who do things like try to
simulate uh phenomenology
uh or just more general like a effective
or emotional inference without it
necessarily having to be related to to
pathology. um though it often can be um
yeah like you can there's a bit of a
distinction because of the wording of
the the question I just wanted to
clarify like um the idea of creating a
model like an agent model that we have
that actually treats a real person like
an empirical existing human being um you
know as sort of the environment where
you have a model that captures or
attempts to make different kinds of
estimations off of this real empirical
ical data that you're receiving from a
person. Um, which is very interesting uh
to do and people make like
classification models for doing that or
they do other sorts of uh like
predictive modeling to try and capture
the behavior of someone. That's that's a
bit different from directly simulating a
person where you're making a model that
uh you know you think based on your best
design and hypothesis about how a person
might work or how they how a person
functions within a particular context
like oh I'm simulating a person in a
particular environmental task or
otherwise um that would be a bit
different where you'd be you know giving
it different kinds of uh proclivities
and and hidden state representations and
actions and all the rest that actually
directly are supposed to simulate a
person. In both cases, you can work with
empirical data. Um, so you can actually
like collect data from a person and for
a model that is supposed to make
estimations off of that. In the former
case, much simpler. You already have the
person's data. You just run it through
and see what your model comes up with to
gain some kind of insight into that
actual person's behavior. Um the second
case where you're trying to make a model
that simulates a person, what you can do
is you would also collect data from a
real person and then cross reference
that with the kinds of behavior and
hidden state estimations that your model
makes. And that's called model fitting.
in which case you would just try and
like incrementally perhaps or
iteratively try to um get your your
homemade model uh to to much more
closely match the kind of parameters
that we find in uh uh you know as as
sort of retrieved or analyzed from the
data of a real person. So yeah, it's a
it's a really big good topic for any of
those who are interested in like
psychiatry, mental health, uh just
general human psychology that want to do
anything computational, very interesting
things to think about. There's plenty of
literature on this and active inference,
but also just elsewhere more broadly.
>> Yeah. in Sebastian's comment about like
the endocrine system and hormones like
that is the beauty of a unified approach
is you don't need a special case model
for every single hormone system or you
can do direct model comparison with or
without the effect of different hormones
or you could treat a variable as an
unobserved
until you observe it. So you could
develop like a whole model that includes
EEG data, MEG data, you know, real- time
glucose, real-time dopamine, all these
different kinds of things that you don't
have access to
with the legibility to say, I don't have
access to these. Here's my uncertainty
interval on them. And then even if you
got patchy data, like just one
observation per day, you could quantify
how much information is this providing.
And then maybe in a different setting or
in the future it's possible to get
biometrics
that are more high frequency or high
accuracy.
Babin's comment here.
Um, once we detect the triggers of
predictive error, then we can find the
context to reduce the predictive error
through dialogue and observation which
could be for linguistic settings or it
could be kind of interpreted as like a
agent in the niche in dialogue more
generically.
Um, it can reduce the predictive error
but I'm not so sure.
>> Yeah, that's Yeah,
>> you Yeah, go ahead.
>> Okay. I mean, I think you can continue
listen so we can talk about at the end.
I mean, I think that's what Andrew said.
I think so. So, yeah. I mean, you know,
I think it won't be that much related to
this entirely. So, yeah. So, we can
discuss about this at the end. Yeah.
>> Yeah. And and and like it's kind of like
when they say there's the rub, which is
like how does the model know which
direction of action is going to be
associated with which gradient change?
That's not addressed here. That's the
question of learning which is how does
that forward model come to be learned?
How does the thermostat come to
understand that turning on the heater
raises the temperature? what would
happen if it was a setting where turning
on, you know, it's just button A and B,
how does it come to learn what the
consequences of action are? So, like
this reminds me of one little riddle,
which is um there's an attic with three
light bulbs in it and you're downstairs
and there's only two light switches.
What can you do with those two light
switches to determine which one connects
to which of the three lights and which
one of the three lights is unconnected?
So first off that that needs a life I
mean that needs like uh you know a
trained environment to know it actually
or else it just like I mean it's an
impossible thing you know even a human
being also can't know it for instance if
I arrive to office I I mean there is no
way that I can understand which which
which which I mean which kind of switch
on the certain you know
>> okay here's the the solution to the
riddle um you turn on one of them and
you leave it on for a long time.
Then you turn it off and you turn on the
second switch. And then you go to the
attic and one of the lights is going to
be on,
>> one of them is going to be warm but off
and then the third one is going to be
off and cold.
>> You can go into these second order
questions like what if it's a
fluorescent light? It doesn't heat up or
how do we know, you know? Yes, you could
always like break out of the box of a
model and continue to explore these
metacognitive questions. Okay, so the
thermometer, you know, we understand the
relationship between the heater and the
thermometer, but how do we come to know
about temperature? So like that is kind
of like popping up a level which again
brings us back to the importance and the
relevance of having a generic modeling
framework where we can actually model
those kinds of ideas as structure
learning and model structural
understandings of the world within the
same generative model family and type.
that's going to eventually pay out at
the very end in something that's like a
body sensor.
and and as the the the convo in the chat
there often this is appealed to with
like an evolutionary account or an
ontogenetic a developmental account of
like well that's just the kind of thing
that comes to be largely structured to
understand this kind of a causal
relationship or even the causal
relationship is built in
and a lot of ways to go with that but um
yes this is like describing the canvas
of what the possibilities are. And then
in the next chapter, we'll deal with
learning and some other topics about how
over multiple time scales [snorts] do
these models come to be fit and used.
But for here, it's just taking the model
is given and it's looking at the fast
time scale of inference.
And so we get to figure 7.3
which is the one that um
we all have written on our hand
[laughter and gasps]
right
um where we have
those two terms from
equation 7.10
in the internal and active states.
So both of them are minimization
processes
with respect to different variables.
Internal states are obviously updating
beliefs about latent states and active
states are updating beliefs about
action.
But they're both a function of the same
variational free energy of observations
and beliefs about latent states mu
[snorts] of x
sensory states. We have observations
being generated by the fancy E by the
environment as a function of the true
latent states Xstar.
The true autonomous action V star. The
true parameters that generate
observations from latent states theta
star subg plus the true variability
noise of observations
omega star subw.
And then over here in that true external
states we have their unfolding through
time
as a function of
the latent states the action forcing
from the agent and the parameters that
define all those relationships plus a
true noise term on the latent states.
So
this is like where we get this classic
diagram
and we can confirm that there are no
causal connections
coming from the outside world
to the internal world except through
observations. Why? And there are no
causal effects of internal states
on external states except through action
selection.
A
that is the marov blanket property which
is that two states are separated by a
marov blanket if they are independent
conditioned upon the blanket states.
That doesn't mean causally disengaged.
It's totally the opposite of that. It's
conditional upon their engagement.
There's no further engagement. So that's
the sort of roller coaster. Oh, narco
blankets are everything. Wait, it's
conditional upon what it's conditional
upon. By definition, they explain
nothing. And then you make your way up
the plateau of productivity where you
realize that these are designable,
they're legible, they're interpretable,
they have positive computational
properties, they're composable, you can
apply category theory to it, you can
develop software interfaces or interpret
software interfaces as this type of a
cycle. So that's sort of what's on the
other side of that whiplash of it's just
Markoff blankets. Wait a minute, they
don't do anything.
and then you meet what you can do with
them once you play around with it more.
So that's 7.3 classic figure and you'll
see a lot of cousins of this figure.
Sometimes the exact same equations
perhaps with a little bit of different
notation. Other times pretty different
equations but still reflecting this
partition or structured way to like
disarticulate
the imshment of the agent in the niche
or two agents in conversation.
Um
7.4
section 7.4 Four
goes into three examples.
Se example 7.1 is a basium thermostat.
Example 7.2
is the countering of an exogenous force.
So that could be like a sort of
homeostatic setting. Or you could think
of it as like someone's doing a prone
hold and then someone else puts another
weight on them and they have to counter
this new force to come to a new
isometric point and then the weight is
removed and then they have to rebalance
to there
and experiment or example 73 which is
countering a dynamic exogenous force
which is basically just 7.2 two where
there's changing forcing function.
Section 7.5 goes into multivariate
active inference in generalized
coordinates which is like whoa
because it's kind of like expanded in
all the dimensions once you're like wait
we have the generalized coordinates with
all the higher derivatives and we could
have any number of perceptual cognitive
active and external channels.
That's why it's so important to
understand at that univariate
level what is really happening because
it's set up in a way so that the
composability is all really powerful
and that's what makes it flexible.
Um and then 7.6 is the conclusions.
uh Sanjie summarizes what happens in the
chapter on page 176
and then
177
basically
mentions
eye movement and several other settings
where this has been applied
and connects it to alternative and
classical methods in motor control and
reflex arcs.
And continuous time,
this is something that that Thomas Parr
and Fristen and others have highlighted
is continuous time because of its lack
of an explicit counterfactual
tends to be utilized in mechanical and
embodied type modeling because you're
not dealing with this if this then that
explicitly. Again, that's going to come
up in the discrete time settings. So, um
in the um
let me just
go to
in the uh
paper on
active inference does not contradict
folk psychology
which I'll put in our notes. votes for
seven [sighs and gasps]
which is explored in these three live
streams. That's the type of model that
they study is explicitly this situation
where
um the body has this continuous time
setting
and then the mind as it were has this
discrete time setting which allows like
the explicit consideration of what would
happen if I move my hand here versus
here and then depending Depending on
which one of those two choices are
selected from the mind, there's a
descending motor control that then
implements that just like it is in this
chapter with like the static or the
dynamic exogenous force.
Um,
if there's a a comment or a thought that
anybody wants to add, please go for it.
Seven's a lot though. It's
simultaneously
hits very hard but also very soft. And
it's like a lot but it's not that many
pages.
It's just very dense.
Andrew, go ahead.
>> Oh, yeah. Thanks. Uh, yeah. Chapter 7 is
just like like if we take a a little bit
of a closer look, it's just building on
all the same things we've already seen.
We just saw Uler's method in chapter 6.
We saw sensory prediction errors in
chapter five. We saw action perception
loops like minus the action like way
back in technically chapter 2, chapter
3. So we're like building on all these
things from before. But then that said,
action itself is a is a whole thing that
absolutely warrants having its own
chapter. Uh and then recognizing how we
treat that distinctly from from other
variables. Um and then yeah, I wanted to
briefly hopefully comment uh on one
question that came up in the chat that's
uh I can't say anything too definitive
about it because it's very broad, but
this potential issue of dealing with
like null values. So anyone who's like
worked in like I I personally worked
like professionally as a data analyst
and scientist. So uh you know machine
learning that that whole world um where
we see values that could be encoded as
like null values or missing values. And
one of the appeals to something like
active inference is that you might be
able to have a model that on the one
hand, you know, does sort of emulate a
lot of these cognitive principles that
that active inference purports to to
simulate um and describe and explain. Um
but then at the same time like being
able to employ it in some kind of
concrete situation like technical
situation u industry or or otherwise.
Um, we do have these things like null
values or missing values from our data
at times whenever there was a a hiccup
in a in a sensor or some kind of error
that happened during a pipeline that
something just wasn't evoked that should
have been. Um, and it's it's a it's it's
a big question and uh but in reality
when we think about it, if we're
repeatedly collecting information
through our eyes or elsewhere, it's like
we aren't technically null values. It's
like if you're looking at a bunch of
pixels and we just consider black to be
nothing and then every object that could
take view uh you know anything that
could be an object within our vision
isn't black. It's going to be like
combinations of other colors. Um that
doesn't mean that the black is
necessarily null, right? It just means
you're probably paying a little less
attention to it. Maybe you're weighing
it differently whenever you you know um
undertake different kinds of inferences
is using that as your observations. But
uh yeah, it's just to say that a
distinction here is as opposed to some
static data that has some missing values
um you know a real organism is going to
be continuously processing everything.
And so they're they're going to be
continuously reducing free energy and
they're going to be taking in what
information that comes in. So we we in
one sense we don't technically have
nullles. There might be others who have
different perspectives on how that works
but um that's how I tend to view it just
like an actual uh like physical
manifestation of these ideas and
principles.
>> I assume that you are answering my
question. Am I right?
>> Yeah.
>> Okay. Okay. The thing is that you know
uh this is actually solved problem in
programming. Actually it's a billion
dollar problem actually. It caused a lot
of app crashes before this null pointer
exception. So thing is that you know as
we told you you are right mapping the
null null variable is a hard thing but
if you map the event into multiple parts
it's extremely easy to take the null
value. So let's take like you can check
like English grammar. Okay. So thing is
that since we have already mapped every
parts of sentences it's extremely easy
that if I talk like oh I football you
will instantly know that okay he's bin
is missing a web. It's very easy cuz you
have you know that what sentence what
the sentence will have actually. So if
there is something missing you'll
instantly find it. So like that if you
pause the event into multiple variables
like for instance like the definite
things like we discussed on the previous
like
>> yeah if you have a very yes if you have
a very structured understanding of the
language yes you can interpolate and you
might be very accurate or you might be
totally off base but yes absolutely.
>> Yeah. So think is that so we can take
the event and we can take event is like
a reality we can take it and we can
pause it to like uh observe what okay it
means what we are seeing and what we are
hearing then interpretive okay I mean
interpretive is not I mean it won't be a
thing for robot but it's for human being
so what they're internally feeling about
the meaning you know so we can take
these things then intended what it means
like we can take like what we intended
to say you know you know like for
instance I just saying I want to drink
water or something like that you So it's
what to say we can separate these things
then we can we will get the definite
value of like what is the reality you
can separate the part of reality here
the tricky part is that context is the
always the only thing that is dynamic
actually so that's most uh trickiest
part actually
>> yes
so far
>> learn absolutely like the idea
>> things are very bad
>> no just the idea thing is
>> we communicate through our intention
We're not just doing descriptive
statistics on the words.
>> Exactly. So thing is that see you can
have like these very contextual
situations where like I mean if you are
doing some kind of data processing for
example like it might be very distinct
to the particular problem you're working
on like if I were um I I work in
education for example so I'll frequently
look at like students assessment scores.
If a student is missing an assessment
score, that means something very
different from how I might handle a
missing value in a different situation.
In this situation, I probably shouldn't
be including that student at all because
I'm probably doing some kind of analysis
to look at how, I don't know, like
assessment scores correlate with, you
know, future academic success or some
some other thing where we're looking
much more at just like kind of plain
simple statistical principles of like,
well, to find how two things correlate,
you can't use missing values from either
one of them, right? It's just you can't
get any kind of correlation out of that.
So, in other cases, you can do different
kinds of value imputations, right? So if
a value is missing, maybe you know
something about the missingness in the
data, right? Like if a value is missing,
there's some pattern there where you
impute a particular value. Or maybe
you're trying to do like a big data kind
of prediction problem where it where you
found that it's savvy enough to just
impute the value to be the mean of the
data such that you want it to just kind
of if a value is missing but we need to
keep moving, just kind of treat it as
the general average score. in that way
it doesn't dramatically bias anything in
one way or another. So yeah, it's uh
it's interesting you phrasing it as a
billion-dollar problem, but yeah, it's
it's more about just yeah, what field
are you in? What what domain are you in?
So I think with my comment, my answer
was mostly like given the textbook group
and kind of the principles that we're
talking about here, I think that in
actual practice, we're usually not
treating things as sort of null values.
That's one of the the tricky things,
right? We're trying to do something that
aligns with computational anything.
Computational neuroscience comput
>> any any last comment otherwise we'll end
it here.
>> Okay. The thing is that so you know for
instance let me I mean
>> just the last comment just the last
comment
>> or lost the last lost comment. So mostly
we can use effect labeling and cognitive
reappraiser to find the context actually
we can map it into a communicative
syntax. That's exactly that's exactly
what we do.
>> Yeah. Okay. Yeah. That's a that's a most
I mean efficient way as as per my
opinion. I mean like as for the I mean
as for the things I tested I recently
model agent. Okay. Agent AI to map like
multiple agents to do that.
>> So it was successful in that area. So
that's my that's what I was working on
currently you know how to reduce errors.
It it's exciting. Intense inference,
belief, desires, intentions, and how
those models adapt to the synthetic
intelligence setting is huge.
>> So, I'll stop the recording here. Yeah,
of course.