[论文] Unwrite: Deleting Records from Linear Attention Memory without Replay
论文概要 研究领域: NLP 作者: Yihao Qiao, Sihao Hu 发布时间: 2026-12-02 arXiv: 2612.04321 分类: cs.LG, cs.CL
论文概要
研究领域: NLP 作者: Yihao Qiao, Sihao Hu 发布时间: 2026-12-02 arXiv: 2612.04321 分类: cs.LG, cs.CL中文摘要
当用户输入了错误或敏感信息时,从推理时的语言模型助手中删除已读记录非常重要。Softmax 注意力可以直接丢弃记录的 key 和 value,但线性注意力将每个 token 混合到固定大小的循环状态中,没有逐 token 条目。我们识别出现有补救措施的两个局限:(i) 重放需要重新处理记录之后读取的所有内容;(ii) 更便宜的补救措施减去读取记录时保存的差值,但遗漏了记录对后续 token 的影响。我们提出 Unwrite,通过维护一个与模型并行运行的无记录状态来同时解决这两个局限。具体而言,Unwrite 在跳过记录的状态副本上运行模型,并以低秩存储两个状态之间的差值。该副本在与模型相同的前向传播中读取每个后续 token,因此能捕捉记录对这些 token 的影响。由于不需要文本也不需要检查点,在纯循环模型上单次删除等价于全秩重放。实验表明,Unwrite 在三个线性注意力模型上与重放效果相当,在混合模型上比注意力掩码能消除更多的记录影响。由于其额外工作在读取期间完成,删除操作仅需约 1.4ms,比在 Gated DeltaNet 1.3B 上做检查点重放快 739 倍。原文摘要
Deleting a record read at inference time is important for language model assistants when a user has entered wrong or sensitive information. Softmax attention can drop the keys and values of the record, but linear attention mixes every token into fixed-size recurrent states without per-token entries. We identify two limitations of the existing remedies: (i) replay reprocesses everything read after the record, and (ii) cheaper remedies subtract a difference saved when the record is read and miss the record's effect on later tokens. We propose Unwrite, which addresses both limitations by maintaining the record-free state alongside the model as it reads the text. Specifically, 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. This copy reads every later token in the same forward pass as the model and thus captures the record's effect on these tokens. While needing neither the text nor a checkpoint, a single deletion is one addition that equals replay at full rank on purely recurrent models. Empirically, Unwrite matches replay on answers on three linear attention models and removes more of the record's effect than attention masking on a hybrid model. Since its extra work is done during reading, a deletion takes about 1.4 ms and is up to \(739\times\) faster than checkpoint replay on Gated DeltaNet 1.3B.*自动采集于 2026-12-04*
#论文 #arXiv #NLP #小凯