← Blogs

Why World Models Need Memory

A proposal for giving world models persistent memory, from the neuroscience of prediction to episodic buffers, consolidated landmarks, and gated adaptation.

Markdown ↗

world models · episodic memory · JEPA · continual adaptation

"The failure of current world models at long horizons is not the absence of capacity. It is the absence of a persistent memory hierarchy in the predictor."

This piece works through the problem from the ground up. We start with why memory is inseparable from prediction in biological brains, then watch language models rediscover the same lesson, then look at why JEPA, the most promising world-model family, still cannot do it. From there we name the exact bottlenecks, examine the partial solutions that exist and where each one stops, and only then build toward an architecture that closes the gap. Nothing about the solution is introduced before the problem earns it.


1. The neuroscience case: why prediction requires memory

Walk into your kitchen in the dark and your hand finds the light switch before your eyes find anything at all. You already know where the counter ends, that the floor will hold, that the fridge is humming to your right. None of that is sensation. It is prediction. What you experience as "seeing the room" is mostly your brain rendering its own model of the room, with the actual light arriving a beat late, used only to correct the parts the model got wrong.

This is the core of predictive processing, and Karl Friston gave it its sharpest form in the free energy principle: a brain exists to minimize surprise. Not the jolt of a single startling moment, but the long-run mismatch between what it expects and what the world actually delivers. To pull this off it runs a generative model that is always a step ahead, forecasting the next sight, sound, and touch. Perception is not the world flowing in. It is prediction flowing out, met halfway by evidence, and the gap between the two, the prediction error, is the only thing the brain ever really learns from.

Here is the part that matters for us. A prediction is only as good as the history behind it. Strip away memory and every moment arrives naked: no sense of what this place usually looks like, no expectation that the cup you set down is still on the desk. Every glance would carry maximum surprise. A system like that is not perceiving the world. It is transcribing it. A camera, not a mind.

Brains dodge this with not one memory system but two, running at different speeds. The hippocampus writes fast: a new experience is laid down in seconds, vivid and specific, which is why you can still picture exactly where you dropped your keys this morning. The neocortex writes slow. Over nights of sleep it replays what the hippocampus caught and quietly distills the patterns that repeat, until what remains is no longer "Tuesday's kitchen" but kitchen-ness itself: what is always there, what tends to move, what can safely be ignored.

The trick that makes this work is restraint. If every fleeting experience rewrote long-term memory, one strange afternoon could overwrite years of knowledge. So the brain gates the transfer. Fast memory fills constantly; slow memory updates only when the evidence piles up into something stable and genuinely new. That gate, the judgment of when a passing experience has earned a permanent place, is the quiet hinge the whole system turns on. Lose it in one direction and you forget everything; lose it in the other and you never learn anything new.

What holds that gate is not a single sentinel neuron or a dedicated circuit. It turns out to be a class of cell that neuroscience spent the better part of a century treating as passive scaffolding: astrocytes. The classical picture of a synapse is two neurons exchanging signals across a narrow gap. The actual structure is three. A perisynaptic astrocyte process wraps both terminals, and it is not passive. For a synapse to strengthen in the lasting way that memory consolidation requires — the mechanism is called long-term potentiation — the receiving neuron's NMDA receptors have to open fully. They need two signals at once: glutamate arriving from the sending neuron, and D-serine released by the astrocyte. Without the astrocyte's contribution the receptor stays half-closed, and the synapse does not learn, regardless of how often or how loudly the neuron fires. The astrocyte is not a bystander. It is a required cosignatory: the gate at the level of the individual synapse, deciding whether this particular connection is even permitted to strengthen.

Above that molecular gate sits a second one, systemic and slower. Throughout waking hours, neural activity generates ATP as a metabolic byproduct, and astrocytes convert that ATP into adenosine. Adenosine accumulates as a direct function of how hard the network has been working — it is the brain's usage meter. When it crosses a threshold the brain enters slow-wave sleep: acetylcholine falls, the cortex produces coordinated slow oscillations, and the hippocampus fires sharp-wave ripples, compressed replays of recent experience broadcast to the neocortex in rapid sequential bursts. The neocortex's weights shift a little with each replay. Over many nights the patterns that recur get distilled into something lasting, and the ones that do not quietly fade. Outside that mode — during waking, during REM — the same replay and the same weight changes do not happen. Astrocytes are, in this sense, the metabolic clock that decides when the consolidation window opens at all.

So the quiet hinge is actually two hinges stacked. The first is molecular: the astrocyte active, D-serine present, NMDA open, plasticity chemically permitted at a specific synapse. The second is systemic: adenosine high enough, slow-wave mode engaged, the hippocampus replaying rather than encoding. Both have to be aligned for a memory to cross from the hippocampus's scratchpad to the neocortex's permanent store. The content of an experience — how surprising it was, how often it recurred — is only half the question. The other half is whether the brain is currently in a state that permits consolidation at all.

Hippocampus Fast write · High fidelity Episode-specific · Short-lived Rapid encoding of surprise evidence Consolidation Gate Fires when evidence is stable, novel, and geometrically coherent Suppresses noise-driven updates writes to Neocortex Slow consolidation Compressed · Permanent Cross-episode abstract patterns New experiences encode fast. The gate decides when accumulated evidence justifies a slow, permanent update.
Figure 1. The brain's two-timescale memory architecture. Fast hippocampal encoding feeds a consolidation gate that updates the neocortex only when evidence is stable and genuinely novel.

You can watch this play out in a rat. Tucked inside its hippocampus are place cells, neurons that each fire for one particular spot in the world, and grid cells that tile space into a coordinate system. Drop the rat into a room it knows and these cells light up in their familiar order. It does not re-survey the walls. It remembers them, and that memory steadies its very next move. A world model worth the name should do the same: walk into a region it has seen before, recognize it, pull up what it already learned, and predict from there instead of starting over. Evolution shipped this hundreds of millions of years ago. The open question is whether we can build it.

Which makes the state of machine learning a little strange. Nearly every system we know of that stays competent over a long, shifting life leans on some version of this fast-slow, gated architecture. So why do we keep building world models that throw it away? Before answering that for world models, it helps to see the same problem appear, and get partly solved, in the systems we understand best.


2. Language models hit this wall first

A language model has no memory in the ordinary sense. Every time it answers, it reads the whole conversation again from the top. Nothing carries over between turns except what gets fed back in as text. For a short exchange this is invisible. But re-reading everything costs attention that grows with the square of the length, so as a conversation stretches into hundreds of turns something has to give. Either the model quietly drops the older parts of the context and loses track of what was decided an hour ago, or it pays a steeply rising bill to keep attending to all of it.

The fixes that actually worked all converge on one idea: give the model a way to write things down. The KV cache keeps the computed state of past tokens so they never have to be reprocessed. Retrieval-augmented generation pushes knowledge out into a document store and pulls back only the few passages that matter right now. Learned memory banks let the model decide for itself which tokens are worth keeping and fetch them later by content. Different mechanisms, one shape: instead of holding everything in mind at once, the model stores what it learned in a durable form and reaches for it on demand.

The payoff is not subtle. A model that can write and retrieve handles long tasks on less compute, because it stops re-deriving what it already worked out. The attention it saves goes to the new problem in front of it rather than the old ones behind it. And it starts to accumulate: the notes it kept about a codebase yesterday make it sharper today, where a memoryless model walks in every morning a stranger.

It is worth being exact about what counts here, because the obvious move, just enlarge the context window, is not the same thing. A bigger context still forgets the instant it overflows. It dilutes, the one fact you need buried under everything you don't. And it forces the model to search the entire haystack on every single step. Real memory is the opposite: selective, structured, and durable. It writes the important things on purpose, in a form built for retrieval, behind a gate that keeps noise from crowding out signal. Those are the same three properties the brain's consolidation gate enforces.

World models face this exact problem one floor up. A language model forgets across turns; a world model forgets across episodes. One loses the thread of a conversation, the other loses the room it mapped an hour ago. The cure has the same skeleton: something fast to catch experience as it happens, something slow to keep what proves durable, and a gate deciding what crosses between them. The hard part is fitting that skeleton into a predictor that works in latent space, without wrecking the representations that cost so much to train in the first place. To see why that is hard, look at how these world models are built.


3. JEPA and the long-horizon memory gap

JEPA, the Joint-Embedding Predictive Architecture, makes one decisive bet: do not predict what the world looks like, predict what it means. A generative model labors to reconstruct every pixel of the next frame. JEPA refuses to. Its encoder turns each observation into an abstract representation, and its predictor learns to guess the next representation from the current one, training only to close the gap between the two in that abstract space, with a stop-gradient on the target so the whole thing does not collapse into predicting a constant.

This is the right bet, for a good reason. Pixels are full of things no planner should waste a thought on: the grain of a wall, the exact shade of a shadow, the flicker of noise that will never repeat. Predicting them burns compute on the parts of the world that are both unpredictable and irrelevant. Predicting in latent space spends that compute where it counts, on what is where, what follows what, what kind of place this is. The results bear it out: JEPA-family models match or beat generative baselines on action-conditioned prediction, zero-shot robot planning, and video understanding, at a fraction of the cost.

A few systems in this family are worth knowing by name, because the rest of the argument leans on them.

  • V-JEPA 2: A frozen encoder combined with a learned video predictor. Strong performance on action-conditioned prediction and zero-shot robot planning. Demonstrated that a JEPA encoder pretrained on unlabeled video can generalize to robotics tasks without task-specific fine-tuning.
  • V-JEPA 2.1: Fixed a specific weakness in V-JEPA 2 where token-level spatial grounding was fragmented; representations were semantically coherent globally but lacked precise local spatial structure needed for fine-grained manipulation tasks.
  • LeWorldModel (LeWM): The most architecturally clean. A stable end-to-end JEPA trained from raw pixels without pretrained encoders, without stop-gradient heuristics, without exponential moving average encoders. Just two loss terms. 15 million parameters. Trains on a single consumer GPU in a few hours. Keep this one in mind; it matters later.
  • MC-JEPA: A pyramidal flow predictor, and the first hierarchical JEPA instantiation. Showed that multi-resolution prediction in latent space is architecturally feasible, with predictions at different spatial scales sharing a common embedding space.

Every one of them shares the same blind spot: the predictor is stateless across episodes. LeWM's encoder learns beautiful, general representations of how scenes evolve. V-JEPA 2 plans zero-shot. But the instant an episode ends, none of what just happened survives in the predictor. Its weights froze at the end of training and never move again. Episode one thousand starts from the identical prior as episode one, as if the previous nine hundred and ninety-nine never occurred.

LeCun's 2022 H-JEPA vision explicitly named this as a structural goal: stack JEPA modules at multiple levels of temporal abstraction. Lower-level JEPA handles moment-to-moment dynamics. Higher-level JEPA handles long-horizon, scene-level abstractions. The hierarchy was the proposed solution to the long-horizon planning problem. But the H-JEPA papers also acknowledge what they left open: how many abstraction levels the hierarchy should have, how levels communicate across episode boundaries, and what mechanism governs updating any level's representations when world dynamics change. The two-tier structure was called "arbitrary." The cross-episode update mechanism was left as future work.

That last item is the heart of it. The hierarchy tells the system what to predict at what timescale, but it says nothing about how to carry experience across episodes or when to revise what the predictor knows. Before we can propose a mechanism for that, we need to be precise about what actually breaks when a stateless predictor runs at long horizons. "It forgets" is too vague to build against. There are five distinct failure modes, and each one demands a different response.


4. Five bottlenecks, five different root causes

Each of these is a distinct failure with a distinct signature. Keeping them separate matters, because any real solution will need a different mechanism for each one. Lump them together as "forgetting" and you end up reaching for a single blunt instrument that fixes none of them cleanly.

Autoregressive predictive compounding

A predictor that feeds on its own output has a problem built in. It guesses the next representation, then feeds that guess back in to guess the one after, and so on. Each guess carries a small error, and each error becomes part of the input to the next. The mistakes do not average out. They snowball. Researchers at CMU and UCSD have traced exactly this in latent-space rollouts and named it autoregressive latent drift: a few steps in, the predicted representation has wandered away from anything the encoder would produce for the real scene. Plan against it and you are planning against a hallucination.

\[\varepsilon_{t+k} \approx \varepsilon_t \cdot L_f^{\,k}\]

Here \(L_f\) is the Lipschitz constant of the predictor \(f_\theta\): if \(f_\theta\) maps two latent states that are \(\delta\) apart to outputs that are at most \(L_f \cdot \delta\) apart, then each autoregressive step can amplify the current error by up to \(L_f\). Writing \(L_f = 1 + \lambda\) makes the per-step growth rate explicit:

\[\varepsilon_{t+k} \approx \varepsilon_t \cdot (1 + \lambda)^k\]

Important: this \(\lambda\) is not a loss hyperparameter. It is a geometric property of the predictor — specifically \(L_f - 1\), the amount by which each forward pass stretches small input errors. A predictor with \(L_f = 1\) is a perfect contraction and errors stay bounded; any \(L_f > 1\) causes geometric blowup over long rollouts. At \(\lambda = 0.02\) the error is 7× larger after 100 steps; at \(\lambda = 0.05\) it is 131× larger. Shaving per-step error helps a little but only changes \(\lambda\) marginally. What actually tames this is re-anchoring the rollout to a real observation periodically, resetting the accumulated drift before it can blow up.

No write mechanism

Freeze the encoder and predictor at inference, as every JEPA system does, and you cut the only wire by which today's experience could reach tomorrow's prediction. A robot can watch a new kind of object for an hour and retain nothing of it past the episode. This is not a setting you can tune or a dataset you can enlarge. There is simply no channel through which the model can grow once it is deployed. It is, by construction, incapable of learning from what it sees.

Noise vs. genuine change: the prediction error ambiguity

Suppose the prediction error suddenly spikes. What does it mean? It could mean the world genuinely changed, a wall moved, an object appeared, and the model ought to take note. Or it could be nothing: sensor noise, a stochastic render, the model's own drift catching up with it. The trouble is that these two cases can produce the exact same spike. Judge by magnitude alone and you cannot tell them apart. React to every spike and noise quietly corrupts everything you know. Raise the bar to stay safe and you sleep through the changes that mattered. Every memory system that wants to update itself runs straight into this wall.

Dynamic drift blindness

Not every change announces itself. A storeroom fills one box at a time over a month. A workspace creeps into a new layout over weeks. At any single visit the scene looks unremarkable, so a stateless model shrugs and moves on, every time. It never sees the trend, because seeing a trend requires comparing now against a remembered then, and it has no remembered then. Ask it how the room has drifted across its last three visits and it has no answer, because as far as it is concerned there were no last three visits.

Return visit degradation

This is the one that stings in practice. A model can pass through the same environment a hundred times and arrive on the hundredth visit no wiser than on the first, sometimes worse. With nothing consolidated, every return is a first encounter. And the one crutch available, stuffing past observations back into the context, decays on its own: the useful early frames get buried under a hundred recent irrelevant ones. The experience is all there, technically. It is just completely out of reach.

Failure modeRoot causeObservable signatureWhat fixes it
Autoregressive compoundingErrors feed next predictionRollout divergence at k > 20 stepsPeriodic re-anchoring to real observations
No write mechanismFrozen weights at inferenceZero cross-episode transferA persistent write pathway
Noise vs. genuine changeError magnitude is ambiguousFalse update storms on noiseGating on geometry, not magnitude
Dynamic drift blindnessNo incremental accumulationMisses gradual scene changesIncrementally updated representations
Return visit degradationNo consolidated retrievalFlat or declining performanceConsolidated, retrievable memory

Five failures, five root causes, five mechanisms that would have to be built. There is no single lever that throws all of them at once, which already tells you any honest solution has to be modular. The good news is that the field has not been idle. Several systems tackle one or two of these directly, and seeing exactly how far each one gets, and where it stalls, is what points the way to the rest.


5. The partial solutions, and where each one stalls

Three systems take real runs at the long-horizon problem, each from a different angle. None of them ends up giving the predictor a memory that survives between episodes, but that is precisely what makes them useful to study. The place where each one stops is a clue to what is actually missing.

Hierarchical World Models (HWM)

HWM splits the problem across two levels. A high-level planner thinks in coarse subgoals, the milestones of a task, while a low-level predictor handles the frame-by-frame dynamics needed to reach each one. The planner doesn't reason about raw actions at all; an Action Encoder folds whole sequences of primitive actions into single "latent macro-actions," so the top of the hierarchy plans in big strokes and the bottom fills in the detail.

And it works. On Push-T, HWM lands 61 to 70% task success where flat models manage 17%. On hard robotic arm control it reaches 70% zero-shot against a flat baseline stuck near zero. It even runs cheaper, about 3× less compute, because it can stop at a coarse level whenever fine detail is not needed. The interesting question is why dividing the horizon helps this much, and the answer goes straight back to the compounding problem from the last section.

High-Level Planner (slow, abstract) Subgoal sequence: g₁ → g₂ → g₃  ·  Action Encoder compresses primitive actions into Latent Macro-Actions Operates on coarse representations across many timesteps g₁ g₂ g₃ Low-level Predictor f_θ · frame-level dynamics z₁ … z_k Low-level Predictor f_θ · frame-level dynamics z_k … z_2k Low-level Predictor f_θ · frame-level dynamics z_2k … z_3k error bounded per interval error bounded per interval error bounded per interval Subgoal boundaries act as re-anchor points · high-level plan persists across low-level noise Error per interval: L_f^(N/K) vs free rollout: L_f^N where L_f = 1+λ is the predictor Lipschitz constant
Figure 2. HWM architecture. The hierarchy bounds error compounding per subgoal interval rather than across the full rollout.

How subgoal decomposition counters predictive error compounding

Recall from Section 4 that the predictor's Lipschitz constant \(L_f = 1 + \lambda\) sets the per-step amplification rate of any input error, so over an \(N\)-step free rollout the worst-case drift grows as \(L_f^N = (1+\lambda)^N\). Now cut that rollout into \(K\) subgoals. Inside each interval the predictor only runs free for \(N/K\) steps before the high-level plan pins it back to a known abstract target. The maximum drift is no longer set by the full horizon, only by the length of one segment.

\[\text{Flat rollout: } \varepsilon_{\max} = \varepsilon_0 \cdot (1+\lambda)^N\] \[\text{With } K \text{ subgoals: } \varepsilon_{\max} = \varepsilon_0 \cdot (1+\lambda)^{N/K}\]

(\(\lambda = L_f - 1\) is the predictor's per-step error amplification rate, a geometric property of \(f_\theta\), not a loss weight.) At \(\lambda = 0.02\), \(N = 100\), \(K = 5\): worst-case drift falls from 7.2× to 1.49×. The subgoal boundary is a free anchor — the same re-anchoring the compounding problem was asking for, delivered here by the plan rather than by memory.

That free anchor is the whole story. Because the high-level plan holds steady while the low-level predictor wobbles, the agent always has somewhere to aim. It never gets truly lost the way a flat predictor does when its own noise snowballs into nonsense. Which is why subgoal agents finish long-horizon tasks far more often even when, step for step, their predictions are no more accurate. HWM buys a real reduction in compounding. What it does not buy is memory: when the episode ends, the plan and everything under it evaporate.

FF-JEPA: the dual-engine approach

FF-JEPA, from June 2026, gets at the same anchoring effect a different way. It pairs a goal-free latent planner, which sketches a plausible future trajectory without being handed a target image, with an action-conditioned model that executes against that sketch. The move that makes it work is a feedback loop: the planner's high-level expectation is folded back into the encoder, so the representation the predictor sees already carries a sense of where things are headed.

The effect is an attractor. When local noise nudges a prediction off course, the top-down expectation tugs it back. The representation \(z_t\) is built from the bottom-up observation and the planner's expected trajectory \(h_t\) at once, so it is harder to knock loose. Same strength as HWM, then, and the same ceiling: it steadies prediction within an episode, and carries nothing across episode boundaries.

PAM: Predictive Associative Memory

PAM, Predictive Associative Memory, is the only one of the three that even tries to remember. It keeps a key-value store in the predictor's latent space: see an observation that resembles something filed away, pull the stored version back out, and use it to sharpen the current prediction. That is a genuine write mechanism, and in principle it can hold information across episodes, which already sets PAM apart.

But look at how the memory is used. PAM treats the store as a destination: write observations in, retrieve the relevant ones, paste them alongside the current input. That is in-context memory wearing a different hat, and it drags along every in-context flaw. It dilutes as the store fills. It costs more to search as it grows. And, fatally for our list, it has no gate, so it cannot tell a genuine change from noise and it never consolidates anything into the predictor's own weights. The buffer should not be a place you read from. It should be a signal, something whose accumulated evidence decides when the predictor itself ought to change. PAM has the wire but not the judgment.

Failure modeHWMFF-JEPAPAM
Autoregressive compoundingPartial — bounded per intervalPartial — feedback re-anchorsPartial — retrieval can anchor
No write mechanismNoNoPartial — retrieval only
Noise vs. genuine changeNoNoNo — no gating
Dynamic drift blindnessNoNoNo — snapshots not accumulation
Return visit degradationPartial — subgoal reuseNoPartial — if retrieved correctly

Lay the three side by side and a pattern jumps out. Each one solves a failure mode or two and leaves the rest untouched, and the failures they all walk past are the same ones: telling real change from noise, noticing slow drift, and writing what is learned into the predictor itself. Every one of those wants the same missing piece, a gate that judges accumulated evidence by its geometry rather than by the size of any single error, and that commits to a permanent update only when the evidence has earned it. That is exactly the piece the brain has and none of these systems do. The next section asks what it would take to build it.


6. What if the predictor could remember?

Step back and take stock. HWM and FF-JEPA make prediction within an episode markedly steadier. PAM goes further and writes things down, but reads them back the wrong way. And the moment any episode ends, all three snap back to the same frozen prior they began with. For all their differences, the predictor at the center is amnesiac in exactly the same way.

The reflex, when a JEPA system buckles at long horizons, is to reach for more: a longer context window, a bigger model, more frequent fine-tuning. None of these touches the actual problem. A longer context is more to look at, not more structure to remember. A bigger model is more capacity, not more adaptability. Fine-tuning trades the old knowledge for the new instead of holding both. The question was never how to give the predictor more of the present. It is how to give it a past: a memory that gathers experience across episodes and rewrites what the predictor knows only when that experience has genuinely earned it.

We already have a working blueprint for this, and it has been sitting in Section 1 the whole time. The hippocampus writes fast. The neocortex consolidates slow. A gate between them holds the line, committing to a permanent change only when the evidence clusters into something stable, novel, and geometrically coherent, never on the strength of one loud error. So the question almost asks itself: what if we built that gate for a JEPA predictor?

Picture it concretely. A fast buffer catches the surprising moments as they happen, in latent space. An online clustering step groups those moments by where they land, so the geometry becomes visible. A gate watches the clusters and fires only when one settles into stable new structure. And when it fires, a small, reversible adapter nudges the predictor's weights to absorb what was learned, while the encoder, with its hard-won representations, stays frozen and untouched. Fast capture, slow consolidation, a gate in between. The brain's design, ported to a predictor.

That port is faithful in one direction and a deliberate simplification in another. The content filtering — evidence accumulated, geometry tight, genuine novelty confirmed — mirrors what the biological gate cares about, and it handles the most dangerous failure mode: noise triggering false permanent updates. What it does not replicate is the mode question. The biological system uses astrocytic adenosine buildup to separate encoding and consolidation into temporally distinct phases; the consolidation window opens only when the brain's usage meter crosses a threshold, not whenever a content criterion is met. MAPA runs its gate continuously during inference rather than in a dedicated offline window. This is a known simplification, and a justified one: the three-part content gate already blocks the cases the mode separation was evolved to prevent. But the biological system asks two questions before it consolidates — is this worth keeping? and is now a time when keeping things is permitted? — and MAPA, by design, only asks the first.

Stated plainly, the bet is this: a two-timescale memory in the predictor, a fast episodic buffer in latent space feeding a consolidation-gated slow weight update, is the minimal sufficient mechanism for continual world-model prediction across long horizons, tracking non-stationary scenes with bounded forgetting, and needing no demonstrations and no replay buffer. The rest of this piece is what that looks like when you actually build it.


7. MAPA, end to end

We call it MAPA, the Memory-Augmented Predictive Architecture. It is not a new world model. It is a memory layer that wraps an existing JEPA predictor, and in the reference build that predictor is LeWorldModel, the clean 15-million-parameter system from Section 3. One rule sits above all the others: the encoder is never touched. The representations it learned in pretraining are the bedrock everything else stands on, and disturbing them would defeat the purpose. Every adaptation MAPA makes flows through a single LoRA adapter on the predictor, roughly 0.8% extra parameters, and the original weights can always be restored exactly.

It comes apart into seven components, and the seams are deliberate. Each one answers a specific failure mode from Section 4, which means each one can be removed on its own to see what breaks. That ablation table is not an afterthought; it is one of the central results the whole project is built to produce. Here is the system whole, then we will walk it piece by piece.

EVERY STEP WHEN PREDICTION ERROR EXCEEDS THRESHOLD WHEN GATE FIRES — RARE s_t Observation raw frame every timestep Encoder φ Frozen — never updated s_t → z_t ∈ ℝ¹⁹² abstract representation SIGReg-trained, metric-preserving z_t and ε_t z_t = φ(s_t) ε_t = ‖ẑ_t − z_t‖² ẑ_t: predicted at t−1 z_t: actual right now Predictor f_θ + LoRA Δθ inputs: z_t + nearest landmark output: ẑ_{t+1} (stored for next step) LoRA adapter Δθ is updated when gate fires runs every step · uses landmark from C7 ε_t if above threshold C2 Threshold τ(t) = μ_W + 2σ_W 100-step rolling window ε_t > τ → write to buffer ε_t ≤ τ → discard adapts as predictor improves C3 Episodic Buffer 2048 entries · ~7.5MB (z_t, a_t, z_{t+1}, ε_t, ep_id) surprise-weighted LRU eviction fast buffer — hippocampus analogue C4 Online K-Means groups z_t by cosine similarity tight cluster → real change scattered → noise EMA centroids track slow drift β=0.95 · ~20 step memory per centroid check gate criteria C5 Consolidation Gate — all three must hold ① support(k) ≥ N_min · enough observations in this cluster, not a one-off fluke ② tightness(k) ≤ σ²_max · cluster is geometrically tight = real change, not scattered noise ③ novelty(k) ≥ δ_novel · centroid is far from existing landmarks = genuinely new gate fires C6 LoRA Update 32 entries · 20 Adam steps · lr=1e-4 nudges predictor to new scene dynamics C7 Landmark Set 192-dim centroid · permanent · kilobytes retrieved every step → anchors predictor retrieved every step
Figure 3. MAPA architecture as three frequency bands. Top (gray): runs every single timestep. Middle (blue): triggered only when the prediction error clears the adaptive threshold. Bottom (green): the gate fires rarely, only when a cluster is tight, novel, and well-evidenced. The dashed green arrow is the landmark feedback — it runs every step, anchoring the predictor to what it has already learned.

One contrast with PAM is worth pausing on, because it is the whole design philosophy in miniature. PAM's buffer was a place to read from. MAPA's buffer is a place to listen to. Nothing is ever retrieved out of the episodic buffer directly; its job is to accumulate evidence and feed the gate, and the gate decides when the predictor should change. What actually persists and gets used at inference are the landmarks and the LoRA adapter, both of them products of consolidation, never the raw buffer itself. The buffer is the signal. The landmarks and the adapter are the memory.


8. Inside the memory: what gets kept, and how it knows

Only the surprises get written down

Most of what a model sees is unremarkable, and writing all of it down would drown the signal. So the first gate, the adaptive threshold filter (C2), lets through only the observations that genuinely surprise the predictor, the ones whose error clears a moving bar set from the recent past: \(\tau(t) = \mu_W + \alpha\sigma_W\), where the window \(W\) is the last 100 steps and \(\alpha = 2.0\) picks off roughly the top 2.3% of recent errors.

The bar has to move, and that is the subtle part. As the adapter learns, the predictor gets better and its everyday error shrinks. A fixed threshold would slowly fall silent, nothing ever clearing it again, and the system would stop noticing anything. Tying the threshold to the recent error distribution keeps "surprising" defined relative to how good the predictor currently is, so it stays alert in a new environment instead of going numb.

What a single memory looks like

Each thing written to the buffer is a small five-part record, \((z_t, a_t, z_{t+1}, \varepsilon_t, \text{episode\_id})\), and every field is there for a reason.

  • \(z_t\) is where the model was in representation space, the latent address of the moment.
  • \(a_t\) is the action taken, needed later because the weight update has to predict what follows given what the agent did.
  • \(z_{t+1}\) is where it actually ended up, the target the update is trained toward, with a stop-gradient so it stays a fixed goal.
  • \(\varepsilon_t\) is how surprised the model was, which doubles as the entry's priority: the more surprising a memory, the longer it survives eviction.
  • \(\text{episode\_id}\) tags where it came from, so the gate can see whether a pattern recurs across episodes or is just one episode's fluke.

All of it fits in about 7.5MB: 2048 entries of five 192-dim vectors. That smallness is intentional. The buffer is not an archive of everything that happened. It is a compact, self-refreshing scratchpad of recent surprises, just rich enough for the clustering step to find structure in.

Telling a real change from a passing fluke

This is the heart of it, the failure mode nothing else in Section 5 could handle. The clustering step (C4) takes each surprising \(z_t\) and drops it onto the nearest existing centroid if it is close enough in cosine similarity, past \(\tau_\text{assign} = 0.85\), updating that centroid by EMA with decay \(\beta = 0.95\). If nothing is close enough, it opens a new cluster. So the geometry of recent surprise is always laid out in front of the gate, grouped and visible.

The \(\beta = 0.95\) decay gives each centroid a memory of about 20 steps, which is exactly what lets it follow slow drift: as a scene gradually changes, its centroid slides along with it, and the distance it has traveled, \(\|c_{k,t} - c_{k,0}\|\), is a number you can read off. A sudden change does something different, it opens a fresh cluster rather than smearing an old one, and that is the right instinct, because an abrupt change and a slow drift are genuinely different events and deserve different memories.

Now the discriminator the whole architecture turns on. When surprise spikes, is it real or noise? The answer is in the shape of the cluster, not the size of the error. The gate (C5) measures tightness:

\[\text{tightness}(k) = \frac{1}{n_k}\sum_i \|z_i - c_k\|^2\]

Noise scatters. A spike from sensor jitter or drift lands somewhere random, and a cluster of such spikes is loose and diffuse, with high within-cluster variance. A real change does the opposite: several observations of the same new thing pile up in the same region, forming a tight, coherent knot. Same error magnitude, completely different geometry.

This is what lets MAPA separate a true scene change from a compounding-error spike of identical size, the thing a magnitude threshold simply cannot do. It is also exactly the claim the matched-noise experiment is built to test: manufacture noise events with the same error magnitude as real changes, and check that the gate fires on the changes and stays quiet on the noise where an adaptive learning-rate schedule cannot tell the difference.

Tightness alone is not enough, though, and the gate insists on all three of these at once:

\[\text{(1)}\;\; \text{support}(k) \geq N_{\min} \qquad \text{enough evidence, not one stray point}\] \[\text{(2)}\;\; \text{tightness}(k) \leq \sigma^2_{\max} \qquad \text{coherent in shape, not scattered noise}\] \[\text{(3)}\;\; \text{novelty}(k) = \min_j \operatorname{sim}(c_k, L_j) \leq 1 - \delta_{\text{novel}} \qquad \text{genuinely new, not already known}\]

Each guards a different way of being fooled. Drop support and the gate fires on a single lucky point. Drop tightness and it fires on noise. Drop novelty and it keeps re-learning something it already stored. Demanding all three together means a memory becomes permanent only when it is well-evidenced, coherent, and actually new, which is a high bar on purpose.

Writing it in: a nudge, not an overwrite

When the gate finally fires, the update is small and careful. The system pulls 32 records from a short raw cache and runs 20 Adam steps at \(1\times10^{-4}\), and the only thing that moves is the LoRA adapter:

\[\Delta\theta = B \cdot A, \qquad A \in \mathbb{R}^{r \times d_{\text{in}}},\;\; B \in \mathbb{R}^{d_{\text{out}} \times r},\;\; r = 8\]

That is about 0.8% of the predictor's parameters, and the base weights θ never move. New knowledge lands entirely in the adapter, which means the core representation cannot be catastrophically overwritten: the adapter can overfit and be reset, and the model underneath is still intact.

The two roads not taken are the point. Full fine-tuning would let each update trample the last, exactly the forgetting we set out to avoid. A replay buffer would mean hauling around raw observations at a scale the project deliberately refuses. LoRA is the smallest pathway that still writes: structured, durable, and bounded enough that nothing it does is irreversible.


9. Architectural choices and pre-training design

Two pre-training choices make everything in Section 8 actually work. They are easy to skip past as implementation detail, but the gating quietly depends on both.

Why SIGReg and not an EMA encoder

Standard JEPA keeps representations from collapsing by running a second, slowly-updating copy of the encoder as a target, the exponential moving average trick. It works, but it doubles the trainable parameters and bolts on real complexity. LeWorldModel showed you do not need it: a geometric regularization loss prevents collapse just as well, with no shadow network at all. MAPA takes the same route and trains its encoder with SIGReg, which adds that geometric term on top of the usual contrastive loss.

\[\mathcal{L} = \mathcal{L}_{\text{InfoNCE}} + \lambda_{\text{geo}} \cdot \mathcal{L}_{\text{geo}}\] \[\mathcal{L}_{\text{geo}} = \mathbb{E}_{i,j}\!\left[\bigl(\|\varphi(s_i) - \varphi(s_j)\| - d_{\text{obs}}(s_i, s_j)\bigr)^2\right]\]

The geometric term forces distances in latent space to track distances in the real world, which is the same as bounding how fast the encoder can stretch space. This is not housekeeping. The whole gate runs on cosine similarity, and cosine similarity only means "semantically alike" if the latent space is metrically honest. Skip SIGReg and two nearly identical scenes can land far apart, shattering one coherent place into a dozen phantom clusters and making the tightness test meaningless. The gate is only as trustworthy as the geometry underneath it.

Why LeJEPA with multi-step targets

The predictor is trained to look several steps ahead at once, \(k \in \{1, 2, 4, 8, 16\}\), not just one step like vanilla JEPA. Two things follow, and both feed back into the memory system. First, a predictor that is decent at long horizons has a lower baseline error, which gives the adaptive threshold a quieter background to pick surprises out of. Second, training across timescales forces representations that mean something at every scale, coarse enough for the long view, fine enough for the next frame. That is exactly the split the memory relies on: the buffer works the fine grain, the landmarks hold the coarse.

Multi-episode unlabeled video observation stream Stage 1 · SIGReg Encoder Pre-training L = L_InfoNCE + λ_geo · L_geo  ·  metric-preserving latent space No EMA target network · halves trainable params · bounds encoder Lipschitz constant Stage 2 · LeJEPA Predictor Pre-training Multi-step targets k ∈ {1,2,4,8,16}  ·  L_JEPA = ||f_θ(z_t,k) − sg[φ(s_{t+k})]||² Representations meaningful at multiple timescales · aligns with MAPA fast/slow memory split Frozen φ + initialized f_θ → MAPA runtime
Figure 4. Pre-training pipeline. SIGReg and LeJEPA are designed together to give MAPA's gating a metrically consistent latent space.

The inference loop, step by step

At runtime the encoder and base predictor are frozen; the only thing that ever moves is the adapter. Each timestep runs the same seven steps:

  1. Encode the observation: \(z_t = \varphi(s_t)\).
  2. Pull the nearest landmark, \(\hat{L} = \arg\min_j \operatorname{sim}(z_t, L_j)\), to anchor the prediction.
  3. Predict the next latent with the current adapter: \(\hat{z}_{t+1} = f_{\theta + \Delta\theta}(z_t, \hat{L})\).
  4. Measure how wrong it was: \(\varepsilon_t = \|\hat{z}_t - z_t\|^2\).
  5. If the surprise clears the threshold, \(\varepsilon_t > \tau(t)\), write the record to the buffer.
  6. Assign it to a cluster and slide that centroid (C4).
  7. If all three gate criteria hold, run the small LoRA update and lay down a new landmark.

Notice the asymmetry, because it is the point. Steps 1 through 4, including the landmark lookup, run every single step; the gate in step 7 fires maybe once in a few thousand, only when the world genuinely shifts. Almost all of MAPA's benefit at inference comes from that constant, cheap re-anchoring to what it already knows, not from the rare, expensive moments of learning something new.


10. MAPA is model-agnostic

Nothing about MAPA is wedded to LeWM. It asks only two things of whatever predictor it wraps: a fixed-dimensional latent space to work in, and a place to inject a LoRA adapter. That is it, and both hold right across the JEPA family. The long-horizon memory result rides on a metrically consistent latent space, which any SIGReg-style encoder supplies, not on any one model's internals.

Base modelLatent dimLoRA-injectableMAPA-compatibleNotes
LeWM (ViT-S)192YesYes — reference implSIGReg encoder; end-to-end from pixels
V-JEPA 2384 / 768YesYesResize buffer entries to match dim
HWM low-level256YesYesAttach memory layer to low-level predictor
GPT-style LLMvariableYesPartialBuffer needs tokenization adapter
Diffusion modeln/aNoNoNo consistent latent; prediction objective incompatible

The pairing that writes itself is HWM plus MAPA. Look back at Section 5: HWM steadies prediction within an episode by carving the horizon into subgoals, and MAPA carries knowledge across episodes by gated memory. They solve different halves of the same problem and never step on each other, so together they cover all five bottlenecks at once. The fit is even physical. MAPA's landmarks can tell HWM's planner what a region usually looks like from past visits, and HWM's subgoal boundaries hand MAPA ready-made anchor points to reset compounding error against. Two systems, different levels, one loop.


11. How to actually test this

A clean idea is worth little until it survives a fair fight, so the plan is six months built to give MAPA every chance to fail honestly. The protocol is preregistered on OSF before any ablation runs, which locks the metrics and baselines in advance so nothing can be quietly chosen after the fact. Every number comes from 10 independent seeds, varying the model's initialisation, the environment's reset schedule, and the order of change events. Comparisons use paired t-tests with Bonferroni correction, and anything that does not clear that bar is not reported as a result.

Month 1: prove the disease before prescribing the cure

Before building anything, make the failure undeniable. Take a pretrained, stateless LeWM and walk it through controlled non-stationary video: lights drifting slowly, an object swapped out in an instant, a new room entered cold. Watch the prediction error climb, then send the sequence back to a scene it saw earlier and watch how much it has forgotten. Split the curves by the kind of change, sudden against gradual, reversible against permanent, small against large, so the diagnosis is specific rather than vague.

Deliverable: baseline forgetting curves by change type. One diagnostic figure that shows the stationarity problem as a measured fact, not a claim. It is the hook the whole paper hangs on: the failure made visible before anything is offered to fix it.

Months 2–3: build it, then take it apart

Add components C2 through C7 one at a time, testing each on its own before wiring it into the whole. Then run the ablation that matters: pull each component out and measure what breaks, failure mode by failure mode. This is not table-filling. It is how the modularity claim gets tested for real. If removing the clustering step (C4) leaves return-visit performance untouched, then the story that C4 handles drift is wrong and has to be rewritten.

Deliverable: the memory-augmented LeWM module, a full ablation grid of components against failure modes, and the first head-to-head numbers against the stateless baseline.

Month 4: the four baselines, and the experiment that decides everything

Each baseline exists to kill a specific objection before a reviewer can raise it.

  • Stateless LeWM is the floor. No memory at all. Any memory mechanism has to clear it, and clear it convincingly.
  • Extended-context LeWM is the "just give it more context" reflex. Same model, longer buffer. If MAPA wins here, it wins on structure, not on having more to look at.
  • Full fine-tuning with a replay buffer is the strongest opponent, full weight updates over stored experience. MAPA should reach this without ever storing raw experience to replay.
  • Adaptive learning-rate schedule is the "you just reinvented warm restarts" charge: a schedule that updates harder when error is high, blind to any cluster geometry. This is the one the central experiment is aimed at.

That central experiment is the matched-noise control, and it is where the whole thesis is won or lost. Build environments where a noise event and a real change produce the exact same error magnitude, the same \(\varepsilon_t\). The adaptive-LR baseline, seeing only magnitude, fires on both and corrupts itself on the noise. MAPA, reading the geometry, should fire on the real change, where observations pile into a tight cluster, and stay silent on the noise, which scatters. If that separation holds, the geometric gate is not a relabeled learning rate. It is doing something a learning rate provably cannot.

Deliverable: the full baseline table, the matched-noise result establishing gate selectivity, plus compute-matched and memory-matched ablations so neither resource can explain the win.

Month 5: the long-horizon stress test

Now the hardest version of the claim. Put the agent in a multi-room world where the dynamics inside each room drift on their own, and let it wander out and come back. The question is blunt: can it keep predicting the room it is in without losing the rooms it left?

The contrast should be stark. The stateless model forgets room A while it is busy in room B, its curves sagging on return. The replay baseline holds on, but only by hauling gigabytes of raw frames. MAPA should hold on too, with bounded forgetting, on a landmark set and an adapter that together weigh kilobytes.

Deliverable: multi-room navigation results, forgetting curves under revisits, the dynamic-drift protocol, and return-visit performance curves.

Month 6: a bound, and the paper

Finally, turn the empirical story into a guarantee. Model the predictor's latent dynamics as a perturbed ODE and apply a Gronwall-type inequality to bound how fast the adapted predictor can drift away from the true dynamics, as a function of gate selectivity and buffer size. A theorem to sit beside the curves.

Deliverable: an arXiv preprint, an open-source memory module that drops onto LeWM and V-JEPA 2, the forgetting bound in the appendix, and every seed, config, and dataset released.


12. Knowing whether it actually worked

A single aggregate score would hide more than it reveals. MAPA could lift average prediction while quietly wrecking one failure mode to rescue another, and you would never see it. So each metric below is pinned to a specific bottleneck, and they are read together. Only by watching all of them at once can you tell the difference between "this works" and "this robbed Peter to pay Paul."

Primary prediction quality metrics

MetricWhat it measuresTarget behaviorWhy it matters
Long-horizon prediction error
MSE(ẑ_{t+k}, z_{t+k}) at k=20,50,100
Autoregressive compounding at rollout depth k Error growth sub-linear in k; no divergence Core quality metric. Directly measures the compounding bottleneck.
Return-visit prediction error
MSE on revisited scenes
Return visit degradation Error at visit N+1 ≤ error at visit 1 Direct measure of whether memory is being used productively.
Forgetting curve AUC
error(scene A) after N steps in scene B
Cross-scene forgetting rate AUC lower than stateless baseline; bounded by theory Multi-room test's primary outcome. Shows whether prior rooms are preserved.

Gate-specific metrics

MetricDefinitionTargetWhat failure looks like
Gate precision % of gate fires that correspond to genuine scene changes (as labeled in controlled environments) >90% — gate fires only on real changes Low precision = gate fires on noise = overwrites good representations
Gate recall % of genuine scene changes that trigger a gate fire >80% — doesn't miss real changes Low recall = changes go unrecorded = model stays stale in changed environments
Matched-noise precision Gate precision specifically on noise events matched in magnitude to real changes >85% — geometry separates noise from change even when magnitude doesn't Low = the tightness criterion is not working; the gate is magnitude-dependent not geometry-dependent
Gate latency Steps from genuine change to first gate fire <50 steps — fast detection, not stale adaptation High latency = model operates with stale representations for too long after a real change

Memory efficiency metrics

MetricDefinitionTarget vs. baselines
Landmark count Number of consolidated landmarks in \(\mathcal{L}\) after N episodes Sub-linear growth in episode count; each landmark represents a distinct scene region
Memory footprint Total bytes: buffer + landmarks + LoRA adapter <20MB at all times vs. replay buffer baseline (GB-scale)
LoRA adapter drift \(\|\Delta\theta_t - \Delta\theta_0\|_F\) over time Bounded, not diverging — confirms adapter isn't overwriting base knowledge
Inference overhead Latency increase per step vs. stateless baseline <5% — memory layer should not be a compute bottleneck

Hyperparameter sensitivity checks

Before claiming results, sweep the following and report performance stability:

ParameterDefaultSweep rangeInstability signal
α (threshold multiplier)2.01.0 – 3.0Large perf swing: gate is brittle to threshold
β (EMA decay)0.950.9 – 0.99Centroid instability or slow drift detection
τ_assign (cluster threshold)0.850.75 – 0.95Fragmentation or merging of semantic regions
N_min (gate support)5–103 – 20Gate fires on flukes or misses genuine changes
r (LoRA rank)84 – 16Underfitting new scenes or catastrophic forgetting

A result that only holds at one carefully chosen threshold is not a result, it is a coincidence. So the sweep over \(\alpha\) has to show MAPA beating the stateless baseline across the whole range, not just at the value that happened to be tuned. And because the protocol is preregistered, any departure from the declared hyperparameters has to be written down and justified, not quietly adopted because it scored well.


Closing

The whole argument collapses to a short chain. Intelligence over long horizons is prediction. Prediction over long horizons needs memory. And memory, the kind that lasts, needs a gate: something that writes fast, consolidates slow, and refuses to let noise become permanent. The brain has run this design for hundreds of millions of years. Language models stumbled into it through the KV cache and retrieval. JEPA world models, for all their elegance, still have not built it.

What it takes to give them one turns out to be small. On top of LeWM: a surprise filter, an episodic buffer, an online clustering step, a three-part consolidation gate, a LoRA adapter, and a landmark set. Seven pieces, each answering one specific failure, adding 0.8% to the parameter count and under 20MB of state. The encoder never moves. The representations that cost so much to learn stay exactly as they were.

The claim is deliberately narrow. Not that this is enough for general intelligence, but that it is the smallest thing sufficient to keep a world model predicting across long horizons without forgetting and without a replay buffer. The six-month program exists to put that claim under real pressure: preregistered, run across many seeds, corrected for multiple comparisons, with ablations sharp enough to falsify any single component on its own.

If it holds, MAPA is a drop-in memory for any JEPA predictor that has to live in a changing world. If it fails, the ablation grid will say exactly which piece gave way and why, and that, too, is worth knowing. Either way, the field learns where the real bottleneck is.