Skip to main content
QUICK REVIEW

[论文解读] Automatic Clipping: Differentially Private Deep Learning Made Easier and Stronger

Zhiqi Bu, Yuxiang Wang|arXiv (Cornell University)|Jun 14, 2022
Machine Learning and Algorithms被引用 14
一句话总结

本论文提出了一种新型的差分隐私优化方法——自动剪裁(automatic clipping),该方法消除了在 DP-SGD、DP-Adam 及其他优化器中对剪裁阈值 $ R $ 进行调优的需求。通过用基于梯度归一化的可学习机制替代固定剪裁,并仅引入一个超参数 $ \gamma $,该方法在视觉和语言任务上均实现了当前最优的准确率,同时保持了隐私保护和计算效率。

ABSTRACT

Per-example gradient clipping is a key algorithmic step that enables practical differential private (DP) training for deep learning models. The choice of clipping threshold R, however, is vital for achieving high accuracy under DP. We propose an easy-to-use replacement, called automatic clipping, that eliminates the need to tune R for any DP optimizers, including DP-SGD, DP-Adam, DP-LAMB and many others. The automatic variants are as private and computationally efficient as existing DP optimizers, but require no DP-specific hyperparameters and thus make DP training as amenable as the standard non-private training. We give a rigorous convergence analysis of automatic DP-SGD in the non-convex setting, showing that it can enjoy an asymptotic convergence rate that matches the standard SGD, under a symmetric gradient noise assumption of the per-sample gradients (commonly used in the non-DP literature). We demonstrate on various language and vision tasks that automatic clipping outperforms or matches the state-of-the-art, and can be easily employed with minimal changes to existing codebases.

研究动机与目标

  • 解决差分隐私深度学习中剪裁阈值 $ R $ 超参数调优的关键挑战。
  • 通过将 $ R $ 与模型性能解耦,消除对 $ (R, \eta) $ 二维网格搜索的依赖,避免昂贵的调优过程。
  • 在 DP-SGD、DP-Adam 和 DP-LAMB 等多种优化器中实现自动、鲁棒且隐私保护的训练。
  • 确保模型准确率在不同 $ \gamma $ 值选择下保持稳定且高效,使 DP 训练如同非私有训练一样用户友好。

提出的方法

  • 提出一种新型剪裁机制,通过将每个样本的梯度按其 $ \ell_2 $-范数加上一个微小常数 $ \gamma $ 进行归一化,替代原有的固定剪裁方式,即 $ \texttt{Clip}(\bm{g}_i; R) \to \frac{\bm{g}_i}{\|\bm{g}_i\| + \gamma} $。
  • 将此自动剪裁机制集成到标准的 DP 优化器(如 DP-SGD、DP-Adam、DP-LAMB)中,实现端到端的差分隐私训练,无需对 $ R $ 进行调优。
  • 引入单一非敏感超参数 $ \gamma $,其在广泛取值范围内(例如从 0.001 到 10)均表现鲁棒,且不影响模型准确率。
  • 理论分析表明,在梯度噪声对称的假设下,自动剪裁保持与标准 SGD 相同的渐近收敛速率。
  • 该方法确保权重衰减在 $ \gamma $ 变化时保持不变,避免了重参数化剪裁中常见的优化过程偏移问题。
  • 为非凸设置下的自动 DP-SGD 提供严格的收敛性保证,证明在温和条件下其收敛速率与标准 SGD 一致。

实验结果

研究问题

  • RQ1是否可以实现完全自动化的逐样本梯度剪裁,而无需手动调优剪裁阈值 $ R $?
  • RQ2消除 $ R $ 作为超参数是否能提升差分隐私深度学习的实际可用性和可复现性?
  • RQ3自动剪裁是否能在多样化的视觉和语言任务中保持或超越当前最优 DP 模型的准确率?
  • RQ4该新方法在不同优化器(如 DP-SGD 与 DP-Adam)下的表现如何,特别是在收敛性和权重衰减稳定性方面?
  • RQ5新超参数 $ \gamma $ 是否对模型性能敏感?它是否能在多种数据集和网络架构上实现鲁棒训练?

主要发现

  • 自动剪裁在 ImageNet 和 E2E 语言建模任务上均达到当前最优或具有竞争力的性能,优于以往需要精细调优 $ R $ 的方法。
  • 在 ResNet18 上训练 ImageNet 时,模型准确率在 $ \gamma $ 的广泛取值范围内(如从 0.001 到 10)保持稳定,即使 $ \gamma $ 变化 10,000 倍,性能下降也微乎其微。
  • 如定理 1 和定理 2 所证明,在梯度噪声对称的假设下,自动剪裁保持与标准 SGD 相同的渐近收敛速率。
  • 与重参数化剪裁不同,自动剪裁完全将 $ R $ 与优化过程解耦,防止了权重衰减的非预期变化,从而保持了模型的泛化能力。
  • 该方法计算效率高,且与所有主流 DP 优化器(包括 DP-Adam 和 DP-LAMB)兼容,无需修改网络架构或训练流程。
  • 实验结果表明,自动剪裁消除了对 $ (R, \eta) $ 二维网格搜索的依赖,将超参数调优工作量降至接近零,同时保持了高准确率。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。