TL;DR
Training language models with Differential Privacy (DP) usually results in a massive hit to model quality, often making them unusable. This paper demonstrates that pre-training a model on a large public dataset before fine-tuning it on private data using DP-SGD not only recovers performance but makes differentially private language modeling feasible where training from scratch fails.
What Problem Does This Paper Address?
Language models (LMs) are increasingly trained on sensitive, user-generated data—think medical transcripts or private chat logs. While we want these models to be accurate, we also need to ensure they don't "leak" the private information they were trained on.
Differential Privacy (DP) provides a rigorous mathematical framework to bound this risk. The standard approach, Differentially Private Stochastic Gradient Descent (DP-SGD), protects privacy by clipping gradients and adding random noise during training. However, this noise is a double-edged sword: it protects individuals but often degrades the model's utility so severely that the resulting text is incoherent. The authors tackle the challenge of building high-quality LMs that respect privacy without the typical performance collapse.
Methods
The authors propose a two-stage training pipeline:
- Public Pre-training: Train a base language model on a large, non-sensitive public corpus using standard (non-private) methods.
- Private Fine-tuning: Fine-tune that base model on a sensitive "private" corpus using DP-SGD.
By starting with a model that already understands basic linguistic structures from public data, the fine-tuning process requires fewer updates on the private data. This allows the model to adapt to the private domain's distribution while staying within a strict privacy budget ($\epsilon$).
They tested this approach using two feedforward neural network architectures: a "small" model (500-250-50 nodes) and a "large" model (10,000-5,000-1,000 nodes). They compared these against models trained from scratch on private data and a non-private GPT-2 baseline.
Datasets
- Public Dataset: The Brown Corpus, a classic collection of modern English text.
- Private Dataset (Proxy): A subset of Reddit comments. While Reddit is technically public, the authors used it as a proxy for sensitive user-generated content that contains personal information. They used 10k comments for training and 5k for testing.
Key Insights and Ideas
- Pre-training is a "Privacy Multiplier": The most significant finding is that training a DP model from scratch on the private Reddit data was a total failure—the models produced "infinite" perplexity (meaning they were mathematically useless). Pre-training provides the necessary "head start" that makes DP training possible.
- Fine-tuning Beats Scratch Training (Even Non-Privately): Interestingly, a model pre-trained on public data and then privately fine-tuned on Reddit outperformed a model trained only on Reddit without any privacy protections.
- The Large Model Paradox: While larger models generally perform better in NLP, they proved more fragile under high-noise DP settings. The large model failed to converge when the noise scale ($\sigma$) was set to 1.1, whereas the smaller model remained stable.
- Group Privacy Matters: The authors account for the fact that one user might contribute multiple sentences by using group differential privacy, ensuring that an individual's entire contribution is protected, not just a single sentence.
Key Results
The quantitative results highlight the dramatic impact of the pre-training strategy. As shown in the convergence plots below, fine-tuned models (the bottom lines) reach a much lower perplexity far faster than models trained from scratch.
According to the final results in Table 1, the small model fine-tuned on Reddit with a privacy noise scale of $\sigma=0.1$ achieved a test perplexity of 1480.84. In contrast, the model trained only on Reddit (without privacy) had a much worse perplexity of 3787.68.
Qualitatively, the feedforward models still struggled with coherence compared to state-of-the-art models like GPT-2. However, the relative improvement gained from the public-to-private transfer was consistent across the board.
Limitations and Future Work
- Architecture Constraints: The authors used feedforward networks due to computational limits. As a result, the generated text was often incoherent. They suggest that future work should apply this "public-to-private" transfer to more powerful architectures like LSTMs or Transformers.
- Privacy-Utility Trade-off: As shown in their privacy analysis, achieving a tighter privacy guarantee (lower $\epsilon$) requires more noise, which inevitably increases perplexity.
- Dataset Scale: The private dataset used (10k comments) is relatively small. Testing this approach on massive private datasets could reveal if the benefits of pre-training scale linearly.
Summary updated