Non-Local Memory as Self-Interaction Functional#
TLDR#
Memory is modeled as a non-local force: the past acts back on the present via a self-interaction functional, not a passive buffer.
Introduce the memory screen / historical manifold needed to restore Markov structure when information propagates with delay.
This chapter reframes experience replay and retrieval as geometric objects: kernels on history with stability diagnostics.
Use the formalism to detect pathological memory behavior (stale recall, runaway attraction to a single trajectory, catastrophic forgetting).
Sets up the multi-agent chapter: delayed coupling naturally leads to field-theoretic interaction pictures.
Roadmap#
The historical manifold and memory screen construction.
Memory as self-interaction: kernels, potentials, and retrieval dynamics.
Diagnostics and failure modes for memory-driven control.
Now we come to something that, if you think about it carefully, is rather remarkable. Up until now, everything we’ve done has been local. The agent looks at where it is right now, checks the gradient of the potential right here, and decides which way to move. It’s like a hiker who can only feel the slope under their feet—very sensible, very Markovian.
But real intelligent systems don’t work that way, do they? When you’re solving a problem and you suddenly remember “Oh wait, I tried something like this last Tuesday and it worked beautifully”—that’s not a local operation. Your past experience is reaching forward through time and grabbing you by the collar, saying “Go this way.”
That’s what this section is about: how to make the mathematics of memory. Not memory as a passive storage system—not a filing cabinet you occasionally rummage through—but memory as an active force that literally pulls the agent toward places it has succeeded before and pushes it away from places it has failed.
Researcher Bridge: Experience Replay as a Potential Field
Standard Experience Replay buffers are just “bags of transitions” sampled at random. We reframe Memory as a Self-Interaction Functional. Past successes and failures act like physical magnets (attractive or repulsive charges) that generate a non-local force \(\Psi_{\text{mem}}\). The agent does not just “sample” the past; it is literally pulled toward high-reward trajectories by the gradient of its own history.
The Historical Manifold and Memory Screen#
Before we can talk about memory as a force, we need to talk about what memory actually is in our geometric picture. And this is where things get interesting.
Think about an agent wandering through its latent space \(\mathcal{Z}\). At every moment, it’s at some position \(z_t\). As time goes on, it traces out a path—a trajectory \(\gamma\) through the space. Now, along this path, things happen. Sometimes the agent gets reward (good!), sometimes penalty (bad!). The trajectory isn’t just a line; it’s a line decorated with information about how well things went at each point.
Here’s the key mental picture: imagine that every time the agent visits a location and gets reward, it leaves behind a little glowing marker—like a firefly trail. Positive reward leaves a bright warm light; negative reward leaves a cold dark spot. Over time, the agent builds up this luminous history across the manifold.
That’s what we’re going to formalize. The “memory screen” is this accumulated pattern of lights and shadows, and it’s going to act like a source of gravitational (or anti-gravitational) force.
Motivation. Sections 20–24 developed local dynamics: the geodesic SDE (Definition Definition 69) evolves \(z_t\) based on \(\Phi_{\text{eff}}(z_t)\) and its gradient at the current position. This is a Markovian formulation—future evolution depends only on present state. However, intelligent agents demonstrably use memory: past experience influences current decisions through mechanisms beyond local gradients [Lin, 1993, Mnih et al., 2015]. This section extends the geometric framework to include non-local contributions arising from the agent’s trajectory history.
Definition 131 (Historical Record)
Let \(\gamma: [0, T] \to \mathcal{Z}\) be the agent’s trajectory on the latent manifold \((\mathcal{Z}, G)\) over time interval \([0, T]\). The historical record is the pair \((\gamma, \alpha)\) where \(\alpha: [0, T] \to \mathbb{R}\) is the reward flux along the trajectory (Definition Definition 95).
Units: \([\gamma(t)] = [z]\), \([\alpha(t)] = \text{nat}/[s]\).
Cross-reference: This connects to Memory Time \(t' < t\) (Definition 1.3.4).
So the historical record is simply the agent’s trajectory plus what happened along it—where did you go, and what reward did you get at each moment? This is the raw material of memory. Now we need to turn it into something geometric.
Definition 132 (Memory Screen)
The memory screen is the signed measure on \(\mathcal{Z}\) defined by
where:
\(\delta_{\gamma(t')}\) is the Dirac measure concentrated at \(\gamma(t') \in \mathcal{Z}\),
\(\alpha(t') = J_r(t')\) is the (signed) reward flux at time \(t'\) (Definition Definition 95).
Units: \([\Xi_T] = \text{nat}\) (total signed measure), \([\alpha] = \text{nat}/[s]\) (reward flux rate).
Interpretation: \(\Xi_T\) encodes where the agent has been, weighted by the sign and magnitude of reward received. Positive rewards contribute positive measure (attractive memory); negative rewards contribute negative measure (repulsive memory).
Cross-reference (Relativistic Multi-Agent): In Chapter 29, the Memory Screen is elevated from an auxiliary construct to a primary state variable. The Causal Bundle \(\mathcal{Z}_{\text{causal}} := \mathcal{Z}^{(N)} \times \Xi_{<t}\) restores the Markov property in relativistic multi-agent settings where finite information speed creates non-Markovian dynamics. See Definition Definition 205.
Look at that definition carefully. The memory screen \(\Xi_T\) is a signed measure—it can be positive or negative. And what it does is accumulate Dirac deltas (point masses) along the trajectory, each weighted by the reward flux \(\alpha(t')\) at that moment.
Here’s what that means in plain language: if you visited position \(z^*\) and got positive reward there, you deposit a little positive “charge” at \(z^*\). If you visited and got punished, you deposit negative charge. The memory screen is the sum total of all these deposits.
Now, why “screen”? Think of it like a projection screen in a movie theater. The agent’s entire history gets projected down onto the latent space as this signed measure. All the temporal information—“I was here first, then there, then back here”—gets collapsed into a single spatial pattern. The when becomes where, weighted by how well it went.
This is not a lossy compression by accident; it’s a deliberate choice. The memory screen forgets when things happened but remembers where and how good. That turns out to be exactly what you need to generate a conservative force field.
Remark 33 (Connection to Holographic Persistence)
The memory screen \(\Xi_T\) provides the mathematical realization of holographic persistence (FAQ D.5.3). The measure \(\Xi_T\) on \(\mathcal{Z}\) acts as a “hologram” of the agent’s history projected onto the latent space, from which non-local forces can be computed.
The Non-Local Interaction Functional#
Now comes the beautiful part. We have this memory screen—this pattern of positive and negative charges deposited across the manifold. But a bunch of point charges isn’t a force field yet. We need to smooth it out and turn it into something that can actually push and pull the agent.
This is where we borrow a trick from physics: the heat kernel. If you’ve never encountered it before, here’s the intuition. Imagine dropping a blob of ink into water. Initially, the ink is concentrated at one point. But heat (diffusion) spreads it out over time. The heat kernel \(H_\tau(z, z')\) tells you: if you started with all the ink at point \(z'\), how much ink would be at point \(z\) after time \(\tau\)?
We’re going to use this kernel to “blur” our point-charge memory into a smooth potential field. The diffusion time \(\tau\) controls how far the influence spreads. Small \(\tau\) means sharp, localized memory—you only feel the pull of experiences that happened very close to where you are now. Large \(\tau\) means diffuse, global memory—experiences from far away can still tug at you.
Motivation. Given the memory screen \(\Xi_T\), we construct a potential \(\Psi_{\text{mem}}(z)\) that exerts influence at the current position \(z\) based on the entire historical distribution. The key mathematical object is an integral kernel that smooths and propagates the memory measure.
Definition 133 (Memory Kernel via Heat Equation [Grigor'yan, 2009, Rosenberg, 1997])
The canonical memory kernel is the Heat Kernel \(H_\tau(z, z')\) on \((\mathcal{Z}, G)\), defined as the fundamental solution to the heat equation:
where:
\(\tau > 0\) is the diffusion time (memory smoothing scale),
\(\Delta_G = G^{ij}\nabla_i\nabla_j\) is the Laplace-Beltrami operator on \((\mathcal{Z}, G)\) (Definition 2.5.3).
Units: \([H_\tau] = [z]^{-d}\) (probability density), \([\tau] = [z]^2\) (diffusion time in geometric units).
Interpretation: \(H_\tau(z, z')\) measures how much influence a memory at \(z'\) has on the current position \(z\) after diffusion time \(\tau\). Larger \(\tau\) yields smoother, more diffuse memory influence. For compact manifolds, \(H_\tau\) admits an eigenfunction expansion; for non-compact manifolds with bounded geometry, Gaussian upper bounds hold [Grigor'yan, 2009].
Notice something important: we’re using the geometry of the latent space here. The Laplace-Beltrami operator \(\Delta_G\) knows about the metric \(G\). This means memories don’t spread uniformly in all directions—they spread along the natural geometry of the space. If two regions are close in geodesic distance (even if they look far apart in Euclidean coordinates), memories will flow between them easily.
This is exactly right! The metric \(G\) encodes what it means for states to be “similar” in a control-relevant sense. Memory influence should follow the same notion of similarity.
Definition 134 (Memory Potential)
The memory potential is defined by
Expanding using Definition Definition 132:
Units: \([\Psi_{\text{mem}}] = \text{nat}\).
Interpretation: The memory potential is the convolution of the heat kernel with the signed reward-weighted trajectory measure. Since \(\Xi_T\) is a signed measure:
Near high-reward past positions (\(\alpha > 0\)): \(\Psi_{\text{mem}} < 0\), creating a potential well. The force \(-\nabla_G \Psi_{\text{mem}}\) points toward the memory (attractive).
Near high-penalty past positions (\(\alpha < 0\)): \(\Psi_{\text{mem}} > 0\), creating a potential barrier. The force \(-\nabla_G \Psi_{\text{mem}}\) points away from the memory (repulsive).
The sign convention ensures that the drift term inside \(\mathcal{M}_{\text{curl}}\!\left(-G^{-1}\nabla \Psi_{\text{mem}}\right)\) moves toward rewarding experiences and away from penalizing ones.
Let me make sure you’ve got the physics right in your head. The memory potential \(\Psi_{\text{mem}}\) is like an electrostatic potential, and the reward-weighted trajectory acts like a distribution of electric charges.
Positive reward at a past location? That’s positive charge. But wait—with the minus sign in the definition, positive charge creates negative potential. And \(-\nabla\Psi_{\text{mem}}\) points toward more negative potential. So the force points toward high-reward locations. The agent is attracted to where things went well.
Negative reward? Negative charge. Creates positive potential. Force points away. The agent is repelled from where things went badly.
It’s like having a bunch of tiny magnets scattered across the manifold, some attracting and some repelling, all adding up to create a force field that guides the agent’s decisions. The strength falls off with distance (through the heat kernel), so nearby memories matter more than distant ones.
Physics Isomorphism: Heat Kernel
In Physics: The heat kernel \(H_t(x, y)\) is the fundamental solution of the heat equation \(\partial_t u = \Delta u\), satisfying \(H_t(x, \cdot) \to \delta_x\) as \(t \to 0\). On a Riemannian manifold, it encodes diffusion and satisfies \(H_t(x, y) \sim (4\pi t)^{-d/2}\exp(-d^2(x,y)/4t)\) for small \(t\) [Berline et al., 1992, Grigor'yan, 2009].
In Implementation: The memory potential uses heat kernel convolution (Definition Definition 134):
where \(H_\tau\) is the heat kernel on \((\mathcal{Z}, G)\).
Correspondence Table:
Heat Equation Theory |
Agent (Non-Local Memory) |
|---|---|
Heat kernel \(H_t(x, y)\) |
Memory diffusion kernel |
Diffusion time \(t\) |
Memory timescale \(\tau\) |
Heat source |
Past reward-weighted positions |
Temperature evolution |
Belief spread over time |
Short-time asymptotics |
Geodesic distance dominance |
Connection: The Matérn kernel \(K_\nu \propto (-\Delta_G + \kappa^2)^{-\nu}\) generalizes the heat kernel; for \(\nu = 1\), it recovers the screened Poisson Green’s function (The Conservative Case: Scalar Potential and Screened Poisson Equation).
Proposition 39 (Kernel Alternatives [Rasmussen and Williams, 2006])
Alternative kernels may be used depending on application requirements:
Gaussian (RBF) Kernel:
\[ K_{\text{Gauss}}(z, z') := \exp\left(-\frac{d_G(z, z')^2}{2\ell^2}\right),\]where \(d_G\) is the geodesic distance and \(\ell > 0\) is the length scale. This provides fast (exponential) decay, suitable for short-range memory effects.
Matérn Kernel:
\[ K_{\nu}(z, z') \propto (-\Delta_G + \kappa^2)^{-\nu}\delta(z - z'),\]where \(\nu > 0\) is the smoothness parameter and \(\kappa > 0\) is the inverse correlation length. For \(\nu = 1\), this recovers the Green’s function \(G_\kappa\) from The Conservative Case: Scalar Potential and Screened Poisson Equation. The Matérn kernel has polynomial (rather than exponential) tails, providing longer-range correlations. See [Rasmussen and Williams, 2006] Chapter 4 for the Euclidean case.
Cross-reference: The Matern kernel with \(\nu = 1\) coincides with the screened Poisson Green’s function (Definition Remark 16), establishing a direct connection between memory effects and value propagation.
Why do we have multiple kernel choices? Because different problems have different memory structures.
The heat kernel (Gaussian decay) says: “Recent experiences matter, but old ones fade away exponentially fast.” Good for fast-changing environments where yesterday’s success might be today’s trap.
The Matern kernel (polynomial tails) says: “Old experiences still have some pull, just weaker.” Good for stable environments where what worked a thousand steps ago probably still works.
The key insight is that the choice of kernel is a modeling decision about how memory should decay with distance. There’s no universally correct answer—it depends on the structure of your problem.
Theorem 15 (Non-Markovian Nature of Memory)
The force field \(-\nabla_G \Psi_{\text{mem}}\) violates the Markov property.
Proof. By Definition Definition 134, \(\Psi_{\text{mem}}(z_t)\) depends on \(\Xi_T\), which contains \(\gamma(t')\) for all \(t' < t\). Therefore, \(\nabla_G \Psi_{\text{mem}}(z_t)\) depends on the entire trajectory history \(\{\gamma(t')\}_{t' \in [0,t)}\), not merely on \(z_t\). This violates the Markov property \(P(z_{t+\delta} | z_t, \{z_s\}_{s<t}) = P(z_{t+\delta} | z_t)\). \(\square\)
Remark (State Augmentation): The non-Markovian character is essential for capturing genuine memory effects. The system state must be augmented to include \(\Xi_T\) (or a sufficient statistic thereof) to recover a Markovian description in an extended state space.
Remark (Computational Complexity): Naively, evaluating \(\Psi_{\text{mem}}(z)\) requires \(O(T)\) kernel evaluations where \(T\) is the trajectory length. For long histories, approximations are necessary: (i) truncate to recent history, (ii) subsample the trajectory, (iii) use inducing points [Rasmussen and Williams, 2006], or (iv) maintain a running kernel density estimate.
This theorem is saying something profound, so let me make sure it’s clear. A Markov process is one where the future depends only on the present—you can throw away all your history and still make optimal predictions. That’s a beautiful mathematical property, and it makes life much simpler.
But memory, by definition, violates this. The force the agent feels right now depends on where it’s been in the past. You can’t throw away the history. The present position \(z_t\) is not a sufficient statistic for predicting what force the agent will experience.
Now, this isn’t as catastrophic as it sounds. The theorem also points to the solution: if you augment the state to include the memory screen \(\Xi_T\) (or some approximation of it), you get back a Markov process in the larger state space. The agent’s state isn’t just “where am I?” but “where am I, and what does my memory map look like?”
This is the standard trick for handling non-Markovian dynamics: expand your notion of state until it becomes Markovian again.
Memory-Augmented Equations of Motion#
Now we get to put everything together. We had the geodesic SDE from before—the equation that tells the agent how to move through latent space based on local potentials, policy, and noise. Now we’re going to add one more term: the memory force.
The beautiful thing is that it fits in so naturally. The memory potential \(\Psi_{\text{mem}}\) just adds to the effective potential \(\Phi_{\text{eff}}\). Physics is additive—if you have two sources of force, you just add them. The agent feels the gradient of the total potential, which now includes contributions from both the local value landscape and the non-local memory field.
Motivation. We now extend the geodesic SDE (Definition Definition 69) to include the memory-induced force \(-\nabla_G \Psi_{\text{mem}}\).
Definition 135 (Memory-Augmented Geodesic SDE)
The memory-augmented dynamics on \((\mathcal{Z}, G)\) are:
where:
\(\Phi_{\text{eff}}\) is the effective potential (Definition Definition 72),
\(\Psi_{\text{mem}}\) is the memory potential (Definition Definition 134),
\(\Gamma^k_{ij}\) are the Christoffel symbols of \(G\) (Definition 2.5.1),
\(u_\pi^k\) is the policy control field (Definition Definition 62),
\(T_c\) is the cognitive temperature (Definition 73, The Geodesic Boris-BAOAB Integrator),
\(W^j_s\) is a standard Wiener process,
\(\mathcal{M}_{\text{curl}} := (I - \beta_{\text{curl}} G^{-1}\mathcal{F})^{-1}\) is the curl-corrected mobility.
Cross-reference: Definition Definition 69.
Units: All terms have units \([z]/[s]\).
Look at that equation. It’s the same structure as before—drift from potential gradients, geodesic correction (the Christoffel symbols), policy control, and noise. The only change is that the potential is now \(\Phi_{\text{eff}} + \Psi_{\text{mem}}\) instead of just \(\Phi_{\text{eff}}\).
This is the power of the geometric framework. Memory doesn’t require a whole new theory; it slots right into the existing equations as an additional potential. The agent doesn’t have to “decide to use memory”—memory automatically exerts its influence through the same gradient-following mechanism that drives all the other dynamics.
Lemma 4 (Virtual Work of Recall)
The infinitesimal work performed by the memory force during displacement \(dz\) is:
Units: \([dW_{\text{mem}}] = \text{nat}\).
Interpretation: When the agent moves toward regions of low \(\Psi_{\text{mem}}\) (attractive memory, i.e., \(d\Psi_{\text{mem}} < 0\)), positive work \(dW_{\text{mem}} > 0\) is extracted from the memory field. This corresponds to “reward from recall”—revisiting previously successful states.
The “virtual work of recall” is a lovely concept. When you remember a past success and move toward recreating it, you’re extracting work from the memory field. It’s as if your memories are batteries storing potential energy, and using them releases that energy to help drive your current behavior.
Conversely, moving toward bad memories costs work—the memory field resists. This is exactly what you’d want: the mathematics encodes “seek experiences like past successes” and “avoid experiences like past failures” as energetic principles.
Theorem 16 (Memory-Induced Barrier Crossing)
Let \(z_t\) be the current position and suppose there exists a past time \(t^* < t\) with \(z^* := \gamma(t^*)\) such that:
\(d_G(z_t, z^*) < \ell_{\text{mem}}\) for some memory influence radius \(\ell_{\text{mem}}\),
\(|\alpha(t^*)|\) is large (strong reward signal at time \(t^*\)).
Then the memory gradient \(\|\nabla_G \Psi_{\text{mem}}\|_G\) can exceed the local barrier gradient \(\|\nabla_G \Phi_{\text{eff}}\|_G\), enabling transitions that would be forbidden under purely local dynamics.
Proof sketch. By Definition Definition 134 and the concentration of \(H_\tau\) near the diagonal for small \(\tau\):
For \(d_G(z_t, z^*) \sim O(\sqrt{\tau})\), the gradient \(\|\nabla_G H_\tau\|_G \sim O(\tau^{-(d+1)/2})\) can be made arbitrarily large by choosing small \(\tau\). If \(|\alpha(t^*)|\) is sufficiently large, this dominates \(\|\nabla_G \Phi_{\text{eff}}\|_G\). \(\square\)
Cross-reference: BarrierGap diagnostic (Limits: Barriers (The Limits of Control)).
Interpretation: Strong memories can “pull” the agent across local energy barriers, providing a mechanism for experience-guided exploration that transcends gradient-based planning.
This theorem is saying something genuinely important about the power of memory. Without memory, the agent is trapped by local energy barriers. If there’s a hill between where you are and where you want to be, you can’t get there—the gradient just pushes you back down.
But with memory, if you’ve been on the other side of that hill before and it was good, the memory field reaches across the barrier and pulls. For strong enough memories close enough to your current position, this pull can overcome the local barrier.
Think about what this means for exploration. Pure gradient-following is myopic—you only see the immediate landscape. Memory lets you see through walls, in a sense. A strong memory of success acts like a beacon, pulling you toward it even when the local landscape says “go away.”
This is how experience-guided exploration works. You don’t just wander randomly hoping to stumble on good states. Your past successes reach out and guide you back.
Connection to RL #20: Experience Replay as Degenerate Non-Local Memory
The General Law (Fragile Agent): Trajectory history induces a Memory Potential via heat-kernel convolution:
where \(H_\tau\) is the heat kernel on \((\mathcal{Z}, G)\) and \(\alpha(t')\) is the reward flux at past times.
The Degenerate Limit: Replace geometric kernel with uniform sampling. Ignore metric structure (\(G \to I\)).
The Special Case (Standard RL):
This recovers Experience Replay [Lin, 1992, Mnih and others, 2015].
What the generalization offers:
Geometric memory: Distances measured in \(d_G\), not Euclidean; nearby trajectories interact more strongly
Reward-signed forces: Positive rewards attract (revisit success); negative repel (avoid failure)
Heat-kernel smoothing: Memory influence decays with diffusion time \(\tau\)
Barrier crossing: Strong memories can pull the agent across local energy barriers
WFR Dynamics with Memory Sources#
So far we’ve been thinking about a single agent following a trajectory. But remember from Section 20 that we can also think about beliefs—probability distributions over where the agent might be. The Wasserstein-Fisher-Rao (WFR) framework describes how these distributions evolve.
What happens when we add memory to the WFR picture? Something quite remarkable: memory acts as a source term in the continuity equation. Belief mass can be created where attractive memories live and destroyed where repulsive memories live. It’s as if the memory screen is shining spotlights that make certain regions of the space more “real” (higher probability) and casting shadows that make other regions less real.
Motivation. Lifting to measure space via the Wasserstein-Fisher-Rao framework (Definition 53, Wasserstein-Fisher-Rao Geometry: Unified Transport on Hybrid State Spaces) [Chizat et al., 2018], we obtain a reaction-diffusion PDE incorporating memory.
Definition 136 (Memory-Augmented Reaction-Diffusion)
The WFR dynamics with memory are:
where:
\(\rho(z, s)\) is the belief density,
\(\mathbf{v} = \mathcal{M}_{\text{curl}}\!\left(-G^{-1}\nabla(\Phi_{\text{eff}} + \Psi_{\text{mem}}) + u_\pi\right)\) is the curl-corrected drift,
\(\bar{\Phi}_{\text{aug}} = \int_{\mathcal{Z}} (\Phi_{\text{eff}} + \Psi_{\text{mem}}) \rho \, d\mu_G\) is the mean augmented potential.
Cross-reference: Definition Definition 53, Theorem Definition 100.
Units: \([\partial_s \rho] = [z]^{-d}/[s]\), all terms balance.
Proposition 40 (Mass Creation from Experience)
The memory contribution to the reaction term is:
where \(\bar{\Psi}_{\text{mem}} = \int_{\mathcal{Z}} \Psi_{\text{mem}} \rho \, d\mu_G\).
Interpretation: Belief mass is created where \(\Psi_{\text{mem}} < \bar{\Psi}_{\text{mem}}\) (attractive memory) and destroyed where \(\Psi_{\text{mem}} > \bar{\Psi}_{\text{mem}}\) (repulsive memory). This acts as a virtual source that redistributes probability toward remembered high-reward regions, even when local dynamics (via \(\Phi_{\text{eff}}\)) do not support such transitions.
Here’s what this means in plain language. Normally, probability flows around like an incompressible fluid—what leaves one place must arrive somewhere else. But the reaction term allows mass creation and destruction. Memory makes probability appear near good experiences and disappear near bad ones.
This is a different mechanism from transport. Transport moves existing probability around. Reaction creates and destroys it. With memory, the agent’s beliefs can spontaneously shift toward remembered successes without having to continuously flow there through the space.
In computational terms, this is like teleportation. Instead of walking from A to B through all the intermediate states, memory lets you just… appear at B, if B was a strongly positive experience. The strength of this effect is proportional to how much better (or worse) the memory potential is at that location compared to the average.
Stability Analysis and Diagnostic#
Memory is powerful, but power is dangerous. If memory pulls too hard, the agent becomes a slave to its past—it will keep trying to recreate old successes even when the world has changed and those strategies no longer work. That’s overfitting to history.
On the other hand, if memory is too weak, the agent forgets what worked and keeps making the same mistakes over and over. That’s catastrophic forgetting.
The healthy regime is somewhere in between: memory should inform but not dominate. The question is: how do we know if we’re in the healthy regime? That’s what this section is about—a diagnostic that tells you whether memory and local dynamics are properly balanced.
Motivation. Non-local memory introduces a potential source of instability: if memory forces dominate local dynamics, the agent may overfit to history and fail to adapt to environmental changes. Conversely, if memory is too weak, the agent exhibits catastrophic forgetting.
Definition 137 (Non-Locality Ratio)
The non-locality ratio at position \(z\) is:
where \(\epsilon > 0\) is a regularization constant preventing division by zero.
Units: \([\Omega_{\text{mem}}] = \text{dimensionless}\).
Heuristic 27.5.2 (Homeostatic Bound on Memory). For stable operation, the non-locality ratio should satisfy:
with empirically recommended bounds \(\Omega_{\min} \approx 0.01\), \(\Omega_{\max} \approx 10\). These bounds are task-dependent and should be tuned based on the environment’s stationarity.
Boundary cases:
\(\Omega_{\text{mem}} \to 0\): Pure Markovian dynamics; agent exhibits catastrophic forgetting.
\(\Omega_{\text{mem}} \to \infty\): Pure memory-driven dynamics; agent overfits to historical experience and fails to respond to current environmental gradients.
Cross-reference: The Governor (Theory of Meta-Stability: The Universal Governor as Homeostatic Controller) can regulate \(\Omega_{\text{mem}}\) by adjusting the memory smoothing scale \(\tau\) or the reward flux weighting in \(\alpha(t')\).
The non-locality ratio \(\Omega_{\text{mem}}\) is beautifully simple: it’s just the ratio of how hard memory is pulling versus how hard the local potential is pulling. If \(\Omega_{\text{mem}} \approx 1\), they’re about equally matched. If \(\Omega_{\text{mem}} \gg 1\), memory dominates. If \(\Omega_{\text{mem}} \ll 1\), local dynamics dominate.
The heuristic bounds make operational sense. You probably want \(\Omega_{\text{mem}}\) somewhere between 0.01 and 10—memory should be noticeable but not overwhelming. The exact bounds depend on how stationary your environment is. In a very stable environment where the past is a good guide to the future, you can afford larger \(\Omega_{\text{mem}}\). In a rapidly changing environment, you want smaller \(\Omega_{\text{mem}}\) so the agent stays responsive to current conditions.
Node 43: MemoryBalanceCheck
# |
Name |
Component |
Type |
Interpretation |
Proxy |
Cost |
|---|---|---|---|---|---|---|
43 |
MemoryBalanceCheck |
Memory Screen |
Non-Local Balance |
Is memory contribution bounded? |
\(\Omega_{\text{mem}} = \lVert\nabla_G\Psi_{\text{mem}}\rVert_G / \lVert\nabla_G\Phi_{\text{eff}}\rVert_G\) |
\(O(\lvert\Xi_T\rvert)\) |
Trigger conditions:
\(\Omega_{\text{mem}} < \Omega_{\min}\): Memory underutilized; increase \(\alpha\) weighting or decrease \(\tau\).
\(\Omega_{\text{mem}} > \Omega_{\max}\): Memory dominates; increase \(\tau\) to smooth memory influence or decay old experiences.
Persistent imbalance: Re-examine memory kernel choice or trajectory sampling strategy.
Cross-references: Diagnostics: Stability Checks (Monitors) (Sieve Diagnostic Nodes), Theory of Meta-Stability: The Universal Governor as Homeostatic Controller (Governor regulation), Node 42 (GovernorStabilityCheck).
Summary: Memory as Non-Local Interface#
Let’s step back and see what we’ve built. The Fragile Agent has four main pillars—Perception, Action, Value, and Memory. The first three are all local: they depend only on what’s happening right here, right now. Perception clamps your position based on what you observe. Action clamps your momentum based on what you do. Value provides a local source term based on reward.
Memory is different. Memory is the agent talking to itself across time. It’s non-local in the most fundamental sense: what you feel now depends on what you experienced in the past, potentially long ago and far away in state space. The mathematical signature of this is the Fredholm integral operator—an integral over the entire trajectory, not just a differential operator at a point.
The table below makes this distinction crisp.
Table 27.6.1 (Pillar Locality Comparison).
Pillar |
Operator |
Geometric Role |
Locality |
|---|---|---|---|
Perception |
\(E_\phi\) |
Dirichlet BC (position clamping) |
Local |
Action |
\(D_A\) |
Neumann BC (flux clamping) |
Local |
Value |
\(\Phi_{\text{eff}}\) |
Source BC (Helmholtz solution) |
Local |
Memory |
\(\Psi_{\text{mem}}\) |
Fredholm integral operator |
Non-local |
Key insight: Memory introduces the first genuinely non-local contribution to the agent dynamics. While perception, action, and value all depend on local data (position, flux, source at \(z\)), memory integrates information over the entire trajectory history via the kernel \(H_\tau\).
Table 27.6.2 (Memory Kernel Comparison).
Kernel |
Asymptotic Form |
Decay Rate |
Use Case |
|---|---|---|---|
Heat \(H_\tau\) |
\((4\pi\tau)^{-d/2}\exp(-d_G^2/4\tau)\) |
Gaussian |
Default; smooth diffusive influence |
Gaussian/RBF |
\(\exp(-d_G^2/2\ell^2)\) |
Exponential |
Short-range memory; fast computation |
Matérn \(K_\nu\) |
\(d_G^{\nu-d/2} K_{\nu-d/2}(\kappa d_G)\) |
Polynomial \(\times\) exp |
Long-range; connects to value propagation |
Note: \(K_{\nu}\) denotes the modified Bessel function of the second kind. For the Matérn kernel on curved manifolds, the formula is approximate; exact expressions require spectral methods.
Summary. This section introduced non-local memory as a self-interaction functional, extending the Markovian dynamics of Sections 20–24. The memory screen \(\Xi_T\) (Definition Definition 132) encodes reward-weighted trajectory history; the memory potential \(\Psi_{\text{mem}}\) (Definition Definition 134) converts this into a force field via heat kernel convolution; and the Non-Locality Ratio \(\Omega_{\text{mem}}\) (Definition Definition 137) provides a diagnostic for balancing memory against local gradients. Node 43 (MemoryBalanceCheck) monitors this ratio during training.
Hyperbolic Active Retrieval: Geodesic Search and Semantic Pull-Back#
Section 27 was about the agent remembering its own past. Now we turn to something different but closely related: the agent reaching out to external knowledge. Think of this as the difference between “I remember doing this before” and “Let me look that up.”
In modern AI systems, this is called Retrieval-Augmented Generation (RAG)—the system queries a knowledge base and incorporates what it finds into its reasoning. But how do we fit this into our geometric framework? Here’s the beautiful insight: if both the agent’s internal representations and the external knowledge base use compatible embeddings, then retrieval is just another kind of non-local interaction. Instead of being pulled by your own past, you’re being pulled by relevant facts in the knowledge base.
The key challenge is what we call the “texture firewall problem.” External documents contain lots of specific details—exact wordings, formatting, style. You want to use that information for generation, but you don’t want it to corrupt your reasoning. The solution is to carefully separate what goes to the control loop (just the semantic content) from what goes to the decoder (full details including texture).
Researcher Bridge: Retrieval-Augmented Control
If you know episodic control or retrieval-augmented generation, this is the geometric version: retrieval is a geodesic search in a shared embedding space. The firewall ensures retrieved texture does not leak into policy decisions.
Cross-references:
Radial Generation: Entropic Drift and Policy Control (Poincare metric).
The Equations of Motion: Geodesic Jump-Diffusion (Equations of Motion).
Non-Local Memory as Self-Interaction Functional (Memory potential).
Tier 6: The Attentive Atlas (Permutation-Equivariant Routing) (Atlas architecture).
Conditional Independence and Sufficiency (Causal Enclosure) (Macro closure).
Motivation. While Non-Local Memory as Self-Interaction Functional treated memory as self-interaction—retrieval from the agent’s own trajectory—this section addresses external retrieval from knowledge bases, embedding indices, and document stores. The central observation is that the Poincare disk geometry introduced in Radial Generation: Entropic Drift and Policy Control applies equally to both internal latent representations and external knowledge embeddings. This isomorphism enables principled Retrieval-Augmented Generation (RAG) as geodesic search on a shared hyperbolic manifold.
The key challenge is the texture firewall problem: external documents contain high-frequency texture (\(z_{\text{tex}}\)) that must be delivered to the decoder but excluded from the control loop to prevent Mode T.C (Labyrinthine Overfitting). We solve this by extending the existing TextureFirewallCheck (Node 29) to external retrieval, ensuring that only bulk coordinates \((K, z_n)\) influence policy gradients.
The Isomorphism of Semantic Manifolds#
Here’s a remarkable fact about modern embedding systems: when you train models on language, images, or any other modality, they end up learning similar geometric structures. Two different embedding models, trained on similar data, will organize concepts in compatible ways. “Cat” and “dog” will be close together (both animals), and “cat” and “democracy” will be far apart, regardless of which model you use.
This isn’t magic—it’s because the models are learning the same underlying semantic relationships from similar data. And it means we can treat the agent’s internal representations and external knowledge bases as living in the same geometric space, or at least in spaces that are related by a smooth mapping.
The formal statement of this is the “Metric Isometry” axiom: there exists a distance-preserving map between internal and external representations. When this holds, retrieval becomes a geometric operation—finding nearby points in a shared space.
Definition 138 (External Knowledge Manifold)
Let \(\mathcal{Z}_{\text{ext}}\) denote the external knowledge manifold equipped with metric \(G_{\text{ext}}\), structured as a fiber bundle:
where \(\mathcal{K}\) is the macro-concept space, \(\mathcal{Z}_n\) the nuisance coordinates, and \(\mathcal{Z}_{\text{tex}}\) the texture fiber.
Units: \([G_{\text{ext},ij}] = [z]^{-2}\) (matching the internal metric).
Cross-reference: This decomposition mirrors Conditional Independence and Sufficiency (Causal Enclosure)’s latent structure \((K, z_n, z_{\text{tex}})\) and Tier 6: The Attentive Atlas (Permutation-Equivariant Routing)’s Atlas architecture.
Axiom 4 (Metric Isometry)
There exists a canonical isometry \(\Phi: \mathcal{Z}_{\text{int}} \to \mathcal{Z}_{\text{ext}}\) such that for all \(z, z' \in \mathcal{Z}_{\text{int}}\):
where both manifolds carry the Poincare metric (Definition Definition 59):
Interpretation: The isometry axiom asserts that embedding models trained on shared semantic corpora induce compatible distance structures. This is the mathematical foundation for cross-modal retrieval.
Definition 139 (Knowledge Atom)
A knowledge atom is a triple \(\xi = (K, z_n, z_{\text{tex}}) \in \mathcal{Z}_{\text{ext}}\) where:
\(K \in \mathcal{K}\): macro-concept (topic, entity class, logical category)
\(z_n \in \mathcal{Z}_n\): nuisance coordinates (style, formatting, source metadata)
\(z_{\text{tex}} \in \mathcal{Z}_{\text{tex}}\): high-frequency texture (specific wording, surface form)
Cross-reference: Compare Conditional Independence and Sufficiency (Causal Enclosure)’s decomposition. The macro closure mechanism (Definition 2.8.1) applies equally to external atoms.
A knowledge atom is just the external version of the agent’s internal state decomposition. Every piece of knowledge has a topic (\(K\)), some context (\(z_n\)), and specific surface details (\(z_{\text{tex}}\)). When you look up “the capital of France,” the topic is “geography/capitals,” the context might be “European politics,” and the texture is the specific string “Paris” with whatever formatting the source uses.
The crucial insight is that for reasoning, you only need \(K\) and \(z_n\). The texture is for output. If the agent starts making decisions based on whether the retrieved document used “Paris” or “paris” or “PARIS,” something has gone wrong.
Geodesic Search in Hyperbolic Space#
Why hyperbolic space? Remember from Section 21 that the Poincare disk is the natural geometry for hierarchical data. Abstract concepts live near the center; specific instances live near the boundary. The volume of the space grows exponentially as you move outward, which perfectly captures how the number of specific facts explodes as you get more precise.
Retrieval in this geometry is geodesic search: given your current query position, find the nearest knowledge atoms. But “nearest” means geodesic distance, not Euclidean distance. Two facts that are both highly specific (near the boundary) might be close in Euclidean terms but far in geodesic terms if they’re in different semantic branches.
Definition 140 (Hyperbolic Geodesic Distance)
For points \(z, \xi \in \mathbb{D}^d\) (the Poincare disk), the geodesic distance is:
Units: \([d_{\mathbb{D}}] = [z]\) (dimensionless in Poincare coordinates).
Cross-reference: This is the distance function induced by the Poincare metric \(G_{ij}\) (Definition Definition 59). See also Definition Proposition 13 for the hyperbolic potential \(U(z) = -2\operatorname{artanh}(\|z\|)\).
Definition 141 (Retrieval Measure via Geodesic Functional)
Given a query position \(z \in \mathcal{Z}_{\text{int}}\) and archive prior \(\mu_{\mathcal{E}} \in \mathcal{P}(\mathcal{Z}_{\text{ext}})\), the retrieval measure is:
where \(T_{\text{ret}} > 0\) is the retrieval temperature.
Units: \([T_{\text{ret}}] = \text{nat}\).
Interpretation: This variational problem balances semantic proximity (first term) against prior plausibility (KL term). At \(T_{\text{ret}} \to 0\), retrieval concentrates on the nearest neighbor; at \(T_{\text{ret}} \to \infty\), it reverts to the archive prior.
Proposition 41 (Exponential Complexity of Specificity)
The volume of a geodesic ball in the Poincare disk grows exponentially with radius:
Proof sketch: The hyperbolic metric has constant negative curvature \(\kappa = -1\). Standard volume comparison (Bishop-Gromov) yields exponential growth. \(\square\)
Interpretation: As the agent descends toward the boundary (increasing semantic specificity), the number of accessible knowledge atoms grows exponentially. This captures the combinatorial explosion of specific facts relative to abstract concepts—compare TopoEncoder hierarchy (Supervised Topology: Semantic Potentials and Metric Segmentation).
This exponential volume growth is profound. At the abstract level (“animals”), there’s a small number of relevant facts. At the specific level (“the individual tiger named Shere Khan in Kipling’s Jungle Book”), there are vastly more. Hyperbolic geometry captures this hierarchy naturally: the further you go from the center, the more space there is, and the more facts can fit.
This also explains why retrieval gets harder as you get more specific. At high abstraction, there are few candidates to search through. At high specificity, the search space explodes. The geodesic distance formula reflects this: it’s harder (larger distance) to distinguish between two specific facts in different domains than between two abstract concepts.
The Retrieval Texture Firewall#
Now we come to a subtle but critical issue. When you retrieve external knowledge, it comes with all sorts of irrelevant details: the font it was written in, the exact phrasing, spelling variations, formatting artifacts. This is the “texture” of the document.
You want to use this texture when generating output—if the user asks for a quote, you should give them the exact quote. But you emphatically do not want this texture affecting your reasoning. If your policy starts depending on whether a source used British or American spelling, you’ve got a problem.
The solution is a firewall: a strict separation between what goes to the control loop and what goes to the decoder. The control loop sees only \((K, z_n)\)—the semantic content. The decoder sees the full atom including \(z_{\text{tex}}\). The firewall ensures that \(\partial\pi / \partial z_{\text{tex}} = 0\)—texture never influences policy.
Definition 142 (Bulk Projection Operator)
The bulk projection \(\Pi_{\text{bulk}}: \mathcal{Z}_{\text{ext}} \to \mathcal{K} \times \mathcal{Z}_n\) is defined by:
Interpretation: This projection discards texture, retaining only control-relevant coordinates.
Cross-reference: This extends the internal texture exclusion of Conditional Independence and Sufficiency (Causal Enclosure) to external retrieval.
Definition 143 (Bulk-Filtered Retrieval Potential)
The retrieval potential is:
with the firewall constraint:
Units: \([\Psi_{\text{ret}}] = \text{nat}\), \([\Lambda_{\text{ret}}] = \text{nat}\), \([\lambda] = [z]^{-1}\).
Cross-reference: Compare the memory potential \(\Psi_{\text{mem}}\) (Definition Definition 134), which uses heat kernel rather than geodesic exponential. Both generate conservative forces.
Theorem 17 (Stability of Retrieval Loop)
Under the firewall constraint (Definition Definition 143), the retrieval force field:
is smooth (Lipschitz in \(z\)) and independent of external texture coordinates \(z_{\text{tex,ext}}\).
Consequence: The control loop remains stable; external texture cannot inject high-frequency gradients that would trigger Mode T.C (Labyrinthine Overfitting).
Proof sketch: The bulk projection \(\Pi_{\text{bulk}}\) is a smooth submersion. Composition with the smooth geodesic exponential preserves smoothness. The firewall constraint ensures \(\nabla_{z_{\text{tex,ext}}} \Psi_{\text{ret}} = 0\) by construction. \(\square\)
Cross-reference: This theorem extends TextureFirewallCheck (Node 29) to external retrieval. See Failure Modes (Observed Pathologies) for Mode T.C classification.
Heuristic 28.3.4 (Side-Channel Texture Delivery). External texture \(z_{\text{tex,ext}}\) is delivered to the decoder via a side channel:
At stopping radius \(R_{\text{cutoff}}\) (The Retrieval Texture Firewall), retrieve the full atom \(\xi = (K, z_n, z_{\text{tex}})\)
Inject \(z_{\text{tex}}\) directly to decoder attention, bypassing the EoM
The control loop only sees \((K, z_n)\)
Interpretation: This is the retrieval analog of “reading a document without letting its style affect your reasoning.”
The “side-channel texture delivery” heuristic is worth understanding deeply. When the agent retrieves a document, two things happen in parallel:
The semantic content \((K, z_n)\) enters the control loop, potentially changing what action the agent takes.
The full content including texture goes to a buffer that the decoder can access during generation.
This separation ensures that the agent’s reasoning depends only on what the document says, not how it says it. But the agent’s output can faithfully reproduce the specific wording when needed.
It’s like the difference between understanding an argument and quoting it verbatim. Understanding should be style-independent; quoting should preserve style exactly.
Retrieval-Augmented Equations of Motion#
Now we extend the equations of motion one more time. We had local potentials, then we added memory, and now we add retrieval. The pattern is exactly the same: each source of influence contributes a potential, and the agent feels the gradient of the sum.
The full equation now has three potential terms: \(\Phi_{\text{eff}}\) (local value), \(\Psi_{\text{mem}}\) (self-interaction from past trajectory), and \(\Psi_{\text{ret}}\) (interaction with external knowledge). The agent is pulled simultaneously by where value is high, where it succeeded before, and where relevant knowledge lives.
Definition 144 (Retrieval-Augmented Geodesic SDE)
The equations of motion with retrieval are:
where:
\(\Phi_{\text{eff}}\): effective potential (Definition Definition 72)
\(\Psi_{\text{mem}}\): memory potential (Definition Definition 134)
\(\Psi_{\text{ret}}\): retrieval potential (Definition Definition 143)
\(\Gamma^k_{ij}\): Christoffel symbols (Definition 2.5.1, Definition 22.2.1a)
\(u_\pi^k\): policy control field (Definition Definition 62)
\(T_c\): cognitive temperature (The Geodesic Boris-BAOAB Integrator)
Cross-reference: This extends the memory-augmented SDE (Definition Definition 135) with the retrieval term \(\Psi_{\text{ret}}\).
Proposition 42 (Superposition of Non-Local Forces)
The total non-local force is:
where:
Memory force \(\mathbf{f}_{\text{mem}}\) integrates over the agent’s past trajectory
Retrieval force \(\mathbf{f}_{\text{ret}}\) integrates over the external archive
Interpretation: The agent simultaneously experiences attraction to its own memory (Non-Local Memory as Self-Interaction Functional) and to relevant external knowledge (this section).
WFR Dynamics: Retrieval-Induced Mass Injection#
Just as memory creates a source term in the WFR continuity equation, so does retrieval. But there’s an important difference in interpretation. Memory mass creation is about the agent’s own experience. Retrieval mass creation is about importing external information.
When you retrieve a highly relevant fact, it’s as if belief mass spontaneously appears at the corresponding location in latent space. You weren’t there before, and you didn’t walk there—you just suddenly consider it possible because you read something relevant.
Definition 145 (Retrieval Source Term)
The Wasserstein–Fisher–Rao continuity equation with retrieval is:
where:
\(r_{\text{local}}(z)\): local mass creation rate (reward-driven, Definition Definition 53)
\(\sigma_{\text{ret}}(z)\): retrieval source term
The retrieval source is:
with \([\sigma_{\text{ret}}] = \text{nat}/[z]^d/\text{step}\).
Cross-reference: Compare WFR Dynamics with Memory Sources’s memory mass creation. Both mechanisms inject mass at non-local locations.
Proposition 43 (Non-Causal Transition via Retrieval)
Mass injection at retrieved locations enables transitions without continuous geodesic paths:
Interpretation: Retrieval teleports probability mass to semantically relevant regions, bypassing the diffusion constraint. This is the WFR-level description of “jumping to a retrieved fact.”
“Non-causal transition” sounds paradoxical, but it makes perfect sense once you see it. Normally, probability can only spread gradually—you can’t jump from A to B without passing through the space between. The diffusion process imposes a speed limit.
But retrieval breaks this. If you retrieve a fact about B while you’re at A, probability suddenly appears at B. No traversal required. This is the mathematical formalization of “suddenly realizing something” or “making a connection you hadn’t made before.” The insight doesn’t have to diffuse slowly through intermediate states; it can just appear.
This is immensely powerful for reasoning, but it also requires careful control. Uncontrolled teleportation would make the dynamics chaotic. The threshold in the retrieval source term ensures that only sufficiently relevant retrievals trigger mass injection.
Diagnostic Nodes for Retrieval Integrity#
Retrieval is powerful, but it can go wrong in ways that are hard to detect without explicit monitoring. We need two kinds of checks:
Alignment check: Is the external knowledge base actually living in the same geometric space as the agent’s internal representations? If the embeddings have drifted apart, retrieval will return irrelevant results.
Firewall check: Is the texture actually staying out of the control loop? If texture is leaking into policy gradients, the agent will start making decisions based on surface features rather than semantics.
These are the retrieval analogs of the diagnostics we’ve seen throughout the Sieve. You can’t just assume things are working; you have to measure.
We introduce two diagnostic nodes for monitoring retrieval health.
Node 44: HyperbolicAlignmentCheck
# |
Name |
Component |
Type |
Interpretation |
Proxy |
Cost |
|---|---|---|---|---|---|---|
44 |
HyperbolicAlignmentCheck |
Interface |
Metric Consistency |
Are internal/external manifolds aligned? |
\(\Delta_{\text{align}} := \mathbb{E}[\lVert d_{\mathbb{D}}^{\text{int}}(z, z') - d_{\mathbb{D}}^{\text{ext}}(\Phi(z), \Phi(z'))\rVert]\) |
\(O(\lVert\nu_\omega\rVert)\) |
Interpretation: Tests whether the isometry axiom (Axiom Axiom 4) holds empirically. Large \(\Delta_{\text{align}}\) indicates embedding drift or domain shift between internal representations and external knowledge base.
Threshold: \(\Delta_{\text{align}} < 0.1 \cdot \bar{d}_{\mathbb{D}}\) (alignment error below 10% of mean geodesic distance).
Node 45: RetrievalFirewallCheck
# |
Name |
Component |
Type |
Interpretation |
Proxy |
Cost |
|---|---|---|---|---|---|---|
45 |
RetrievalFirewallCheck |
Policy |
Causal Isolation |
Is external texture isolated from control? |
\(\Gamma_{\text{leak}} := \lVert\nabla_{z_{\text{int}}} (\partial \pi / \partial z_{\text{tex,ext}})\rVert\) |
\(O(d_{\text{tex}})\) |
Interpretation: Measures texture leakage into policy gradients. Should be near-zero under Theorem Theorem 17.
Threshold: \(\Gamma_{\text{leak}} < \epsilon_{\text{firewall}}\) (implementation-dependent; typically \(10^{-6}\)).
Cross-reference: Node 45 extends the internal TextureFirewallCheck (Node 29) to external retrieval.
Summary#
Let’s put memory and retrieval side by side to see how they’re the same and how they’re different.
They’re the same in structure: both are non-local potentials that integrate over some external source (past trajectory or knowledge archive) and contribute forces to the equations of motion. Both create mass sources in the WFR dynamics. Both need diagnostic monitoring to stay healthy.
They’re different in source and interpretation. Memory is about you—your own past experiences reaching forward to guide your current decisions. Retrieval is about others—external knowledge that can inform you. Memory uses the heat kernel (smooth, diffusive influence). Retrieval uses geodesic exponential (sharp, proximity-based selection). Memory’s firewall is temporal (past vs present). Retrieval’s firewall is spatial (bulk vs texture).
Together, they give the agent two complementary ways to transcend the tyranny of local gradients.
Table 28.7.1 (Memory vs Retrieval Comparison).
Aspect |
Retrieval (Hyperbolic Active Retrieval: Geodesic Search and Semantic Pull-Back) |
|
|---|---|---|
Source |
Internal trajectory \(\gamma_{0:T}\) |
External archive \(\mathcal{Z}_{\text{ext}}\) |
Kernel |
Heat kernel \(H_\tau(z, z')\) |
Geodesic exponential \(\exp(-\lambda d_{\mathbb{D}})\) |
Potential |
\(\Psi_{\text{mem}}\) (Def. Definition 134) |
\(\Psi_{\text{ret}}\) (Def. Definition 143) |
Firewall |
Temporal (past vs present) |
Spatial (bulk vs texture) |
WFR source |
\(r_{\text{mem}}(z)\) |
\(\sigma_{\text{ret}}(z)\) |
Diagnostic |
Node 43 (MemoryBalanceCheck) |
Nodes 44–45 |
Key insight: Memory and retrieval are dual non-local mechanisms. Memory integrates over temporal history; retrieval integrates over spatial archive. Both contribute conservative forces to the equations of motion (Definition Definition 144) and mass sources to WFR dynamics (Definition Definition 145).
Bilevel Regulation of Non-Local Potentials (Joint Optimization Resolution)#
Now we face a practical question: how much should the agent rely on memory versus retrieval? This isn’t something you can set once and forget. The right balance depends on the situation. In a familiar environment where your past experience is a good guide, lean on memory. In a novel situation where you need external information, lean on retrieval.
The Universal Governor (Section 26) handles this automatically. It watches the diagnostic signals—is the agent surprised by reality? is memory dominating too much?—and adjusts the strengths \(\Lambda_{\text{mem}}\) and \(\Lambda_{\text{ret}}\) accordingly.
The key insight is that “surprise” (the Interventional Gap) tells you whether your internal model is adequate. If you’re not surprised, your memory is working well. If you’re surprised, you need external information. The Governor translates this into concrete adjustments.
The joint optimization of memory strength \(\Lambda_{\text{mem}}\) and retrieval strength \(\Lambda_{\text{ret}}\) is solved by the Universal Governor (Theory of Meta-Stability: The Universal Governor as Homeostatic Controller) acting on the diagnostic residuals of Nodes 43 and 53.
Proposition 44 (Optimal Non-Local Coupling)
Let the control vector be \(\Lambda = (\Lambda_{\text{mem}}, \Lambda_{\text{ret}})\). The optimal coupling is the fixed point of the Governor’s policy \(\pi_{\mathfrak{G}}\) (Definition 126) given the diagnostic state \(s_t = (\Delta_{\text{causal}}, \Omega_{\text{mem}})\).
Control Law Derivation:
Surprise Signal: Let \(\Delta_{\text{causal}} = D_{\text{KL}}(P_{\text{int}} \| P_{\text{obs}})\) be the Interventional Gap (Node 53).
Overfitting Signal: Let \(\Omega_{\text{mem}}\) be the Non-Locality Ratio (Definition 137, Node 43).
Governor Update: The Lyapunov descent condition \(\Delta V_{\mathfrak{L}} < 0\) (Definition 129) implies the following qualitative update dynamics:
where \(\alpha_1, \alpha_2, \alpha_3 > 0\) are learning rates and \(\Omega_{\max}\) is the maximum tolerable non-locality ratio.
Proof sketch. The Governor’s outer objective (Definition 128) includes terms penalizing both prediction error (Interventional Gap) and overfitting (Non-Locality Ratio). The gradient of this objective with respect to \(\Lambda\) yields the stated control law. At equilibrium, \(\dot{\Lambda} = 0\), which implies a balance between reliance on memory and retrieval calibrated to the agent’s surprise level. \(\square\)
Remark 34 (Operational Interpretation)
If the agent is surprised by reality (\(\Delta_{\text{causal}}\) high): It must increase reliance on external truth (\(\Lambda_{\text{ret}} \uparrow\)).
If the agent is not surprised (\(\Delta_{\text{causal}}\) low): It can conserve bandwidth by relying on internal memory (\(\Lambda_{\text{mem}} \uparrow\)), subject to the constraint that it must not overfit (\(\Omega_{\text{mem}} < \Omega_{\max}\)).
This closes the joint optimization problem by reducing it to a specific instantiation of the Governor’s Lyapunov stability framework (Definition 129).
The Safe Retrieval Bandwidth Corollary (Instability Resolution)#
There’s a limit to how much information you can place in the agent’s latent space under the declared capacity convention. The area-law expression from Section 33 is an operational diagnostic whose boundary, resolution, and channel assumptions must be checked.
Retrieval adds information to the chosen proxy. If the proxy exceeds its declared capacity, the controller should flag the run and inspect the units and estimator. A singular metric or radial slowdown follows only under the additional metric ansatz, coupling, force, and overdamped hypotheses; saturation does not universally freeze the dynamics.
This result gives a conditional trigger and possible interventions: increase interface bandwidth or reduce retrieval intensity when the measured proxy violates the declared capacity. It does not provide a universal theorem about infinite knowledge or an automatic metric singularity for every retrieval system.
Retrieval-induced instability is identified as the violation of the Causal Information Bound (The Causal Information Bound). Retrieval functions as a mass-injection source term; stability is preserved only if the total bulk information respects the interface area law.
Theorem 18 (Safe Retrieval Bandwidth)
Let \(\sigma_{\text{ret}}(z)\) be the retrieval source term in the WFR continuity equation (Definition 145). The latent geometry remains non-singular if and only if the total information flux satisfies:
where \(C_{\partial} = \nu_D \cdot \text{Area}(\partial\mathcal{Z})/\ell_L^{D-1}\) is the boundary capacity (Definition Definition 102, Definition 103).
Proof.
Mass Augmentation: Retrieval modifies the bulk information density: \(\tilde{\rho}_I = \rho_I + \sigma_{\text{ret}}\).
Metric Response: By the Capacity-Constrained Metric Law (Theorem Theorem 6), the radial metric component scales as \(G_{rr} \propto (1 - \tilde{I}_{\text{bulk}}/C_{\partial})^{-1}\).
Singularity: If \(\int \sigma_{\text{ret}} > C_{\partial} - I_{\text{bulk}}\), then \(G_{rr} \to \infty\) at a radius \(r < 1\) (the horizon moves inward).
Dynamical Consequence: The update velocity \(\|v\|_G \to 0\) (Causal Stasis, The Causal Information Bound). The instability manifests as the freezing of the agent’s inference dynamics due to saturation of the holographic bound. \(\square\)
Interpretation: External retrieval becomes destabilizing when it pushes the total information content beyond the holographic capacity of the interface. The remedy is to increase interface bandwidth (more sensors) or reduce retrieval intensity.
The Causal Isometry Theorem (Cross-Modal Retrieval Resolution)#
Here’s a beautiful result that justifies cross-modal retrieval—using information from images to inform language processing, or vice versa.
The claim is this: if two different sensory channels (say, vision and language) both provide enough information to solve the same control task, then their latent geometries must be isometric—they must be the same shape, up to relabeling. Why? Because the geometry is determined by the causal structure of the task, not by the sensory channel. The task is invariant; the geometry follows the task.
This is why you can train image embeddings and text embeddings separately and then use them together: if they’re solving the same semantic tasks, they must be organizing concepts the same way. The isometry isn’t a happy accident; it’s a consequence of the physics.
Under uniqueness of the metric-law solution (for example, for the saturated Poincare-disk ansatz), we prove that if two modalities allow for the solution of the same causal control task, their capacity-constrained geometries are isometric in the bulk.
Theorem 19 (Causal Isometry Theorem)
Let \(\mathcal{M}_A\) and \(\mathcal{M}_B\) be latent manifolds encoding modalities \(A\) and \(B\) of a common environment \(\mathcal{E}\). Let \(\Phi_{\text{causal}}\) be the Causal Information Potential (Causal Discovery: Interventional Geometry and the Singularity of Action). If both representations are Interventionally Closed (Definition 168) and the metric-law solution is unique (as for the saturated Poincare-disk ansatz), then the induced metrics \(G_A\) and \(G_B\) are isometric.
Proof.
Metric Genesis: According to the Capacity-Constrained Metric Law (Theorem 6), the metric \(G\) is determined by the solution to the Einstein-like equation \(R_{ij} - \frac{1}{2}R G_{ij} + \Lambda G_{ij} = \kappa T_{ij}\), where the stress-energy tensor \(T_{ij}\) is derived from the risk Lagrangian \(\mathcal{L}_{\text{risk}}\).
Risk Invariance: The risk Lagrangian \(\mathcal{L}_{\text{risk}}(V) = \frac{1}{2}\|\nabla_A V\|^2 + U(V)\) depends only on the Value function \(V\) and the Causal Potential \(\Psi_{\text{causal}}\).
Task Invariance: The potentials \(V\) and \(\Psi_{\text{causal}}\) are functions of the causal graph of the environment \(\mathcal{E}\), which is an invariant independent of the sensory modality (pixels vs. tokens).
Uniqueness: Assuming the solution to the metric field equation is unique (guaranteed for the Poincare disk ansatz in the saturation limit), the geometries \(G_A\) and \(G_B\) are identical up to a diffeomorphism determined by the encoder parameterization. \(\square\)
Interpretation: Under the stated uniqueness condition, latent representations of the same concept in different modalities (e.g., visual vs. textual) are geometrically isometric because the risk functional governing the metric depends only on the causal structure of the environment, not the sensory channel. This justifies cross-modal retrieval: information retrieved from one modality can inform reasoning in another if both are grounded in the same causal graph.