Hippocampal Linear Attention (HOLA)
- HOLA is a semiparametric memory method that combines a fixed-size recurrent state with an exact key–value cache to overcome lossy compression in linear attention.
- It employs a delta-rule backbone and surprise-based cache writing to select and store high-surprise tokens, ensuring robust in-context recall.
- Empirical results demonstrate improved language modeling and needle-in-a-haystack retrieval, validating HOLA as an effective memory augmentation technique.
Searching arXiv for papers directly relevant to HOLA and related linear-attention memory mechanisms. Hippocampal Linear Attention (HOLA) is a semiparametric memory augmentation for linear-attention and delta-rule LLMs in which a fixed-size recurrent state is retained as a compressive memory and complemented by a bounded exact key–value cache for associations that the recurrent state does not preserve exactly. Introduced as “a hippocampus for linear attention,” HOLA is explicitly inspired by Complementary Learning Systems: the recurrent state models linearly compressible structure, while the cache stores exact support points selected by the prediction residual actually committed to the state. The design targets the failure mode whereby fixed-capacity recurrent memories overwrite earlier facts, interfere along shared key directions, and degrade on needle-in-a-haystack recall as context length increases (Cui, 2 Jul 2026).
1. Problem setting and conceptual basis
HOLA starts from the observation that linear attention, DeltaNet, Gated DeltaNet (GDN), and related state-space models summarize the entire prefix in a fixed-size recurrent state . This yields attractive efficiency because memory does not grow with sequence length in the same way as full attention, but it also forces the model to compress all prior key–value associations into a finite matrix. The paper characterizes this compression as inherently lossy: if many distinct associations compete for representation in the same finite state, earlier facts get overwritten, similar key directions interfere, exact one-shot facts are not preserved, and “needle-in-a-haystack” recall degrades.
The paper’s diagnostic is cast in state-space terms. The recurrent state is a fixed-capacity online estimator of the mapping from keys to values. It works when the mapping is linearly compressible, but not when many specific associations must be remembered individually. The underlying limitation is capacity: the state has rank at most , so once the number of distinct associations exceeds that capacity, new writes overwrite old ones along shared key directions. A distant pair may therefore no longer be exactly recoverable from .
HOLA’s response is explicitly CLS-inspired. The recurrent state is retained as a compressive, generalizing, “neocortex-like” memory, while a separate bounded exact KV cache acts as a “hippocampal” complement for surprising items that should not be forced through compression. This division is presented as a way to avoid catastrophic interference between “generalize over many examples” and “remember this exact event.”
2. Two-memory architecture
HOLA is a two-memory design inside each recurrent layer. One component is the standard delta-rule or GDN recurrent state , which stores a compressed summary of the prefix. The second is a persistent cache of exact key–value pairs with fixed capacity , described as a bounded exact KV cache and a test-time semiparametric memory. In the main 340M setup, the default persistent cache size is per layer.
| Component | Definition | Responsibility |
|---|---|---|
| Recurrent state | Fixed-size delta-rule / GDN state | Model linearly compressible structure |
| Exact cache | Persistent top-0 exact KV pairs | Preserve exact support points and high-surprise items |
| Visible set 1 | Persistent cache, current causal block items, and one null sink | Bounded read set for causal retrieval |
The model combines the two memories through
2
where 3 is the recurrent-state output and 4 is a non-parametric read over the cache. In this decomposition, the state functions as the parametric estimator and the cache supplies a non-parametric correction.
Although the cache is framed as a test-time memory state, HOLA modifies both training and inference. The cache is inference state rather than model parameters, but training and inference use the same cache semantics because the top-5 set by write magnitude can be maintained online or blockwise without order dependence. The paper emphasizes that HOLA adds only small learned parameters for the cache read path—cache-path RMSNorm scales, per-head sink, and per-head cache gate—so the architecture remains essentially iso-parametric with its GDN backbone.
3. Delta-rule backbone and semiparametric formulation
The baseline recurrence used by HOLA is the delta rule:
6
Here 7 is the recurrent state matrix, 8 are the query, key, and value, 9 is the write strength, 0 is the residual or innovation, and 1 is the recurrent readout. The operational interpretation is “predict, then write the residual”: the model predicts the value using the current state, computes what is missing, and writes that missing part into memory scaled by 2.
For GDN, the prediction is 3 with a decay gate 4, so the residual becomes
5
This preserves the same residual-writing logic while making the prediction itself decay-gated.
The paper formalizes HOLA as a semiparametric memory estimator. Given prefix observations 6, pure state memory reads as
7
For semiparametric memory, the state becomes 8, and the read is
9
Within this framework, full attention is treated as the unbounded non-parametric reference case:
0
The comparison is structurally important: full attention stores every token exactly in an unbounded KV cache, whereas HOLA is a bounded semiparametric approximation with a compressive recurrent state plus a small exact cache.
4. Surprise-based cache writing
The cache write mechanism is defined directly from the delta-rule update. Writing is expressed as
1
and the write magnitude is measured by the Frobenius norm
2
Because 3 has unit norm, the cache score reduces to 4. The paper describes this as the token’s intrinsic “surprise” or committed write magnitude.
The rationale is that the delta-rule model already computes the signal needed for cache selection. The residual 5 indicates what the state failed to predict, while 6 indicates how strongly the model committed that correction to memory. A large 7 therefore means that the token both exposed a weakness in the recurrent state and materially changed that state. HOLA uses this as a criterion for exact storage.
Cache maintenance is parameter-free. The cache writes without a learned eviction module and instead maintains the top-8 exact 9 pairs seen so far according to 0. Operationally, a new token is scored, inserted with its exact 1, and if the cache exceeds capacity, the item with the smallest score is evicted. The persistent exact memory is therefore a top-2 set by committed residual magnitude rather than by recency.
This choice is empirically contrasted with recency-based selection. The matched control HOLA+recency uses the same cache machinery but evicts by position instead of 3. The reported pattern is that recency helps somewhat locally, but for long-range needle recall it is much weaker than surprise-based selection: at 32k on S-NIAH-1, HOLA reaches 4, HOLA+recency 5, and GDN 6. This supports the claim that cache usefulness depends more on what is stored than on simply retaining the latest tokens.
5. Decoupled cache retrieval and sharp exact-memory readout
HOLA reads the cache through a sharpened softmax over the visible set 7:
8
The paper fixes cache temperature 9 and relies on RMSNorm-0 to set the effective logit scale. Retrieval is therefore still weighted softmax attention rather than hard nearest-neighbor lookup, but the intention is to make it behave as near-argmax retrieval rather than ordinary soft averaging.
The motivation for decoupling the cache read from the recurrent path is numerical. If one naively reuses the backbone’s unit-L2-normalized 1, the effective cache logit is roughly 2, and over 3 entries even a perfect match gets only about 4 of the softmax mass. Under those conditions the cache behaves almost like uniform averaging over stored values, which defeats the purpose of exact storage. RMSNorm-5 keeps the vector norm around 6, so with 7 the effective logits become around 8, making the softmax much more concentrated on the best match.
The decoupling is also required for stability. The recurrent state-update path continues to use unit-L2 normalized 9, because the delta rule relies on 0 so that the update operator 1 has eigenvalues in 2. If the norm were 3 on the state path, those eigenvalues would become 4, which could diverge. HOLA therefore uses unit-L2 normalized queries and keys for state recurrence and RMSNorm-5 transformed queries and keys only for cache read.
The read-side sharpening ablation is one of the paper’s central analyses. At 46M parameters, adding the cache with a weak unit-L2 read changes Wiki perplexity only slightly, from 6 to 7, whereas the same score rule plus RMSNorm-8 reduces it to 9. On the same ablation, far 0 recall increases from 1 for GDN to 2 with 3+unit-L2 read and to 4 with 5+RMSNorm-6. The paper therefore identifies sharpening as the single largest lever in the design.
6. Empirical profile and computational properties
The main model reported for HOLA has 340M parameters, uses a GDN architecture with 7, 24 layers, 4 heads, head dimension 256, and is trained on 15B SlimPajama tokens with context length 2048. HOLA-specific settings are per-layer cache, 8, chunk 9, eviction score 0, cache normalization RMSNorm-1, frozen 2, and gate init 3. The benchmarks include Wikitext-103 perplexity, LAMBADA perplexity, commonsense tasks, in-context retrieval on FDA, SWDE, and SQuAD, and long-context retrieval on RULER from 2k to 32k.
| Benchmark | GDN | HOLA |
|---|---|---|
| Wiki perplexity | 27.32 | 22.92 |
| LAMBADA perplexity | 30.95 | 30.26 |
| FDA | 11.7 | 20.1 |
| SWDE | 29.0 | 35.9 |
| SQuAD | 32.5 | 33.8 |
On language modeling, HOLA lowers Wikitext perplexity from 4 to 5, a 6 change, and beats a full-attention Transformer++ result of 7. The same trend appears across scale: Wikitext perplexity improves from 8 to 9 at 46M, from 0 to 1 at 170M, and from 2 to 3 at 340M. The reported interpretation is that the exact cache is not merely a niche retrieval gadget; it also improves language modeling.
On in-context retrieval, the gains are concentrated in extraction-heavy tasks. FDA improves from 4 to 5, described as a 6 relative gain; SWDE improves from 7 to 8, described as a 9 relative gain; SQuAD improves from 00 to 01. By contrast, the six-task commonsense average changes only modestly, from 02 for the GDN anchor to 03 for HOLA, while HOLA+recency reaches 04. The empirical pattern is therefore consistent with the paper’s claim that HOLA primarily helps exact memory rather than all reasoning uniformly.
The long-context evidence is given on RULER needle-in-a-haystack tasks. On S-NIAH-1 at 32k tokens, HOLA records 05, HOLA+recency 06, and GDN 07, despite training context only 2k. At 2k, S-NIAH-2 rises from 08 for GDN to 09 for HOLA and S-NIAH-3 from 10 to 11. At 4k, S-NIAH-2 rises from 12 to 13, and at 8k S-NIAH-1 rises from 14 to 15. The paper summarizes these results by stating that HOLA achieves the best linear in-context retrieval and remains much more robust than GDN or a matched HOLA+recency cache on RULER needle-in-a-haystack recall out to 32k tokens, which is 16 its training length.
The added memory and parameter cost remains bounded. During decoding, HOLA stores roughly 17 KV pairs per layer, with 18, 19, and one sink. For the 340M model in bf16, the cache overhead is reported as about 31 MB plus negligible scores. Peak GPU allocation is 20 GB for HOLA and 21 GB for GDN at both 32k and 128k, described as nearly flat with context and only about 5% overhead. Cache-specific learned parameters total
22
trainable scalars, less than 23 of model size, plus 96 frozen temperature scalars.
7. Relation to adjacent research and limitations
Within the broader literature on efficient long-context modeling, HOLA occupies a distinct position. CHELA decomposes long-range modeling into a structured, stable, multiscale global context pathway and a hardware-efficient linear-attention pathway, using short-long convolutions plus tiled linear attention; this suggests a division of labor between cheap global memory/compression and selective data-dependent retrieval, but CHELA remains a dense hybrid mixer rather than a bounded exact-memory system (Liu et al., 2024). LAVO replaces the full key/value history with a fixed-size orthogonal memory complemented by a local sliding-window attention path; its orthogonal basis bank explicitly enforces pattern separation in a compressed global memory, but the resulting memory is a running average projection rather than an exact episodic cache (Zhang et al., 2023). CCQ addresses a different failure mode by modifying only the read step: it contracts the query along high-density directions of memory using the running key covariance, thereby treating retrieval weakness as a read-selectivity problem rather than only a write-capacity problem (Le et al., 31 May 2026). A separate hippocampal line in reinforcement learning uses sparse event encoding and fixed linear sequence propagation 24 as a temporal memory buffer for egocentric visual navigation; this suggests a complementary state-space view of hippocampal computation, but it is autonomous and temporally indexed rather than query-driven and content-addressable (Lin et al., 11 Oct 2025).
Relative to these neighboring designs, HOLA’s defining novelty is the combination of semiparametric framing, parameter-free surprise-based cache selection using 25, decoupled RMSNorm-26 cache read for sharp retrieval, and attachment inside every recurrent layer. The architecture does not abandon recurrent compression; instead, it makes exact memory a bounded complement to that compression.
The paper is also explicit about limitations. The cache is deliberately small, with persistent size 27 and visible read span 28, so not every relevant fact can be retained in very long or needle-dense settings. This is reflected in the fact that 32k single-needle recall reaches 29 rather than perfect recall. The gap to full attention remains on pure extraction tasks such as FDA, where every token may matter. The design depends on hyperparameters including cache size 30, chunk size 31, read normalization choice, normalization scales 32, cache gate, and score rule 33. The authors also note that they did not run a matched-memory comparison against learned eviction systems such as LTE’s CNN-based evictor. A plausible implication is that HOLA is best understood not as a general replacement for all attention behavior, but as a targeted correction for the exact-recall deficiencies of fixed-state recurrent memory.