[Paper Review] Scalable and Efficient Training of Large Convolutional Neural Networks with Differential Privacy
This paper introduces mixed ghost clipping, a novel, efficient method for per-sample gradient clipping in differentially private (DP) training of large convolutional neural networks (CNNs) and vision transformers (ViTs). By eliminating the need to compute per-sample gradients explicitly, it reduces memory and computation overhead, enabling DP training that is up to 3× faster and with only 1–10% memory cost compared to non-private training, achieving state-of-the-art accuracy on CIFAR-10 (96.7% at ε=1) and CIFAR-100 (83.0% at ε=1).
Large convolutional neural networks (CNN) can be difficult to train in the differentially private (DP) regime, since the optimization algorithms require a computationally expensive operation, known as the per-sample gradient clipping. We propose an efficient and scalable implementation of this clipping on convolutional layers, termed as the mixed ghost clipping, that significantly eases the private training in terms of both time and space complexities, without affecting the accuracy. The improvement in efficiency is rigorously studied through the first complexity analysis for the mixed ghost clipping and existing DP training algorithms. Extensive experiments on vision classification tasks, with large ResNet, VGG, and Vision Transformers, demonstrate that DP training with mixed ghost clipping adds $1\sim 10\%$ memory overhead and $<2 imes$ slowdown to the standard non-private training. Specifically, when training VGG19 on CIFAR10, the mixed ghost clipping is $3 imes$ faster than state-of-the-art Opacus library with $18 imes$ larger maximum batch size. To emphasize the significance of efficient DP training on convolutional layers, we achieve 96.7\% accuracy on CIFAR10 and 83.0\% on CIFAR100 at $ε=1$ using BEiT, while the previous best results are 94.8\% and 67.4\%, respectively. We open-source a privacy engine (\url{https://github.com/woodyx218/private_vision}) that implements DP training of CNN with a few lines of code.
Motivation & Objective
- Address the high computational and memory cost of per-sample gradient clipping in differentially private (DP) training of large CNNs.
- Overcome the scalability bottleneck in DP training, especially when using large batch sizes required for high model accuracy.
- Enable efficient training of large vision models, including ResNet, VGG, and Vision Transformers (ViTs), under strong privacy guarantees.
- Demonstrate that larger DP models do not necessarily underperform smaller ones when efficient clipping is used, challenging prior empirical observations.
- Provide a practical, open-source privacy engine to simplify deployment of DP training in vision models.
Proposed method
- Propose mixed ghost clipping, a technique that avoids explicit per-sample gradient computation by leveraging a hybrid of ghost gradients and layerwise clipping decisions.
- Introduce a layerwise decision principle that selects between standard and ghost clipping based on spatial dimensions (H×W), minimizing memory overhead.
- Implement the method to work with any DP optimizer and any clipping function, maintaining memory efficiency close to non-private training.
- Design a computational graph that computes gradient norms and clipped gradients without storing intermediate per-sample gradients, reducing memory footprint.
- Use a mixed strategy where only selected feature maps are processed with ghost gradient techniques, balancing accuracy and efficiency.
- Integrate the method into a privacy engine (open-sourced at https://github.com/woodyx218/private_vision) for plug-and-play DP training of CNNs and ViTs.
Experimental results
Research questions
- RQ1Can per-sample gradient clipping in DP training of large CNNs be made significantly more memory and time efficient without sacrificing model accuracy?
- RQ2Does the efficiency of mixed ghost clipping enable training of larger models—such as VGG and Vision Transformers—under strong privacy guarantees (e.g., ε=1) with improved accuracy?
- RQ3What is the theoretical and empirical complexity trade-off between mixed ghost clipping and existing clipping methods like Opacus or ghost clipping?
- RQ4Can large DP vision models achieve state-of-the-art performance on standard benchmarks like CIFAR-10 and CIFAR-100, especially under strong privacy constraints?
- RQ5To what extent does memory efficiency from mixed ghost clipping allow for larger batch sizes, and how does this impact training speed and convergence?
Key findings
- Mixed ghost clipping reduces memory overhead to less than 10% and training slowdown to less than 2× compared to non-private training, even for large models like BEiT with 303M parameters.
- On VGG19 with CIFAR-10, mixed ghost clipping is 3× faster than Opacus and supports an 18× larger maximum batch size.
- At ε=1, the method achieves 96.7% test accuracy on CIFAR-10 and 83.0% on CIFAR-100 using BEiT, surpassing previous SOTA results of 94.8% and 67.4%, respectively.
- The method enables training of ViTs such as CrossViT and BEiT at scale with only 0.3% more memory than non-private training and 2× slower than non-private training.
- The complexity analysis confirms that mixed ghost clipping avoids the high memory burden of existing methods by using a principled layerwise clipping strategy.
- With the same batch size, mixed ghost clipping is 1.7× faster than the next-best DP algorithm, and with larger batch sizes enabled by memory savings, it achieves up to 3× speedup.
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.