arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2605.24879cs.LGmath.OC
收藏

基于随机裁剪的高效DP-SGD用于大语言模型

Efficient DP-SGD for LLMs with Randomized Clipping

Meta Platforms Inc(Meta平台公司);University of Southern California(南加州大学)

Enayat Ullah, Sai Aparna Aketi, Devansh Gupta, Huanyu Zhang, Meisam Razaviyayn

AI总结:

提出DP-SGD-RC算法,利用随机迹估计(Hutchinson和Hutch++)降低每样本梯度范数估计的内存开销,在保持隐私保证的同时减少内存和计算复杂度。

摘要:

大语言模型(LLMs)在可能包含敏感信息的大规模数据集上进行训练。差分隐私(DP)作为正式隐私保护的事实标准,为训练具有可证明隐私保护的LLMs提供了原则性框架。然而,最先进的DP训练实现依赖于快速梯度裁剪技术,其内存开销为$O(B \min\{T^2, d^2\})$,其中$B$是批量大小,$T$是序列长度,$d$是模型宽度。随着模型规模和上下文长度的增长,这一开销变得难以承受。我们提出DP-SGD-RC,一种带有随机裁剪的新型DP-SGD变体,可降低内存和计算复杂度。DP-SGD-RC利用随机迹估计方法,特别是Hutchinson估计器[Hutchinson, 1989]及其改进变体Hutch++[Meyer et al., 2021],以减少每样本梯度范数估计的内存占用。我们提供了严格的隐私分析,表明DP-SGD-RC实现了与确定性裁剪相竞争噪声乘数。在长上下文基准(包括分类、问答和摘要任务)上微调Llama~3.2-1B的实验表明,DP-SGD-RC在匹配基线效用的同时显著降低了内存和计算需求。

英文摘要:

Large language models (LLMs) are trained on vast datasets that may contain sensitive information. Differential privacy (DP), the de facto standard for formal privacy guarantees, provides a principled framework for training LLMs with provable privacy protection. However, state-of-the-art DP training implementations rely on fast gradient clipping techniques with memory overhead $O(B \min\{T^2, d^2\})$, where $B$ is the batch size, $T$ is the sequence length, and $d$ is the model width. This becomes prohibitive as both model size and context length grow. We propose DP-SGD-RC, a novel variant of DP-SGD with randomized clipping that reduces memory and compute complexity. DP-SGD-RC leverages stochastic trace estimation methods, specifically Hutchinson's estimator[Hutchinson, 1989] and its improved variant, Hutch++[Meyer et al., 2021], to reduce the memory footprint of per-sample gradient norm estimation. We provide a tight privacy analysis showing that DP-SGD-RC achieves noise multipliers competitive with deterministic clipping. Experiments fine-tuning Llama~3.2-1B on long-context benchmarks spanning classification, question answering, and summarization tasks demonstrate that DP-SGD-RC matches baseline utility while significantly reducing memory and compute requirements.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑