知识蒸馏让小模型学得更好且更少记住训练数据,隐私风险更低。
Memorization Dynamics in Knowledge Distillation for Language Models
- 用蒸馏方法训练小模型,能减少超过50%的数据记忆。
- 约95%的记忆集中在少数易记样本上,可提前预测。
- 硬蒸馏比软蒸馏更易继承老师数据,风险更高。
知识蒸馏(KD)被广泛用于将大语言模型的能力迁移到小模型,显著提升效率与实用性,常优于标准微调。除了性能提升,KD还被视为缓解训练数据泄露风险的隐私保护手段。尽管数据记忆问题在预训练和微调中已有研究,但在蒸馏场景下的动态仍不清晰。本文基于三个大模型家族(Pythia、OLMo-2、Qwen-3)和三个数据集(FineWeb、Wikitext、Nemotron-CC-v2),研究了蒸馏全流程中的记忆现象。发现:(1)蒸馏模型记忆训练数据显著少于标准微调(减少超50%);(2)部分样本极易被记忆,贡献了超过95%的记忆量;(3)学生模型的记忆程度可在蒸馏前通过zlib熵、KL散度和困惑度等特征准确预测;(4)软蒸馏与硬蒸馏总体记忆率相似,但硬蒸馏继承的教师专属样本多出2.7倍。结果表明,相比标准微调,蒸馏既能提升泛化能力,又能降低记忆风险。
原文摘要 · Abstract (English)
Knowledge Distillation (KD) is increasingly adopted to transfer capabilities from large language models to smaller ones, offering significant improvements in efficiency and utility while often surpassing standard fine-tuning. Beyond performance, KD is also explored as a privacy-preserving mechanism to mitigate the risk of training data leakage. While training data memorization has been extensively studied in standard pre-training and fine-tuning settings, its dynamics in a knowledge distillation setup remain poorly understood. In this work, we study memorization across the KD pipeline using three large language model (LLM) families (Pythia, OLMo-2, Qwen-3) and three datasets (FineWeb, Wikitext, Nemotron-CC-v2). We find: (1) distilled models memorize significantly less training data than standard fine-tuning (reducing memorization by more than 50%); (2) some examples are inherently easier to memorize and account for a large fraction of memorization during distillation (over ~95%); (3) student memorization is predictable prior to distillation using features based on zlib entropy, KL divergence, and perplexity; and (4) while soft and hard distillation have similar overall memorization rates, hard distillation poses a greater risk: it inherits $2.7\times$ more teacher-specific examples than soft distillation. Overall, we demonstrate that distillation can provide both improved generalization and reduced memorization risks compared to standard fine-tuning.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。