Differentially Private Optimization on Large Model at Small Cost

Zhiqi Bu, Yu-Xiang Wang, Sheng Zha, George Karypis
9/30/2022
105 citations
cs.LGcs.CLcs.CR

Official code: awslabs/fast-differential-privacy (144 stars, Python, Apache-2.0, last commit 2026-01-22).

Abstract

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.

Show full abstract

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).

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Fast, memory-efficient, scalable optimization of deep learning with differential privacy

14425PythonNov 20, 202210 months agoApache-2.0
deep-learningdifferential-privacyneural-networkprivacy-preserving-machine-learning

Similar Papers

Cite this paper

@article{bu2022differentially,
  title  = {Differentially Private Optimization on Large Model at Small Cost},
  author = {Zhiqi Bu and Yu-Xiang Wang and Sheng Zha and George Karypis},
  year   = {2022},
  eprint = {2210.00038},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.00038}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.00038.svg)](https://codeofpaper.com/paper/2210.00038)

Discussion