发现微调初期记忆激增,用n-gram分数提前停止可有效抑制。
Early Detection and Reduction of Memorisation for Domain Adaptation and Instruction Tuning
- 用n-gram得分监测记忆风险,早于性能指标变化
- 早期停止使记忆率下降,性能损失极小
- 新正则化方法降低记忆40%,适配各类模型
尽管大语言模型在众多任务中表现优异,但仍可能记忆训练数据,导致隐私或版权文本泄露。现有防御多针对预训练阶段,对领域自适应和指令微调过程中的记忆问题关注不足。本文在Pythia、Llama3和Mistral等1.4B-70B参数模型上进行微调,追踪常见评估数据集上的逐字记忆情况。结果发现,记忆量在前几轮显著上升,常早于验证困惑度或评估性能达到最优。提出一种简单有效的n-gram记忆评分,能可靠预测逐字记忆;将其作为早停依据,可大幅减少记忆,且性能损失最小。进一步引入n-gram感知的损失正则化项,使所有测试模型的记忆率最高降低40%,相比已有策略性能折损更小。这些发现为微调阶段的记忆动态提供了实用且可扩展的洞察。
原文摘要 · Abstract (English)
Although large language models excel across many tasks, they can memorise training data and thereby expose private or copyrighted text. Most defences target the pre-training stage, leaving memorisation during fine-tuning, especially for domain adaptation and instruction tuning, poorly understood. We fine-tune Pythia, Llama3, and Mistral models spanning 1.4B-70B parameters on common evaluation datasets and track verbatim memorisation throughout training. We find that memorisation increases dramatically in the first few epochs, often significantly before either validation perplexity or evaluation performance is optimised. We use a simple but effective n-gram memorisation score which reliably precedes verbatim memorisation; using it as an early-stopping criterion mitigates memorisation with minimal performance loss. Further, we introduce an n-gram-aware loss regulariser and show that it reduces memorisation across all model families tested by up to 40% while minimising evaluation performance trade-offs when compared to an existing memorisation mitigation strategy. These results yield practical, scalable insights into memorisation dynamics during language model fine-tuning.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。