Abstract
Differentially private (DP) training of large-scale models often relies on adaptive optimizers like ADAM. However, the standard application of DP noise can bias the second-moment estimates, degrading performance. This paper investigates the design principles for private adaptive optimizers, demonstrating that the common pursuit of unbiased second-moment estimates is counterproductive in high-dimensional settings. Instead, the authors propose a "scale-then-privatize" approach that aligns noise with the gradient geometry, outperforming existing methods in transformer fine-tuning tasks.
Introduction
Adaptive optimizers such as ADAM are essential for training modern language models, yet they present unique challenges when integrated with Differential Privacy (DP). Standard DP training typically involves two steps: clipping gradients to a fixed norm and adding Gaussian noise. In adaptive settings, this noise biases the second-moment estimate ($\nu$), often making it appear more uniform across coordinates. This "whitening" effect can negate the benefits of adaptivity, essentially reducing a sophisticated optimizer to a non-adaptive one.
The Challenge of Private Adaptivity
The core issue lies in how noise interacts with the second-moment estimation. In ADAM, $\nu$ adjusts the learning rate per parameter. When noise is added, the resulting estimate of $\nu$ reflects both the true gradient and the added noise. Many researchers have attempted to solve this by creating "unbiased" estimators that subtract the expected noise bias. However, this paper argues that such intuition, while valid in low dimensions, fails in the high-dimensional regimes typical of modern deep learning.
Rethinking Unbiased Estimation
The authors identify two primary flaws in the "unbiased" approach:
- The High-Dimensional Curse: In high dimensions, unbiased estimators frequently yield negative values for the second moment. To maintain stability, practitioners must use a large stability constant ($\epsilon_s$), which re-introduces the bias the estimator was designed to avoid.
- Geometry Mismatch: An unbiased estimate of the non-private $\nu$ does not necessarily match the geometry of the private gradients. In a private setting, the effective gradient distribution includes the noise, and the optimizer should ideally adapt to this combined geometry.
Methods for Private Adaptive Optimization
The paper evaluates several strategies for private adaptivity, ranging from standard post-processing to more advanced scaling techniques:
- Post-Processing (Standard): Privatize the gradient first, then plug it into ADAM. This leads to a biased, overly uniform $\nu$.
- Independent Moment Estimation (IME): Noise the first and second moments separately.
- Bias Correction: Mathematically subtract the expected noise bias from the second-moment estimate.
- Scale-Then-Privatize: The authors' preferred method. It uses the previous iteration's $\nu$ to scale the current gradient before clipping and noising. After noising, it "unscales" the gradient back to its original space.
- Side Information: Using public, non-private data to estimate the geometry ($\nu$) beforehand.
Experimental Evaluation
The methods were tested on a 1-D synthetic logistic regression and a high-dimensional transformer task (fine-tuning TinyBERT with 4.4M parameters on the arXiv dataset for masked token prediction).
Key findings include:
- Scale-then-privatize consistently achieved the lowest test loss across different noise levels on the transformer task.
- Unbiased methods (IME and Bias Correction) actually performed worse than the simple baseline in high dimensions, confirming the theoretical warnings about negative estimates and the necessity of large stability constants.
- Regime Change: While unbiased methods might appear effective on small-scale or low-dimensional tasks, they fall apart as the parameter count grows into the millions.
Conclusion
This research provides a critical perspective on designing private adaptive optimizers. By demonstrating that "scale-then-privatize" outperforms unbiased estimation in high-dimensional settings, the authors offer a more robust path forward for DP training of transformers. This approach ensures that added noise matches the shape of the gradients, preserving the relative importance of different features and synergizing well with advanced DP techniques like Matrix Factorization.
Summary updated