Efficient and Scalable Implementation of Differentially Private Deep Learning without Shortcuts

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Beltran, Sebastian Rodriguez, Tobaben, Marlon, Jälkö, Joonas, Loppi, Niki, Honkela, Antti
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914249215836160
author Beltran, Sebastian Rodriguez
Tobaben, Marlon
Jälkö, Joonas
Loppi, Niki
Honkela, Antti
author_facet Beltran, Sebastian Rodriguez
Tobaben, Marlon
Jälkö, Joonas
Loppi, Niki
Honkela, Antti
contents Differentially private stochastic gradient descent (DP-SGD) is the standard algorithm for training machine learning models under differential privacy (DP). The most common DP-SGD privacy accountants rely on Poisson subsampling to ensure the theoretical DP guarantees. Implementing computationally efficient DP-SGD with Poisson subsampling is not trivial, which leads many implementations to taking a shortcut by using computationally faster subsampling. We quantify the computational cost of training deep learning models under DP by implementing and benchmarking efficient methods with the correct Poisson subsampling. We find that using the naive implementation of DP-SGD with Opacus in PyTorch has a throughput between 2.6 and 8 times lower than that of SGD. However, efficient gradient clipping implementations like Ghost Clipping can roughly halve this cost. We propose an alternative computationally efficient implementation of DP-SGD with JAX that uses Poisson subsampling and performs comparably with efficient clipping optimizations based on PyTorch. We study the scaling behavior using up to 80 GPUs and find that DP-SGD scales better than SGD. We share our library at https://github.com/DPBayes/Towards-Efficient-Scalable-Training-DP-DL.
format Preprint
id arxiv_https___arxiv_org_abs_2406_17298
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Efficient and Scalable Implementation of Differentially Private Deep Learning without Shortcuts
Beltran, Sebastian Rodriguez
Tobaben, Marlon
Jälkö, Joonas
Loppi, Niki
Honkela, Antti
Machine Learning
Cryptography and Security
Distributed, Parallel, and Cluster Computing
Differentially private stochastic gradient descent (DP-SGD) is the standard algorithm for training machine learning models under differential privacy (DP). The most common DP-SGD privacy accountants rely on Poisson subsampling to ensure the theoretical DP guarantees. Implementing computationally efficient DP-SGD with Poisson subsampling is not trivial, which leads many implementations to taking a shortcut by using computationally faster subsampling. We quantify the computational cost of training deep learning models under DP by implementing and benchmarking efficient methods with the correct Poisson subsampling. We find that using the naive implementation of DP-SGD with Opacus in PyTorch has a throughput between 2.6 and 8 times lower than that of SGD. However, efficient gradient clipping implementations like Ghost Clipping can roughly halve this cost. We propose an alternative computationally efficient implementation of DP-SGD with JAX that uses Poisson subsampling and performs comparably with efficient clipping optimizations based on PyTorch. We study the scaling behavior using up to 80 GPUs and find that DP-SGD scales better than SGD. We share our library at https://github.com/DPBayes/Towards-Efficient-Scalable-Training-DP-DL.
title Efficient and Scalable Implementation of Differentially Private Deep Learning without Shortcuts
topic Machine Learning
Cryptography and Security
Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2406.17298