Fewer Heads, Fewer Memories: Pruning Redundant Attention Heads Suppresses Verbatim Memorisation
Computer Science > Computation and Language arXiv:2610.40974 (cs) [Submitted on 29 Oct 2026] Title: Fewer Heads, Fewer Memories: Pruning Redundant Attention Heads Suppresses Verbatim Memorisation Authors: Aryan Chowdhury, Riza Batista-Navarro.
计算机科学 > 计算与语言 arXiv:2610.40974 (cs) [提交于 2026 年 10 月 29 日] 标题:更少的头,更少的记忆:剪枝冗余注意力头可抑制逐字记忆 作者:Aryan Chowdhury, Riza Batista-Navarro。
Abstract: Large language models have been shown to memorise and reproduce verbatim sequences from their training data, raising concerns about privacy leakage, intellectual property exposure, and the limits of generalisation. Recent theoretical work suggests that attention heads may contribute to this behaviour by functioning as associative memory mechanisms, with memorisation capacity scaling with the number of heads.
摘要:大型语言模型已被证明会记忆并逐字重现其训练数据中的序列,这引发了对隐私泄露、知识产权暴露以及泛化极限的担忧。近期的理论研究表明,注意力头可能通过充当联想记忆机制来促成这种行为,且记忆容量随注意力头数量的增加而扩展。
At the same time, empirical work has shown that many attention heads are redundant and can be pruned with limited impact on downstream performance. Despite these parallel findings, the effect of pruning redundant heads on memorised-sequence reproduction remains unexplored.
与此同时,实证研究表明,许多注意力头是冗余的,可以在对下游性能影响有限的情况下进行剪枝。尽管存在这些平行的发现,但剪枝冗余注意力头对记忆序列重现的影响仍未得到探索。
In this work, we demonstrate that zeroing out a substantial fraction of attention heads prior to inference can significantly suppress verbatim memorisation while preserving, or even improving, language modelling performance on the benchmark used to identify redundant heads.
在这项工作中,我们证明了在推理前将相当大比例的注意力头置零,可以显著抑制逐字记忆,同时在用于识别冗余头的基准测试中保持甚至提升语言建模性能。
Evaluating GPT-2-XL(1.5B) on known memorised sequences, we find that pruning 729 task-redundant heads reduces the memorisation count by 91.5%, while improving WikiText-103 perplexity by 0.92. These findings suggest that attention-head redundancy can be exploited to mitigate memorisation at inference time, without retraining or modifying the training data.
通过在已知记忆序列上评估 GPT-2-XL (1.5B),我们发现剪枝 729 个任务冗余头可使记忆计数减少 91.5%,同时将 WikiText-103 的困惑度提升 0.92。这些发现表明,可以利用注意力头的冗余性在推理时减轻记忆问题,而无需重新训练或修改训练数据。