Opacus: User-Friendly Differential Privacy Library in PyTorch
arXiv:2109.12298
Abstract
We introduce Opacus, a free, open-source PyTorch library for training deep learning models with differential privacy (hosted at opacus.ai). Opacus is designed for simplicity, flexibility, and speed. It provides a simple and user-friendly API, and enables machine learning practitioners to make a training pipeline private by adding as little as two lines to their code. It supports a wide variety of layers, including multi-head attention, convolution, LSTM, GRU (and generic RNN), and embedding, right out of the box and provides the means for supporting other user-defined layers. Opacus computes batched per-sample gradients, providing higher efficiency compared to the traditional "micro batch" approach. In this paper we present Opacus, detail the principles that drove its implementation and unique features, and benchmark it against other frameworks for training models with differential privacy as well as standard PyTorch.
arXiv commentPrivacy in Machine Learning (PriML) workshop, NeurIPS 2021
References in corpus (9)
- Deep Learning with Differential Privacy
- Renyi Differential Privacy
- Rényi Differential Privacy of the Sampled Gaussian Mechanism
- Efficient Deep Learning on Multi-Source Private Data
- Efficient Per-Example Gradient Computations
- Enabling Fast Differentially Private SGD via Just-in-Time Compilation and Vectorization
- Fast and Memory Efficient Differentially Private-SGD via JL Projections
- Efficient Per-Example Gradient Computations in Convolutional Neural Networks
- BackPACK: Packing more into backprop
Cited by in corpus (6)
- How to DP-fy ML: A Practical Guide to Machine Learning with Differential Privacy
- Large Language Models Can Be Strong Differentially Private Learners
- Enabling Fast Differentially Private SGD via Just-in-Time Compilation and Vectorization
- Gradient Sparsification for Efficient Wireless Federated Learning with Differential Privacy
- A novel analysis of utility in privacy pipelines, using Kronecker products and quantitative information flow
- LazyDP: Co-Designing Algorithm-Software for Scalable Training of Differentially Private Recommendation Models