Differentially private (DP) machine learning is often a trade-off: you get strong privacy guarantees, but your model’s accuracy usually takes a nosedive. A popular workaround is to pretrain a model on massive public datasets and then "finetune" it on sensitive private data. However, critics have recently argued that this only works when the public and private data are very similar. In the real world—think medical records or legal documents—private data looks nothing like the public internet.
This paper from researchers at Carnegie Mellon University, presented at NeurIPS 2024, tackles this head-on. They ask: Does public pretraining still help when the distribution shift is extreme?
TL;DR
Public pretraining significantly boosts the accuracy of differentially private models even when the private task is completely different from the public one. By leveraging shared low-dimensional representations, public features can improve private training accuracy by up to 67% over training from scratch, even when zero-shot performance is no better than random guessing.
What Problem Does This Paper Address?
The "utility gap" in differential privacy is a major barrier to adoption. While pretraining on public data helps, recent critiques (notably by Tramèr et al.) pointed out that most research used "in-distribution" tasks—like pretraining on ImageNet and finetuning on CIFAR-10. In these cases, the public data already contains the classes needed for the private task, making the "transfer" trivial.
In reality, private data is often "out-of-distribution" (OOD). If you pretrain on cat photos from the web but need to finetune on sensitive histopathology slides, does that public knowledge still count for anything? If zero-shot performance (using the model without any finetuning) is terrible, is the public model still a useful starting point?
Methods
The authors combine a rigorous empirical study with a new theoretical framework:
- Empirical Evaluation: They used a CLIP ViT-B model (pretrained on the massive LAION-2B dataset) and tested three private training strategies:
- Full training from scratch: No public data used.
- Full finetuning: Updating all model weights privately.
- Linear probing: Keeping the public backbone frozen and only training a new classification head privately.
- Theoretical Modeling: They developed a stylized linear regression model where both public and private tasks share a low-dimensional subspace. They analyzed a two-stage algorithm: first, estimate the shared subspace from public data; second, perform private regression within that learned subspace.
- Privacy Framework: All private training was conducted using DP-SGD (Differentially Private Stochastic Gradient Descent) to ensure formal $(\epsilon, \delta)$-differential privacy.
Datasets
The researchers focused on datasets that are notoriously difficult for standard web-pretrained models:
- PatchCamelyon (PCam): A medical dataset for lymph node tumor detection. CLIP’s zero-shot accuracy here is near-random (~51%).
- Functional Map of the World (fMoW): Satellite imagery classification (62 classes). CLIP achieves a measly 1.6% zero-shot accuracy.
- RESISC45: Another satellite scene classification task (45 classes).
- Public Baselines: For comparison, they also referenced standard datasets like ImageNet and CIFAR-10.
Key Insights and Ideas
- Zero-shot failure $\neq$ Feature failure: Even if a model can't label a satellite image correctly out-of-the-box, its internal layers have learned a "visual alphabet" (edges, textures, shapes) that is still highly relevant.
- The Power of Dimensionality Reduction: The core theoretical insight is that public data helps by identifying a shared low-dimensional representation. Training privately in a $k$-dimensional subspace is much "cheaper" (requires less noise) than training in the full $d$-dimensional space.
- Linear Probing is a DP Superpower: In non-private learning, full finetuning usually wins. In private learning, linear probing often wins because it involves far fewer parameters. Since DP noise scales with the number of parameters being updated, linear probing allows for much higher accuracy under the same privacy budget.
Key Results
- Massive Accuracy Gains: On the fMoW satellite task, training from scratch was "unusable" at low privacy levels (~10% accuracy). Linear probing using public features boosted this to nearly 40%—a massive relative improvement.
- Linear Probing Dominance: Across all OOD datasets, linear probing consistently outperformed full finetuning, sometimes by over 50% (as seen in the RESISC45 results).
- Validation of Theory: The authors plotted the "eigenspectrum" of the features (Figure 3 in the paper) and found that even for OOD data, the representations were approximately low-rank, validating their theoretical assumptions.
Limitations and Future Work
- Linear Simplification: The theoretical model assumes a linear subspace. While this provides great intuition and matches the empirical success of linear probing, real neural networks share more complex, non-linear representations.
- Subspace Assumption: The work assumes a shared subspace exists. If the public and private tasks are truly, fundamentally unrelated at every level, these benefits might vanish.
- Future Directions: The authors suggest that finding better ways to identify these shared subspaces—perhaps through more diverse public pretraining—could further close the DP utility gap.
For more details, you can find the full paper on arXiv: 2312.15551.
Summary updated