[Paper Review] Differentially Private Optimization on Large Model at Small Cost
This paper introduces Book-Keeping (BK), a novel system-level technique that drastically reduces the computational and memory overhead of differentially private (DP) optimization in large deep learning models. By combining ghost norm, book-keeping, and ghost differentiation, BK achieves near-standard training efficiency—only 1.03× the time and <1% memory overhead—while maintaining state-of-the-art DP accuracy on GPT2, ResNet, and ViT across vision and language tasks.
Differentially private (DP) optimization is the standard paradigm to learn large neural networks that are accurate and privacy-preserving. The computational cost for DP deep learning, however, is notoriously heavy due to the per-sample gradient clipping. Existing DP implementations are 2-1000X more costly in time and space complexity than the standard (non-private) training. In this work, we develop a novel Book-Keeping (BK) technique that implements existing DP optimizers (thus achieving the same accuracy), with a substantial improvement on the computational cost. Specifically, BK enables DP training on large models and high dimensional data to be roughly as fast and memory-saving as the standard training, whereas previous DP algorithms can be inefficient or incapable of training due to memory error. The computational advantage of BK is supported by the complexity analysis as well as extensive experiments on vision and language tasks. Our implementation achieves state-of-the-art (SOTA) accuracy with very small extra cost: on GPT2 and at almost the same memory cost (<1% overhead), BK has 1.03X the time complexity of the standard training (0.83X training speed in practice), and 0.61X the time complexity of the most efficient DP implementation (1.36X training speed in practice). We open-source the codebase for the BK algorithm at the FastDP library (https://github.com/awslabs/fast-differential-privacy).
Motivation & Objective
- Address the high computational and memory cost of differentially private deep learning, especially for large models and high-dimensional data.
- Overcome the bottleneck of per-sample gradient clipping in DP optimizers, which traditionally incurs 2–1000× slowdown and significant memory bloat.
- Design a system-level optimization that enables DP training to approach the efficiency of standard non-private training without sacrificing privacy guarantees.
- Extend the method to support parameter-efficient fine-tuning (e.g., LoRA, Adapter) and distributed training, ensuring broad compatibility.
- Achieve state-of-the-art privacy-accuracy trade-offs with minimal performance overhead on vision and language benchmarks.
Proposed method
- Introduce the Book-Keeping (BK) technique to efficiently compute per-sample gradient norms by tracking and reusing intermediate gradient values across samples in a mini-batch.
- Leverage the ghost norm trick to avoid explicitly materializing per-sample gradients, reducing memory usage and enabling efficient gradient norm computation.
- Apply ghost differentiation to compute gradients without storing full per-sample gradients, minimizing memory footprint during backpropagation.
- Develop hybrid BK algorithms that dynamically switch between ghost norm and per-sample gradient instantiation based on model architecture and feature dimension to optimize performance.
- Integrate BK into a modular, automatic codebase (FastDP) that supports any PyTorch model, optimizer, and training setting—including LoRA, BiTFit, ZeRO, and gradient accumulation.
- Use theoretical complexity analysis and empirical evaluation to validate that BK achieves near-ideal time and space complexity, matching standard training in theory and approaching it in practice.
Experimental results
Research questions
- RQ1Can per-sample gradient clipping in DP optimization be made as efficient as standard training in terms of time and memory complexity?
- RQ2How can system-level optimizations like ghost norm and book-keeping reduce the computational burden of DP training on large models?
- RQ3What is the optimal trade-off between ghost norm and per-sample gradient instantiation across different model architectures and input dimensions?
- RQ4Can the BK technique be generalized to support parameter-efficient fine-tuning and distributed training without sacrificing privacy or efficiency?
- RQ5To what extent does BK close the gap between theoretical complexity and practical hardware performance in DP training?
Key findings
- BK reduces the time complexity of DP training to 1.03× that of standard training on GPT2, achieving 0.83× the training speed in practice with less than 1% memory overhead.
- On RoBERTa-large, BK achieves 1.36× the speed of the most efficient prior DP implementation (GhostClip), with 0.61× the time complexity.
- BK enables training of large models like BEiT-large and GPT2-large on a single A100 GPU without memory overflow, where prior methods fail due to memory constraints.
- Hybrid BK algorithms adaptively switch between ghost norm and per-sample gradient computation, achieving optimal performance across architectures—favoring ghost norm in transformers and per-sample in deeper CNNs.
- BK maintains state-of-the-art accuracy on vision and language tasks: 64.6 BLEU on E2E with ε=3, and 97.1% accuracy on CIFAR10 with ε=2.
- The FastDP library, built on BK, supports automatic integration with any model, optimizer, and training technique (e.g., LoRA, ZeRO), ensuring broad compatibility and future-proofing.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.