Skip to main content
QUICK REVIEW

[Paper Review] Automatic Clipping: Differentially Private Deep Learning Made Easier and Stronger

Zhiqi Bu, Yuxiang Wang|arXiv (Cornell University)|Jun 14, 2022
Machine Learning and AlgorithmsComputer Science14 citations
TL;DR

This paper introduces automatic clipping, a novel differentially private optimization method that eliminates the need to tune the clipping threshold $ R $ in DP-SGD, DP-Adam, and other optimizers. By replacing fixed clipping with a learnable, gradient-normalization-based mechanism using a single hyperparameter $ \gamma $, the method achieves state-of-the-art accuracy across vision and language tasks while maintaining privacy and computational efficiency.

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.

Motivation & Objective

  • Address the critical challenge of hyperparameter tuning for the clipping threshold $ R $ in differentially private deep learning.
  • Eliminate the need for expensive 2D grid searches over $ (R, \eta) $ by decoupling $ R $ from model performance.
  • Enable automatic, robust, and privacy-preserving training across diverse optimizers like DP-SGD, DP-Adam, and DP-LAMB.
  • Ensure that model accuracy remains stable and high regardless of the choice of the new hyperparameter $ \gamma $, making DP training as user-friendly as non-private training.

Proposed method

  • Propose a new clipping mechanism that normalizes per-sample gradients by their $ \ell_2 $-norm plus a small constant $ \gamma $, replacing fixed clipping with $ \texttt{Clip}(\bm{g}_i; R) \to \frac{\bm{g}_i}{\|\bm{g}_i\| + \gamma} $.
  • Integrate this automatic clipping into standard DP optimizers (e.g., DP-SGD, DP-Adam, DP-LAMB), enabling end-to-end differentially private training without tuning $ R $.
  • Introduce a single, non-sensitive hyperparameter $ \gamma $, which is robust across a wide range of values (e.g., from 0.001 to 10) without affecting model accuracy.
  • Theoretical analysis shows that automatic clipping maintains the same asymptotic convergence rate as standard SGD under symmetric gradient noise assumptions.
  • The method ensures that weight decay remains invariant under changes in $ \gamma $, avoiding unintended optimization shifts common in reparameterized clipping.
  • Provide rigorous convergence guarantees for automatic DP-SGD in non-convex settings, proving it matches standard SGD’s convergence rate under mild conditions.

Experimental results

Research questions

  • RQ1Can per-sample gradient clipping be made fully automatic without requiring manual tuning of the clipping threshold $ R $?
  • RQ2Does eliminating $ R $ as a hyperparameter improve the practicality and reproducibility of differentially private deep learning?
  • RQ3Can automatic clipping maintain or exceed the accuracy of state-of-the-art DP models across diverse vision and language tasks?
  • RQ4How does the new method perform under different optimizers (e.g., DP-SGD vs. DP-Adam), especially in terms of convergence and weight decay stability?
  • RQ5Is the new hyperparameter $ \gamma $ sensitive to model performance, and does it allow for robust training across diverse datasets and architectures?

Key findings

  • Automatic clipping achieves state-of-the-art or competitive performance on ImageNet and E2E language modeling tasks, outperforming prior methods that require careful $ R $ tuning.
  • On ImageNet with ResNet18, the accuracy remains stable across a wide range of $ \gamma $ values (e.g., from 0.001 to 10), with minimal performance drop even when $ \gamma $ is changed by 10,000x.
  • The method maintains asymptotic convergence rates matching standard SGD under symmetric gradient noise, as proven in Theorem 1 and Theorem 2.
  • Unlike reparameterized clipping, automatic clipping fully decouples $ R $ from the optimization process, preventing unintended changes to weight decay and preserving model generalization.
  • The method is computationally efficient and compatible with all major DP optimizers, including DP-Adam and DP-LAMB, without requiring architectural or training pipeline changes.
  • Empirical results show that automatic clipping eliminates the need for expensive 2D grid searches over $ (R, \eta) $, reducing hyperparameter tuning effort to near-zero while maintaining high accuracy.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.