arXiv cs.CL· Aryan Chowdhury, Riza Batista-Navarro·· 11 小时前AI 评分32
研究发现:剪枝冗余注意力头可抑制 GPT-2-XL 逐字记忆
Fewer Heads, Fewer Memories: Pruning Redundant Attention Heads Suppresses Verbatim Memorisation
AI 导读
在推理前将大量注意力头置零,可显著抑制大语言模型的逐字记忆行为。研究在 GPT-2-XL(1.5B)上剪枝 729 个任务冗余注意力头,记忆计数下降 91.5%,同时 WikiText-103 困惑度改善 0.92。该方法无需重新训练或修改训练数据,即可在推理阶段缓解记忆带来的隐私与版权风险。
正文 · 原文
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.
| Comments: | 7 Pages, 5 Tables, 1 Figure |
| Subjects: | Computation and Language (cs.CL); Machine Learning (cs.LG) |
| Cite as: | arXiv:2610.40974 [cs.CL] |
| (or arXiv:2610.40974v1 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2610.40974 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Aryan Chowdhury [view email]
[v1]
Thu, 29 Oct 2026 20:59:31 UTC (321 KB)
来源:arXiv cs.CL · arxiv.org