Introduction
To carry a conversation across dozens of sessions, a model has to store the past and read it back when needed. Existing architectures lean toward one side of the trade-off between exact preservation and inference scalability. MemOnce resolves that dilemma with a two-stage design: compress and store once, then revive only when needed.
Paper: MemOnce: A Scalable Memory Architecture for Large Language Models (arXiv:2611.27973, 2026.11.23) · Project: https://clare-nie.github.io/MemOnce
1. Problem: every way of keeping memory has a different cost
1.1 Attention models store every past token
The KV cache is a temporary store that an autoregressive model keeps at each layer so it does not recompute the keys and values of tokens it has already read when predicting the next token. A Transformer accumulates this cache layer by layer and token by token.
With $L$ layers, context length $N$, and hidden dimension $D$, this cache grows as $O(LND)$, and prefill computation grows as $O(LN^2D)$ (Table 1). In concrete terms, at 1M tokens the GPU-resident cache under full context reaches 32.05 GB. A note in Table 14 states that baselines that OOM on a single H100 (80 GB) were evaluated on multiple GPUs.
1.2 Linear and recurrent models compress into a single state but forget details
Linear and recurrent models, typified by GDN, fold the past into a state matrix at each layer. GDN’s state is $d \times d$ and is continuously updated by the online delta rule (Eq. 3). Memory becomes $O(Ld^2)$ and independent of context length, but the problem is that the amount of information the matrix can hold is finite.
The paper (Appendix G, Table 16) describes this state as a rank bottleneck. A $d \times d$ matrix can hold at most $d$ linearly independent key directions without loss. Once the number of context tokens $N$ exceeds $d$, the association system becomes overdetermined, and together with interference between tokens, old signals decay exponentially. Moreover, because this compression happens before seeing the query ($x_t$), tokens irrelevant to the answer occupy the same finite capacity.
Experiments show the same pattern. Pure GDN’s perplexity rises sharply on long corpora. In the pretraining comparison (Table 15), GDN records WikiText 26.03 and Penn Treebank 223.14, while MemOnce (r=8) records 21.08 and 151.80.
1.3 Cross-layer sharing solves only half the problem
Approaches like YOCO that cache only the state of a middle layer (e.g., $L/2$) and decode the KV of subsequent layers eliminate the depth factor $L$. However, cache size still scales with $N$ as $O(ND)$, and prefill is still $O(LN^2D)$ (Table 1). No token-level compression occurs.
So the question the paper poses is this. Can exact recall, linear time, and a bounded GPU cache be obtained at the same time? MemOnce’s answer is “split the memory storage stage in two.”
2. Small example: how an 8,192-token conversation becomes memory
The following is an illustrative example that reproduces the paper’s setup with small numbers. Configurations such as chunk size 512, compression ratio $r=8$, a short-term window of 16 chunks, and index dimension 1,024 follow the paper’s post-training settings (§B.1, §D.1); the conversation content and responses are invented for explanation.
| Stage | Input | What actually happens | State retained | Output |
|---|---|---|---|---|
| Encoding | 8,192-token conversation (= 16 chunks of 512 tokens) | Pass the 16 chunks through the backbone in parallel to compute each chunk’s final-layer hidden states | Last 64-token state per chunk | Memory bank: 16 pieces × 64 tokens = 1,024 compressed tokens |
| Discard | First 448 tokens of each chunk | Drop them without revisiting | (448 tokens per chunk, 7,168 tokens total discarded) | — |
| Load | Memory bank | Put the most recent 16 chunks into the GPU short-term window; pieces evicted from the window are moved out to CPU/SSD | Short-term window: 1,024 compressed tokens = 5.0 MB | Long-term pool is empty in this example |
| Retrieval | Query “last week’s travel plan?” | Convert the last token state into a 1,024-dim index (0.25 ms); if there are long-term pool candidates, pick the top 64 by cosine similarity | — | Long-term pool is empty, so no long-term pieces are selected |
| Restore & generate | Active memory: 1,024 compressed tokens | Project into K/V for each of the 8 full-attention layers to restore them | K/V cache of each layer | Attention sees only this KV and the current input to generate the response (“Yes, we agreed to go to Jeju in March.”) |
flowchart TB
A["Input<br/>8,192-token conversation = 16 chunks of 512 tokens"] -->|"Pass through the backbone<br/>to compute final-layer hidden states"| B["Final-layer state per chunk<br/>16 x 512 x 2,560 dims"]
B -->|"Keep only the last 64 tokens per chunk"| C["Memory bank<br/>16 pieces x 64 tokens = 1,024 compressed tokens"]
B -->|"Discard the first 448 tokens"| X["Discarded<br/>448 tokens per chunk, 7,168 tokens total"]
C -->|"Fill the 16-chunk short-term window"| D["Short-term window (GPU-resident)<br/>1,024 compressed tokens = 5.0 MB"]
C -.->|"Evicted from the window"| E["Long-term pool (CPU/SSD)<br/>empty in this example"]
F["New input<br/>'last week's travel plan?'"] -->|"Last token state -><br/>1,024-dim index (0.25 ms)"| G{"Are there retrieval<br/>candidates in the long-term pool?"}
G -->|"No -> nothing to retrieve"| H["Active memory<br/>1,024 compressed tokens (entire short-term window)"]
G -.->|"Yes -> adopt only top-64<br/>the rest are dropped"| I["Active memory<br/>4,096 + 1,024 = 5,120 compressed tokens<br/>25.0 MB on GPU"]
H -->|"Restore to K/V for the 8 full-attention layers"| J["Attention input<br/>restored KV + current input"]
I --> J
J --> K["Generate response<br/>attend only to active memory, not the full past context"]
classDef keep fill:#e8f0fe,stroke:#3367d6,color:#0b2a5b
classDef calc fill:#fff4e5,stroke:#e08a1e,color:#5c3200
classDef drop fill:#f1f3f4,stroke:#9aa0a6,stroke-dasharray:4 3,color:#3c4043
classDef out fill:#e6f4ea,stroke:#2e7d32,color:#123d19
class A,F calc
class B,J calc
class C,D,H,I keep
class X,E,G drop
class K out
Colors in the diagram distinguish states. Blue boxes are storage states that actually remain on the GPU, orange is a computation process, dashed gray is something discarded or omitted (the discarded 448 tokens, the empty long-term pool, no retrieval candidates), and green is the final output. The numbers come from the 4B post-training setup. Keeping only the last 64 of 512 tokens per chunk (1/8) yields 1,024 compressed tokens, and since one such piece is 320 KB, 16 short-term window pieces fit in 5.0 MB.
Applying the same pipeline to a 1M context fills the long-term pool, and the retrieval stage actually runs. Only the top-64 from the long-term pool (64 × 64 = 4,096 compressed tokens) are adopted and the rest are dropped; adding the 1,024 tokens of the short-term window fixes active memory at 5,120 compressed tokens. The GPU footprint of this state is 25.0 MB (Table 14), and the past that attention sees is only these 5,120 compressed tokens.
3. Method: how writing, retrieval, and reading are separated
The paper decomposes the memory state into three functions (Eq. 5).
$$G_t = g_\theta(x_{1:t-1}), \quad M_t = i_\theta(x_t, G_t), \quad C_t = u_\theta(M_t)$$- $g_\theta$: write. Compress the past and store it in the persistent memory bank $G_t$.
- $i_\theta$: retrieve. Select only the states that match the current input and turn them into active memory $M_t$.
- $u_\theta$: read. Restore the selected states into the KV cache $C_t$ of each attention layer.
3.1 Writing: keep only the last 1/r tokens and store once
If we split the history into segments $x_i$ and encode each one, each segment yields a final-layer hidden state $h^L_i$. The memory encoder takes only the last 1/$r$ tokens from it (Eq. 6, default $r=8$).
G_t = Concat(h^L_{1,-n_1/r:}, ..., h^L_{t-1,-n_{t-1}/r:}) = [m_1, ..., m_k]^\top ∈ R^{k×D}, k = ⌊N/r⌋G_t = Concat(h^L_{1,-n_1/r:}, ..., h^L_{t-1,-n_{t-1}/r:}) = [m_1, ..., m_k]^\top ∈ R^{k×D}, k = ⌊N/r⌋This single store compresses along two axes at once. The layer-dimension factor of $L$ disappears, and the time dimension shrinks by $r$, so persistent memory storage becomes $Lr$x smaller.
The paper grounds the sufficiency of the trailing tokens in causal masking and the properties of linear blocks. Because linear blocks and causal attention keep pulling context within a chunk toward later positions, the trailing token states carry the chunk’s meaning. This lets chunks be encoded independently and in parallel, so prefill runs without sequential waits (chunk 128 in pretraining, 512 in post-training).
3.2 Reading: the same representation is not shared by every layer
If every layer shared the stored representation as-is, per-depth expressiveness would disappear. So in the reading stage, active memory $M_t$ is converted into each layer’s K/V by a lightweight MLP kept separately per layer ($K^l_{\text{Proj}}, V^l_{\text{Proj}}$) (Eq. 7).
K^l = K^l_{\text{Proj}}(M_t), V^l = V^l_{\text{Proj}}(M_t), l ∈ {1, ..., L}K^l = K^l_{\text{Proj}}(M_t), V^l = V^l_{\text{Proj}}(M_t), l ∈ {1, ..., L}In actual post-training, the restoration targets are only the full-attention layers of the hybrid backbone. In Qwen3.5-4B, 8 of the 32 layers qualify (§D.1), and the linear GDN blocks have no past cache of their own. In other words, storage happens once, but at use time the memory is “unpacked” again into per-layer KV.
3.3 Retrieval: choose only once per query
The memory bank is split into two tiers. The short-term window keeps the representations of recent chunks resident on the GPU and uses them with no retrieval latency, while the long-term pool moves older representations evicted from the window out to CPU memory or SSD.
When a new input arrives, the last token representation goes through an MLP and $\ell_2$ normalization to become a 1,024-dim index vector, and cosine similarity against the long-term pool selects the top-$(K=64)$ (Eq. 8).
M^long_t = Top-K_{m_i ∈ G^long_t} ( Sim(φ(h^L_t), φ(m_i)) )
M_t = i_θ(x_t, G_t) = ( M^long_t ∥ G^short_t ) ∈ R^{|M_t|×D}M^long_t = Top-K_{m_i ∈ G^long_t} ( Sim(φ(h^L_t), φ(m_i)) )
M_t = i_θ(x_t, G_t) = ( M^long_t ∥ G^short_t ) ∈ R^{|M_t|×D}This retrieval is computed only once per query, and every attention layer and every subsequent decoding step shares the same index. A single index vector is 2 KB, the index matrix for a 128K context (256 chunks) is 512 KB, and even at 1M context it stays on the GPU at 4.0 MB (§B.1). Computing the query vector takes 0.25 ms.
3.4 Attention: fix the range of the past it sees
After restoring active memory into KV, each attention layer concatenates the restored K/V in front of the current input’s local K/V and computes (Eq. 10).
O^l_t = Attn( Q^l_t, [K^l ∥ K^l_t], [V^l ∥ V^l_t] )O^l_t = Attn( Q^l_t, [K^l ∥ K^l_t], [V^l ∥ V^l_t] )Bounding the active memory size by a constant $C$ ($C \ll N$) makes the GPU-resident cache $O(CD)$, independent of both context length and layer count.
| Model | State cache | Prefill time |
|---|---|---|
| Transformer | $O(LND)$ | $O(LN^2D)$ |
| GDN / SWA / M+ | $O(CLD)$ | $O(CLND)$ |
| YOCO | $O(ND)$ | $O(LN^2D)$ |
| MemOnce | $O(CD)$ | $O(CLND)$ |
(Table 1)
3.5 Training: learn in both regimes
In pretraining, the backbone and the memory encoder-decoder are optimized jointly. Gradients flow through active memory and the restored KV, so the process of forming memory and the process of using it are aligned in one pass.
In post-training, the backbone is frozen and only three lightweight parts are trained: LoRA adapters that are enabled only for memory encoding (rank 128, α 256), the retrieval index projection $\phi(\cdot)$, and the on-demand decoder. During generation the adapters are turned off, and the past is injected only through the restored KV.
Retrieval is trained contrastively against the evidence turns designated by a teacher. The contrastive term in Eq. 11 ($\lambda = \tau = 0.1$) contrasts the query vector with the index of the evidence piece. The training corpus MemOnce-1M is a mix of 8 data sources of 1M samples, where Qwen3.5-35B-A3B produces, for a final user query, both an answer and the index of the evidence turn. Token lengths in the corpus average 7,099, with a p90 of 16,426 and a maximum of 25,000, and conversation rounds span 3–464 turns. More than 63% exceed the 16-segment short-term window, so training already repeatedly practices recovering from the long-term pool.
3.6 Why this structure is theoretically favorable
Appendix G splits the loss into two stages: the information loss incurred during compression, $\Delta I_{\text{write}}$, and the loss incurred during retrieval, $\Delta I_{\text{route}}$. The former arises from folding the past into the last 1/$r$ tokens and storing it; the latter arises because the unselected pieces do not carry enough of the remaining predictive information.
For linear models, $\Delta I$ keeps growing with $N$. MemOnce, by contrast, targets $\Delta I_{\text{write}} \approx 0$ through depth and time compression, and $\Delta I_{\text{route}} \approx 0$ through query-conditioned sparse selection. Separately, discarding the linear block’s recurrent state at every chunk boundary is the default setting. In Table 8, $r=8$ gives 0.5255 with retention and 0.5235 with discarding, a difference of 0.0020.
4. Results
4.1 Quality as a base architecture: perplexity does not collapse under compression
The paper trains MemOnce from scratch at 150M–1B parameters and compares it with Transformer, GDN, YOCO, MLA, LastKV, MemCache-GRM, and others.
In Figure 3 and Table 11, MemOnce shows the best scaling over the 150M→1B range. At 600M, validation perplexity is 10.34 (r=8)/10.16 (r=1), and at 1B it is 9.83/9.65. At 1B, r=1 (9.65) records a lower PPL than the full-attention Transformer (9.78), and r=8 at 9.83 comes close to 9.78. The downstream average for r=8 is 0.5513, slightly ahead of the Transformer (0.5512). By Table 15, every compression-ratio variant of MemOnce yields a higher downstream average than the 365M Transformer (Avg. 0.5185), MLA (0.5187), YOCO (0.5197), and a 1.4x larger 516M Transformer (0.5146).
On the 8-task zero-shot average (Table 2), MemOnce r=1 ranks first at 52.63 and r=8 ranks second at 52.35. GDN trails slightly at 52.31. In language modeling, r=1 ranks first on WikiText at 19.28 and r=8 ranks first on LAMBADA at 32.45. LAMBADA for r=1 is 32.69.
In the compression-ratio sensitivity ablation (Appendix E, Table 8), going from $r=1$ to $r=8$ costs 0.0025 accuracy (with linear state retained) or 0.0028 (with linear state discarded). This supports the design assumption that “the last 1/$r$ tokens represent the chunk.”
4.2 Memory benchmark: beyond the full-context baseline
The core experiment post-trains memory into Qwen3.5-2B/4B with LoRA and evaluates on 5 memory benchmarks spanning 4K–1M tokens (MemBench, LoCoMo, LongMemEval, PersonaMem-128, PersonaMem-1M). Multiple-choice items were scored by exact accuracy, and open-ended responses were judged by DeepSeek-V4.1-Flash as a strict judge (§4.1, §D.3).
Put as a single question: can a model that goes through compression and retrieval be more accurate than a full-context model that puts all 1M tokens on the GPU and reads them?
| Model (size) | MemBench (~4K) | LoCoMo (~21K) | LongMemEval (~115K) | PersonaMem-128 | PersonaMem-1M | Average |
|---|---|---|---|---|---|---|
| Qwen3.5-2B (full context) | 72.69 | 64.35 | 41.00 | 45.00 | 23.60 | 49.33 |
| Qwen3.5-4B (full context) | 82.64 | 69.55 | 42.20 | 43.50 | 33.60 | 54.30 |
| M+ (8B) | 66.93 | 46.43 | 27.40 | 38.40 | 27.80 | 41.39 |
| EvoEmbedding† (4B) | 69.13 | 24.68 | 18.60 | 42.50 | 38.80 | 38.74 |
| Metis† (4B) | 50.03 | 25.06 | 8.80 | 38.90 | 36.00 | 31.76 |
| δ-Mem† (4B) | 55.53 | 15.00 | 13.00 | 34.00 | 32.20 | 29.95 |
| MemOnce (2B) | 73.54 | 59.03 | 35.40 | 48.50 | 39.40 | 51.17 (+1.84) |
| MemOnce (4B) | 84.34 | 67.01 | 47.40 | 53.60 | 48.00 | 60.07 (+5.77) |
(Table 3; † denotes models retrained for a fair comparison)
Two things stand out in the table. First, at 4B, MemOnce averages 60.07%, 5.77 percentage points ahead of the 54.30% full-context baseline. At 2B it is also ahead, by 1.84 percentage points at 51.17%. It does not win every benchmark, however. On LoCoMo (≈21K), full context (69.55) is still ahead. Conversely, the longer the context, the more the full-context baseline collapses, as on PersonaMem-1M (33.60); the paper interprets this as query-conditioned sparse retrieval filtering out irrelevant historical context and thereby reducing the attention dilution that occurs in long contexts.
Second, the gap to existing memory methods is large. On the retrained basis, the averages are M+ 41.39, EvoEmbedding† 38.74, Metis† 31.76, and δ-Mem† 29.95. The paper explains that these fixed-state methods lose, while compressing long histories, the fine-grained details required by multi-session benchmarks (LoCoMo, LongMemEval). The official implementation numbers are δ-Mem 29.28, EvoEmbedding 39.15, and Metis 27.80. EvoEmbedding is slightly above its retrained number (38.74), but all three methods are below MemOnce (60.07).
4.3 What counts as answering from actual memory: HotpotQA-1M
HotpotQA♣-1M is a task that requires finding evidence in separate bundles of documents rather than in multi-session conversations (9,848 paragraphs, ≈1.35M tokens, 500 open-ended multi-hop questions).
| Model (size) | With memory | Without memory | Pure memory gain |
|---|---|---|---|
| Qwen3.5-4B (full context) | 26.60 | 10.60 | +16.00 |
| RAG (4B) | 52.20 | 15.60 | +36.60 |
| M+ (8B) | 33.40 | 7.20 | +26.20 |
| MemOnce (2B) | 49.80 | 8.80 | +41.00 |
| MemOnce (4B) | 59.40 | 19.60 | +39.80 |
(Table 13)
MemOnce-4B beats RAG (52.20) by 7.2 percentage points, while dropping memory leaves it at only 19.60. The paper presents this gap as evidence of using stored memory rather than parametric overfitting.
In the direct comparison with RAG (Table 12), MemOnce averages 60.07 and RAG 52.87 (+7.20), with MemOnce ahead on 4 of 5. The exception is LongMemEval. RAG exceeds MemOnce’s 47.40 with 52.40 because it inserts the uncompressed source text verbatim and thus performs single-session excerpting precisely. This is where the criterion separating the two approaches becomes visible. Questions that require quoting a sentence verbatim favor source injection, while questions that require combining facts spread across an entire conversation favor a compression-and-retrieval structure.
4.4 Preserving general ability: adding memory leaves the original capability intact
With a 32K memory load attached, on three general reasoning tasks (MMLU, GSM8K, GPQA) (Table 4), MemOnce averages 65.98, effectively the same as the original Qwen3.5-4B (65.88) (+0.10). By contrast, the soft-prompt injection approach (EvoEmbedding, 47.66, −18.22) and the backbone-internal linear state approach (Metis, 43.35, −22.53) perturb internal activations and heavily damage general ability. δ-Mem holds at 65.93 but its memory recall stays at 29.28.
The paper attributes this to freezing the backbone during generation and injecting the past only through the restored KV.
4.5 Efficiency: read compute and throughput separately
Efficiency requires distinguishing “how little is computed” from “how fast each unit of computation is.” At 4B and 1M tokens (Table 14):
| Method | Prefill time | Prefill FLOPs (effective throughput) | Decoding (tok/s) | GPU-resident cache | SSD/CPU pool |
|---|---|---|---|---|---|
| Qwen3.5-4B (full context) | 286.86 s | 97.10 P (338 TF/s) | 8.4 | 32.05 GB | — |
| M+ (8B) | 1479.50 s | 14.92 P (10 TF/s) | 21.5 | 2.50 GB | 35.90 GB |
| δ-Mem | 1065.88 s | 412.94 P (387 TF/s) | 18.0 | 4.5 KB | — |
| EvoEmbedding | 160.33 s | 16.81 P (105 TF/s) | 29.1 | 2.6 MB | — |
| Metis | 132.26 s | 7.07 P (53 TF/s) | 28.0 | 80.1 MB | — |
| MemOnce | 41.36 s | 7.37 P (178 TF/s) | 29.3 | 25.0 MB | 640.0 MB |
Four things appear at once.
First, prefill is 41.36 s, 6.9x faster than full context and 35.8x faster than M+. FLOPs drop from 97.10 P to 7.37 P, about 13x, but effective throughput also falls from 338 to 178 TF/s, so the actual speedup is 6.9x. In other words, the main source of the gain is reduced computation, and it is not explained by kernel efficiency alone. The paper explains that MemOnce bounds chunk attention to a 4K-token window and thereby sustains 167–180 TF/s.
Second, decoding throughput stays nearly flat at 29.3 tok/s. Full context collapses to 8.4 tok/s as KV cache traffic grows (a 3.5x difference). Scaling from 32K to 1M, MemOnce’s decoding throughput holds at 29.4 → 29.0 → 29.3 → 29.3 tok/s (Figure 4).
Third, the GPU-resident cache is nearly constant. It is 20.0 MB at 32K and fixed at 25.0 MB from 128K through 1M, with the extra representations moving to the SSD/CPU pool (640 MB at 1M).
Fourth, retrieval latency is 64.24 ms per query. At a 128K context, encoding is 60.39 ms, retrieval and loading 3.85 ms, and PCIe transfer 20.00 MB (Table 10), which is 12.0x faster than M+’s per-layer retrieval (772.50 ms, 1,150 MB transferred) and 17.0x faster than RAG-Rewrite (1,094.30 ms, including 1,081.84 ms of query rewriting).
4.6 Learned representations serve directly as embeddings and rerankers
Memory representations transfer to retrieval and reranking without separate fine-tuning. In Table 5, MemOnce (4B, 1,024 dimensions) achieves an overall Recall@10 of 69.21 and NDCG@10 of 53.06 across 8 retrieval benchmarks, ahead of BGE-M3 (65.60/50.00) and Qwen3-Embedding-4B (62.30/48.10). The paper explains that, unlike dedicated embedding models trained only on sentence-pair similarity, MemOnce optimizes the end-to-end index representation jointly with language modeling and evidence-contrastive supervision, so multi-hop and temporal dependencies can be captured in a 1,024-dim descriptor.
Used as a reranker (Table 6, LoCoMo), in a setup that draws 256 candidates with All-MiniLM-L6-v2 and keeps only the top 20, A-MEM goes from 43.57 to 60.78 (+17.2) and LightMem from 40.58 to 53.90 (+13.3). This is even better than attaching the dedicated reranker Qwen3-Reranker-4B (A-MEM 60.39, LightMem 52.40).
5. Limitations and adoption considerations
5.1 Limitations stated by the authors
There are two (§5.2). First, due to compute constraints, pretraining went only up to 1B parameters. Scaling behavior beyond 7B was not verified. Second, although memory capability is strong, performance on complex agent tasks such as long-running interactive coding or multi-step tool use has not yet been fully verified.
5.2 Constraints from a reviewer’s perspective
Retrieval has to find the piece containing the answer. Lowering the retrieval budget to $K=0$ leaves only the short-term window and drops the average to 36.83. Giving just $K=16$ jumps it to 59.72 (Table 9), but that means the compact state has high information density, not that retrieval has no room to fail. The index is trained on evidence turns designated by a teacher (§C.1), so retrieval quality can also degrade in distributions where teacher labels are inaccurate.
The assumption that “trailing tokens represent the chunk” has boundaries. The paper explains that linear blocks and causal attention gather segment meaning into the trailing states. However, the loss when evidence is scattered in the early part of a chunk or when input order changes is not reported in the paper. The ablation study also covers only compression ratio and whether the linear state is retained, and does not directly test this boundary.
A compressed representation alone does not provide the full source text. RAG’s lead on LongMemEval is a signal of this difference. But the paper does not report a metric that directly measures the rate at which compressed representations reproduce source words exactly, so comparing “citation accuracy” numerically would require a separate evaluation.
The comparison conditions are not fully symmetric. In Table 3, M+ is 8B, whereas MemOnce is 2B/4B, the other native memory methods are 4B, and the full-context baselines are 2B/4B. Whether the 4B configuration of 8 full-attention layers out of 32 (§D.1) is identical at 2B is not reported in the paper. In addition, a note in Table 14 states that baselines that OOM on a single H100 were evaluated on multiple GPUs. The 286.86 s prefill for 1M full context also cannot be asserted as a single-GPU measurement.
5.3 Overall
MemOnce fits well for services where personalization and fact recall in long multi-session conversations are the bottleneck and GPU memory is limited. It is strong on questions that require combining memories with scattered evidence (multi-hop, multi-session, personalization), while RAG remains effective for questions that require quoting source sentences verbatim. In practice, adoption should assume that the retrieval index lies within the training distribution, and pretraining scaling beyond 7B and complex tool-use scenarios remain open problems.
Tables from the paper
Tables converted mechanically from the arXiv e-print LaTeX source. The numbers are the paper’s own and did not pass through a model.
Table 1. Performance of foundation architectures on language modeling and zero-shot common-sense reasoning tasks. All models are pretrained from scratch on FineWeb-Edu under fair configurations. Wiki. and LMB. denote perplexity ($\downarrow$) on WikiText-103 and LAMBADA, respectively. Best results are in bold, and second-best are underlined.
| Model | Wiki. | LMB. | LMB. | PIQA | Hella. | Wino. | ARC-e | ARC-c | SciQ | BoolQ | Avg. |
|---|---|---|---|---|---|---|---|---|---|---|---|
| ppl $\downarrow$ | ppl $\downarrow$ | acc $\uparrow$ | acc $\uparrow$ | acc_n $\uparrow$ | acc $\uparrow$ | acc_n $\uparrow$ | acc_n $\uparrow$ | acc $\uparrow$ | acc $\uparrow$ | $\uparrow$ | |
| Transformers & Attention Variants | |||||||||||
| Transformer | 20.90 | 33.24 | 35.2 | 65.7 | 40.4 | 51.5 | 52.4 | 28.2 | 83.2 | 58.2 | 51.85 |
| SWA | 20.52 | 32.69 | 34.5 | 65.6 | 41.0 | 51.4 | 50.1 | 27.4 | 83.2 | 59.7 | 51.60 |
| MLA | 23.07 | 33.37 | 34.2 | 67.0 | 39.7 | 50.7 | 50.6 | 27.7 | 83.2 | 61.9 | 51.87 |
| Linear & Recurrent Architectures | |||||||||||
| DeltaNet | 23.75 | 33.71 | 30.8 | 65.6 | 37.9 | 51.0 | 49.1 | 26.8 | 80.7 | 60.3 | 50.28 |
| GDN | 26.03 | 33.37 | 34.0 | 67.6 | 40.6 | 50.3 | 54.1 | 27.2 | 84.2 | 60.6 | 52.31 |
| Efficient & Memory Architectures | |||||||||||
| Hybrid | 19.56 | 32.61 | 35.1 | 66.5 | 42.0 | 51.7 | 51.4 | 27.1 | 83.4 | 58.7 | 51.99 |
| YOCO | 24.38 | 35.18 | 36.1 | 67.4 | 40.7 | 51.1 | 51.6 | 26.5 | 82.6 | 59.7 | 51.97 |
| LastKV | 21.12 | 34.04 | 33.7 | 65.5 | 40.0 | 50.5 | 50.9 | 27.8 | 81.5 | 58.8 | 51.09 |
| Memory Caching | 29.84 | 42.47 | 17.6 | 62.6 | 33.5 | 49.9 | 47.5 | 25.7 | 72.8 | 56.6 | 45.78 |
| MemOnce$_{r=8}$ (Ours) | 21.08 | 32.45 | 34.0 | 67.8 | 41.9 | 51.8 | 52.3 | 27.7 | 81.7 | 61.6 | 52.35 |
| MemOnce$_{r=1}$ (Ours) | 19.28 | 32.69 | 35.2 | 67.6 | 42.2 | 49.6 | 52.4 | 27.5 | 84.7 | 61.9 | 52.63 |
Table 2. Performance on five memory benchmarks across varying context lengths. MemOnce is the first native memory model to surpass the full-context baseline. Best results are in bold and second-best are underlined. $^\dagger$ denotes re-trained models for fair comparison.
| Model | Size | MemBench | LoCoMo | LongMemEval | PersonaMem-128 | PersonaMem-1M | Mem. Avg. |
|---|---|---|---|---|---|---|---|
| ($\sim$4K) $\uparrow$ | ($\sim$21K) $\uparrow$ | ($\sim$115K) $\uparrow$ | ($\sim$128K) $\uparrow$ | ($\sim$1M) $\uparrow$ | $\uparrow$ | ||
| Full Context Baselines | |||||||
| Qwen3.5-2B | 2B | 72.69 | 64.35 | 41.00 | 45.00 | 23.60 | 49.33 |
| Qwen3.5-4B | 4B | 82.64 | 69.55 | 42.20 | 43.50 | 33.60 | 54.30 |
| Native Memory Models | |||||||
| $\delta$-Mem | 4B | 46.72 | 16.88 | 11.20 | 40.00 | 31.60 | 29.28 |
| EvoEmbedding | 4B | 67.08 | 25.97 | 16.40 | 47.30 | 39.00 | 39.15 |
| Metis | 4B | 47.45 | 9.35 | 7.40 | 37.60 | 37.20 | 27.80 |
| M+ | 8B | 66.93 | 46.43 | 27.40 | 38.40 | 27.80 | 41.39 |
| $\delta$-Mem$^\dagger$ | 4B | 55.53 | 15.00 | 13.00 | 34.00 | 32.20 | 29.95 |
| EvoEmbedding$^\dagger$ | 4B | 69.13 | 24.68 | 18.60 | 42.50 | 38.80 | 38.74 |
| Metis$^\dagger$ | 4B | 50.03 | 25.06 | 8.80 | 38.90 | 36.00 | 31.76 |
| MemOnce (Ours) | 2B | 73.54 | 59.03 | 35.40 | 48.50 | 39.40 | 51.17$_{+1.84}$ |
| MemOnce (Ours) | 4B | 84.34 | 67.01 | 47.40 | 53.60 | 48.00 | 60.07$_{+5.77}$ |
Table 3. General reasoning performance under a 32K memory load across different memory paradigms. Best results are in bold and second-best are underlined. Subscripts indicate changes relative to the Qwen3.5-4B base model.
| Model | Mechanism | MMLU | GSM8K | GPQA | Gen. Avg. |
|---|---|---|---|---|---|
| Qwen3.5-4B | Full Context | 72.81 | 92.00 | 32.83 | 65.88 |
| Qwen3.5-4B$_{\text{full sft}}$ | Model Weight | 51.97 | 40.50 | 22.73 | 38.40$_{-27.48}$ |
| EvoEmbedding | Soft Prompt | 68.64 | 39.50 | 34.85 | 47.66$_{-18.22}$ |
| Metis | Linear State | 71.71 | 23.50 | 34.85 | 43.35$_{-22.53}$ |
| $\delta$-Mem | Linear State | 73.46 | 91.00 | 33.33 | 65.93$_{+0.05}$ |
| MemOnce (Ours) | KV Cache | 72.59 | 91.00 | 34.34 | 65.98$_{+0.10}$ |
Table 4. Retrieval performance across diverse long-context and conversational benchmarks. We report Recall@10 (R@10) and NDCG@10 (N@10). Best results within each metric block are in bold and second-best are underlined.
| Model | Size | Dim | Metric | ESG-Reports | LoCoMo | LongMemEval | REALTALK | QASPER | PeerQA | CovidQA | MLDR | Overall |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BGE-M3 | 1.2B | 1024 | R@10 | 51.00 | 55.70 | 77.80 | 52.40 | 66.40 | 37.30 | 87.20 | 97.00 | 65.60 |
| Qwen3-Embedding-4B | 4B | 2560 | R@10 | 57.90 | 41.30 | 58.70 | 42.70 | 72.90 | 36.00 | 93.20 | 96.00 | 62.30 |
| MemOnce (Ours) | 4B | 1024 | R@10 | 72.55 | 52.54 | 86.18 | 44.14 | 76.47 | 35.38 | 88.39 | 98.00 | 69.21 |
| BGE-M3 | 1.2B | 1024 | N@10 | 35.90 | 41.80 | 65.60 | 42.00 | 44.20 | 28.20 | 65.10 | 77.00 | 50.00 |
| Qwen3-Embedding-4B | 4B | 2560 | N@10 | 40.80 | 29.90 | 47.10 | 34.50 | 50.20 | 27.20 | 76.70 | 77.80 | 48.10 |
| MemOnce (Ours) | 4B | 1024 | N@10 | 55.82 | 38.68 | 72.75 | 31.78 | 53.64 | 25.05 | 64.68 | 82.09 | 53.06 |
Table 5. Context reranking performance across agent memory systems on the LoCoMo benchmark. All methods use All-MiniLM-L6-v2 to retrieve 256 candidate segments and restrict the final generator context to Top-20. Best results within each system are in bold and second-best are underlined.
| System | Method | Single-hop | Multi-hop | Temporal | Open | Overall |
|---|---|---|---|---|---|---|
| A-MEM | Original | 42.91 | 13.71 | 32.29 | 56.48 | 43.57 |
| + Reasoning | 43.26 | 15.26 | 35.42 | 58.98 | 45.52$_{+2.0}$ | |
| + Qwen3-Reranker-4B | 61.70 | 22.12 | 43.75 | 76.46 | 60.39$_{+16.8}$ | |
| + MemOnce (Ours) | 66.31 | 33.96 | 46.88 | 70.75 | 60.78$_{+17.2}$ | |
| LightMem | Original | 41.13 | 23.36 | 41.67 | 46.85 | 40.58 |
| + Reasoning | 48.23 | 24.92 | 39.58 | 49.94 | 43.77$_{+3.2}$ | |
| + Qwen3-Reranker-4B | 55.32 | 29.28 | 44.79 | 61.12 | 52.40$_{+11.8}$ | |
| + MemOnce (Ours) | 67.02 | 27.10 | 41.67 | 61.12 | 53.90$_{+13.3}$ |
Table 6. Hyperparameters for pre-training and post-training.
| Configuration | Pre-training | Post-training |
|---|---|---|
| Backbone | MemOnce | Qwen3.5 |
| Training Paradigm | Scratch | LoRA (rank$=128, \alpha=256$) |
| Training Dataset | FineWeb-Edu-10B | MemOnce-1M |
| Max Sequence Length | $4$K | $64$K |
| Block Size | $128$ | $512$ |
| Parallel Encoding Chunks | $8$ | $8$ |
| Global Batch Size | $128$ | $64$ |
| Step Data Volume | $0.5$M | — |
| Training Steps | $21,748$ | $15,625$ |
| Learning Rate | $6\times 10^{-4}$ | $5\times 10^{-5}$ |
Table 7. Ablation study on compression ratio $r$ and long-term linear state persistence across eight downstream benchmarks. Best results are in bold and second-best are underlined.
| Linear State | Ratio $r$ | PIQA | Hella. | Wino. | ARC-E | ARC-C | SciQ | BoolQ | LAMB. | Avg. |
|---|---|---|---|---|---|---|---|---|---|---|
| Persisted | $1\times$ | 0.669 | 0.419 | 0.527 | 0.531 | 0.288 | 0.814 | 0.617 | 0.360 | 0.5280 |
| $2\times$ | 0.673 | 0.416 | 0.493 | 0.525 | 0.278 | 0.845 | 0.600 | 0.376 | 0.5259 | |
| $4\times$ | 0.664 | 0.416 | 0.511 | 0.510 | 0.264 | 0.831 | 0.609 | 0.366 | 0.5213 | |
| $8\times$ | 0.668 | 0.418 | 0.522 | 0.516 | 0.281 | 0.836 | 0.613 | 0.350 | 0.5255 | |
| Discarded | $1\times$ | 0.676 | 0.422 | 0.496 | 0.524 | 0.275 | 0.847 | 0.619 | 0.352 | 0.5263 |
| $2\times$ | 0.668 | 0.414 | 0.518 | 0.514 | 0.290 | 0.835 | 0.590 | 0.360 | 0.5235 | |
| $4\times$ | 0.675 | 0.414 | 0.502 | 0.513 | 0.283 | 0.836 | 0.608 | 0.370 | 0.5253 | |
| $8\times$ | 0.678 | 0.419 | 0.518 | 0.523 | 0.277 | 0.817 | 0.616 | 0.340 | 0.5235 |
Table 8. Ablation study on the retrieval budget $K$ across long-context memory benchmarks. Best results are in bold and second-best are underlined.
| Model | Top-$K$ | MemBench | LoCoMo | LongMemEval | PersonaMem-128 | PersonaMem-1M | Mem. Avg. |
|---|---|---|---|---|---|---|---|
| MemOnce-4B | $K=0$ | 72.49 | 20.06 | 14.00 | 40.20 | 37.40 | 36.83 |
| MemOnce-4B | $K=16$ | 84.94 | 65.06 | 47.00 | 53.60 | 48.00 | 59.72 |
| MemOnce-4B | $K=32$ | 84.64 | 66.23 | 45.20 | 53.60 | 48.80 | 59.69 |
| MemOnce-4B | $K=64$ | 84.34 | 67.01 | 47.40 | 53.60 | 48.00 | 60.07 |
| MemOnce-4B | $K=128$ | 84.94 | 65.97 | 45.60 | 51.00 | 46.80 | 58.86 |
Comments