---
title: Semantic Memory Management Unit (S-MMU)
url: https://www.emergentmind.com/topics/semantic-memory-management-unit-s-mmu
type: topic
---

# Semantic Memory Management Unit (S-MMU)

Searching arXiv for the cited papers to ground the article.
Semantic Memory Management Unit (S-MMU) denotes a memory-optimization construct for systems that must convert interaction traces into reusable semantic content while maintaining an external memory store. In the UMEM framework, S-MMU is instantiated as the jointly trained Memory-Optimizer that tightly couples memory extraction and memory management between a frozen Executor $E$ and an external Memory Bank $B$ [2602.10652]. In a distinct but conceptually related usage, Sparsey can also be cast as an S-MMU, where semantic memory emerges from the superposition of episodic traces stored in sparse distributed representations rather than from a separately optimized extraction-and-management policy [1710.07829]. Across these formulations, S-MMU refers not to a single canonical architecture but to a functional role: regulating how experience is encoded, updated, and generalized into persistent memory.

## 1. Conceptual scope and definitional variants

In UMEM, S-MMU is defined as the jointly trained Memory-Optimizer module whose purpose is to couple two operations that are often decoupled in LLM-agent memory systems: extracting a concise memory from an interaction trace and deciding how that memory should modify the memory bank [2602.10652]. Its two sub-modules are the Memory Extraction Unit (MEU), which takes a new interaction trace $T_q$ and distills a concise, generalizable memory entry $A$, and the Memory Management Unit (MMU), which takes $A$ plus metadata and selects a memory operation $\mathrm{opt}\in\{\mathrm{ADD},\mathrm{UPDATE},\ldots\}$ to apply to $B$. The operational pipeline is given as: query $q \rightarrow$ retrieve Top-$K$ from $B \rightarrow$ Executor $E$ yields trajectory $T_q \rightarrow$ MEU distills $A \rightarrow$ MMU chooses $\mathrm{opt} \rightarrow$ memory bank $B \leftarrow \mathrm{Apply}(B,A,\mathrm{opt}) \rightarrow$ next query.

This formulation is motivated by a specific failure mode: existing methods predominately optimize memory management while treating memory extraction as a static process, resulting in poor generalization, where agents accumulate instance-specific noise rather than robust memories [2602.10652]. S-MMU therefore names the mechanism that turns memory formation into a joint optimization problem.

Sparsey presents a different interpretation. There, S-MMU is not a policy module inserted between an executor and an external symbolic bank, but a hierarchical associative memory model in which semantic memory arises as a side effect of storing episodic traces in superposed sparse distributed representations [1710.07829]. The model uses levels $\ell=0\ldots L$, with $\ell=0$ as binary-pixel input and higher levels organized into 2-D arrays of macs, each containing $Q$ competitive modules with $K$ binary neurons. A mac’s code $c_{\ell,m}(x)$ consists of exactly one winner per competitive module, so $|c_{\ell,m}|=Q$. In this sense, Sparsey treats semantic memory management as an emergent property of continual single-trial storage rather than as an explicit action-selection process.

A plausible implication is that “S-MMU” functions best as a systems-level category rather than a single algorithmic recipe. In one line of work it denotes a trainable controller over an explicit bank; in another it denotes a distributed representational substrate whose update rules induce semantic structure automatically.

## 2. Architectural organization in UMEM

The UMEM instantiation places S-MMU between a frozen Executor $E$ and an external Memory Bank $B$ [2602.10652]. The Executor serves as the LLM inference engine. The external bank stores accumulated memories. S-MMU mediates between execution and persistent storage by observing the resulting trajectory and deciding what durable memory should be created or revised.

The MEU is responsible for transforming the trajectory $T_q$ into a concise memory entry $A$, described as “a rule or strategy” in structured form. The MMU then takes the extracted $A$ together with metadata and selects a memory operation. The available operations are explicitly described as including $\mathrm{ADD}$ and $\mathrm{UPDATE}$. The update is then committed by $\mathrm{Apply}(B,A,\mathrm{opt})$.

The online loop is defined procedurally. The system initializes with $B\leftarrow\varnothing$ and initializes S-MMU policy parameters $\theta$. It precomputes $\mathrm{NN}(q)$ for all training queries via cosine embeddings. During each training step, it samples a batch of queries, retrieves $B_{\text{top}K}$ for each query, executes the query with the Executor, samples $G$ candidate actions from the policy, evaluates each action using a reward that combines a format check and neighborhood-level utility, updates $\theta$ using Group Relative Policy Optimization (GRPO), and finally commits the best-scoring action to the memory bank [2602.10652].

This design makes extraction and management inseparable during optimization. Rather than assuming that memory content is already correct and optimizing only the bookkeeping around it, UMEM trains the production of the memory entry and the decision to store or revise it under a common reward signal. This suggests that the system treats memory quality as inseparable from memory operations.

## 3. Semantic Neighborhood Modeling and neighborhood-level utility

A central mechanism in UMEM is Semantic Neighborhood Modeling (SNM), introduced to mitigate overfitting to specific instances [2602.10652]. For a query $q$, its semantic neighborhood is defined over a precomputed corpus $D$ using a fixed encoder $e$ with $\ell_2$-normalized embeddings. The neighborhood is

$$
\mathrm{NN}(q)=\{\text{the }N\text{ distinct queries }q'\neq q\text{ in }D\text{ that maximize }\cos(e(q),e(q'))\}.
$$

An equivalent formulation is provided as

$$
\mathrm{NN}(q)=\arg\max_{S\subset D\setminus\{q\},\,|S|=N}
\sum_{q'\in S}\cos\bigl(e(q),e(q')\bigr),
$$

with

$$
\cos(e(q),e(q'))=e(q)^\top e(q').
$$

During training, any candidate memory update is evaluated not only on the source query $q$ but averaged over all $q'\in \mathrm{NN}(q)$. This discourages instance-specific noise by rewarding memories that transfer across semantically related queries.

The practical example supplied for semantic neighborhoods is algebraic. For the query “Solve $x+y=10$, $x-y=?$”, the Top-3 neighbors might be “Given $a+b=12$, $a-b=?$”, “Solve $p+q=8$, $p-q=?$”, and “Find $x+y=14$, $x-y=?$”. A candidate memory such as “When $x+y=N$ and $x-y=M$, solve via $x=(N+M)/2$, $y=(N-M)/2$” is then scored on all three neighbors rather than on the source query alone [2602.10652].

This mechanism operationalizes semantic generalization by replacing pointwise reward with cluster-level evaluation. A plausible implication is that SNM converts memory learning from a local trace-compression problem into a neighborhood-consistency problem.

## 4. Reward design and policy optimization

UMEM defines a marginal utility reward for each sampled memory action $a$, where an action consists of the pair $(A,\mathrm{opt})$ [2602.10652]. For each neighbor $q'\in \mathrm{NN}(q)$, two terms are computed.

The first is Success Gain:

$$
G_{\mathrm{succ}}(q') = c_{\mathrm{mem}}(q') - c_{\mathrm{ref}}(q'),
$$

where $c_{\mathrm{mem}}(q')\in\{0,1\}$ is correctness after applying the action and $c_{\mathrm{ref}}(q')\in\{0,1\}$ is correctness under the reference memory bank with no update.

The second is Efficiency Regularization:

$$
R_{\mathrm{eff}}(q')=
\bigl[c_{\mathrm{mem}}(q')\times c_{\mathrm{ref}}(q')\bigr]
\times
\bigl(\ell_{\mathrm{ref}}(q')-\ell_{\mathrm{mem}}(q')\bigr),
$$

where $\ell_{\mathrm{ref}}(q')$ and $\ell_{\mathrm{mem}}(q')$ are the token lengths of the reasoning trajectories before and after applying the action. The gating term $c_{\mathrm{mem}}\cdot c_{\mathrm{ref}}$ ensures that brevity is rewarded only when accuracy is preserved.

The per-neighbor marginal utility is

$$
A_u(q') = G_{\mathrm{succ}}(q') + R_{\mathrm{eff}}(q'),
$$

and the group reward is averaged over the neighborhood:

$$
r_g(a)=\frac{1}{N}\sum_{q'\in \mathrm{NN}(q)} A_u(q').
$$

A small format-check bonus $r_f\in\{0,1\}$ is added to obtain the final reward,

$$
r(a)=r_f(a)+r_g(a).
$$

The joint training objective maximizes the expected marginal utility over the training set $Q$:

$$
\max_\theta\;
\mathbb{E}_{q\sim Q}\Bigl[
\alpha\,r_f(a)
+\frac{1}{N}\sum_{q'\in \mathrm{NN}(q)}A_u(q')
\Bigr],
\quad
a\sim T_o(\cdot\mid q,T_q,B),
$$

where $\alpha$ is a small weight for the schema-format reward. The optimization is performed by Group Relative Policy Optimization without a value critic [2602.10652].

The pseudocode further specifies that group advantage is computed as

$$
A_{i,g}=r_{i,g}-\mathrm{mean}_g(r_{i,g}),
$$

and $\theta$ is updated by maximizing $\sum_{i,g} A_{i,g}\cdot \log T_o(a_{i,g}\mid \ldots)$. After policy update, the committed memory operation is the action with maximal reward for that query instance.

This reward design makes generalization measurable at training time. Rather than labeling a memory entry as intrinsically good, the framework defines goodness as marginal utility over a semantic neighborhood, with accuracy and trajectory compression jointly represented.

## 5. Monotonic growth and continual self-evolution

The UMEM formulation imposes a monotonic memory growth property by design: S-MMU never deletes entries and performs only $\mathrm{ADD}$ or $\mathrm{UPDATE}$ operations, so

$$
|B_{t+1}| \ge |B_t|.
$$

The empirical consequence is described as a strictly non-decreasing curve when plotting $|B_t|$ against interaction step $t$ [2602.10652]. The stated rationale is that experience accumulates rather than vanishes, while $\mathrm{UPDATE}$ operations keep the size in check by replacing rather than blindly duplicating entries.

In continual self-evolution over 10 epochs on ALFWorld, UMEM is reported to achieve a steadily rising CSR curve, whereas competitors plateau or degrade, which is presented as confirmation of stable long-term memory growth and low error accumulation [2602.10652]. The abstract likewise states that UMEM maintains a monotonic growth curve during continuous evolution.

This design directly addresses a common concern in self-updating agent memory: that online adaptation can introduce regressions, overwrite useful abstractions, or amplify noise. Here the proposed answer is not deletion or periodic reset, but neighborhood-evaluated updates combined with non-decreasing bank growth. This suggests a specific interpretation of “memory management” in S-MMU: management is not synonymous with aggressive pruning, but with controlled accumulation under a utility criterion.

## 6. Evaluation benchmarks and reported performance

UMEM is evaluated with Exact Match (EM) accuracy on single-turn reasoning tasks and with Cumulative Success Rate (CSR) and Progress Rate (PR) on multi-turn embodied tasks [2602.10652]. The single-turn EM benchmarks are AIME, GPQA-Diamond, HLE, and HotpotQA. The multi-turn benchmark is ALFWorld.

The reported gains are summarized below.

| Setting | Baseline | UMEM |
|---|---:|---:|
| ALFWorld CSR | 61.11 % | 71.78 % |
| AIME | 51.67 % | 58.33 % |
| GPQA-Diamond | 52.53 % | 65.15 % |

For ALFWorld, the no-memory CSR of $61.11\%$ increases to UMEM CSR of $71.78\%$, a gain of $+10.67$ percentage points [2602.10652]. For AIME, the baseline of $51.67\%$ increases to UMEM (Qwen 4 B) at $58.33\%$, a gain of $+6.66$ percentage points. For GPQA-Diamond, the baseline of $52.53\%$ increases to UMEM at $65.15\%$, a gain of $+12.62$ percentage points. Across five benchmarks and three executor LLMs—Qwen 8B, GPT-5.1, and Gemini-2.5—UMEM is reported to uniformly outperform ReMem, Memp, and non-learning baselines by $3$–$12$ percentage points.

These results are specifically framed as evidence that joint optimization of extraction and management improves generalizable memory. The benchmark mix is notable: it spans single-turn reasoning and multi-turn interactive planning, which suggests that the S-MMU concept is intended to be agnostic to whether memory utility is expressed as answer accuracy or embodied task progress.

## 7. Relation to Sparsey and alternative interpretations of semantic memory management

Sparsey offers a markedly different but technically relevant interpretation of S-MMU [1710.07829]. The model is hierarchical, unsupervised, and based on sparse distributed representations (SDRs). Each mac contains $Q$ competitive modules with $K$ binary neurons, and the code space per mac is $K^Q$. The local sparsity is $1/K$, since each mac activates exactly one neuron per competitive module.

Its core per-mac data structures are a bottom-up weight matrix $W^U_{\ell,m}$, a lateral matrix $W^H_{\ell,m}$, and a top-down matrix $W^D_{\ell,m}$, all initialized to zero and represented with low precision. Encoding uses the Code Selection Algorithm (CSA), which computes bottom-up, horizontal, and top-down input potentials; forms a familiarity metric

$$
G=\frac{1}{Q}\sum_{i=1}^Q b_i
$$

with $b_i=\max_{j\in \mathrm{CM}_i} V_j$; and then modulates winner selection according to whether the input is familiar enough for code completion or novel enough for code separation. All steps are $O(Q\cdot K)$ per mac and are independent of how many codes are already stored.

Learning is single-trial and Hebbian. After code selection, the synapses associated with active co-occurrences in $W^U$, $W^H$, and $W^D$ are set to $1$ or incremented by $+1$. No iterative weight descent is used; a single co-activation sets a synapse and it never decays. Because codes are stored in superposition, semantic memory is described as emerging computationally for free from episodic storage. Similarity in code space is measured by

$$
S(x,y)=\frac{|c(x)\cap c(y)|}{|c(x)|},
$$

and this overlap monotonically tracks input-space similarity by construction of the CSA [1710.07829].

Sparsey also makes explicit complexity and systems claims. The three primitive S-MMU-style calls are write$(x)$, read$(x')$, and update$(x'')$, with total time complexity $O(M\cdot Q\cdot K)$ for $M$ total macs, independent of the number of stored items. Reported empirical figures include training on MNIST with 200 samples per class in 220 s on one CPU with approximately 90% accuracy, scaling to 800 per class with 89% accuracy in 25 min, and Weizmann Video training in approximately 210 s with 67% leave-one-actor-out accuracy after SVM readout on final-frame codes [1710.07829].

The contrast with UMEM is structurally instructive. UMEM treats semantic memory management as a learned policy over an external bank, evaluated through neighborhood-level utility. Sparsey treats it as the representational consequence of superposed SDR storage and constant-time retrieval. This suggests two distinct research programs under the same broad label: one centered on explicit memory actions for LLM agents, the other on distributed associative coding in hierarchical memory systems.

Source: https://www.emergentmind.com/topics/semantic-memory-management-unit-s-mmu