Differentially Private Stochastic Gradient Descent with Fixed-Size Minibatches: Tighter RDP Guarantees with or without Replacement
- Python 3.8.0
- PyTorch 1.13.1
- Matplotlib
- python fs_rdp_bounds.py
This python file can be used in other applications to utilize our accountant. It contains functions for subsampled mechanisms with and without replacement as well as different implementations for replace-one and add/remove relationship. Below we provide a usage example:
- python fs_rdp_accountant_cifar_example
A pretrained model is saved under the folder named "saved_models." This is the same as the one used in Abadi et al to non-privately pretrain on CIFAR-100. It can be replaced by other deep learning models. In order to non-privately train this model on CIFAR-100 locally, one can set the --pretrain switch to "store_false," and then run the above command.
- python fs_rdp_bounds_figs.py
- python plot_Fig2_3.py
- python plot_Fig4.py