Papers
Topics
Authors
Recent
Search
2000 character limit reached

Palimpsa: Metaplastic Attention Memory

Updated 4 July 2026
  • Palimpsa is a self-attention model that treats in-context learning as an online continual learning problem by using a fixed-size dual-state memory architecture.
  • It pairs an attention state with an importance (precision) state to implement Bayesian metaplasticity, modulating plasticity and mitigating interference and catastrophic forgetting.
  • Empirical evaluations show that Palimpsa enhances effective memory capacity and accuracy on complex sequence tasks compared to traditional gated linear attention models.

Searching arXiv for the cited "Palimpsa" paper and closely related palimpsest-related work to ground the article in current arXiv records. Palimpsa is a self-attention model that casts in-context learning (ICL) as a continual learning problem under a fixed-size attention memory, and addresses the associated stability–plasticity dilemma through Bayesian metaplasticity (Bonnet et al., 9 Feb 2026). In Palimpsa, the memory used by linear or gated linear attention is not represented solely by an attention state; it is paired with an importance, or precision, state that modulates plasticity online at the level of individual memory parameters. This design is intended to expand effective memory capacity, reduce interference in long sequences, and avoid both catastrophic forgetting and catastrophic remembering (Bonnet et al., 9 Feb 2026). The name also invites comparison with the broader notion of palimpsest-like layering found in manuscript restoration and memory theory. In manuscript studies, palimpsests are overwritten documents whose earlier traces remain partially recoverable (Perino et al., 2023), while in neuromorphic hardware palimpsest memory denotes the coexistence of short-term overwriting with longer-term consolidated traces (Giotis et al., 2021). This suggests that Palimpsa belongs to a broader family of “layered retention” concepts, although the formalism in the model is specific to attention-based sequence processing (Bonnet et al., 9 Feb 2026).

1. Conceptual basis in fixed-size attention memory

Palimpsa starts from the view that ICL in transformers functions as an online associative memory: as a sequence {xt}\{x_t\} arrives, keys ktk_t, queries qtq_t, and values vtv_t are formed, and outputs yty_t depend on stored key–value associations (Bonnet et al., 9 Feb 2026). In full attention this memory is realized as an explicit KV cache, whereas in linear attention, gated linear attention (GLA), and state space models (SSMs), it is replaced by a fixed-size state StS_t updated online (Bonnet et al., 9 Feb 2026). The core problem is that fixed-size memories accumulate interference as sequences grow: new information must be integrated, but old information that remains relevant should not be overwritten prematurely.

The canonical linear-attention memory update is

St=St1+vtkt,yt=Stqt,S_t = S_{t-1} + v_t \otimes k_t, \qquad y_t = S_t q_t,

with interference arising whenever incoming keys are not orthogonal to previously stored keys (Bonnet et al., 9 Feb 2026). Gated variants add input and forgetting gates, but retain a fixed, non-metaplastic learning rate, so capacity remains fixed and long sequences intensify interference (Bonnet et al., 9 Feb 2026). Palimpsa is proposed specifically to resolve this limitation by tying plasticity to an online estimate of synaptic importance.

A useful contextual analogy comes from manuscript restoration. Digital restoration of ancient papyri aims to suppress structured background signals while preserving faint letter traces, especially in palimpsest-like conditions where text is partially erased or overlaid by periodic substrate patterns (0903.5045). In a distinct but conceptually resonant domain, Palimpsa likewise attempts to preserve important earlier traces while allowing selective incorporation of new ones (Bonnet et al., 9 Feb 2026). This analogy is interpretive rather than formal, but it captures the model’s emphasis on layered retention under interference.

2. Dual-state architecture and Bayesian metaplasticity

Palimpsa maintains two coupled states per attention head (Bonnet et al., 9 Feb 2026). The first is an attention state

StRdv×dk,S_t \in \mathbb{R}^{d_v \times d_k},

or, in the variational formulation, a posterior mean μt\mu_t. The second is an importance or precision state

ItRdv×dk,I_t \in \mathbb{R}^{d_v \times d_k},

with

ktk_t0

representing uncertainty when low and consolidated knowledge when high (Bonnet et al., 9 Feb 2026).

The probabilistic model is row-wise. For each row ktk_t1, Palimpsa assumes a Gaussian prior

ktk_t2

and in practice uses a factorized diagonal covariance

ktk_t3

with constant prior precision

ktk_t4

(Bonnet et al., 9 Feb 2026). The likelihood of values conditioned on key and row-wise importance weights ktk_t5 is

ktk_t6

equivalently,

ktk_t7

(Bonnet et al., 9 Feb 2026). Here ktk_t8 acts as an input-gating term.

To enable forgetting without replay, the posterior is modified into a weighted posterior

ktk_t9

which corresponds to an online approximation to a fixed-size memory window of length qtq_t0 (Bonnet et al., 9 Feb 2026). The forgetting gate is

qtq_t1

with qtq_t2 learnable and qtq_t3 input-dependent (Bonnet et al., 9 Feb 2026). Larger qtq_t4 or qtq_t5 near qtq_t6 slows forgetting; smaller qtq_t7 accelerates it.

This structure implements Bayesian metaplasticity: synapses that have accumulated more evidence acquire larger precision and therefore smaller effective learning rates, while uncertain synapses remain plastic (Bonnet et al., 9 Feb 2026). In the language of the paper, this dual-state design increases effective capacity, reduces interference, and prevents both catastrophic forgetting and catastrophic remembering.

3. Update equations, free-energy view, and diagnostics

Under the diagonal covariance approximation, Palimpsa updates precision and memory mean using local elementwise operations (Bonnet et al., 9 Feb 2026). Writing rows implicitly and using qtq_t8 for elementwise multiplication, the updates are

qtq_t9

vtv_t0

with readout

vtv_t1

These equations formalize the claim that plasticity is inversely proportional to importance: the effective per-parameter learning rate is vtv_t2 (Bonnet et al., 9 Feb 2026).

Equation (1) shows that importance increases through new evidence vtv_t3, is carried forward through vtv_t4, and relaxes toward the prior through vtv_t5 (Bonnet et al., 9 Feb 2026). Equation (2) combines an uncertainty-weighted carryover term with a data-driven increment scaled by vtv_t6, vtv_t7, and vtv_t8. The result is a fixed-size memory in which different parameters can occupy different consolidation regimes at the same time.

The variational free energy for each row vtv_t9 is given by

yty_t0

where the three explicit quadratic terms are identified as plasticity, forgetting, and stability terms respectively (Bonnet et al., 9 Feb 2026). Minimizing this objective yields the closed-form updates above.

The paper also introduces a head-level diagnostic, the metaplasticity ratio

yty_t1

computed per row at time yty_t2 (Bonnet et al., 9 Feb 2026). Large values indicate strong differentiation between consolidated and plastic synapses. This metric is used in experiments to show that metaplastic structure emerges during training.

4. Relation to gated linear attention, Deltanet, Longhorn, MesaNet, and Mamba2

A central contribution of Palimpsa is to interpret several existing gated linear architectures as special cases of the same Bayesian framework under different posterior approximations (Bonnet et al., 9 Feb 2026). This is not merely a naming exercise; it provides a transformation path from non-metaplastic to metaplastic models.

The relation can be summarized concisely:

Model family Posterior/architecture characterization Relation to Palimpsa
Deltanet and Gated Deltanet Fixed stability matrices, yty_t3 No metaplasticity; effectively constant yty_t4
Longhorn Diagonal stability with per-row input gating yty_t5 No per-parameter metaplasticity
MesaNet Approximate full covariance yty_t6 with row-wise scalar yty_t7 Limited per-parameter metaplasticity
Mamba2 Strong-forgetting regime with yty_t8 Special case where metaplasticity is effectively off

In one canonical gated delta-rule form, the update is

yty_t9

and with forgetting,

StS_t0

(Bonnet et al., 9 Feb 2026). These models use fixed stability terms and therefore fixed capacity.

Palimpsa reduces to a Mamba2-like update when forgetting dominates or StS_t1 is extremely small, so that

StS_t2

Then Equation (2) becomes

StS_t3

which the paper identifies as the asymptotic regime where Palimpsa behaves like Mamba2 (Bonnet et al., 9 Feb 2026). On this reading, Mamba2 is a special case of Palimpsa in which forgetting dominates and importance does not evolve.

The paper further proposes a practical transformation recipe. By reparameterizing the value stream as

StS_t4

and initializing StS_t5 with a tiny head-wise scale so that StS_t6, one can match the original non-metaplastic dynamics and then gradually learn StS_t7 and StS_t8 to enable metaplasticity (Bonnet et al., 9 Feb 2026). This “upgrade path” is operationally important because the recommended training pipeline is to pretrain a fast non-metaplastic model and then fine-tune with Palimpsa.

5. Empirical results and training dynamics

Palimpsa is evaluated on Multi-Query Associative Recall (MQAR) and on language-model-based Commonsense Reasoning tasks (Bonnet et al., 9 Feb 2026). In MQAR, sequences contain StS_t9 key–value pairs under maximal packing, and curriculum training uses St=St1+vtkt,yt=Stqt,S_t = S_{t-1} + v_t \otimes k_t, \qquad y_t = S_t q_t,0 with two-layer GLA stacks, hidden size St=St1+vtkt,yt=Stqt,S_t = S_{t-1} + v_t \otimes k_t, \qquad y_t = S_t q_t,1, value-dimension expansion St=St1+vtkt,yt=Stqt,S_t = S_{t-1} + v_t \otimes k_t, \qquad y_t = S_t q_t,2, and St=St1+vtkt,yt=Stqt,S_t = S_{t-1} + v_t \otimes k_t, \qquad y_t = S_t q_t,3 heads (Bonnet et al., 9 Feb 2026). Learning rates are swept from St=St1+vtkt,yt=Stqt,S_t = S_{t-1} + v_t \otimes k_t, \qquad y_t = S_t q_t,4 to St=St1+vtkt,yt=Stqt,S_t = S_{t-1} + v_t \otimes k_t, \qquad y_t = S_t q_t,5, and each model is run with St=St1+vtkt,yt=Stqt,S_t = S_{t-1} + v_t \otimes k_t, \qquad y_t = S_t q_t,6 seeds (Bonnet et al., 9 Feb 2026).

The reported models are Palimpsa-D on a Deltanet backbone, Palimpsa-M on a Mamba2 backbone, ablations without metaplasticity, and a Gated Deltanet baseline (Bonnet et al., 9 Feb 2026). The principal result is that metaplasticity consistently improves average MQAR accuracy across lengths for both backbones, with the gap widening at longer sequences and strongest for Palimpsa-D (Bonnet et al., 9 Feb 2026). The interpretation given in the paper is that importance-tracked plasticity increases effective capacity and reduces interference as sequence length grows.

Training dynamics are also reported. The learned memory window St=St1+vtkt,yt=Stqt,S_t = S_{t-1} + v_t \otimes k_t, \qquad y_t = S_t q_t,7 grows rapidly, nearly exponentially at first, until it is sufficient for the task, and only then does the loss decrease (Bonnet et al., 9 Feb 2026). The metaplasticity ratio

St=St1+vtkt,yt=Stqt,S_t = S_{t-1} + v_t \otimes k_t, \qquad y_t = S_t q_t,8

reaches approximately St=St1+vtkt,yt=Stqt,S_t = S_{t-1} + v_t \otimes k_t, \qquad y_t = S_t q_t,9, indicating that consolidated synapses become about StRdv×dk,S_t \in \mathbb{R}^{d_v \times d_k},0 more stable than plastic ones (Bonnet et al., 9 Feb 2026). Early in training, StRdv×dk,S_t \in \mathbb{R}^{d_v \times d_k},1 is small and the dynamics are close to Mamba2, with StRdv×dk,S_t \in \mathbb{R}^{d_v \times d_k},2; metaplasticity emerges only when longer memory is needed (Bonnet et al., 9 Feb 2026).

For language modeling and commonsense reasoning, pretraining is performed on Fineweb-Edu at two scales: StRdv×dk,S_t \in \mathbb{R}^{d_v \times d_k},3M and StRdv×dk,S_t \in \mathbb{R}^{d_v \times d_k},4M parameters, trained for StRdv×dk,S_t \in \mathbb{R}^{d_v \times d_k},5B and StRdv×dk,S_t \in \mathbb{R}^{d_v \times d_k},6B tokens, respectively (Bonnet et al., 9 Feb 2026). Evaluation includes Wikitext perplexity, LAMBADA perplexity and accuracy, and zero-shot PIQA, HellaSwag, WinoGrande, ARC-e/c, and SIQA (Bonnet et al., 9 Feb 2026). Fine-tuning to metaplastic Palimpsa variants preserves the total token budget; for example, at StRdv×dk,S_t \in \mathbb{R}^{d_v \times d_k},7M, metaplastic fine-tuning uses StRdv×dk,S_t \in \mathbb{R}^{d_v \times d_k},8B tokens from the StRdv×dk,S_t \in \mathbb{R}^{d_v \times d_k},9B checkpoint (Bonnet et al., 9 Feb 2026).

At μt\mu_t0M, fine-tuned Palimpsa-D slightly outperforms baselines in average accuracy, and metaplastic variants show notably better LAMBADA perplexity, consistent with improved long-range retention (Bonnet et al., 9 Feb 2026). At μt\mu_t1M, fine-tuned Palimpsa-D and Palimpsa-M occupy the top two positions; each improves its non-metaplastic counterpart by approximately μt\mu_t2 points in average accuracy, and Palimpsa-D exceeds Gated Deltanet by approximately μt\mu_t3 points, with μt\mu_t4 versus μt\mu_t5 average (Bonnet et al., 9 Feb 2026). The gains are again strongest on context-heavy tasks such as LAMBADA.

6. Implementation, computational profile, and limitations

Per token, the dominant cost of Palimpsa is μt\mu_t6 for updating μt\mu_t7 and μt\mu_t8 and μt\mu_t9 for readout, which is the same asymptotic order as standard GLA (Bonnet et al., 9 Feb 2026). The principal state overhead is that both ItRdv×dk,I_t \in \mathbb{R}^{d_v \times d_k},0 and ItRdv×dk,I_t \in \mathbb{R}^{d_v \times d_k},1 must be stored, so state memory is approximately doubled relative to storing ItRdv×dk,I_t \in \mathbb{R}^{d_v \times d_k},2 alone (Bonnet et al., 9 Feb 2026). Additional parameters are limited to head-wise scalars such as ItRdv×dk,I_t \in \mathbb{R}^{d_v \times d_k},3 and small networks or projections for producing ItRdv×dk,I_t \in \mathbb{R}^{d_v \times d_k},4 and ItRdv×dk,I_t \in \mathbb{R}^{d_v \times d_k},5, so parameter overhead is described as minor relative to the backbone (Bonnet et al., 9 Feb 2026).

The recommended implementation uses chunked associative scans across subsequences for GPU efficiency and includes numerical safeguards such as clamping ItRdv×dk,I_t \in \mathbb{R}^{d_v \times d_k},6 within ItRdv×dk,I_t \in \mathbb{R}^{d_v \times d_k},7 and optionally bounding ItRdv×dk,I_t \in \mathbb{R}^{d_v \times d_k},8 (Bonnet et al., 9 Feb 2026). Practical initialization is

ItRdv×dk,I_t \in \mathbb{R}^{d_v \times d_k},9

often with constant positive prior precision per dimension (Bonnet et al., 9 Feb 2026). Head-wise ktk_t00 is initialized so that ktk_t01 corresponds to an initial memory window ktk_t02–ktk_t03, and then learned (Bonnet et al., 9 Feb 2026). Training guidance includes pretraining with non-metaplastic kernels for speed and switching to Palimpsa for an additional ktk_t04–ktk_t05 of tokens, while monitoring average ktk_t06 and the metaplasticity ratio (Bonnet et al., 9 Feb 2026).

Throughput is a notable caveat. With custom kernels and associative scans, Palimpsa is reported to run at speeds comparable to Mamba1, but in large settings the non-metaplastic Mamba2 kernels can be more than ktk_t07 faster (Bonnet et al., 9 Feb 2026). This is the practical reason for the pretrain-then-fine-tune strategy.

Several limitations are stated explicitly (Bonnet et al., 9 Feb 2026). The extra state ktk_t08 roughly doubles per-head state memory. Unbounded ktk_t09 or ill-conditioned ktk_t10 can create numerical instability, motivating clipping and regularization. Under strong domain shift, learned priors and gates may require retuning, and the paper suggests possible head-wise priors or adaptive ktk_t11 per layer. Proposed future directions include using head-level uncertainty for routing or confidence, combining metaplastic and non-metaplastic heads, and dynamic selection of metaplasticity based on context difficulty (Bonnet et al., 9 Feb 2026).

7. Broader “palimpsest” context across restoration, segmentation, and hardware memory

The broader research context clarifies why the name Palimpsa is apt. In manuscript studies, a palimpsest is a historical manuscript in which an older text, the scriptio inferior, was partially erased and overwritten with a newer text, the scriptio superior, producing geometric and spectral overlap between layers (Perino et al., 2023). Digital restoration work on papyri emphasizes background suppression and letter enhancement through Fourier filtering and edge detection, especially when faint text is compromised by substrate texture, stains, or periodic fiber lines (0903.5045). In the 7Q5 case study, custom Fourier filtering removed vertical papyrus lines and edge detection improved readability, demonstrating how structured interference can be suppressed while preserving weak textual traces (0903.5045).

That manuscript setting provides a concrete model of layered information recovery. In deep-learning work on palimpsests, semantic segmentation is proposed as a means of assigning per-pixel letter identities even when strokes overlap, using a U-Net with multi-label outputs (Perino et al., 2023). The reported proof of concept uses synthetic overlapping letters with pixel accuracy of approximately ktk_t12, precision of approximately ktk_t13, recall of approximately ktk_t14, and a visual success rate of about ktk_t15 on the test set (Perino et al., 2023). These studies do not define Palimpsa as a model, but they exemplify the same general challenge: preserving and disentangling superimposed traces under interference.

In neuromorphic hardware, the phrase “palimpsest memories” refers to the ability of a single synapse to carry multiple memory traces layered in time, with recent inputs dominating in the short term and older traces re-emerging after volatile dynamics decay (Giotis et al., 2021). In metal-oxide volatile memristors, this behavior arises from the interaction between fast volatile conductance changes and slower non-volatile residues. The paper reports that memristive synapses exhibit an expanded doubled capacity, can protect a consolidated long-term memory while up to hundreds of uncorrelated short-term memories temporarily overwrite it, and can implement familiarity detection of previously forgotten memories (Giotis et al., 2021). This is not the same mechanism as Palimpsa’s Bayesian precision tracking, but the family resemblance is strong: both involve selective consolidation, controlled overwrite, and differential timescales of retention.

A plausible implication is that Palimpsa’s name encodes a cross-domain metaphor rather than a purely ornamental label. In manuscript restoration, old writing remains recoverable beneath newer inscription [(0903.5045); (Perino et al., 2023)]. In memristive synapses, short-term traces temporarily cover but do not erase consolidated long-term ones (Giotis et al., 2021). In attention-based sequence models, Palimpsa formalizes an analogous objective: permit online rewriting while preserving important accumulated structure through per-parameter metaplasticity (Bonnet et al., 9 Feb 2026). Within that frame, Palimpsa can be understood as a technical instantiation of palimpsest-like memory in the setting of fixed-size attention.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Palimpsa.