Hello and welcome everyone. Welcome back to the second applied active inference symposium. It is the second interval and it's July 31st, 2022. In this second session, we are going to first feature a presentation by Bruno Lara, prediction error dynamics, a proof of concept implementation. Following that, we'll hear from Matt Brown with a presentation real time robotic control through embodied homeostatic feedback. The third presentation will be by Adam Saffron on generalized simultaneous localization and mapping G-Slam as a unification framework for natural and artificial intelligences. And the final presentation will be by JF Cloutier towards a symbolic implementation of active inference for Lego robots. We'll then have some of those presenters rejoin us in the final two or so hours of this interval for a roundtable discussion. We'll also be joined by Carl Pristin there. So thanks everyone for watching live or in replay. Hope that you add any comments if you would like into the live chat. And otherwise, thanks to all of our presenters and co-organizers for their awesome work. And thanks so much for joining Bruno. Please take it away. Yeah, thanks a lot for the invitation. I was very surprised as most of our work so far is not directly related. Well, it's not actually active inference. Of course, it's related. But since we published a couple of years ago, a paper that actually I'm presenting a bit of these results here. Well, lots of nice and interesting people started to look into this implementation of predictor aerodynamics. And it's actually the part where we could say it's the part that we are taking out of all this framework to try to implement in our robots, in our agents. I don't know how many times you've heard this story of why we are doing this kind of cognitive robotics or why we like to call all this research or this area cognitive robotics. And I like a lot this slide, which kind of summarizes what it's usually a long introduction on the history of artificial intelligence and robotics. And it just tells this story of 50 years of research trying to figure out how can we have machines that are as intelligent as humans. And it comes out that actually this upper part of the image quite got resolved rather fast. We cannot say easily, but it was more or less fast.  So what has to do with interaction with the world, you have a small child that is capable of handling these objects in the environment. And then you have this other robot that can do it. But at the moment that you change the size, the weight, the position, whatever you want of the pieces or of the chessboard, you actually have a child that with no problem can adapt himself to the challenge. And the nerd joke is then on the other side, you have another PhD that has to solve it if you do the same for the robot. So in reality, what was supposed to or was thought to be kind of the hard problem, which was having a robot reason and solve problems. It came out to be quite the not so difficult to solve task. And we can talk about more difficult challenges that have already been passed such as, I don't know, playing go, which is way harder than chess. And we had Alpha go a couple of years ago while winning against the human champion. So we like to think that we are doing now things differently. We are having robots that interact with the world, that interact with what's going on around, and they learn through this interaction. And of course, that gives us lots of challenges and lots of things that we have to solve. So now I come from this, you could think now as an old school of internal models. We work in this field for quite already some years. And it's this part of the world where there is inverse and forward models for control, of course. And they are thought to be behind all these important issues in humans. Since the beginning of my career, we've been doing implementations of different types of tools for these robots, but always based on these inverse and forward models. So just a quick reminder for those that might not be very much into this type of models. So we had a sensory situation, whichever it is, whatever it is. And we have a desired sensory situation. We have an inverse model that takes as input those two things, the sensory situation at time t, of course. The sensory situation at time t plus one, which is the desired. And the inverse model is going to tell us what's the motor command that needs to be performed to go from here to here. And then we have a forward model that takes the sensory situation at time t and the motor command at time t and gives us the prediction of what's going to happen with this sensory situation. And so we have a prediction error when we, well, we have lots of errors, but we are interested on particularly this error, which is the difference between what we actually predicted and what happened in the world. So we've been doing this for quite a while. Well, we've also used this prediction back as a sensory situation and we can get long time predictions, what we call, we can do lots of comparisons between what we wanted and what actually happened and lots of different errors. But as you know, and well, now everyone works with is actually this error, like the difference between the world and what actually I predicted. And yeah, and so that's, that's, that's what we can say we have in common. Some years after, after, well, some years ago, actually, we came across all these, all these ideas of prediction, sorry, predictive processing, and we started to dig into it to see what actually we could use for our models, what could be useful for improving our models and our agents' behaviors. And we have lots of doubts, lots of, lots of questions, but one of the first things that we've done so far is to look into what happens with the error as, as an agent is executing an action. Sorry.  Well, first, where is actually the, what you could call the, the cross areas of what we believe it's important in this case, when we have active inference and prediction error minimization. So most of us are very familiar with this kind of representation of what's happening actually during, during action. And we actually believe that prediction, minimizing prediction error is what leads to belief updating. So, like the change in a prior belief encoded as a posterior belief. And this is actually informational gain. So this means learning, right? So in active inference, the expected future states are fulfilled through action execution, we know, and this associated expected prediction error is minimized by actively sampling, sampling sensory information. And so the, the important part for us is this expected prediction error. And we believe the attribute of a policy, which can be epistemic and instrumental in, in case this is this action is novelty searching, it's reflecting, it's epistemic affordance, and we could say it's acting for information. In case of preference searching, no, this reflects instrumental affordances and its action for reward. So in words of, of Kirbenstein, we can, we can think of active inference as the process of selecting relevant affordances. So those which are expected to minimize prediction error in a context sensitive manner. Yeah. So what we've done actually, or what we wanted to, to actually implement is how these, how these expectations about the, the, the dynamics of the error cause or are related to feelings to, to, to this embodied feelings. We believe they, they allow a sensitivity. So how well or how bad an agent is doing at improving the grip on what is relevant in the landscape of affordances. So the sensitivity to changes in the rate of prediction error reduction is what we call prediction error dynamics. And we can say the steeper the slope, the faster the rate of reduction. And we see some, some like, yeah, examples, just, just very, very simple. So in, in red, in, in black, we could see the actual error as, as they, as the action is executing. And then we have a slope associated to this error. So what we don't want, what the agent doesn't want is this error increasing having a positive slope. And on the other hand, the error is decreasing. Then we have this slope and this is actually what we, what we are looking for. So prediction errors are manifested as changes on affect. So if the rate of prediction error is faster than expected, we have a positive balance and we have an action policy, which is more precise. In the case of the error is slower than expected or is increasing unexpectedly. We have a negative balance and an action policy, which is less precise. So just, just walking you through a couple of implementations that we have done. The first one is just kind of an example of, of this mix that we're trying to have. The error is used for learning, but we have a very simple implementation of self organizing maps. We call it the self organized internal models architecture. The nice thing on this architecture is that it actually sort of doesn't have to have an inverse model. What we have is a self organizing map that organizes the motor sensory information. And on the other hand, we have a visual sensory information, which is also organized in the same, another self organizing map. And then we have what we call a multimodal representation. And in this multimodal representation, we have associations. We have associations between a sensory situation, another sensory situation, and a motor command. So you could think of this as an inverse forward model pair, but it's actually not encoded as such. So we just have associations between sensory situations and motor commands. So we thought this was very interesting. And we use it, for example, for saccadic control. So the robot has some initial sensory situation, which is the stimulus somewhere in its field of view. And what we need or what the robot wants is to fobiate the stimulus. So this is the sensory situation, the desired one. And we ask this self organizing maps architecture what we need to do. So to bring the stimulus from here to here and it's executed. It's not very precise. So it comes close to the center of the image. And then we use this as the new sensory situation. Then we have the same target. We again ask the architecture what do we need to do. And then it comes very close. So after a hundred runs, you can see that the robot, this is the starting situation. In red, we have the first prediction and execution. And in green, we have the second prediction and execution. So it's a very nice, simple architecture that actually works, as I said before. It works like a forward model, but it can also work as an inverse model. We use prediction error to learn. And so we could use it as some kind of modular architecture. We can put more maps. And in this case, we have the position of the head, visual stimulus, the position of the arm. And what the robot can actually do is find the stimulus somewhere in the space and then bring it to the center, kind of obviated. And then actually bring the arm also there. So we have all these associations between movements of the head, movements of the arm, movements of the eyes. And all these get associated and are coded as initial and ending positions. Okay. So the next question or the next thing we tried to do was how can we use prediction error dynamics to guide learning? And this was this paper we presented a couple of years ago in EpiRub. It was actually a Guido Schilachi that presented it, which is our co-author. So it's a work by Guido Alejandra Siria, which is also a colleague and myself. And what we did there is, I won't tell you much about the maths or the kind of networks that were used in detail. The important part is what we see here. So we have a very simple robot. This is what you could see here. It's a two degrees of freedom camera mounted on a sort of artificial field where we have lots of plants. And the robot moves towards a specific destination. So it wants to look at some image, at some plant. And so we have for each movement, for each goal, sorry, for each goal, we have a prediction error here. So we organize the goals in a sum. Of course, the goals, sorry, are encoded using an auto encoder. We use the middle part of the encoder to have represented the goals here. And the important part is each one of these goals has some prediction error dynamics. And so we go back again to our inverse model and forward model and execute the command, the motor command. And we get, we do our prediction and we get an error between what we wanted and what happened. The interesting part and what became kind of nice and that was what we wanted to implement, what we were thinking about is we append this prediction error to a sort of a buffer. And this buffer, once that it contains more than four predictions, we do a linear regression. And actually what we get is an indicator of the progress. How good are we doing? So it's kind of a tendency for learning. So when we have a negative slope, it actually means we are going towards the goal, we are doing fine. So progress is increasing. It means there is a positive emotion and we remain on this goal. So learning is going fine. When the slope is positive, so the activity is away from the goal, there is no progress, the error keeps increasing. So we have what we could see as a negative emotion. Something that can be encouraged is then to switch to switch goal. So we have a positive slope, means increase the size of the prediction error dynamics buffer. This was one of the... Sorry, that was something of kind of interesting and very new in this field, in this area. We haven't thought about it before and what we actually did is, okay, what happens if my slope is positive? It means I'm doing very bad at this task and what I'm going to do is I'm going to increase the size of this buffer. When we have a negative slope, it means, okay, I'm doing fine. So I'm going to decrease the size of this buffer. So what we are actually doing is adjusting dynamically the size of this monitoring window and we are doing that depending on how things are going with respect to what we are actually expecting. So if the prediction error increases, we have a positive slope and we do a more frequent evaluation of the feedback. This allows a quick correction of the action and it can lead to satisfaction in case we manage to do it better and it uses abandoning the goal. So in this case, after a number of interactions, where the error is not decreasing, the error keeps increasing, then we can change, we can switch goals and we could say we are trying to avoid frustration. So through intrinsic motivation, what we try is search for a new goal. When the prediction error decreases, we have a negative slope. We don't need to be evaluating the feedback so frequently and we can free resources for the agent to do something else. There is no more prediction error, so that means we've achieved our goal so learning happened, learning occurred. Again, we search for a new goal now. So when we select a new goal, we give priority to those that have a negative slope which is kind of steep in the prediction error dynamics and we have some examples here of how the error moves as we are moving in the world and how the buffer size increases when the error increases and then it decreases when the slope now again changes. So that was one of the first things we did and now actually Adam invited us to this special issue that he did in Frontiers and we published there a paper which is actually, well, at the beginning it was about something else and then we ended up with this model presenting this model. This is just an idea that we have which actually encloses this part that I talked about, about the slopes and the expected error. So what we are suggesting here is that I don't know how much time we have if I can go into detail on this let's try something very fast. So we have an agent that has maybe physiological needs in case the agent doesn't have physiological needs through intrinsic motivation, we want to do something new. We want to do search around the world. Then we go to what we call the environmental context which brings us to this field of affordances where there is lots of actions and each action, each task has some expected error dynamics. We go to a task related context which comes from selecting the task and then we do some planning of sensory motor sequences we start acting on the world and we get some error. As we execute this task then we have two types of monitoring. We have the typical momentaneous error that helps us go through the planning and correct the execution of the task and we have a window of prediction error dynamics which is compared to the expected error that this action had and according to that is that we are going to go to these emotions that tells us no, the error is increasing we have this slope here so we go back to another task before checking then if something has changed we still have physiological needs or we don't if the error is not so gravely increasing it's more like going fine then we go back to this same planning to this same action. So it's a very nice model that we thought of it's on the make and we have many ideas from bringing this box diagram into the world and in our idealistic dream what we are thinking on is something actually based on SOIMA we haven't implemented this yet but it's something based on this SOIMA but now we have lots of other modules we have some interoceptive internal model representation exteroceptive model representation this is actually wrong but anyway so in this side we have all the exteroceptive information the interoceptive information and we have some policies and a task and some error this error is going to tell us how we are doing how we can stay on the task if the error is too big then we can change tasks so it's a bit of a mixture between the previous thing I told you and this is how it could look in what happens on top down so when we have a task this task is going to activate some policies and these policies are going down to act on the world we have again some error coming up and this error is somehow coded here there is some monitoring so that we can go on in our policies this is the momentaneous error if the error is very big then we can go back here sorry so this is top down and this is actually bottom up it's actually the error coming up all the way and coding here and this is how we start the cycle with some task policies and everything else that is happening in the world so I think that we can stop there it's clear we don't have direct questions from the audience as I'm not seeing anyone we'll ask you one question otherwise we have no direct questions but we can definitely accumulate them for the round table what is the relationship between prediction error minimization and free energy I think it's just like part of the process I don't know what you mean within the whole thing of whatever you want free energy everything that is happening the difference between the expected states and what's actually happening in the world we always have in active inference or in free energy you always have an error happening in what's happening in what's what is happening in the action in the world so through this prediction error is how we believe it's going to happen like the learning is going to occur I don't know if... yes that's awesome thank you very much hope to see you very soon yeah we'll see you in two hours or so excellent see you soon very much hope to see you very soon alright welcome everyone we are back this next presentation is going to be by Matt Brown real-time robotic control through embodied homeostatic feedback so Matt thank you very much for co-organizing and for also joining to present and please take it away I had a really great talk Bruno I have some follow-up questions for later but yeah thanks for coming and my name is Matt I'll be talking a bit about a long-running research project and I hope you guys find this interesting here's a quick high-level description of the project it's kind of an alternate way of looking at the generative modeling process built around homeostasis from the bottom up this approach is very different a bit of an unorthodox approach in detail about how this works you can probably read it but the short version is based on series of Ross Ashby and his homeostatic and it's a new kind of adaptive model that uses learned via homeostatic feedback through an environment and itself and I'll be showing some demos about applying this to robotic control that I've been working on lately just a quick agenda I'll be talking a bit about the project background where it came from because some background might be useful then I'll be talking about how homeostats build network self-models and what that means and how those function and then I'll be talking about plugging those into environments and how embodiment works and how synchronization functions in this process and then I'll be doing some demonstrations showing this working with robotics yeah so just to give you background on myself I'm a computer scientist mostly I'm not much of an academic I have a few publish papers but not on this particular topic I've been obsessed with the mechanisms of thought for most of my life I worked in the video game industry for about a dozen years and then worked in deep enforcement learning for a number of years and also about 20 years ago I worked in software radio at the Spectrumware project which became Genie Radio that'll be relevant later today I'll be talking about work that's now going on I'll be going at my startup thought for us and talking a bit about the history will help explain what I'm doing I think this started about 2006-2007 with deep learning was kind of new and was kind of the new hot thing I did a big deep dive into it really excited about it but I was in fact quite dissatisfied and I felt that deep learning and this approach of using neural networks deep learning works in natural systems and even in the last few years I feel like we have this amazing hammer with deep learning and everything suddenly looks like nails and I feel like we need to take a step back and look critically at what problem we're trying to solve so for me I was looking for new approaches in the nature of agency and goals goals in terms of what are they and how do they manifest in nature semantic information versus raw information how do raw sensory signals become meaningful I wanted more insight into how time played into this learning process and I was in particular looking for media agnostic approaches not in your own specific how do plants in single celled organisms deal with their world so I started by reading a lot going back in time chaos theory I was a big fan of I ran into Matrona and Varela and Autopolisus and I was really excited about that but it was too abstract for me as an engineer I think to tackle and so I kept going until I got to homeostasis and cybernetics and particularly a cyberneticist named Ross Ashby and I basically became obsessed with Ross Ashby you know to still am to a certain degree and he's not a part of most computer science programs so he's quite well known outside of computer science but I felt is not part of my own education and he's most known for things like the law requisite variety and the good regulator theorem and those will be common themes in the next 30 minutes or so so what I started doing is pouring through Ashby's technical journals recreating his work in a particular device called the homeostat so this is just a quick slide to tell people about the homeostat and Ashby no doubt many people watching this probably are familiar with Ashby and perhaps the homeostat but it's worth going over briefly regardless if you look up on Wikipedia it'll say homeostat is one of the first devices capable of adapting itself to the environment and exhibited behaviors such as habituation enforcement and learning through its ability to maintain homeostasis in a changing environment Ashby viewed learning as adaptation and stability and was described as an isomorphism generating machine and most importantly for me he uses feedback to generate hemostasis via a property called ultra stability so I'll be talking about that here there's a description here from one of his books about it but it is quite tricky to reproduce I had to go to his personal technical journals and lots of iteration before I got it working the key for me was ultra stability which is a very strange kind of property but it is the individual node property within this four node homeostat that enabled this general property this group property of homeostasis to take place and it's part of the function of how whoops let me go back it's part of the function of how the homeostat works and it's in the property implemented by individual nodes using a simple set of rules that gives rise to group homeostasis it's comprised of double feedback loop where like the low level feedback loop performs like a linear transformation and then a high level feedback loop modifies this linear transformation and it's designed to seek equilibrium meaning output of zero which is you can if you think of this to each of these nodes seeking equilibrium of a state of zero every choice of a linear transformation is a prediction of a type and so the result of this linear transformation at every moment accumulates prediction error as it seeks a zero prediction error so it's kind of an interesting goal driven process that works through multiple group process this is just a more in-depth description of the homeostat basically constructed of four individual ultra-stable nodes and the network as a whole creates an adaptive dynamical tractor set as a self-consistent reinforcing self-model, ultra-stability powers it's very stable space exploration through like the law of represent variety and can be seen as a network of reciprocal constraints this is just an interesting letter from Alan Turing to Ashby back when they were members of the ratio club and Ashby was getting some notoriety Turing basically disagreed with Ashby's approach and this letter here he suggests that Ashby simply simulate his homeostat in his Turing machine and while true I think this Ashby was taken aback by this because it kind of misses the point at the time the debate was all about analog versus digital computation and what was useful to the war effort was most critical but there was a bit of a conflation here I think in terms of what Ashby was trying to create which was something more along the lines of universal adaptation or universal cognition maybe versus Turing's universal adaptation and you know I feel like this conflation of issues still haunts us today with deep learning and whether or not they're intelligent so how do you build them so essentially I took Turing's advice and simulated in particular 20 years ago as part of the spectrum where projects which you know kind of pioneered software radio which is now part of called genius radio and so I kind of stole methodologies from this approach where I created the homeostat as a digital simulation of a continuous analog system or device and so that's kind of the approach I took I started by pointing through Ashby's technical journals and experimented with different implementations and approaches of his direct analog machine once this was functional it was simple enough to abstract down to very simple kind of minimal process once it's functional you can start taking pieces out and see what breaks it and what doesn't and eventually this effectively simplified down to a dynamical attractor definition for ultra stability that could be connected into arbitrary network topologies and the network as a whole can be kind of seen as a self model each node is trying to predict its neighbor as it seeks equilibrium and the local ultra stability tunes nodes local connections and the resulting positive and negative feedback loops that it is personally a part of and ultra stability tunes these as a group of these overlapping feedback loops such that they've reached and holding a static equilibrium and that means that the local prediction community prediction error drops to zero as well as well as the output from each node and these overlapping loops become self-reinforcing and self-repairing and it's this final self predicting set of loops that maintains a self model at homeostatic equilibrium this model converges and considered self consistent it is composed of these homeostatic feedback loops that maintain the network at a critical state meaning that the network is highly sensitive to prediction error and mean the smallest prediction error can trigger global structural changes amongst these feedback loops and this process can also be seen as synchronization which I can talk about a bit later so let me show a quick demo I'm going to skip the original homeostatic here and I'm going to show a quick demonstration of what this actually looks like for a 20 node homeostatic it takes a bit longer and it's a bit more demonstrative so let me switch briefly here and apologize for the delay I'll get this up cool alright so let me just describe what you're seeing here you're seeing 20 single dimensional graphs this is the accumulated local prediction error at each node of the 20 node homeostat you can also think of this as one 20 dimensional dynamical tractor or 20 single dimensional dynamical tractors these are also considered as phase space graphs for each of the nodes so what you're seeing here is I have a pause I'm going to move it along slow this is slowed down on purpose and what you'll see is they start off very chaotically and you know what happened is a couple nodes will start stabilizing then more will start stabilizing and then eventually the entire network will converge to zero prediction error now this is unconnected to an environment so it's just predicting itself one thing I like to do here and I don't know how many people else are going to find this interesting I want to show a little in-depth look at what this final convergence and collapse to zero looks like so what I'm going to do is I'm going to changes to auto scaling the graphs meaning that as it goes to zero you'll see the graph ranges drop and what you should see is this usually there's a pattern forms amongst the output nodes that is kind of consistent with every drop what you'll see is it's kind of hard to see with 20 nodes especially I've gone a little too far we're already at e negative 20 here but what you're seeing is you're seeing the 20 dimensional drop to zero and there's kind of like a cyclical pattern to this and every time it goes to this pattern it drops down another order of magnitude and this will go all the way down to the floating point error of my computer which is about negative 46 I believe and it basically fails to function at that point because it can't tell the difference floating point error can no longer function so and the whole thing kind of falls apart there but that kind of shows you a bit about the process let me go quickly back to the slides so yeah that just kind of showed you a slow down version of the 20 dimensional homeostat and I want to show the 20 dimensional because it happens a lot slower and it's a little easier to see what's going on with four nodes it's almost instantaneous and it's hard to see the progression okay so that seems like a lot of work for a model that doesn't really do anything and isn't connected to the environment so you know we have this model that can adapt this internal structure to reach homeostatic equilibrium through it's kind of a self synchronization process how do we use this to drive behavior and you know this next step took me a few years even though it's kind of conceptually simple but don't worry it'll it'll get complex really quickly the short version is sensor the motors kind of define how the agent is embedded into its environment and the network topology defines the adaptive capacity of the homeostatic agents model sensitive definitions provide a mechanism to influence the behavior of the system by providing priors in the form of preferred environmental states these act as kind of like TLA dynamic priors externally defined dynamic set points for the homeostatic adaptation the motor definitions provide simple affordances for modifying the environment that provides the basis for future sensory predictions the preferred states of the sensors become the first outcomes of the motors and the model's behavior is biased as as desired this is probably most people on this active inference symposium are probably familiar with this idea this slide is put together for the benefit of people who are kind of familiar with traditional deep learning and neural network approaches to contrast how these networks function differently because it's a bit hard for people to get their head around the first is probably the most obvious there's no back propagation here only ultra stability which is kind of a local rule this leads to huge sample efficiency the learning is very structured meaning you don't have to diffuse learning across thousands or millions of parameters you only have to model you only have to update the part of the model that is mispredicting or is part of a misprediction the other thing to notice is that this is not a temporal most neural networks and deep learning networks are kind of disembodied a temporal processes this is very much a temporal process you know signals take time to move from one node to another which makes it inherently the whole thing very temporal the resulting temporal relationships are important actually spatial relationships of sensors and motors end up getting encoded into relative temporal relationships within sensory signals and also vice versa signal timings of the propagating signals within the network can translate into different physical spatial relationships amongst the output motors for example or the input sensors so there's a relationship between temporal location relative timing of signals and the spatial location of sensors and motors and the physical embodied agent just to kind of push on that a little farther the different regions within this larger homeostatic network will then be sensitive to different sets of motors a sense of sensors based on their physical relative location and by contrast deep learning, deep reinforcement learning deep reinforcement learning for example is an attempt at adding temporality to an otherwise atemporal static deep learning models the other way to compare these two is deep learning models are generally trying to be universal function approximators in where this is much more generative and inherent to temporal the very learning is very very different and just to expand a bit more on the topics from the previous slide the network diagram here on the right is very oversimplified network and it's just to mention visually explain how to think about some of these networks there's no forward or backward no front back top bottom only kind of relative location from other nodes and from sensors and motors perhaps more relevantly and it is common for people to look at the learning process as a sequential flow of processing like sensing, proceeding, then acting or planning, then acting and instead you have to kind of think of this as all happening at the same time emerging together as kind of one whole perceptual motor system not a traditional sandwich model time simply advances and we simulate the analog systems as signals propagate across the network and so you don't get input from the sensors calculate the network and get out from the motors you send input to the sensors you get out from the motors and those motor actions are basically based on the generative models prediction of what it should be doing already before having even sensed the world so what's interesting here from the model point of view in terms of how this homeostasis works is the network's homeostatic feedback loops come to be dependent on the expected sensory signals meaning that the the sensory signals become entrained in the homeostatic self-maintenance processes which kind of naturally makes it grounded in the embodied experience this homeostatic self-maintenance process is composed of the environmental signals themselves as part of its predictions and expectations expectations and predictions for the consequences of motor actions are embedded in the signals sent it to the sensors from deeper in the network like on the right here and they're sent to the sensors where expectation meets reality and prediction errors cascade backwards and modify the internal structure of the model as part of this model update and then motor actions are accompanied by these parallel sensory prediction signals that flow from the deeper in the network the actions taken at any moment are not based on the latest input but based on predictions driven from deeper in the network from the same places that the sensory expectations are sent from this may be familiar to those who are familiar with predictive processing or perceptible control theory and the idea here is that where the sensors and motors meet the network the network itself is trying to make those local prediction errors zero meaning it's trying to anticipate the actual sensory experience through kind of inverse modeling so another just kind of quick look at how to look at this homeostatic process is through synchronization this process can be seen as generating an adaptive synchronization manifold between an agent and an environment around minimization of prediction error this is kind of looking at synchronization as prediction you know when a system when two sensors are synchronized they can be thought of as predicting each other anticipating the other the other's motions and individual nodes using ultra-stability are using ultra-stability to learn how to predict their neighbors and when equilibrating these nodes are kind of synchronized through these feedback loops and the synchronization spreads from individual nodes to whole network synchronization and ultimately out from the motors and back and through the sensors in a synchronization manifold between the agent and environment to say it another way the overlapping feedback loops interact and synchronize with each other as part of this homeostatic self maintenance and as these feedback loops extend from motors through the environment to the sensors the model gains the ability to anticipate the consequences of its own actions and the capacity to synchronize internal states with something in the external world the synchronization means that internal states will come to resemble the internal states of the other this is kind of along the lines of the good regulator theorem when at this synchronized homeostatic state it's also in this critical state I've mentioned this earlier where it's stable but it's sensitive to local prediction error so they meaning that the model this critical state is maintained as long as local prediction error is maintained within a certain threshold but otherwise the smallest prediction error can trigger global structural changes within these feedback loops in order to better predict the future in order to maintain the synchronization network must be able to converge to equilibrium faster than the environment can destabilize it and so there's network update rates where we have to maintain this kind of fast movement and this kind of is in line with the law of requisite variety where we have to make sure that we can explore state spaces faster than the environment we're attempting to control and as long as the homeostatic network can reestablish the stable feedback loops faster than this synchronization manifold will be maintained and synchronization is kind of an interesting thing especially in the context of robotic control because you know once kind of two elements are synchronized you know let's say you have a subnetwork that's synchronized and you know two nodes that are not directly connected can end up coordinating without any kind of communication between the two because they've been previously synchronized their behavioral end up being correlated as well and in case it's interesting to think about you know what is the structure of these kind of feedback loops and this you know generative model and the way I like to think about it is a dynamic holler key meaning you know a hierarchy is kind of like you know a top down construction but you know a dynamic holler key is more like a bottom-up construction where the parents are composed of the children and dynamic in that as the children change their own self definitions the parents are likewise changed so it's kind of constantly shifting and changing over time as the children redefine themselves and the structure is very useful as a generative model as well as a small number of individuals to you know kind of reshape the hierarchy very quickly as it's part of an ongoing dynamic process cool so I'll switch over and do some quick kind of demonstrations showing how this ends up you know why would you actually want to do this you know yeah why would you actually want to do this especially in the context of robotics so the first thing I'm going to show is let me just share here quickly this is the demo I put together a couple years ago actually let me let me shrink the screen a little bit so it's not quite so much to share this was put together a couple years ago to kind of demonstrate you know why would you do why would you do robotics like this you know what is the point and what does robustness mean and what does additivity mean in the context of robotics so hopefully you can see now my screen this is just a simple modification of an OpenAI gym called Reacher and what it's been modified to add a single texture joint here and the reasons will be obvious here in a minute but this is just a simple task the model has to get its into the target position and this is using these homeostatic models here but here's what's interesting I can do and this model hasn't seen this situation yet I can disable the outer motor for example and it will basically on the fly figure out how to achieve the goal you know just by updating its internal model and saying oh this motor doesn't work anymore let me modify my model of the world I can turn that back on and he'll start using it immediately or it will start using it immediately I can do the same with the internal motor it can turn that off and so oops I did not turn it off there we go now it's off yeah so and it just kind of figures out okay the inner motor I have no longer have access to let me update my model and I can again turn that back on and it'll start using it again so this was just kind of a simple demonstration I made a couple years ago to show why you would want to do robotics this way real-time adaptation to unexpected situations due to the the generative model that's constructed this way now let me just scoot forward a little bit to more recent work and hopefully the frame rate won't be too bad over zoom let me just shrink the window a little bit in hopes that helps okay let me share this the frame rate just feels a little rough over zoom here but this is all just running locally on machine so this is something a little more recent a little more complicated we made the goal a little more complex and we've used a full six degree of freedom arm here from like a this is actually a fetch robot mobile arm but something a little more realistic than like a toy problem and I'm just you know periodically here retargeting the desired angle for this valve and so this is the sort of robot that turns valves and what I've done is that I can periodically change the set point for it's you know where how it sees the world basically you define goals by you know defining preferred states of the world and then the homeostatic model basically figures out how to control the robot to to effect the you know the state of the world that it wants I'm hoping here every 30 seconds it will randomize the valve shape the square one here is the simplest one but let me add some motion and random orientation the model has not seen this before either so it just kind of learns on the fly how to deal with this kind of moving shape as I do it I can also do the sinusoidal motion here so imagine it's on a floating platform where the rotation and the position are kind of moving through space here we go now we got something more interesting so now we have it still moving through space it's a circular valve here something very little harder to turn and what I'm going to do is I'm going to make it very slippery so imagine I've just poured oil over it so now it's having to deal with a really really slippery valve here that it has to turn and it still manages to do it even though it's really hard but you can get the idea here is you know if you do the generative model in this kind of sample efficient way you can kind of get natural you know adaptation to whatever it's kind of experiencing in the moment here so I think I've kind of I think this is maybe I maybe I'll do the random motion again maybe that's interesting there's all sorts of stuff you can kind of throw at this and kind of deal with it I apologize for the frame I'm going to blame zoom for that so cool all right good I don't think I have too much left but you know next steps are basically improving automation tools I'm working my startup is basically developing this for real-world use in adaptive situations where you need fine motor control and kind of dexterous object manipulation in uncertain environments you know it's on the technical side we're looking at you know scaling up goal specifications and topologies which are related as well as you know deeper temporal horizons in both directions planning and ahead and recall but yeah that's about all I had for today and I look forward to the questions answering the roundtable little bit if anybody has questions now I can talk to it as well I'm a little I went a little fast I apologize I'm a fast it was great just maybe one preliminary question what settings do you see these kinds of implementations occurring in first and then the other question in order if it's your preference is how do you see the homeostatic network related to the analytical first principles foundations of active inference as we know it today yeah no those are really good questions and I you know I I didn't talk much about active inputs because I figured everybody else had kind of done it pretty thoroughly use cases first your first question use case we're looking at are things that are just beyond the ability of current robotics the idea here is the software could be put on you know any old robot and kind of provide you know adaptive capabilities for certain things you know we're pretty open-ended in terms of what we're looking at in terms of use cases right now our current uses are in like energy and manufacturing particularly this is a fair amount of stuff that still has to be done by humans that could be pretty easily moved into robots if they had you know a little bit more capability and then in terms of how does the homeostatic networks kind of get into the active inference framework in general and I kind of test on it a little bit in terms of how this these ultra stable nodes work in the framework of homeostasis if you kind of think of homeostasis as the network trying to seek global equilibrium what this means from the ultra stable nodes point of view it means that it's it's local output state is zero and that local output state is the result of an accumulation process of this linear transformation so the idea here is this ultra stable node what it's doing is it's doing a search it's doing a search through what are the right linear transformations that make my local state go to zero and so in that context you can kind of think of every time the the ultra stable node updates its local linear transformations this is updating its local model of the world and making a new guess about how the world works and whether or not that's useful for the purpose of global prediction whether or not it makes that local value go to zero so there's there's a lot of threads here in terms of expectations and and you know prediction error flowing through the network but it's a much more distributed process like it's and it's much less clear like what each node is is what part of the model each node is taking place because you know each node in the network when it's changing its linear transformation what it's actually doing it's slightly redefining all the subnetworks in the network that's in all the loops that flow through that node it's making a small change too so each node in a certain way then has effect on all the other networks that are connected through its feedback loops and all those other nodes also have impact on its signals that are flowing through it and this is a reciprocal process that kind of builds this generative model I'm not sure if that's particularly helpful yeah that's great if I could make one more comment and question then we'll bring Adam Saffron on in just a minute or the letter that you showed was quite interesting and I got the sense of this like multi-generational titanic clash between what you described as infinite computation in the discrete setting with the Turing tape and then infinite adaptation in the continuous setting with the generalized cybernetics and so I think that's a very fascinating framing because what do people say about computers and continuous time systems we're going to have to discretize and so the implementation is stepwise and that's what allows us to like actually implement it on hard drives and CPUs and so on with the Von Neumann architecture but then also in the background or like even the water that we swim in is this continuous time the real time unfolding of perception cognition action outside of the sandwich model outside of the discrete time yeah I really like to pick up on that I wish I was more qualified to speak on such topics I'm a computer scientist so I don't want to speak too far outside my field but yeah I think you hit the nail on the head of my gut instinct on it all right we'll take just a short break and then come right back with Adam Saffron all right welcome back everyone we are continuing on with Adam Saffron generalized simultaneous localization and mapping G-Slam as a unification framework for natural and artificial intelligences so Adam thanks a lot for joining and please take it away thank you Daniel so hello everyone I'm Adam Saffron I am a research fellow at the Johns Hopkins University School of Medicine at their Center for Psychedelic and Consciousness Research and today I will be discussing a grand unified theory another one but before I do as was previously mentioned and as is probably of interest to people watching this I recently co-organized a special issue of Frontiers and Neuro robotics with Ines Cipollito and Andy Clark most of the submissions are already in for you to read and that will be closing up soon there's also another special issue that I am co-organizing with other active inferences and custodians for royal society interface focus on the subject of symmetries in mind and life broadly construed ranging from symmetry breaking and dynamical systems to a gauge theoretic formulation of the free energy principle this is actively soliciting contributions and so please contact me if you have anything along those lines so in this work throughout all of it my journey I've been trying to understand the basis of autonomy and biological and artificial systems do we have free will how does that work could we build autonomous agents that work like we do and have our capacities these are the kinds of questions that have motivated me towards this end I have been working on some fairly ambitious projects such as a theory of homelessness that tries to bring together various theories within the free energy principle and active inference framework and also models of free will in terms of the micro mechanics of agency across all of this work I take what I've called a Marian neuro phenomenological approach or a Neal Seth calls a computational neuro phenomenology which I think is a better name and roughly the idea is you take the core aspects of experience seriously as fundamental things to explain and then you cross reference this with a multi-level functionalist handling or a Marian handling where you can simultaneously analyze the system on computational or functional levels with the system what the different aspects are for their their adaptive significance with their the function they're serving this algorithmic level the abstract way the specific programs and operations by which this is achieved and the implementation level or the physical realization of these and so the idea is you take this multi-stack understanding of cognitive systems and you cross reference this with phenomenology taking experience seriously and this is my general approach and active inference with this associated process theories basically checks boxes across all those levels you have the free energy principle you have active inference and you have predictive coding and these various claims of different degrees of specificity really helped to flesh out this mutually constraining multi-level account of cognition but more recently I have been collaborating with roboticists and here are two particularly excellent biobots Tim Verbalen and Ozen Katal and along these journeys we encountered each other and there's increasing interest in machine learning and artificial intelligence and things like artificial consciousness you'll have people like Ben Geo talking about system to cognition and more recently even Lacuna has been starting to take these things on with his JEPA architecture talking about world models of different kinds and how they might serve the functions of artificial consciousness but for my collaboration with Tim and Ozen we've mostly been focused on the specific problem of navigation specifically a problem known as simultaneous localization and mapping roughly the idea here is that where am I in space and what kind of space is this this is a fundamental question for any active inference system any cybernetic system but there's kind of a problem here in that you're trying to map out the space and situate yourself in it in the same time simultaneously but to map out the space it helps to know where you are in the space it helps to have a good map of that space and so there's various proposals for different ways of bootstrapping yourself to degrees of certainty of what kind of maps or models are adequate for situating you in the world in a particular location and this is going to be important whether you're a robot navigating through the world or an animal foraging for value you got to know where you are to know what to do so more recently in this collaboration which I've really found to be amazing because I just I'm an awe of robotics and what they can do it's kind of like that Feynman quote of what I cannot build I cannot build I do not understand well they live that that's just what they do all day long they're like introspecting how do I work they're going into theory and then they're actually building a system in this back-and-forth iterative process and so the collaboration here was I'm looking at you know what ways can biological systems and specifically focusing on the hippocampal system what ways can these inform navigation problems and this more recent paper that I'm going to be focusing on more today called generalize simultaneous localization mapping or G slam we're reversing the flow a bit and the ideas and more than cognitive neuroscience informing robotics it's looking more to robotics to inform cognitive neuroscience basically leveraging the precision they have with characterizing these problems and the way they're in touch with the ground truth of engineering and physical moving systems in the world using this to inform cognitive neuroscience and specifically the claim is that this slam problem is fundamental and that it may have structured a surprisingly maybe shockingly broad range of cognitive processes and that this might be a fundamental a source of fundamental principles for understanding how high level cognition was achieved with high level put in some scare quotes but the idea is the things that humans seem to be or animals seem to be particularly capable of doing relative artificial systems and humans in some ways even more so and the properties we want to recapitulate in artificial intelligence and machine learning so some precedent for this came from work with rat slam a seminar work by Milford Wyeth and Precer so in this they look to the rat in this hippocampus and look at its way finding and navigation abilities and try to basically reverse engineer these there's a really excellent youtube video that I'll post I've watched it countless times which just summarizes this process of building up rat slam from like these initial foundations of the ambition and folding in more and more details finding this isn't quite working going back to the biology going back to engineering and then actually showing systems that do the same things as biological systems inspired by those systems it's extremely compelling it kind of like every time I watch the video I feel like I get something new I wonder is are these the steps that nature took and evolving these systems and also kind of what have I been doing with my life all this time like why didn't I find roboticist soon or started talking to them so I'm very grateful to be part of this symposium Layton and very grateful for Tim and Ozen and so with their work with Layton slam what they're doing is they're tackling the slam problem using active inference I'm not going to go into all the details here but some of this was discussed there's parallels with some of the architectures that were discussed previously and Tim touched on this so you basically have an agent moving through the world that has a variety of views of what it's expecting to see and poses and this experience map is a trajectory of the agent room space and time and then here would be a generative model description in the middle of this where you have these conjunctions of poses and views which are unfolding in this series of transitions adaptively sculpted via your policies but where there's this upper level which is basically organizing this as spatial temporal trajectories situating you in some kind of map or graph of space and this conjunction of pose and view one of the places I found to be compelling is that I've arrived at these basically the primary modalities I focus on just from looking at the systems neuroscience but this happens to be the primary things that are focused on for helping a robot to move through the world and pose and view basically for neuroscience I focus a lot on systems such as the Precunius as potentially enabling something like a mind's eye and the lateral prior cortices as something like a lived body and that these would couple very closely and that would make some sense since your pose would inform your view and vice versa but there's another detail you need for this to be an autonomous system and adaptation which is not just like where's my body and what am I seeing but where am I in space and where do I want to go relative to the world and the various things that I believe are in the world how do I pursue my goals in the world and so enter the slam problem but what's built with latent slam this is a very impressive architecture some details are described below which all these things governed by a singular objective function where the agent is able to not just make its way through the world but also it's this powerful self-supervised learning curriculum as you're moving between views and pose and landmarks each one providing a source of predictions for the other training up the other helping you to get a grip on the world in terms of slam so this like broader notion of g slam or generalized slam this would be a way of thinking of high level cognition I'm particularly interested in these two operations one's called loop closure and the other's graph relaxation slash node duplication I guess that's three but the idea is as Tim mentioned when an agent finds itself in a situation where its pose and view are highly similar to something what was previously encountered this affords a potentially unique opportunity you now think you know where you are in space and so this is a really good opportunity to update your experience map and so this coming back around it's not just a good opportunity in terms of you have high confidence but it creates a closed system so you closed a loop and so you basically have these different equilibrium points in this graph which can be thought of as a map also but basically because they're all chained together these are sometimes modeled as like energetic spring systems and they're all mutually informing and constraining one another and so when you find yourself with a loop closure event where you're in this highly familiar state you then take this as an opportunity to refine your map and so you will do a very fine if you're within a certain margin of error of a location if you think you really got it you'll then take the overall map and relax and you'll basically move around the various dependencies of different nodes and space, the different landmarks to adjust them and have each one refine the other and form the other however if you're past some threshold for similarity and it looks like you're close but not quite there, you're a little bit different if you're surprised then you'll duplicate the node and then you'll create a new landmark and so now you'll have a new graph and so this is basically a kind of structure learning and there's a lot of work in Bayesian cognitive science on and with an active inference a lot of open work like how do we effectively do structure learning for handling complex domains and I'm suggesting and I think I know some hopefully would agree especially because we're writing together would be that this provides a principled basis for doing structure learning what's interesting here though in this diagram that Tim made is that as you're mapping out this warehouse here if you set these thresholds for identifying a node differently if your graph relaxation slash thresholds are set differently you get very different models or maps you might get very different structures or if you will schemas or scripts that's not the frame in terms of the slam problem but the claim here is that basically these the hippocampal supposed place fields provide a basis for structure representations many of which have resemblances to the kinds of things that were hoped for in good old fashioned cognitive science and a neuro symbolic AI and so some of and part of what's hoped for is some of the aspects of potentially uniquely human cognition high level cognition high level require some sort of representational scheme but if you set these parameters but if this is the mean by which you arrive at representations and if these parameters set differently could give you wildly different representations these would have very different impacts on the kinds of minds you might have potentially including even things like cognitive spectrums if you would apply this to a biological domain and so there's some notion that for instance you could even potentially think of these parameters for the hippocampal system which are maybe evolutionarily were originally laid down as parameters for a slam problem for an animal finding itself in the world but where the continued operate in terms of the mechanisms of hippocampal and entorhinal plasticity that these if they are parameterized differently in different people could give you very different kinds of minds and this potentially has very the significance of this might be difficult to overstate in terms of characterizing human difference these might be some of the most important variables you could look at for saying how people differ in the way they relate to knowledge in the world and not just clinical consequences basic science consequences maybe even helping to explain some of uniquely human cognition some of the things that help to get symbolic reasoning and cumulative culture off the ground there's other proposals that are kind of similar to this mad dog navigation perspective or slam perspective Jeff Hawkins out of Mementa has a proposal he calls a thousand brains theory technically it should be called something more like a hundred thousand brains theory where the idea is that there's a common cortical algorithm carried out by every single cortical column of doing this object modeling and navigation of the kind that's described with the camplin and rhino system I find aspects of this to be compelling but also very mixed feelings and I can talk about that later with anyone who's interested there's another recent proposal in this spirit by Chris Fields and Michael Levin where they're basically characterizing morphogenesis as cells engaging in a kind of way finding navigation process of where they ought to be in this synchronization manifold of the phenotype and so they're all finding their place as Carl and I say like singing from the common hem sheet knowing where they are but as they're synchronizing they're moving around to find where they are this unfolding geometric melody that eventually becomes the phenotype of the organism but the idea is that this intelligence of way finding at the cellular level many of these mechanisms may have been repurposed and recycled and deployed differently for overt navigation and that this is a frame for intelligence more generally I find this to be extremely compelling although what I'm doing with this work is I'm focusing more on the hippocampal rhino system as a source of specific adaptations with specific properties and a major transition in evolution potentially also with some connection to things like Ginsburg and Geblancas major transition markers and unlimited associative learning they have a lot of emphasis on the hippocampal system and its homologs which is something that I'm only beginning to look into in the insect insects with the central complex and the mushroom bodies and the way they handle navigation I think cross referencing the mammalian version and the insect version would be really invaluable and that's a major to do that I'm hoping Danny will help me with so some other precedents would be in terms of this idea of generalized navigation that this would be a powerful frame for understanding cognition some older work with Hasabi and McGuire they found interestingly that hippocampal patients not only are they impaired in episodic memory but they have trouble with episodic imaginings of counterfactuals of novel situations and so they talked about this construction system of this brain, this core system for memory and imagining allowing for various forms of sophisticated modeling and creative cognition and this seems to have been part of what basically gave Demis the confidence to go and found deep mind and this is still a core aspect of what they're doing there and the race is on for reverse engineering the system and the race is heating up and some really excellent work would come from Timothy Barron's group I believe he's still at UCL they're showing like for instance there's an architecture called the Tolman Ikenbaum machine which I strongly recommend checking out that's active inference compliant as a realization of the functioning hippocampal system they don't focus as much on navigation although it can be used for that and that's part of it I'll come back in a second for the differences here but in this work one thing of note is so they're showing basically people categorizing these stimuli where you have these birds with different length necks and there's a kind of morpho space in terms of characterizing the features and their various dimensions and basically they're showing hippocampal slash entorhinal like representations grid-like representations being involved in helping to map out this feature space and so this is one example that's very commonly cited of spatialized cognition of something that might not seem clearly spatial but then the idea of G-Sign would be once we've spatialized it then to what degree in our sense making is it actually kind of navigation through the space and so this process of spatializing and navigating through the space simultaneously I would call that a slam problem and I think a lot of cognition can be fruitfully framed in this way and I'm going to go a little further so here's the Tolman Eichenbaum machine and he's showing different I don't know it's his face covered by the thing I can't tell well there he is so his work is unbelievable his group but different things like relations among people within hierarchical tree structures of their relations doing things like transitive inference of one property related to another in a set of dependencies but basically using the hippocampal system's properties to navigate and manipulate these spatialized representations there's other work from DeepMind there's this other talk highly recommended by Statchenfeld at all at the main conference unbelievable talk talking about the recent work from DeepMind to reverse engineer the hippocampal system play cells and the grid cells of the entorhinal system as allowing for a variety of properties very similar to Barron's work and they collaborate together but one thing that's interesting about this talk is it makes a point that this isn't just for tasks that are like physical space this isn't necessarily spatial I might challenge that a bit and say that we should basically always have a prior of looking for the spatial properties of any task domain and then wondering to what degree can we frame this as a slam problem and I think there's maybe two reasons for doing this one is that basically putting things into a common framework helps to draw analogies across seemingly heterogeneous domains and this can be a source of insight in terms of a common representational framework for sense making gives you the ability to have creative combinations from seemingly different domains but the other reason is the hippocampal system like this was specifically probably what it was selected for this is a mapping system for animal foraging through value through various spaces and this isn't just evolutionary but this is also developmentally and ongoing this is an ongoing problem we have not transcended this we are still in space we still constantly have to move through space and situate ourselves through spaces physical spaces and also conceptual spaces so that's part of the reason I'm really emphasizing framing because the hippocampal system will never lose this job description and this the idea is that understanding the ways in which it's parameterized specific operationalizations I don't think that's a word it's essential to keep in mind this ecological significance and so this is all within the spirit of I guess a broader view on cognitive science called ecological rationality which is go back to the origins and try to understand it's Tim Bergen's quote nothing in biology makes sense except of the light of evolution take that very seriously and run with it one other thing that's so alongside one thing I think you get is connections one thing a G slam perspective gets you is connections to foraging theory and so you know if you're thinking of an animal going through the world trying to extract value resources are often patchy and so as you're moving through the world you might be balancing exploration and exploitation if you find a patch might be good to exploit that for a bit if it's particularly juicy but then as that patch dries up maybe it's time to go explore and then you want to move between adaptively move between phases of exploration exploitation staying longer in some places and then moving to other places and so these jumps other places like when a patch starts to dry up and these are sometimes known as Levy flights and this is playing actually into some of my work in psychedelics informed by some really intriguing suggestions from Matt Shine's group the idea is that one of the mechanisms impacted by psychedelics might be potentially facilitating these kinds of Levy flights where you can think of more creative cognition as involving more exploration more broad associations and there's all and foraging theory it's extremely rich and well developed there's all sorts of different modes of foraging that could be thought of as different modes of cognition there's specific hypotheses and connections to formalisms like the marginal value theorem so you would have like a hypothesis like when do you leave well in the marginal value theorem it is you leave a patch or when do you go and try to find a new you leave a patch when the average when your current estimated value drops below what you think the average rate of return should be so this then you know basically like you can now characterize people where are they relative to these different normative models and this idea maybe has an even older vintage or maybe newer relative to evolution but old relative to discourses in terms of the art of memory and the method of loci memory especially before we wrote everything down or when writing things down was expensive and even now to have something in your mind where it could be at hand where you could retrieve it a well curated set of knowledge it's essential and so one of the best tricks that were discovered if you actively intentionally spatialize your knowledge you actually create a physical place that you visualize and you move through it and at each place you at each point in this space you've placed different things you want to remember and part of the reason this likely works so well like almost certainly is this is you know the core of memory in the campus system is actually involving a process of it is a spatial mapper that's something I would argue there's connection to some other more cognitive science I'm not going to get into right now but like multi-dimensional scaling where you understand potentially complex domains by mapping them onto a simpler and potentially more cognitively navigable space and then I'm not going to get into this right now but actually I will so real quick aside with respect to multi-dimensional scaling one of the early things that got people excited for it about it was it's potential use for analogical reasoning or establishing similarities between domains it's a very important thing to know like how similar is something relative to something else like should these things be placed in the same category or you know it's and one way of doing this was saying what is the distance in this when you do multi-dimensional scaling and you place something in a feature space what is the distance between these between different things and the further apart the less similar they are but there are other models of analogical reasoning and there's another race on to try to figure out how we do analogical reasoning and so some of these proposals you know they would go on beyond something like multi-dimensional scaling but they would involve specific structure representations but then we have a question well what's the ontological status of such things do they actually exist in the mind so we do actually have representations or maybe these things are more like they're virtualized or inactively realized or implicitly I suspect they probably we probably many of the kinds of structures you know described in good old fashioned cognitive science might not be biologically plausible but they might be surprisingly biological plausible if you actually have a system capable of adaptively constructing graphs based on your ability to extract value from these graphs and situate things relative to other things and so it's possible that some of analogical reasoning and even causal reasoning could be unlocked by having a good means of creating structure representations and one of the things the campus system seems to be able to do is create these graphs where the different place cells of the campus can be thought of as nodes and so if you duplicate a node you are now basically doing structure learning you have you're complexifying this representation so this comes into my work in other ways such as models of goal oriented behavior I'm not going to get into too many details right now but here would be the campus system and you see based on work of people like Reddish and also like Sam Gershman has a successor representation model but basically you'll see these predictive that campus is a predictive map where what's being predicted is where you'll see these sweeps of activity that will proceed in front of the animal and then which will predict which choice will do, what arm of a maze it might go to and so the idea is that the campus system is the top of the cortical hierarchy and that any prediction errors that are not handled elsewhere end up get temporarily stored in this volatile memory system which is also encoding these trajectories or these series of equilibrium points of state transitions and that basically you have prediction errors that are not handled elsewhere, make their way there get temporarily stored and you can have what's sometimes called semantic pointer architecture where basically as you're moving as you're stepping through these various equilibrium points you can then unpack this as estimates of system and world in terms of operative policies and actions and what you expect at different points along these different trajectories and so here I'm focusing on moving through a physical space in this case making T but this is I would argue this is also part of what we do when we navigate conceptual spaces that we are deciding what branches do we go down to what degree where will we find what kinds of value and that this is a similar operation using similar procedures from common neural processes more recently I've been trying to extend this to models of volition including free will and let's see Daniel how much time do I have left I'm sorry 10 minutes okay great so this is less I guess explicitly slam-framed but still hippocampus at the center so here I'm trying to this is a recent piece preprint form which I'd love feedback on but basically the idea is as you're that the present moment of experience has a thickness to it this is sometimes called the specious present or the remembered present and that it seems to vary at the minimal thickness of a moment of sense-making seems to be about a third of a second and the upper bound seems to be about three seconds and that this seems to correspond to an epic so you basically can so the hippocampal system can whenever you enter like a room it'll tile that domain with a certain degree of granularity will create these hexagonal tilings of that space and then within there that's where you'll have these different attracting attractors these different trajectories play out orchestrating the rest of the brain in terms of its dynamics to pursue these various goals and so the one way you have to work with in terms of the the thickness of the different rollouts for sophisticated inference would depend on partially the shelf life of this set of attractors before you have to refresh them in some way either set down an entirely new set try to recreate the old one or prevent the remapping and this will be related to some of what was what was just described with air dynamics in terms of how good of a grip do I have so let's say you have like a poor grip on what's happening and your prediction area is going up this is not a good situation for you that might be a good opportunity to stop hold and catch fire re-tile space in a new set of operative policies for sophisticated inference and so here what I'm trying to do is show that different levels of agonism of these serotonergic receptors involve the psychedelics 5HG2A receptors are influencing the stability of these sets of attractors and the vividness with which you are doing these imaginings of rollouts of actions into the future and here it seems that what you could potentially do is describe some of a dose response curve for something like psychedelics where as the dose increases the extent of the rollouts become greater you've stabilized them and imagination can become more vivid and influence your policy selection more because you have more confidence in what you're seeing and so sophisticated inference your imaginings are contributing more to your ongoing overt action selection up to a point but then at a certain point the idea is that you keep dosing the animal or maybe the robot and it enters more of a creative dream-like regime where it starts to lose coherence and you see the extent of these rollouts of policy selection decreasing things are becoming more vivid but less coherent and this itself could occasion error and potentially re-gripping in this model and so the idea though is that this would be a cognitive spectrum in addition to explaining some of the neuro phenomenology of things like psychedelics this could potentially explain some cognitive spectrum whether we're talking about maturation or aging or waking up when you first wake up to going to sleep these different parameterizations of your mechanisms for sophisticated inference helping to basically provide a phenomenological handling of human of what it's like to be a person and all the variations of it and so I think that should be it for right now and happy to talk about all this with anyone who's interested thank you Hi Danu Hey You're muted Thank you very much. Any other notes you'd like to add? I think that's it for the moment Great. Hope that you consider anything and join us for the roundtable shortly so thanks and we'll be right back with the final presentation by J.F. Cloucher Right. We are back This will be the final presentation of this interval This is J.F. Cloucher towards a symbolic implementation of active inference for Lego robots Looking forward to hearing this and then seeing you on the roundtable J.F. I'm Jean-François and I will talk about how I program Lego robots as active inference agents This work in drafts with most robotic implementations of active inference which are based on probabilistic inference so I hope this will spark some interesting discussions Well, first of all, I'm a software developer I'm not a neuroscientist in my spare time I like to code models of cognition because I'm keenly interested in all matters of cognition and consciousness and I run them on robots because the real world is hard and I believe that writing code for robots is actually a very good way to test my understanding and coding itself helps make abstract concepts tangible to me So what do I want to accomplish? Well, I want my robots to learn autonomously while they are informed to the principles of active inference This is the current version of my robots. There are two earlier versions and there's one in early development and here we'll see my robots to the left, Carl, to the right, Andy driven by the interplay of generative models for hunger danger avoidance and wonderlust Let's see them in action They navigate space The sheet of paper on the floor represents food and they are attracted by the scent of food simulated by an infrared beacon on a pedestal So Carl is making a beeline to the food while Andy is having problem getting traction and bumping into the walls Carl is cautiously approaching but we'll get a little bit too close to the pedestal and this will engage its danger avoidance of generative models Andy backs out Andy is observing all this Andy backs out as well Carl is re-approaching to food and this time we'll eat successfully Andy has noticed that Carl was freaking out and in sympathy freaks out himself while Carl is eating Alright, so that was the robots as they are right now after three iterations of this project So what does it take to implement an active inference agent? Well, there are three approaches One, we can take the numerical approach which basically puts the mathematics of active inference into code and runs that on robots Another approach is to take a symbolic approach where we have code functions that operate mostly on symbols, predicates, etc Here we can see we have the symbols for hungry, very, danger, curiosity, etc But that's not the only option Take E. coli E. coli is an active inference agent and its implementation is biochemical Well, I clearly didn't take that route I went this symbolic route Well, mostly because it's the familiar one to me and it provides me with a better scaffolding for my intuitions and exploration Also find that it handles complexity quite well When I started this project in 2017, my first thoughts were to implement a society of mind I'd come across this concept decades ago It's a theory of mind put forward by Marvin Minsky 50 years ago and at its core it says that intelligent behavior emerges from a lot of simple actors that interact in simple ways It so happens that I look at it as an architectural principle as well So how does one implement a society of mind? Well, to me the answer is clear as we use the actor model The actor model is a model of concurrent computation that was introduced by Carl Hewitt in 1973 According to this model of computation we have independent actors which are processes, concurrent processes each one managing its own state In the only way an actor can interact or influence another actor is by sending messages and once an actor receives a message it will interpret that message possibly modify its internal state and as a consequence fire messages to other actors So building a society of mind using the actor model is quite a natural fit I also happened to program in the elixir language and elixir is a message oriented multiprocess language which is based on the actor model so it's a perfect fit So here we are It's 2017 I own two LEGO Mindstorms EP3 kits They're wonderful robotic skits with a nice choice of sensors, mini motors and a computer, the EB3 brick that controls them all I want to build a society of mind in elixir on my EB3 robots I'm in luck there's a Linux distribution called EB3dev that allows me to run elixir on the EB3 brick so I'm all set So that allowed me to start this project and this project as I said has completed three iterations I'm starting a fourth one and we look at each one in turn reviewing the goals and also the issues uncovered First iteration 2017 version one a simple society of mind as I call it So I implement an ad hoc model of cognition it's not something I took from research it's something I made up myself it's home brood and let's have a quick tour So being a society of mind it's populated with actors and we have the detector actors and their responsibilities are to interface with the sensors and to pull them periodically to generate percepts which are events that are like all other events that the actors will produce are sent to the memory of a system actor which is a dispatcher which will then dispatch these events to other actors that are interested in them There's a memory actor and all events are sent to the memory as well to be stored for a certain amount of time and represent the past if you want to the agent and the other actors are able to query this memory in order to make whatever decisions they need one of the key actors are the perceptor actors and what they do is they ingest events, percept events originally from the detectors and analyze them maybe in the context of the past and produce higher level percepts for example a perceptor might be digesting a distance a percept from a detector look at it and say ah, given prior distances I'm getting closer to an obstacle and in a higher level and then produce that percept and the high level perceptor might say ah, I am getting closer to an obstacle and I am currently close to it so produce a percept that says collision imminent and so forth and so on another important part of actor is the motivator and motivator is responsible for deciding what the robot needs, what the robot wants and it expresses this need or this want as a motive event that is again centered in central nervous system dispatched in this case to the behavior actor and the behavior actor then takes this motive and acts on it by emitting intent events that are listened to by the actuator actors who translate these intents into actual commands and move the robot. One key point is that the motivators actually are competing with one another so that the most important need of the robot is the one that is expressed so for example, being getting to safety is more important than satisfying hunger. Let's look a little bit into one of the types of actors the behavior actors and the behavior actor is actually quite complex, it does a lot of work, it's not a simple actor, it's implemented as a state machine and with every state transition triggered by new percepts intents are emitted and so we can have a behavior actor which job is to direct the robot to the food. So it works so let's see in the version one moving about and trying to get the food which in this case is the blue paper on the ground. So it tries to avoid collisions not following six feet, here it finds out it's stuck, backs out goes around doing a better job at avoiding obstacles and now makes a beeline to the food having detected it approaches cautiously and feeds. So this worked quite well but there were issues with this version one not this is, I don't think it was visible in the video but the robot was frequently overwhelmed by a constant flow of percepts the detectors constantly feed the percepts into the society of mind and after a while they kind of back up and the robot starts reacting to old events and one solution was to actually put the robot to sleep once in a while paralyze it, let the events wash through the system and then wake it up with a clean slate so that was kind of a little bit awkward and another issue was that well there's no learning going on, the robot doesn't get better with each run and given the model it wasn't clear to me where I could fit learning in there so time for version two so I need to find a way to make my robots learn and they also need to better focus and be able of attention so they can avoid being overwhelmed with all these unneeded sensations I also need more computing power so I replace db3 brick by a raspberry pi 3 about the same time I come across Andy Clark's book surfing uncertainty and I find that the predictive brain makes quite a lot of sense to me I think it tells a really good story about learning and attention so I decide to implement a predictive society of mind this is my first crack at it I won't go into the details I do in a companion paper let's just say that there are actors for managing beliefs validating them making predictions and taking action to make these predictions come true there's also an attention actor for turning detectors on and off as needed and a focus actor for prioritizing belief validation I do introduce some learning the robot learns what actions correlate well with success but that's about it and there's the model does not feel quite right to me at this point and they are bottleneck actors for example there's only one experience actor there's only one attention actor only one memory of course and only one focus and in a society of mind that just doesn't feel right yet it still it works and let's watch Andy on its first run that's Andy version 2 hasn't learned anything yet so same scenario Andy is detected to food would like to move towards it but doesn't know which actions validate beliefs best it smells food but still now it's just heading into the wall for Andy this being quite unproductive and it's quest for food it's a little bit painful to watch let's stop now is Andy 30 runs later and it's much more competent about matching beliefs and actions smells food and very competently makes a beeline to that food just here we go slowly approaching obviously a very different Andy from the naive one and there we go okay so it worked but there's still there were issues with version 2 first the model doesn't quite feel right to me it doesn't quite capture something I didn't feel right about it and there were bottleneck actors as well which is not a good sign and learning was limited to action selection so time for version 3 I call this one a society of generative models so I go back to the Andy Clark's book and also read on the free energy principle and it becomes clear to me that generative models are actually quite central in fact it's generative models all the way down so I get to work on a new model in this new model I have very few kinds of actors they're detector actors as before to interface with the sensors actuator actors to interface with motor speakers and whatnot and the only other kind of actor are the generative model actors the GM actors and there's quite a few of them in this case here 16 and they do the heavy lifting they do the belief updating the predicting the raising of prediction errors the selecting selection of actions and they are responsible for remembering their past states and actions each GM operates within its science scope one for locating food one for avoiding obstacles one for detecting approach to obstacles and so forth and so on the GM actors have parent-child relationships the parent GM sends predictions as events about what it expects its children GMs to believe even what it itself believes and these predictions flow downward and prediction errors flow upward if a child GM receives the prediction about what it's supposed to believe or it's expected to believe and it's not what it believes and it sends back a prediction error up to its parents well that means that a generative model's perceptions are in fact the uncontested predictions it makes plus the prediction errors it receives and the GM updates its beliefs based on these perceptions and given what it believes it may decide to take some actions and then raise intent events that reach the actuators a little bit like before the generative models are kind of grouped into different areas of concern there's being which is responsible for deciding whether we're in danger we're hungry or we're free the danger GMs which have to do with clearing obstacles trying to stay in well-lit areas avoiding collisions with the other robot and whatnot then there are hunger GMs that have to do with eating, seeking food, etc there's the freedom GM which I call the wonder lost GM which basically says well I'm neither in danger nor hungry so let me just roam around and finally there are these two ones here which have to do with guessing the intent of the other robot and we'll go into more details with these two so let's look more closely at the GM actor remember that a GM has parent GMs and child GMs predictions flow downward and prediction errors flow upwards let's look inside a GM defines one or more conjectures a conjecture is a potential belief for example whether I know where food is or whether I'm about to collide two different conjectural beliefs a belief may either be a goal that's a belief we want to make true like I'm eating or an opinion which is a belief that I want to validate for example that I am approaching food a conjecture is typically activated when the GM receives a prediction about the conjectured belief and a conjecture knows how to check its associated belief to see if it's valid knows how to make predictions given that belief and how to decide what actions to take to either achieve or test the belief a GM learns how well alternate courses of actions policies correlate to achieving validating belief it also keeps track of which child GM asks more should they send competing prediction errors so it does precision weighing and each GM actor works in its own time it's a concurrent process and it does it operates one round at a time and we'll see what a round means and it remembers its past rounds its past perceptions its past beliefs and actions so now let's look at the life cycle of a GM actor well as I said a GM actor operates round after round after round so what's around when a round is started a GM carries over the perceptions and beliefs from the previous round it doesn't start from scratch and if it's in the midst of trying to achieve a goal-believe it may as it starts its new round activate conjectures so that the action believe and as a result send predictions to child GMs once we're done starting the round is active and then the GM actor just sits there for maybe I don't know 300 milliseconds waiting for events events like predictions coming from above from parents that will then activate conjectures trying to prove that the predicted belief is actually true this will cause predictions to be sent to child GMs and as a consequence maybe predictionaries will come up and the GM will update its perceptions when the round is completed either because we've heard from all the children or because time's up the GM completes this current round it updates position weighing keeps its trusted perceptions updates its beliefs as a result may send prediction errors because the new beliefs conflict with predictions that it had received before it updates its policies and decides on the course of action sends intense and notifies the round is completed and we continue so round after round after round I mentioned that there were two very kind of more interesting GMs in the society of generative models these are these two GMs and they represent my little foray into theory of mind these GMs are dedicated to guessing what the other robot is doing so each robot observes the other and detects the patterns of movements and infer intentions from these patterns there's only two kinds of intents that are inferred one is that the other robot has detected food and is making a move towards food or that the other robot is in danger and is panicking now how does a robot see the other robot well in addition to the array of things I already had from previous version I've added a new sensor a 360 beacon seeker and what this beacon seeker sees is the beacon on the back of the other robot so each robot has a beacon on its back that broadcasts a 360 radius circumference angle signifies here I am here I am and the other robot detects how far the other robot is and at which relative orientation so that let's say one robot here Carl is making a B line to the food Andy has been observing this and seeing the pattern of movement which is a very straight trajectory inferred that Carl has detected food and is homing in on it and may decide to follow Carl and get to the food as well another pattern of movements would be a chaotic pattern of movement and let's say Carl had been backing away in panic from hitting the pedestal and Andy was observing this and noticed that this kind of chaotic pattern and inferred that Carl wasn't a panic and decided to get into panic as well if you remember the video at the beginning of the presentation so this is going well but we all know debugging is hard I find out also that debugging societies of mind on robots is very hard in order to help myself I developed a simulation environment I think of it as simulated embodiment which allows me to observe what goes on inside a given robot it helps for debugging it helps for experimentation in the simulation world world a robot my robots virtual robots live in a grid world there are obstacles the blue tiles there are kind of darker areas that the robot tries to avoid which are represented in the black and gray squares and then there's the food which is the green tiles here as the robots navigate that space by using their society of generative models I can see where each robot is in terms of its state first I can see where it's located I can see its orientation and what its last said what the last action it executed and I can see the state of its virtual sensors and virtual actuators I can also peek inside the various generative models of a robot here I'm looking into the avoiding obstacle GM of N and D and I can look at the state in the current round or in past rounds and I can see which predictions came in which conjectures are activated what are the current perceptions what beliefs that the robot hold at the time and what actions it thinks are more likely to work and what actions it is taking very very helpful but this moves really fast and so I can actually slow down the simulation and even pause it and then look inside the various generative models and see what's happening is what I expected would happen so great debugging debugging tool and experimentation tool so I'm quite happy with version 3 I think it aligns quite well with the active inference on apology there are no bottleneck actors and but learning is still limited to selecting action policies however I think that the version 3 sets the stage very well for the new iteration and this one has an ambitious learning agenda and it's just getting started so version 4 starting now I call it active inferencing so here's what I want to achieve as the robot interacts with its environment and learns how to maintain it I want it to learn how I want it for I want for it to learn how to maintain its homeostasis by growing its own society of generative models so instead of being given the a set of generative models I want the robot to learn that set normally that but I want each GM to learn its own capabilities and wanted to infer its logic programs that when executed will infer predictions from perceptions will infer beliefs from also from its perceptions and infer policies that will validate or invalidate its belief so how does one do that well there's a very very interesting paper that I found which is called making sense of sensory input written by Richard Evans and all from a deep mind and it answers the question of how do you learn a causal theory that explains a sequence of sensations and once you've built that causal theory you can then apply it to predict what the next round of sensations will be and thus make predictions about them just to read from the beginning of the paper making sense involves constructing a symbolic causal theory that both explains the sensory sequence and also satisfies a set of unity conditions now unity conditions are actually a set of constraints derived from Kant's philosophy that ensure that all the pieces of the theory form a coherent whole I won't go into the details but it's quite fascinating the paper goes on making sense of sensory input is a type of program synthesis but it is unsupervised program synthesis so the paper presents an app perception engine this is the software that will generate infer causal theories from sensory data it is at its core it's a code generator what it does is it synthesizes logic programs that implement these causal theories and when you run these logic programs you can predict incoming sensations so essentially an app perception engine generates predictors and the way it does that is it searches predictor logic programs in a space of potential possible logic programs it's a search problem and the search space is extremely large of course so we need a way to constrain it we need to apply strong inductive biases to restrict the search that's where the unity conditions come in so in order to derive its own predictor a GM will search for good predictors using app perception so given a prior round of perceptions remember that the GM has a memory of each round a set of simultaneous perceptions given that sequence a GM will search a space of candidate predictors for a good one what makes a predictor well, two things first there's a scope and then there's rules the scope is essentially the objects the rules will be about and the belief predicates that will be used in the rules the rules well there's three kinds of rules there's the static rules which apply on simultaneous perceptions like at time n and the rules validate and possibly also infer implied perceptions, missing perceptions an example of a static rule might be if the robot is at distance 0 from an obstacle it is also touching the obstacle then there are causal rules and the causal rules essentially infer the perceptions at time n plus at time 1 given the perceptions at time n they predict the next perceptions an example of a causal rule would be if the robot is at distance x from an obstacle and the robot is approaching the obstacle in the next round of perception the distance of the robot to the obstacle should be smaller and finally there are conceptual rules which are rules that kind of make the whole predictor hang together semantically there are rules of mutual exclusion for example there can only be one distance between a robot and an obstacle and rules of uniqueness which I'm sorry rule of uniqueness would be that they can only be one distance yes rule of uniqueness there can only be one distance for example between two objects and mutual exclusion might be a robot cannot approach an obstacle and be touching it at the same time so the aproception engine will kick in for a GM when the current predictor of the GM is no longer good enough for the job we've produced a predictor and now we have more rounds of perceptions and the predictor is doing a really bad job at predicting the next perceptions and then the aproception engine will kick in and try to produce a better predictor for that GM so that happens for all the GMs and once we have a good predictor the GM even the current set of perceptions can infer the next set of perceptions does make predictions so we talked about how a GM learns but what about how it learns how about learning the entire society of GMs how does a robot form a society of GMs through interactions with the world well this is going to be guided by a a metacognition GM that's something that's given when the robot starts life it has a basic set of detectors set of actuators that is a given and it also has a metacognition GM it's also a given the metacognition GM the role is to watch over and guide the evolution of a society of GMs that's the action for it to function each GM must act as a cognitive sensor it must produce sensations such as our prediction errors trending up or down do policies predictably my beliefs or very importantly is the robot's homeostasis at risk these are cognitive sensations that a GM will produce will be listened to by the metacognition GM and that will allow it to update its own beliefs about how well the society of GMs is doing does it have sufficient coverage is each GM capable enough based on that may take corrective actions by creating new GMs and possibly if one GM is not doing very well it's stuck in a rut removing it and replacing it with another so that's the role of the metacognition GM so how can the robot tell whether it's doing better or worse than before but it has learned well feelings that's how so a robot will have internal sensors for feelings and I'm thinking about feelings of hunger which increases with physical and mental exertion and is reduced with eating there's the feeling of pain which would go up with a number of collisions but would be reduced automatically with the passage of time simulating healing and then I'm thinking also the feeling of ennui which goes up if a GM is not learning anything if its logic programs are unchanged for a long period of time but ennui goes away when the GM is learning feelings I have a balance positive, negative I'm hungry, very hungry, negative balance I'm not hungry at all, positive balance and a negative balance signals risks to homeostasis and when beliefs are derived from feelings with a negative balance or positive balance then these beliefs take on this balance and this is going to be used to prioritize actions because actions that promote beliefs with a strong balance will be prioritized for actions that do not in other words, a GM with very strong feelings will have its actions prioritized over GMs that currently want to take action from less feelings less powerful feelings and if these actions conflict then the actions of the GM with stronger feelings will predominate will take over all this, what do I think makes a robot an active entrance robot well, there's many things but I'd like to think that it's its simplest expression for me at well at least an active robot is one that learns what to do in order to feel good more often than not so I'm hoping that this work will raise some big questions and give me some insights into them for example, what is the superior knowledge that an agent must possess to learn autonomously what makes unsupervised learning converge on competency and maybe a little bit more far out what can growing a society of GMs learn from developmental biology, I suspect that there are principles at work here that both they both share so that's it, thank you very much thank you to the active inference group for their help and encouragement and the version 3 of my work is available on github it's open source, I can be reached on discord and by email and the companion paper to this talk is available on senator all right, great talk JF, we'll take a quick break and we'll be right back with the round table all right, we are back, this is the beginning of the second round table, that's our last session in the second interval of the second applied active inference symposium and some more may be joining but I am joined here by Adam Saffron Bruno Lara and Jakobs Mechel and maybe just to begin it would be awesome if anybody who wanted to thank you and welcome to JF Carl will be joining shortly so perhaps to begin if anybody would like to provide a reflection on a talk that was not their own, what was something that you felt like was brought to the table, what was a key problem area that was addressed and how did you see active inference being implemented and adding meaning in that situation I can maybe quickly just comment on JF's presentation since it was the most recent I think definitely this symbolic approach to active inference is one that has perhaps not been that pushed forward and like obviously there are different approaches all around the field but I feel like that this particular perspective on pursuing this kind of emergent generative models which only have the very basic kind of setup but then the complexity emerges through the usage of Elixir and Prolog I think was really interesting and yeah I mean we talked about JF's project in the organizational meeting units quite a lot but every time I think about it it's really cool to see this implementation Thanks Dr. Adam I mean in terms of the recent one just the app reception engine the content inspiration that I found that to be really exciting especially because I've been taking some inspiration from some of the work and like wondering whether basically like these categories like are they not just like preconditions for judgment but like any kind of sense making whatsoever like any sort of world with composition that could be navigated and parsed and so to see that that kind of work was being done with that level of sophistication was just amazing. It is a thread that came up multiple times with juxtaposing continuous time and all of these and then it's almost like another dialectic with the numerical and this the distributional approach to variational inference sampling message passing a whole taxonomy of approaches that we've seen for active inference models and also models of perception cognition and control outside of active inference and so maybe J.F. if you wanted just to provide a thought on where you see the symbolic perspective coming from and intertwining with active inference directions and robotics like we were talking about today. Right well again comes in from different perspective ones is explainability of choices and behaviors if the robot is driven by symbolic reasoning and it becomes relatively straightforward for it to provide an explanation of its behavior in terms of the chain of reasoning that led to it so that's of interest in and of itself. The other aspect is when it comes to the app perception engine it has a inability to develop a causal theory symbolic causal theory from relatively small data set so unlike machine learning solutions which require intensive learning process which leads to an obscure causal theory if you want with the app perception engine you have a relatively small amount of data as input and a causal theory that's symbolically expressed as output which can serve as a basis for explanation and justification and rationale that being said if the as part of the process of app perception GM abduces latent objects and abduces predicates the meaning of these predicates are only to be inferred in context because they're going to be called P1 and P2 and Object 01, Object 02 you may by examine amination just maybe infer I think we're looking at a predicate that has to do with navigation and avoidance but that will not be clear so I think in that regard there are gains but they're not absolutely clear in terms of explainability but when it comes to active inference I think of that what matters to me is that the robots behave according to the principle of active inference and not necessarily by implementing the mathematics of it so I don't think it's a contradiction as far as I'm concerned these are affordances that are mine which is symbolic programming and that's why I'm doing it that way thank you it's almost like in the textbook of active inference where we have the high and the low road and here's like the symbolic airdrop actually arriving at a similar place although being quite disjoint in its origins from the particular partition flows on continuous numerical variables a lot of the ways that we've seen things develop in the past several years so welcome Carl if you would like to say hello or provide any remarks on anything that you've seen at the symposium or any overview thoughts on active inference and robotics well I've greatly enjoyed all the presentations there's so many different perspectives so I would imagine my comments will fall from what people want to talk about so I'm going to just pick up on that last theme so Jean Francois symbolic dropping on from high I thought it was a really intriguing perspective and it's a perspective that I've been actually forced into in certain applications of the mathematics of active inference so I thought it'd be useful to share that in the sense that when you write down discrete state space models and use the maths of minimizing variational expected free energy to invert those models very often you're confronted with specifying those models with boolean logic if this then that and literally in the code which you write to specify a particular tensor that maps from some causes to some consequences you are literally using if and then statements and and or statements in order to generate the tensors or the matrices that sort of encode probabilistic mapping which now become deterministic mapping simply because you're populating these tensors with zeros and ones so I do see an enormous opportunity here to actually bring together the mathematics on the simple probability theory just using categorical distributions or Dirichlet distributions of a particular sort where you're only dealing with zeros and one probabilities and the kind of logic and a perception that you were talking about I thought that was absolutely fascinating one thing that intrigues me is if you can do that then there is a way of doing your searches of all the potential programs or logical statements that are internally consistent with the evidence at hand for example I could build a gerative model where I can be in two places at the same time or two things can be in the same place at any one time that's from the point of the gerative model I can write that down without an exclusion principle but when I now come to ask the question is that model relative to another model that can be written down in terms of Boolean logic that precludes two things being in the same place at any one time does that simpler model now provide a better explanation for the evidence at hand so technically what that means is that I can apply the rules of Bayesian model selection to this model versus that model where the model just is a statement of propositions logical propositions and there are ways of automating that very efficiently called Bayesian model reduction and I'm just wondering whether you could take a lot of pressure of the search for the internally consistent logical structures that you're dealing with if you can cast it in terms of in terms of Bayesian model reduction which quite simply is measuring the evidence the probability of this sequence of outcomes that can itself be categorical I mean this state or that state the probability of that particular sequence of discrete outcomes given this structure this generative model that is articulated as a logic and if you can do that I think that would be very very powerful because that speaks to a common theme which I think most of us or you were talking about which is this issue of structure learning and what you're talking about is sort of a principled way to get the right parsimonious structures that have this this coherence I can't remember you were even taking it right back to sort of 19th century philosophy or 18th century philosophy in terms of the constraints it would be really great to see whether that kind of sort of logical structure that philosophers like actually could be discovered or disclosed just using good old fashioned Bayesian model selection there seems to be a close homology there with some of the work of people like Josh Tenenbaum where he certainly articulates structure learning from the part of you of radical constructivism using sort of program searches and sort of casting generative models as programs and then score the quality of these programs using a form of Bayesian model selection and he claims to be able to do sort of millions very, very effectively within a few seconds have you looked at Josh Tenenbaum's work at all? Not yet but I certainly will and I just wanted to make clear that the Apocetron engine was developed by Richard Evans in the paper making sense of sensory input and yes one of the core issues is inductive bias how do you restrict the search space so that you can have a chance of finding within a reasonable amount of time a logic program that is a competent predictor and that's where synthetic unity of our perception plays in as it provides constraints on the class of logic programs which are acceptable which are considered valid and if I make a contribution because this is work in progress I would like to add additional constraints from the fact that we're not trying to generate one generative model in and of itself but as in the context of the society of generative models so a generavall will borrow its perception domain from the belief domain of other generative models thus creating additional constraints and as it searches it will try not to modify the scope in such a way that it orphans other generative models so as the society of generative models grows so does the set of constraints that apply on reducing the search for a predictor in any of the generative models themselves so I'm hoping that as the society of generative models grows so does the set of constraints that apply on the searches for any one of them but I think the name of the game is very much in this the richness and the strength of the inductive biases that are applied on search just to highlight a few pieces of what we're addressed then to Bruno or Adam or anyone who'd like to add impressed on me robotics is radical constructivism not just in the sense of the constructing models but also in the way that Adam described in terms of the relationship to the embodied artifact so that is one interesting piece and another in this quest to find the rainbow that connects first principles and analytic formulations through mesoscale for example computational code all the way to the last mile in the cases that we heard from Wenhao Chen in the previous session Carl when you described the way that Boolean logic enters at the level of execution was very interesting and suggests that there is kind of like a brackish area similar to that between discrete and continuous time models in like hierarchical modeling but here where the numerical and the statistical approaches to active inference are becoming connected to actual logical implementations and design choices that have to do with which functions are executed first or the conditions that certain things occur in and so there actually is a meeting ground or an interface in a way implicitly already and so it is very interesting to see how JF's work on the generative model generation process is now approaching that intersection from the other side and suggesting it's like if you see a car coming from the other direction there's a road and now this high and low road network starts to grow more pathways so Bruno or Adam would be happy to hear any thoughts you have yeah thanks yeah I think that's much our case as I was telling you from this other side of the story and at the end we have to make some choices on implementations and so far we've been very focused on this self-organizing maps most of our work is on that and that's actually one of the questions I have for all of you like what's your take on all these approaches that we're trying to we're coming from a different field from a different point of view and in a way we are almost intentionally avoiding probabilistic approaches to active inference so I don't know what's your opinion on that that was the first one and the second one is more like I don't know like a doubt a question for Carl like what do you see in the near future on all these things that we are working on prediction error dynamics and this monitoring of the error over time can yeah I think that's I'd love to speak to that if I can interestingly does that speak to your question Daniel I just wanted to point out also that this notion of moving between continuous state-space models and discretized state-space models is something that people in quantum computing keep their close eye on because you get all digital then the opportunity for quantum computing suddenly rears its head so it was also a very pragmatic pragmatic reason to sort of look at that transition and also just to bring in Adam's point not only was he suggesting that we quantize discretize, spatialize in terms of little tiles and places, receptive fields for being here as opposed to being over there but he was also suggesting we do that in time so I think the quantization of space-time in a generative model is a really important thing and of course you could argue that that's a step closer to good old fashioned symbolic AI that has a meaning in the sort of folk psychology sense so to come to Bruno's question so the big divide here is between for my point of view at least generative models that are of continuous states and time versus generative models that are of discrete states and states and time and clearly you need both in the sense the world that a roboticist and indeed me and my children live in is a continuous world and I have to move around it I have to control continuous temperatures and all sorts of things and yet it seems as if the intelligence is at a symbolic level so I think what we're talking about is a hybrid generative model and then the question is how do you get the sort of discrete parts to talk to the continuous parts but if we just focus on the continuous parts and just to answer Bruno's question directly first of all what I'm saying is you can't ignore the continuous bits so everything you were talking about in terms of self-organizing maps has to be there at some level is this a question of whether you can put a more symbolic logical structure on top of it to cause gradient sufficiently to resolve all the complexity I loved your work I could see all the important issues in terms of representing uncertainty as the if you like the stand in for the valence of how I am doing so I was amused to hear that you're actively avoiding probability theory yet for me everything you said was all about probability it's all about uncertainty and that was true at so many levels so just to answer Daniel's question to you the relationship between variational free energy and the prediction error is really trivial and very simple it's just under continuous state space models with Gaussian random fluctuations the free energy gradients just are the prediction errors the side prediction errors so it's really simple quadratic forms for the log probabilities so self-organizing maps that organize themselves in terms of responding to prediction errors just are systems that are performing a gradient flow on a variational free energy under the assumption you're dealing with continuous states that have Gaussian by random by central limit theorem random fluctuations so that's all exactly what would please me if I was a probabilistic committed to the probabilistic part I think you're bringing to the table though is the dynamics of the uncertainty or the amplitude the prediction error the unsigned prediction error the behavior of prediction errors over the separation of time scales I think that's a really important really important move I see slight homologues of that not formally identical but certainly homologues of that from the part of you of an engineer this would be like getting the Kalman gain right you know if you interpret a Kalman gain on a Kalman filter as assigning the right precision or confidence to the prediction errors as they come in relative to the state of the Kalman filters and your your prior beliefs that you've accumulated getting that right having an adaptive Kalman filter where you're actually optimizing the Kalman gain you know that would be if you like the state of the hierarchical Kalman PC filtering so that if I was a psychiatrist I would say this is exactly what goes wrong in people with schizophrenia and autism is that they've got their estimators of the overall error wrong and that they now need to you know this is an explanation for false belief updating or false state estimation from the Kalman filtering point of view that the other point that struck me in the early part of your talk was something which as a neurobiologist or motor control theorist something that they would find very entertaining which was the link between the ability to ignore stuff and sensory attenuation I don't know if you've come across that in robotics but certainly in terms of motor control of the kind I think you're using which I would ascribe to the equilibrium point hypothesis like approach you're putting your set point into the actuator and you're letting the reflexes do the rest but you've got to control carefully how those predict