“To be prepared against surprise is to be trained. To be prepared for surprise is to be educated.” (From James P. Carse’s “Finite and Infinite Games,” featured in the Kernel curriculum).” Kernel Book, Module 6, Learn how to Learn
In 1859, Charles Darwin introduced natural selection as the key mechanism for evolution – a unifying principle to explain the diversity and interconnectedness of all biological forms.
A century and a half later, some suggest neuroscientist Karl Friston’s free energy principle (FEP) is the most “all-encompassing idea” to come along since.
Free energy is the difference between the states you expect to be in and the states your sensors tell you you’re in.
And its principle – packaged in a theoretical framework called active inference – describes how all living organisms seek to minimize it.
“We sample the world to ensure our predictions become a self-fulfilling prophecy,” Friston once wrote.
His theory unifies all sentient behavior – perception, planning, and action – around the single foundational principle of minimizing surprise.
“[Active inference] is all in the title,” Daniel Ari Friedman (KB5) told Kernel. “It’s about integrating action and inference.”
Added Jakub Smékal (KB7): “The core idea behind active inference is that both of these processes can be cast within the same mathematical and computational framework.”
That framework, Daniel continued, “doesn’t say anything about anything in specific – just like English doesn’t tell you how to design your room or make a safe highway. But if it can be understood as an expression tool for those kinds of situations and their composition, then it has all of this utility.”
It can help researchers “sketch out” complex cognitive and systemic dynamics across various domains, from neuroscience to robotics, AI to web3.
Across their work, collectively and individually, Daniel and Jakub are preparing us for surprise.
DANIEL ARI FRIEDMAN & JAKUB SMÉKAL
Daniel grew up and remains based in Northern California. He has a Ph.D. from Stanford, where he studied ecology and evolutionary biology.
Jakub, originally from Prague, is at Stanford today, pursuing a Ph.D. focused on how AI learning models can be applied to biological systems.
“I think the first thing I said when [Daniel and I] met was ‘what is active inference?’” Jakub told us, “and it sort of snowballed from there.”
Even the adept struggle to answer that question. Active inference expands upon Bayesian inference, a statistical framework for updating beliefs based on probability estimates as new data becomes available.
Consider taking a sip of what you expect to be hot coffee and getting cold Coca-Cola instead. In a traditional Bayesian model, through perception and learning, you simply update your understanding of the world to better match new sensory input (realizing the object is a soda, not a coffee).
Active inference incorporates the organism’s actions into the process. It accounts for the fact that you actively test the prediction error by looking into the cup, smelling it, or taking another sip. Your actions become part of resolving the surprise.
On first blush, that may seem self-evident, but the implications are profound: if organisms actively test their predictions about the world, then perhaps all persistent systems – from cells to societies – operate through similar cycles of prediction, action, and belief revision.
In 2020, to explore that convergence, Daniel co-founded the Active Inference Lab (today, the Active Inference Institute), an open-science nonprofit dedicated to improving the accessibility, rigor, and applicability of the active inference framework.
“We do participatory science activities, create different artifacts, programs, partnerships, research fellows, internships,” he said, “all these different ways that people can contribute and get involved with the ecosystem.”
Jakub became a part-time researcher at the institute in 2022. “A lot of my work – and especially since the work in web3 – is the minimization of uncertainty,” he said, before musing, “I guess that’s the game that everyone’s playing.”
Prior to Kernel, Daniel and Jakub worked together on a project called Opscientia (later called OpSci), applying active inference to construct an ontology for DeSci.
They’ve since co-authored several research papers on the subject, like “Active Blockference,” which brings active inference to blockchain ecosystems and agent-based modeling.
As their research suggested, science itself can be treated as an active inference system – a network of entities that perceive evidence, update beliefs, and take actions to reduce uncertainty about the world.
The blockchain enables transparent, decentralized coordination of this collective intelligence – e.g. token-based incentives for valuable contributions, smart contracts as “affordances” (automated rules that enable certain actions – funding, peer review, publication – based on predefined conditions), and DAOs that embody collective decision-making.
Communities, in theory, can self-organize around shared knowledge interests without central control.
The ability to organize, though, assumes a shared communication system. Different sciences and disciplines have distinct standards and lexicons, rife with jargon and cultural quirks.
In 2023, Daniel and Jakub set out to reconcile that challenge via Generalized Notation Notation (GNN), a standardized text-based language that bridges theory and implementation – an “expression tool,” if you will.
After its initial development, GNN remained “latent for a year or two,” said Daniel, but “in the last six months or so, I’ve done a ton of work on it and a few more people have gotten interested, because there are so many new opportunities for the structured generation of these compliant programs.”
GNN has evolved, he said, into “a recipe-writing language.”
That creates opportunity to use natural language descriptions for generative models – like “describ[ing] a baseball game – every single thing happening – as a state space model,” he continued. “Now that’s a recipe we can’t cook today, but eventually we’re gonna expand our recipe specifications set.”
For the past year, Jakub has been focused on deep state space models. “The key problem that I’m really excited about is: how do we quantify uncertainty in the models that we train?” he said. “How can we calibrate the models better?”
As he studies their learning dynamics, Daniel – in addition to developing GNN and guiding the Active Inference Institute – is a mentor for both Kernel and DeSchool, a decentralized and collaborative learning protocol.
He regards both as steps toward an education paradigm where everyone is “welcomed into a customized caring, situation-specific, age- [and] context-appropriate learning experience,” he said.
“And just like hot and cold water on the tap, [people will] be able to adjust that pragmatic and epistemic value and respect the beauty of learning – and the art and the science of it as well.”
Learning, of course, is both art and science. And perhaps the beauty lies in meeting people where they are, preparing them for the inevitable surprise that thwarts expectation.
Turn the tap to your liking, adjust the flow, and float down paths you can barely begin to predict.
For rabbit hole dwellers, we ask each featured fellow to share some deeper technical inspiration – e.g. research docs, whitepapers – that adds depth to their work. These are Jakub and Daniel’s:
Active Inference: The Free Energy Principle in Mind, Brain, and Behavior
Catechism for: “Towards Active Diffusion: A Tale of Multiple (den)Cities”
Systems Modeling and Cognitive Audits for Hypercert Ecosystems
Generalized Notation Notation for Active Inference ModelsGenerative Research Teams: Active Inference Compositions For Research and Meta-Science
Building something surprising? Come and join us. Apply for Kernel.


