Differentially Private Knowledge Distillation via Synthetic Text Generation

📄 arXiv: 2403.00932v3 📥 PDF

作者: James Flemings, Murali Annavaram

分类: cs.LG, cs.CL, cs.CR

发布日期: 2024-03-01 (更新: 2025-12-16)

🔗 代码/项目: GITHUB


💡 一句话要点

提出DistilDP以解决差分隐私与模型压缩的平衡问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 差分隐私 知识蒸馏 模型压缩 合成数据 大型语言模型 隐私保护 自然语言处理

📋 核心要点

  1. 现有方法在实现差分隐私和模型压缩时,往往面临效用损失的权衡,且同时应用这两种技术会加剧效用下降。
  2. 本文提出DistilDP,通过合成数据生成的硬标签和软标签,利用差分隐私教师模型进行知识蒸馏,提升模型效用。
  3. 实验结果显示,DistilDP在Big Patent数据集上至少提升了9.0 PPL,且在强隐私参数下表现出色,展示了其有效性。

📝 摘要(中文)

大型语言模型(LLMs)在多个下游任务中表现出色,但数据隐私的日益重要性使得在私有数据上训练LLMs时需要采用差分隐私(DP)。与此同时,LLMs参数规模的快速增长要求在资源受限或延迟敏感的应用中进行模型压缩。差分隐私和模型压缩通常需要在效用损失上进行权衡,且同时应用这两种方案可能会加剧效用下降。为此,本文提出了一种新颖的差分隐私知识蒸馏算法DistilDP,该算法利用由差分隐私教师LLM生成的合成数据进行知识转移。实验结果表明,DistilDP在Big Patent数据集上相较于现有基线至少提升了9.0 PPL,并且在强隐私参数下表现良好,推动了自回归LLMs的隐私保护压缩。

🔬 方法详解

问题定义:本文旨在解决在私有数据上训练大型语言模型时,如何有效地实现差分隐私与模型压缩之间的平衡。现有方法在同时应用这两种技术时,往往导致效用显著下降。

核心思路:论文提出的DistilDP算法通过合成数据生成的硬标签和软标签来进行知识蒸馏,利用差分隐私教师模型的知识转移,从而在保证隐私的前提下提升模型的效用。

技术框架:DistilDP的整体架构包括两个主要模块:首先,通过差分隐私教师模型生成合成数据;其次,利用合成数据进行知识蒸馏,分别从硬标签和软标签中提取知识。此外,如果教师和学生模型具有相似的架构,还可以通过对齐隐藏表示进一步蒸馏知识。

关键创新:DistilDP的核心创新在于同时利用合成数据的硬标签和软标签进行知识转移,并且通过对齐隐藏表示来增强知识蒸馏的效果。这种方法与传统的知识蒸馏方法相比,能够更好地兼顾隐私保护和模型效用。

关键设计:在算法设计中,关键参数包括差分隐私的隐私预算ε,以及教师和学生模型的架构相似性。此外,损失函数的设计考虑了硬标签和软标签的结合,以最大化知识转移的效果。具体的网络结构和训练流程在论文中进行了详细描述。

🖼️ 关键图片

fig_0

📊 实验亮点

实验结果表明,DistilDP在Big Patent数据集上相较于现有基线至少提升了9.0 PPL,且在隐私参数ε=2的情况下,依然保持了强大的隐私保护能力。这些结果展示了DistilDP在隐私保护压缩自回归LLMs方面的有效性。

🎯 应用场景

该研究的潜在应用领域包括需要保护用户隐私的自然语言处理任务,如医疗、金融和法律等领域的文本生成与分析。通过在这些领域中应用DistilDP,可以在确保数据隐私的同时,提升模型的性能和实用性,具有重要的实际价值和未来影响。

📄 摘要(原文)

Large Language models (LLMs) are achieving state-of-the-art performance in many different downstream tasks. However, the increasing urgency of data privacy puts pressure on practitioners to train LLMs with Differential Privacy (DP) on private data. Concurrently, the exponential growth in parameter size of LLMs necessitates model compression before deployment of LLMs on resource-constrained devices or latency-sensitive applications. Differential privacy and model compression generally must trade off utility loss to achieve their objectives. Moreover, simultaneously applying both schemes can compound the utility degradation. To this end, we propose DistilDP: a novel differentially private knowledge distillation algorithm that exploits synthetic data generated by a differentially private teacher LLM. The knowledge of a teacher LLM is transferred onto the student in two ways: one way from the synthetic data itself -- the hard labels, and the other way by the output distribution of the teacher evaluated on the synthetic data -- the soft labels. Furthermore, if the teacher and student share a similar architectural structure, we can further distill knowledge by aligning the hidden representations between both. Our experimental results demonstrate that DistilDP can substantially improve the utility over existing baselines, at least $9.0$ PPL on the Big Patent dataset, with strong privacy parameters, $ε=2$. These promising results progress privacy-preserving compression of autoregressive LLMs. Our code can be accessed here: https://github.com/james-flemings/dp_compress.