Back to Portfolio
AI & Cognition

Towards Tabula Rasa through Active Predictive Processing and Memory

Architectural ideas for JEPA: curiosity, memory as prediction, and why imitation might come for free.

November 15, 2026•14 min read

Yesterday, I watched Yann LeCun's interview on world modeling and its massive efficiency advantage over the language modeling that dominates the current AI industry.

After an evening of reading and pondering related work, I wholeheartedly advocate for more attention (pun not intended) on LeCun's world modeling architecture: the Joint Embedding Predictive Architecture, or JEPA [1]. You can read about JEPA itself in numerous videos and articles. In this blog, I want to write about some architectural ideas for JEPA that I believe would help us take a giant step towards true AGI in the physical world.

Researchers at the Advanced Machine Intelligence Lab outlined four key ingredients of true intelligence: 1) world understanding, 2) persistent memory, 3) reasoning ability, and 4) safety and controllability. I will focus on the first three and make three arguments:

  1. World understanding can be greatly accelerated by going multimodal and by encouraging curiosity.
  2. Memory and reasoning can be built from the same underlying principle, and that principle is prediction.
  3. Once an agent has curiosity and memory together, imitation emerges on its own. We do not need to enforce it.

A note on credit before I start. I worked most of these ideas out on my own, and then went looking for who had been there before me. Quite often, someone had. Where an idea already exists in machine learning, I cite it and build on it. Where it exists in cognitive science, I say so, and I say whether it has made its way into ML yet. What I think is mine is mostly the way the pieces fit together, and the argument about imitation at the end.

I also want to be clear that this article is my vision of a physical AGI. It is not intended as an authoritative research guidebook.


World Understanding

World understanding comes from capturing invariance across training data or, in the context of RL, across environment transitions. Data augmentation, large-scale pretraining, and, most recently, world models all approach this same problem in different ways.

To capture invariance, a model must learn from a diverse dataset. Diversity here means two things: diverse representations of each state, so the model can infer the state from its observations, and wide coverage of possible states. Coverage does not mean naive sampling, because some states are more informative than others. I will take the two in turn.

Diverse representations: go multimodal

We already have good answers for the first kind of diversity. Theoretical work suggests that multimodal training improves performance on each single modality. Moreover, by training on next-state prediction, as in model-based RL, we get an abundance of training signal no matter how sparse the reward is. Put JEPA on a robot with sensors of diverse modalities, like vision, touch, and proprioception, and the prediction objective pushes the agent to connect the dots between them and build rich representations.

Keep the robot's own body in mind. Proprioception will come back at the end of this article and do more work than it seems to be doing here.

Diverse states: be curious

The second kind of diversity is more nuanced. To experience meaningfully diverse transitions, an agent must prioritize actions that lead to novel states or, in formal language, prioritize information gain.

I am far from the first to say this. In ML, VIME [2] rewards an agent for the information it gains about the environment's dynamics. In cognitive science, the same quantity appears as the epistemic value term of active inference [3], which belongs to a wider family of theories called active predictive processing [4]. These theories model the brain as an active prediction engine that seeks out experiences that improve its mental model of the world.

The information gained about the state ss from an outcome oo under a policy π\pi is

I(s; o∣π)  =  H[q(o∣π)]⏟how uncertain isthe outcome overall?  −  Eq(s∣π)[H[p(o∣s)]]⏟how uncertain would it beeven if I knew the state?I(s;\, o \mid \pi) \;=\; \underbrace{H\big[q(o \mid \pi)\big]}_{\substack{\text{how uncertain is}\\ \text{the outcome overall?}}} \;-\; \underbrace{\mathbb{E}_{q(s \mid \pi)}\big[H[p(o \mid s)]\big]}_{\substack{\text{how uncertain would it be}\\ \text{even if I knew the state?}}}

By this principle, we want our agent to do two things: reduce its prediction error, and take actions that lead to information gain. It turns out these two objectives are intimately related if we use the prediction error as a proxy for information gain. If we ignore environmental uncertainty, the information gain is a strictly increasing function of the prediction error.

Using prediction error as a curiosity reward is the oldest trick in this literature. Schmidhuber proposed it in 1991 [5], and Pathak et al. [6] made it work at scale, also in a learned feature space. So I claim nothing new in the reward itself. What interests me is what happens when the feature space is a JEPA latent, because then one quantity serves both players. The predictor minimizes the error and the actor chases it:

min⁡ϕ  Lpred(ϕ)=Edπ[∥z~t−zt∥2],max⁡π  J(π)=Edπ[rIG],rIG=sg⁡(∥z~t−zt∥2)\min_{\phi}\; \mathcal{L}_{\text{pred}}(\phi) = \mathbb{E}_{d^{\pi}}\big[\|\tilde{z}_t - z_t\|^2\big], \qquad \max_{\pi}\; J(\pi) = \mathbb{E}_{d^{\pi}}\big[r_{\text{IG}}\big], \qquad r_{\text{IG}} = \operatorname{sg}\big(\|\tilde{z}_t - z_t\|^2\big)

where ztz_t is the encoded state, z~t\tilde{z}_t is the predictor's guess for it, and sg⁡\operatorname{sg} is the stop-gradient. This is partly what makes gambling so addictive: pulling a slot machine is an action that leads to uncertainty that soon gets resolved.

I should point out that this is one place where I leave LeCun's blueprint. In his proposal, the actor finds its actions by planning through the world model against a cost module [1]. Here the actor is a plain policy that is paid in the world model's own error, which makes it a closer relative of the curiosity agents above than of his planner.

The noisy TV

However, the proxy quickly breaks down on the classical noisy-TV problem [7]. Imagine a TV playing random noise. An agent naively seeking unpredictability would sit in front of it forever and learn nothing, simply because random noise is unpredictable.

This calls for a distinction between epistemic and aleatoric uncertainty. The former comes from our model, the latter from the environment. We want to reward the agent for visiting states with high epistemic uncertainty and ignore the aleatoric noise.

My answer was to let the predictor estimate the noise itself and discount it. Here, too, someone got there first: Mavor-Parker et al. [8] have the predictor output a mean and a variance for the next state and subtract the predicted variance from the squared error. There are other remedies as well. One can reward disagreement within an ensemble of predictors [9], or plan for expected novelty inside a learned world model [10]. JEPA even has an answer of its own, since its encoder is free to drop details that are hard to predict [1].

I still like the variance-head version, because it needs only one predictor and it stays inside the prediction objective. The form I use divides by the predicted variance instead of subtracting it:

rIG′  =  sg⁡ ⁣(∑j=1d(zj−μj)2σj2)−dr'_{\text{IG}} \;=\; \operatorname{sg}\!\left( \sum_{j=1}^{d} \frac{(z_j - \mu_j)^2}{\sigma_j^2} \right) - d

Here the predictor outputs a mean μ\mu and a variance σ2\sigma^2 for each of the dd latent dimensions through separate heads, and it can be trained with the continuous ranked probability score (CRPS) or a sampling-based energy score. The intent is that scaling the prediction error by the aleatoric variance leaves only the epistemic uncertainty about the state. Subtracting the latent dimension dd makes the expected reward zero when the environment is pure noise, so the TV stops being interesting the moment the agent understands that it is noise.

Curiosity gives the agent a reason to move. But a curious agent without memory can only react to what is in front of it right now. It cannot carry what it just learned into its next decision, and it cannot stop to think. That is the next ingredient.


Memory and Reasoning

To understand memory and reasoning in JEPA, I want to first draw our attention to LLMs, despite the continued debate over whether LLMs possess true world understanding and logic.

In LLMs, memory and reasoning are unified in a single representation: the context window. Memory is what is already stored in context, and reasoning is what expands the context. Reasoning is impossible without memory, while memory is continuously updated through reasoning. By recurrently feeding back what it has generated, an LLM can model nested relations that a single shallow pass cannot. More generally, test-time compute directly improves model performance [11].

I find this a beautiful property, and I want the JEPA agent to have it too.

Short-term memory and reasoning

We can apply the same principle to JEPA agents by keeping a memory vector mtm_t across timesteps, in the spirit of memory-augmented sequence models [12]. The predictor reads the memory and writes the next one:

pϕ(zt,at,mt)  =  (z~t+1, mt+1)p_{\phi}(z_t, a_t, m_t) \;=\; (\tilde{z}_{t+1},\, m_{t+1})

The memory vector stores information about past states. It acts like short-term memory, so the agent can act upon its immediate experiences. On its own, this is a standard construction. Latent world models such as PlaNet already carry a recurrent state through their dynamics model [13].

The part I care about is what the agent can do with it. Reasoning shows up as the agent choosing trivial actions to iterate on its memory vector before committing to a meaningful one. Letting a recurrent network take extra internal steps before it commits to an output is Graves's adaptive computation time [14]. The difference here is that the extra steps are actions in the world, so thinking is something the actor decides to do. This formulation unifies short-term memory with reasoning while preserving the key property of each: 1) acting and predicting based on past experience, and 2) modeling complex distributions through test-time scaling.

Long-term memory and predictive processing

A memory vector is only useful if the agent learns what to put in it. So next we need a memory update rule that lets the agent selectively read and write useful information. I propose training the memory so that the final memory vector helps re-predict everything that happened since the last update:

L(ϕ)  =  ∑t=τT∥pϕ(zt,at,mT)−zt+1∥22\mathcal{L}(\phi) \;=\; \sum_{t=\tau}^{T} \big\| p_{\phi}(z_t, a_t, m_T) - z_{t+1} \big\|_2^2

where τ\tau is the time of the last long-term memory update, TT is the current time, and ϕ\phi parametrizes the predictor. For compactness we could drop the action conditioning, assuming proprioception is encoded into zz.

Conditioning a predictor on one summary vector of a set of observations has the same structure as neural processes [15]. Here the summary is the agent's own recurrent memory, and that changes what the equation implies. Three interesting corollaries follow from it.

The agent keeps what matters for prediction. Imagine the predictor in a new environment. In the first few episodes the predictor is random, so mTm_T is pressured to store the entire trajectory's transition information. Since memory is a lossy compression of the trajectory, the predictor slowly learns the world dynamics to complement it. As the predictor gets better, the pressure on memory to hold everything decreases, and it is replaced by pressure from the actor to use memory as a reasoning workspace. What remains in the memory vector is only the key information the predictor needs as context.

The agent can choose to remember. Suppose the agent is told something important at state ztz_t. The predictor is not pressured to remember it, because it is only one state out of many. The memory equation puts more weight on states that appear more often. So the actor can rehearse important information through self-talk. This populates the replay buffer with more echoes of that information and lets the predictor learn it more effectively. Rehearsal as the route from short-term to long-term memory is a classical idea in cognitive science [16]. To my knowledge it has not been carried over to ML as a behaviour the agent learns for itself. Continual learning does use the word "rehearsal", but for replaying stored data, which is a different thing.

The agent recalls by association. Human working memory may hold only around four chunks of information [17], but through associative retrieval we draw on a vast pool of knowledge latent in our brain. When you are trying to recall someone's name, a reminder of its first letter helps. Predictive processing builds associative retrieval implicitly, because long-term memory is baked into the weights of the prediction network and environmental cues bring it back. Cue-dependent recall is long established in cognitive science, and it is not new to ML either: content-addressable memory is the idea behind Hopfield networks [18]. What I find appealing is that here it comes without a dedicated retrieval mechanism.

Sleep, and why the brain looks like this

The formulation has one problem. To propagate gradients into the memory head, we need to recursively unfold the predictor, which could lead to gradient explosion. To mitigate this we must either 1) cap the number of timesteps we unfold, or 2) update frequently so that the recursion chain stays short.

This looked like an engineering nuisance at first. Then I noticed that both constraints show up in human cognition if we think of a gradient update as sleep. The first explains why extended periods without sleep weaken memory, and the second why sleep helps with memory consolidation. And if learning to form useful memories means the memory network converges, it fits that adults, whose memory network has converged, sleep less than infants, and much less than newborns.

The design is also unexpectedly consistent with how the brain separates working memory from long-term memory. A patient with a concussion suffers from reduced working memory and executive function while keeping access to long-term memory. In our architecture that is the split between the memory vector and the weights: working memory is the vector the agent reasons over, and long-term memory is whatever the gradient updates have written into the network.

I later learned that cognitive science has a well-developed theory of exactly this division of labour. Complementary learning systems theory [19] holds that a fast store captures individual experiences and replays them, including during sleep, so that a slow learner can absorb them gradually. Unlike rehearsal, this one has already reached ML: experience replay in deep RL was inspired by it [20]. Read that way, the replay buffer in this architecture plays the part of the fast store. I take it as encouragement that a constraint which fell out of the math lands on a theory that was built from the biology.

At last, predictive processing, reasoning, and memory formation are unified in one simple and elegant formula.


Imitation Comes for Free

So far the agent explores because it is curious, and it remembers because remembering helps it predict. I treated these as two separate ingredients. The part that surprised me is what they do together: imitation behaviour should emerge under the memory-augmented active predictive processing (MAAPP) objective, without us asking for it.

Let me first say why this matters. One of the biggest problems in learning is exploration. In high-dimensional, continuous environments (aka the real world), the probability of randomly discovering useful actions drops dramatically due to the curse of dimensionality. There are just too many combinations of actions to try. So to make exploration efficient, expert demonstrations are collected and used to pre-train or constrain the policy. Because expert demonstrations are scarce, methods like offline RL and inverse RL try to squeeze improvement out of suboptimal or unlabeled demonstration data. I will try to show that the MAAPP objective shares the goals of such methods, and that it explains social behaviour as an emergent phenomenon instead of an objective we enforce.

To make the argument concrete, I split the memory write into its own module. The full agent then has three parts, a memory module, a predictor, and an actor:

Mψ(zt,at,mt,z~t)=mt+1,pϕ(zt,at,mt)=z~t+1,πθ(zt,mt)=at.\begin{aligned} M_{\psi}(z_t, a_t, m_t, \tilde{z}_t) &= m_{t+1}, \\ p_{\phi}(z_t, a_t, m_t) &= \tilde{z}_{t+1}, \\ \pi_{\theta}(z_t, m_t) &= a_t. \end{aligned}

Now put a student policy next to an expert completing new tasks in a difficult environment. The student is incentivized to imitate the demonstration whenever doing so leads it to discover new environment dynamics, because the expert's structured actions reach states the student would never find by chance. Note that this is impossible without memory: a policy that cannot remember what the expert did cannot replicate it. Since the actor's gradients propagate into the memory module, the actor can selectively remember the behaviours worth imitating.

Knowing is not the same as doing

There is an obvious objection, and it bothered me for a while. Wouldn't the predictor learn the dynamics of the demonstration just by watching, before the actor ever gets a reward for copying it?

This is where multimodality comes back. In simple environments like Atari games, observing an expert and acting with your own character produce nearly identical observations, so there is little imitation incentive left once the predictor has watched. A human baby, on the other hand, feels its muscles, its touch, and its body when it performs an action, which is very different from watching a demonstration. The predictor struggles to predict proprioception from observing the expert. The more the agent's observations depend on its own actions, the stronger the incentive to imitate. Knowing is not the same as doing.

The same reward also tells the agent when to stop. Once the actor has learned everything it can from the expert, the predictor models that behaviour well, the reward dries up, and the imitation ends. This is similar in effect to bootstrapping RL from an imitation policy [21]. For the same reason, the actor will not imitate behaviours that lead to no structured outcome or novel dynamics. This is close in spirit to what offline RL is trying to achieve, which is to learn only from the useful actions in a demonstration.

Who has been here before

Parts of this argument exist already, and they are worth laying out because they show where the open question is.

In developmental robotics, the socially guided intrinsic motivation learner of Nguyen and Oudeyer [22] chooses between imitating a teacher and exploring on its own according to which gives more learning progress. So it, too, stops imitating a teacher that has nothing left to offer. There, however, imitation is a built-in strategy that the learner selects.

In deep RL, imitation of an expert has been shown to emerge without being built in, but under task reward. Ndousse et al. [23] found that model-free agents needed a model-based auxiliary loss before they learned socially, and Bhoopchand et al. [24] found that memory was one of the necessary ingredients. Both findings agree with the picture above: a predictor and a memory are what make imitation possible.

As far as I know, what has not been tested is emergence from an intrinsic reward alone, and whether it depends on how much the agent's observations depend on its own actions. That is the claim I would most like to see someone try to break.

It may strike us how much emergent behaviour a policy with memory is capable of. Yet the machine intelligence community often treats persistent memory and policy learning as separable objectives. I would argue the two are more deeply intertwined than they appear. To borrow a perhaps unconventional line from George Orwell's Nineteen Eighty-Four: "Who controls the past controls the future."


What I Am Not Sure About

Since none of this has been run, I owe the reader the places where I think the argument is weakest.

First, a variance head trained on prediction error learns how wrong the predictor usually is, whatever the reason. Whether that separates aleatoric noise from epistemic uncertainty in states the agent has rarely visited is an empirical question, and the ensemble methods above exist because the answer is not obviously yes.

Second, curiosity pays for novelty, and novelty is not the same as usefulness. The agent has a way to rehearse, but I have not shown that it has a reason to, since repeating something known is the least surprising thing it could do. For the same reason it would happily copy an expert into a novel but bad state. Active inference pairs epistemic value with a term for the agent's preferences [3], and something like it is probably needed here.

Third, copying an expert requires mapping someone else's body onto your own. I have assumed the latent space makes this possible, and that is a large assumption.

The claim about imitation is at least cheap to test. Put a student next to an expert with intrinsic reward only, vary how much of the observation is proprioceptive, and see whether imitation appears in one condition and not the other.


Concluding Remarks

Let's picture an experiment with a robot controlled by a blank neural net. We put this "baby robot" in a typical household, where it listens to conversations, watches people act, and tries out actions. Through the architecture above, the robot updates its network, unsupervised, to learn the associations between language, images, and its own actions. That would be a kind of intelligence we have never seen before.

Today, memory, prediction, and action are mostly treated as separate modules. Modern architectures like world action models are starting to integrate prediction and action. Unified accounts are not new either. In cognitive science, the free-energy principle claims to cover perception, action, and learning with one objective [25], and in ML, LeCun's blueprint [1] places a world model, memory, an actor, and intrinsic motivation in one architecture. What I have tried to add is a sketch of how a single prediction objective could tie exploration, memory, and imitation together. As I have tried to show, all three are critical ingredients for human-level intelligence, and they are stronger together.

I made many biological comparisons here, despite how differently artificial neural nets and biological neurons learn. They are all grounded in the belief that cognition should share a common mathematical foundation, regardless of the means to that common end. Having two different cognitive systems produce the same phenomena sounds like an excellent way to judge whether we have reproduced the biological one faithfully.

Finally, I believe that machine learning is simple and elegant. The algorithm that works should be as fundamental and beautiful as Noether's theorem in physics. A grand unified theory should have a clear and fundamental justification for every design choice, with little, if any, manual engineering.


References

  1. Y. LeCun. A Path Towards Autonomous Machine Intelligence. OpenReview, 2022.
  2. R. Houthooft, X. Chen, Y. Duan, J. Schulman, F. De Turck, P. Abbeel. VIME: Variational Information Maximizing Exploration. 2016. arXiv:1605.09674
  3. K. Friston, F. Rigoli, D. Ognibene, C. Mathys, T. Fitzgerald, G. Pezzulo. Active inference and epistemic value. Cognitive Neuroscience 6(4):187–214, 2015.
  4. A. Clark. Whatever next? Predictive brains, situated agents, and the future of cognitive science. Behavioral and Brain Sciences 36(3):181–204, 2013.
  5. J. Schmidhuber. A possibility for implementing curiosity and boredom in model-building neural controllers. Proc. Int. Conf. on Simulation of Adaptive Behavior, 1991.
  6. D. Pathak, P. Agrawal, A. A. Efros, T. Darrell. Curiosity-driven Exploration by Self-supervised Prediction. 2017. arXiv:1705.05363
  7. Y. Burda, H. Edwards, D. Pathak, A. Storkey, T. Darrell, A. A. Efros. Large-Scale Study of Curiosity-Driven Learning. 2018. arXiv:1808.04355
  8. A. N. Mavor-Parker, K. A. Young, C. Barry, L. D. Griffin. How to Stay Curious while Avoiding Noisy TVs using Aleatoric Uncertainty Estimation. 2021. arXiv:2102.04399
  9. D. Pathak, D. Gandhi, A. Gupta. Self-Supervised Exploration via Disagreement. 2019. arXiv:1906.04161
  10. R. Sekar, O. Rybkin, K. Daniilidis, P. Abbeel, D. Hafner, D. Pathak. Planning to Explore via Self-Supervised World Models. 2020. arXiv:2005.05960
  11. C. Snell, J. Lee, K. Xu, A. Kumar. Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters. 2024. arXiv:2408.03314
  12. A. Bulatov, Y. Kuratov, M. S. Burtsev. Recurrent Memory Transformer. 2022. arXiv:2207.06881
  13. D. Hafner, T. Lillicrap, I. Fischer, R. Villegas, D. Ha, H. Lee, J. Davidson. Learning Latent Dynamics for Planning from Pixels. 2018. arXiv:1811.04551
  14. A. Graves. Adaptive Computation Time for Recurrent Neural Networks. 2016. arXiv:1603.08983
  15. M. Garnelo, J. Schwarz, D. Rosenbaum, F. Viola, D. J. Rezende, S. M. A. Eslami, Y. W. Teh. Neural Processes. 2018. arXiv:1807.01622
  16. R. C. Atkinson, R. M. Shiffrin. Human memory: A proposed system and its control processes. Psychology of Learning and Motivation 2:89–195, 1968.
  17. N. Cowan. The magical number 4 in short-term memory: A reconsideration of mental storage capacity. Behavioral and Brain Sciences 24(1):87–114, 2001.
  18. J. J. Hopfield. Neural networks and physical systems with emergent collective computational abilities. PNAS 79(8):2554–2558, 1982.
  19. J. L. McClelland, B. L. McNaughton, R. C. O'Reilly. Why there are complementary learning systems in the hippocampus and neocortex. Psychological Review 102(3):419–457, 1995.
  20. D. Kumaran, D. Hassabis, J. L. McClelland. What Learning Systems do Intelligent Agents Need? Complementary Learning Systems Theory Updated. Trends in Cognitive Sciences 20(7):512–534, 2016.
  21. H. Hu, S. Mirchandani, D. Sadigh. Imitation Bootstrapped Reinforcement Learning. 2023. arXiv:2311.02198
  22. S. M. Nguyen, P.-Y. Oudeyer. Active Choice of Teachers, Learning Strategies and Goals for a Socially Guided Intrinsic Motivation Learner. Paladyn 3(3):136–146, 2012. arXiv:1804.06819
  23. K. Ndousse, D. Eck, S. Levine, N. Jaques. Emergent Social Learning via Multi-agent Reinforcement Learning. 2020. arXiv:2010.00581
  24. A. Bhoopchand et al. Learning few-shot imitation as cultural transmission. Nature Communications 14:7536, 2023.
  25. K. Friston. The free-energy principle: a unified brain theory? Nature Reviews Neuroscience 11:127–138, 2010.