Pre-training Differentially Private Models with Limited Public Data

Zhiqi Bu, Xinwei Zhang, Sheng Zha, Mingyi Hong, George Karypis

Abstract

Differential Privacy (DP) is the standard for protecting sensitive data during model training, yet its application to the pre-training of large-scale foundation models has historically faced significant utility and efficiency barriers. This paper presents a theoretical analysis using a Hessian-based framework to identify a "decelerator" term in DP training. We propose a "continual pre-training" strategy that leverages a small amount of public data to transition the model into flatter regions of the loss landscape before applying DP on private data. Our approach achieves state-of-the-art accuracy on ImageNet-21k and various downstream tasks while maintaining rigorous privacy guarantees.

Introduction

The development of foundation models like Vision Transformers (ViT) and GPT requires massive datasets, often scraped from public sources that may contain sensitive or copyrighted information. While Differential Privacy (DP) provides formal guarantees against data leakage, it is typically restricted to the fine-tuning stage. Applying DP during pre-training—where the model learns its core representations—has proven difficult due to slow convergence and poor final accuracy. This work aims to bridge this "privacy gap" by enabling efficient and effective DP pre-training.

Theoretical Framework: The Decelerator Term

To understand the failure modes of DP pre-training, we analyze the per-iteration loss improvement of DP optimizers. Our Hessian-based analysis identifies a "decelerator" term: $\frac{\sigma^2 tr(\mathbf{H})}{Bc^2}$. This term quantifies how DP noise ($\sigma$), the curvature of the loss landscape (trace of the Hessian $\mathbf{H}$), and the batch size ($B$) interact to impede training progress.

A critical finding is that DP training is most hindered when the loss landscape is "sharp" (high Hessian trace), a condition prevalent in the early stages of training. By isolating the components of DP-SGD, we observe that the primary performance bottleneck is the injected noise, rather than the per-sample gradient clipping.

Figure 2: Comparison of training accuracy across SGD variants. The proximity of standard SGD and SGD with clipping suggests that noise, not clipping, is the primary driver of performance degradation in DP training.

Proposed Method: DP Continual Pre-training

Based on the decelerator analysis, we propose a two-phase "continual pre-training" strategy:

  1. Phase 1: Public Jumpstart. Pre-train on a limited, non-sensitive public dataset (e.g., 10% of the total data) without DP. This moves the model parameters into a "flatter" region of the loss landscape where the Hessian trace is lower.
  2. Phase 2: Private DP Training. Continue pre-training on the target private dataset using DP-SGD or DP-Adam.

This strategy effectively bypasses the high-curvature initial phase where DP noise is most destructive. We also introduce an automatic switching mechanism to transition between phases based on validation performance or optimal DP batch size monitoring.

Figure 3: Train loss trajectories for AdamW variants. The significant gap between clipping-only and noise-injected versions highlights the impact of the decelerator term during the optimization process.

Experimental Results

Our method demonstrates substantial improvements over existing DP pre-training techniques. On ImageNet-21k, using only 10% public data (ImageNet-1k), we achieved a DP accuracy of 41.5% at $\epsilon = 8$. This performance translates well to downstream tasks, with our models reaching 55.7% on Places365 and 60.0% on iNaturalist-2021, outperforming previous methods like TAN and ViP by significant margins (up to +38% on CIFAR-100).

Furthermore, the models exhibit robust defense against Membership Inference Attacks (MIA), with success rates approaching random guessing at lower privacy budgets. The implementation is optimized via the fastDP library, ensuring computational feasibility for large-scale applications.

Conclusion

By identifying the Hessian-based decelerator in DP training, we provide a theoretical foundation for why standard DP pre-training fails and how to mitigate its effects. Our continual pre-training strategy offers a practical path toward building privacy-preserving foundation models that do not sacrifice significant utility, paving the way for safer large-scale machine learning.

Summary updated

BibTeX
@inproceedings{bu2024pre,
  author = {Zhiqi Bu and Xinwei Zhang and Sheng Zha and Mingyi Hong and George Karypis},
  title = {{Pre-training Differentially Private Models with Limited Public Data}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=GQrk0WGNiC},
}
Figure