大语言模型(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.
Revisiting Gradient Normalization and Clipping for Nonconvex SGD under Heavy-Tailed Noise: Necessity, Sufficiency, and Acceleration
College of Computer Science and Technology National University of Defense Technology(计算机科学与技术学院 国防科技大学);Center for Machine Learning Research (CMLR) Peking University(机器学习研究中心(CMLR) 北京大学)
DP-SGD-Global-Adapt-V2-S: Triad Improvements of Privacy, Accuracy and Fairness via Step Decay Noise Multiplier and Step Decay Upper Clipping Threshold
University of Louisiana at Lafayette(路易斯安那大学拉斐特分校);College of Saint Benedict and Saint John’s University(圣本笃学院与圣约翰大学);Mississippi State University(密西西比州立大学)
Privacy of SGD under Gaussian or Heavy-Tailed Noise: Guarantees without Gradient Clipping
Inria, CNRS, Ecole Normale Supérieure PSL Research University(法国国家科学研究中心、巴黎高等师范学院PSL研究大学);Department of Management Science and Information Systems(管理科学与信息系统系);Faculty of Engineering and Natural Sciences(工程与自然科学学院);Department of Mathematics(数学系)
Optimization Risk Bounds for Kolmogorov-Arnold Networks Trained by DP-SGD with Correlated Noise
RPTU Kaiserslautern-Landau(凯撒斯劳滕-兰道大学);Machine Learning Research, Morgan Stanley(摩根大通机器学习研究部);Institute of Science and Technology, Klosterneuburg(克洛斯特纽堡科学与技术研究所);Catholic University of Eichstätt-Ingolstadt(埃希施泰特-英戈尔施塔特天主教大学)
Cyclic and Randomized Stepsizes Invoke Heavier Tails in SGD than Constant Stepsize
Rutgers Business School(罗格斯商学院);Princeton University(普林斯顿大学);Inria(法国国家信息与自动化研究所);CNRS(法国国家科学研究中心);Ecole Normale Supérieure(巴黎高等师范学院);PSL Research University(巴黎文理研究大学);Florida State University(佛罗里达州立大学)
Enhancing DP-SGD through Non-monotonous Adaptive Scaling Gradient Weight
School of Computer Science and Big Data, Minjiang University(闽江学院计算机科学与大数据学院);School of Information, Renmin University of China(中国人民大学信息学院);RMIT University(皇家墨尔本理工大学)
Why is Normalization Preferred? A Worst-Case Complexity Theory for Stochastically Preconditioned SGD under Heavy-Tailed Noise
Department of Mathematics, University of California, Berkeley, CA, USA(加州大学伯克利分校数学系);Department of EECS, University of California, Berkeley, CA, USA(加州大学伯克利分校电子工程与计算机科学系);Department of IEOR, University of California, Berkeley, CA, USA(加州大学伯克利分校工业工程与运营研究系)
High-Probability Convergence for Composite and Distributed Stochastic Minimization and Variational Inequalities with Heavy-Tailed Noise
Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);King Abdullah University of Science and Technology(阿卜杜拉国王科技大学);Moscow Institute of Physics and Technology(莫斯科物理技术学院);Université de Montréal(蒙特利尔大学);Mila(米拉研究所);Weierstrass Institute for Applied Analysis and Stochastics(魏尔斯特拉斯应用分析与随机过程研究所);Ivannikov Institute for System Programming RAS(伊万尼科夫系统编程研究所(俄罗斯科学院));Skolkovo Institute of Science and Technology(斯科尔科沃科学技术研究所)
Clipping Improves Adam-Norm and AdaGrad-Norm when the Noise Is Heavy-Tailed
Moscow Institute of Physics and Technology, Russia(莫斯科物理技术学院);Ivannikov Institute for System Programming RAS, Russia(伊万诺夫系统编程研究所);Sber AI Lab, Russia(俄罗斯Sber人工智能实验室);Innopolis University, Russia(因诺波利斯大学);The Russian Presidential Academy of National Economy and Public Administration, Russia(俄罗斯总统经济与公共行政学院);Skolkovo Institute of Science and Technology, Russia(斯克沃尔佐夫科学与技术研究所);Mohamed bin Zayed University of Artificial Intelligence, UAE(穆罕默德·本·扎耶德人工智能大学);Machine Learning and Optimization Laboratory (MLO), EPFL, Lausanne, Switzerland(机器学习与优化实验室(MLO),EPFL,拉瓦尔普勒斯,瑞士)
Balancing Utility and Privacy: Dynamically Private SGD with Random Projection
Department of Mechanical Engineering(机械工程系);Translational AI Center(转化人工智能中心);Department of Electrical and Computer Engineering(电气与计算机工程系);Iowa State University(爱荷华州立大学);Department of Energy and Power Engineering(能源与动力工程系);Tsinghua University(清华大学)