ActInf ModelStream 022.1: Online Generalised Predictive Coding (Mehran Hossein Zadeh Bazargani) @ActiveInference
ActInf ModelStream 022.1: Online Generalised Predictive Coding (Mehran Hossein Zadeh Bazargani)  @ActiveInference
Uploaded June 2026 | Updated November 2026, 3 days ago
Online Generalised Predictive Coding
Mehran H. Z. Bazargani, Szymon Urbas, Adeel Razi, Thomas Brendan Murphy, Karl Friston
arxiv.org/abs/2605.02675
This paper introduces an extension of generalised filtering for online applications. Generalised filtering refers to data assimilation schemes that jointly infer latent states, learn unknown model parameters, and estimate uncertainty in an integrated framework -- e.g., estimate state and observation noise -- at the same time (i.e., triple estimation). This framework appears across disciplines under different names, including variational Kalman-Bucy filtering in engineering, generalised predictive coding in neuroscience, and Dynamic Expectation Maximisation (DEM) in time-series analysis. Here, we specialise DEM for ``online'' data assimilation, through a separation of temporal scales. We describe the variational principles and procedures that allow one to assimilate data in a way that allows for a slow updating of parameters and precisions, which contextualise fast Bayesian belief updating about the dynamic hidden states. Using numerical studies, we demonstrate the validity of online DEM (ODEM) using a non-linear -- and potentially chaotic -- generative model, to show that the ODEM scheme can track the latent states of the generative process, even when its functional form differs fundamentally from the dynamics of the generative model. Framed from a neuro-mimetic predictive coding perspective, ODEM offers a biologically inspired solution to online inference, learning, and uncertainty estimation in dynamic environments.
doi.org/10.48550/arXiv.2605.02675
Code: github.com/mldawn/odem

-

--- RESOURCES & TRANSCRIPT ---
📄 Full Transcript on GitHub:
github.com/ActiveInferenceInstitute/ActiveInferenceJournal/tree/main/data/video/activeinferenceinstitute/ModelStream/ModelStream_008

Active Inference Institute information:
Website: https://www.activeinference.institute/
Activities: https://activities.activeinference.institute/
Discord: https://discord.activeinference.institute/
Donate: http://donate.activeinference.institute/
YouTube: youtube.com/c/ActiveInference
X: https://x.com/InferenceActive
Active Inference Livestreams: https://video.activeinference.institute/

------

CHAPTERS
0:00 Welcome and introduction
1:30 The brain as an inference machine
3:00 Generative models and generative processes
4:30 Markov blankets
6:00 Temporal derivatives and dynamics
7:30 State and observation equations
9:00 Smooth Gaussian noise
10:30 Unknowns to infer
12:00 Generalized coordinates of motion
13:30 The derivative operator
16:30 Variational free energy
18:00 Variational inference
21:00 Gaussian assumptions
22:30 Approximating the posterior
25:30 Divergence from priors
27:00 Predictive coding vs. active inference
28:30 Hierarchical predictive coding
30:00 Local learning
31:30 Passing prediction errors
33:00 Prediction errors on dynamics
34:30 Gradient descent in generalized coordinates
36:00 Dynamics as momentum
37:30 Separation of time scales
40:30 The online algorithm
42:00 Accumulating gradients
43:30 Free action
45:00 Relation to dynamic causal modeling
46:30 E-step and M-step loops
48:00 Python implementation
49:30 Experimental setup
51:00 Generalized Lotka-Volterra system
52:30 Generating observations
55:30 Two scenarios: matched vs. mismatched dynamics
57:00 Observation mapping
58:30 Priors and the interaction matrix
1:00:00 Precision ratio as attention
1:01:30 Orders of motion
1:04:30 Results: the precision ratio
1:09:00 Trade-off: noisy estimates
1:13:30 Results: orders of motion
1:16:30 Parameter and noise estimates
1:22:30 No ground truth for parameters
1:24:00 Future work: hierarchical models
1:25:30 Dimensionality reduction
1:27:00 Acknowledgments
1:28:30 Code walkthrough: package architecture
1:30:00 Computing variational free energy
1:31:30 Running an experiment
1:34:30 Time-scale separation in code
1:36:00 Defining the generative model
1:37:30 Outputs
1:40:30 Plotting results
1:42:00 Q&A: comparing orders of motion
1:45:00 Q&A: no domain knowledge required
1:46:30 Closing thoughts
ActInf ModelStream 022.1: Online Generalised Predictive Coding (Mehran Hossein Zadeh Bazargani)ActInf GuestStream 118.1 ~ Tadahiro Taniguchi Co-Creative Learning via Metropolis-Hastings...Fundamentals of Active Inference (Chapter 8, Session 35) August 11, 2026Xin Sun: “From Lived Experience to Mathematical Mapping”Bradly Alicea: “World Models, Part III: Making World Models Accessible” (Live Coding)ActInf Textbook Group ~ Cohort 8 ~ Session 4 (Chapter 2) ~ 3/13/2025Active Inference Working Groups: “Coordinating the Field”ActInf ModelStream 021.1: Melih Kandemir: Distributional Active InferenceMontijn van Loo: “The Mark of the Moral and the Shared Author Hypothesis”ActInf GuestStream 107.1 ~ David Benrimoh The Role of Affective States in Computational PsychiatryActive InferAnt Stream 014.1 ~ Generalized Notation Notation: From Plaintext to Triple PlayFundamentals of Active Inference (Chapter 9, Session 42) September 4, 2026
Active Inference Institute |

ActInf ModelStream 022.1: Online Generalised Predictive Coding (Mehran Hossein Zadeh Bazargani)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER