Read the paper
Unwrite: Deleting Records from Linear Attention Memory without Replay
on GitHub
Imagine you're writing in wet cement. With regular attention — the softmax kind — every word is a separate tile you can pry out. But linear attention models work differently: every token gets mixed into a running state, like stirring paint. Once a color is in, you can't unstir it. If a user feeds your model wrong or sensitive information, the only way to undo it has been to rewind and replay everything after the mistake — the equivalent of pouring the paint out and re-mixing from scratch, minus the bad color. Unwrite's core claim: you can delete a record from a linear attention model's recurrent state in constant time, without replaying subsequent tokens, and without losing accuracy. The trick is to maintain a "shadow" state that never saw the offending record, running in parallel during the same forward pass. The difference between the real state and the shadow state is stored at low rank, so when deletion is requested, you just swap in the correction. At full rank on purely recurrent models, this is mathematically identical to full replay. The two existing remedies have clean failure modes. Replay — reprocessing everything after the deleted record — is correct but expensive, scaling linearly with context length. The cheaper alternative, subtracting the record's contribution saved at write time, misses how the deleted record influenced every subsequent token's state update. Unwrite captures this cascade effect because the shadow state reads every later token in real time. The cost is carried during reading, not at deletion time. The authors test across three linear attention architectures: DeltaNet, Gated DeltaNet, and Mamba2. On a QA evaluation, Unwrite matches full replay on all three. On Gated DeltaNet 1.3B, deletion takes about 1.4 ms versus over 1 second for checkpoint replay — a 739× speedup. On a hybrid model (mixing softmax and linear attention layers), Unwrite removes more of the deleted record's downstream effect than simple attention masking, though the comparison here is against a weaker baseline. The architectural bet is interesting: Unwrite's overhead scales with the rank of the state difference, not with context length. The authors show this difference is empirically low-rank, which is why the method is practical. But this is also where the assumption could break — adversarial or highly entangled contexts might produce higher-rank differences that erode the efficiency gain. Integrity is decent but bounded. The benchmarks are the authors' own QA evaluations, not community-standard deletion benchmarks (which barely exist for linear attention). The comparison to replay is the right strong baseline for correctness; the comparison to attention masking on hybrids is less decisive. Code is released, which matters. No independent replication yet. The bigger picture: as linear attention and state-space models scale up for long-context inference, the inability to selectively forget becomes a real deployment blocker for privacy, safety, and correctness. Unwrite is the first method that addresses this without replay cost or accuracy loss. The question is whether the low-rank assumption holds as models and contexts grow — that's the load-bearing wall.
The analogy
Linear attention is like writing in wet cement — every token gets mixed into a running state you can't unstir. Softmax attention is tiled flooring where you can pry out individual tiles. Unwrite maintains a parallel shadow slab of cement that never saw the bad tile, so when you need to delete, you just swap slabs instead of re-pouring.
Wet cement
Colors mixed into a running state are irrecoverable — the only fix is re-pouring minus the bad pigment
Shadow state
A parallel recurrent state that never saw the deleted record runs alongside the main state, capturing all downstream effects
Honest assessment
Unwrite solves a real and cleanly stated problem — selective deletion from linear attention recurrent states — with an elegant shadow-state trick that is provably correct at full rank and empirically fast. The 739× speedup over replay on Gated DeltaNet 1.3B is striking. The load-bearing assumption (low-rank state differences) is plausible but untested at scale or under adversarial conditions. This matters most if recurrent/linear attention models become production defaults; if softmax Transformers remain dominant, the problem Unwrite solves stays niche. Engineers building with Mamba, DeltaNet, or similar should track this closely.
What Is CLAIMS?
73
/ 100
BedrockNews applies a structured analytical framework called CLAIMS to academic papers and technical research releases.
How CLAIMS worksClaim
4/5
Ladder
4/5
Architecture
4/5
Integrity
3/5
Milestone
3/5
Successor
4/5
What is this paper actually committing to?
Genuine novelty: first replay-free deletion for linear attention that captures downstream effects. Not just faster — provably equivalent to replay at full rank. Clean problem statement, committed claim.
The field fight
Can sub-quadratic sequence models match softmax attention's editability while keeping their inference efficiency?
Side A
Softmax attention's per-token addressability is a fundamental advantage worth the quadratic cost; recurrent models sacrifice too much control
Held by: Standard Transformer deployments, KV-cache approaches
Side B
Linear attention and SSMs can be made editable without sacrificing efficiency; the missing primitives are engineering problems, not fundamental limits
Held by: Mamba, DeltaNet, Gated DeltaNet, this paper
Milestone tracker
Unlocks: Privacy-compliant deployment of recurrent LLMs with real-time record deletion at serving speed
Current
1.3B
params
Gated DeltaNet (this paper)
Next
7B+
params
Production-scale recurrent LLM
~1-2 years if linear attention models scale on schedule
Verified Facts (6)
Unwrite runs the model on a copy of its state that skips the record and stores the difference between the two states at low rank
A single deletion is one addition that equals replay at full rank on purely recurrent models
Unwrite matches replay on answers on three linear attention models
Removes more of the record's effect than attention masking on a hybrid model
A deletion takes about 1.4 ms and is up to 739× faster than checkpoint replay on Gated DeltaNet 1.3B
Code released at https://github.com/yihao-qiao/Unwrite
Practical Implications (4)
Enables real-time deletion of user-submitted sensitive or erroneous information from recurrent LLM state without expensive replay — critical for GDPR-style right-to-deletion compliance in deployed systems
Shadow-state approach can be integrated into existing linear attention training/inference pipelines with released code — no architecture redesign required
Deletion cost is constant (~1.4 ms) regardless of how much text follows the deleted record, making it practical for long-context serving
If the low-rank assumption holds at scale, this removes a key deployment blocker for sub-quadratic sequence models versus softmax Transformers
More latest news
Read all