Abstract
This paper presents the first successful training of a BERT model with strong Differential Privacy (DP) guarantees ($\epsilon = 1.1$) that maintains high utility on downstream medical tasks. The authors introduce a novel DP WordPiece algorithm for private vocabulary construction and demonstrate that their model effectively "forgets" sensitive information while retaining the medical knowledge necessary for high-performance entity extraction. By leveraging massive batch training and rigorous privacy evaluation, this work bridges the gap between theoretical privacy guarantees and practical utility in sensitive domains.
Introduction
Large language models (LLMs) like BERT are prone to memorizing snippets of their training data. When these models are trained on sensitive datasets—such as clinical notes—this memorization poses a significant privacy risk: malicious actors could potentially extract patient names or conditions from the model's weights. While Differential Privacy (DP) offers a mathematical framework to bound this risk, applying it to Transformers has historically been a "utility killer," often resulting in significant performance drops. This research addresses these challenges through architectural and algorithmic innovations.
Methodology
The authors tackle the privacy-utility trade-off through three key innovations:
DP WordPiece Algorithm
Standard WordPiece builds a vocabulary based on word frequencies, which can leak information about the training set. To make this private, the authors developed a DP WordPiece algorithm that partitions data into tuples and adds Gaussian noise to word histograms before vocabulary generation. This process is formally proven to satisfy $(\epsilon, \delta)$-DP.
Massive Batch Training
DP-SGD (the standard algorithm for private training) requires adding noise to gradients. To prevent this noise from overwhelming the learning signal, extremely large batch sizes are required. The authors achieved a massive batch size of 128,000 by using gradient accumulation and parallelizing across 256 TPU shards.
Privacy Evaluation via "Secret Sharer"
To go beyond theoretical guarantees, the authors used a "canary" test. They injected random, unique sequences into the training data. While a non-private model memorized these sequences easily, the DP-BERT model showed almost zero "exposure," failing to memorize the secrets even when they appeared 100,000 times.
Experimental Setup
- Pre-training: A combination of the standard Wikipedia + BookCorpus (3B words) and the MIMIC-III corpus (712M words of de-identified clinical notes).
- Evaluation: The i2b2-2010 and i2b2-2011 datasets, which involve extracting medical entities (problems, tests, treatments) from clinical text.
Key Results
The DP-BERT model significantly outperformed vanilla public BERT and remained competitive with non-private medical models. As shown in the results table, the "privacy tax" for a strong guarantee of $\epsilon = 1.1$ is remarkably small.
- Vanilla BERT (Public data only): ~76.3 F1 score.
- Medical BERT (Non-private, trained on MIMIC): ~86.8 F1 score.
- DP-BERT ($\epsilon = 1.1$): ~83.7 F1 score.
Discussion and Insights
- Vocabulary Matters: Creating a private domain-specific vocabulary recovered much of the utility typically lost to DP training compared to using generic public vocabularies.
- Generalization vs. Memorization: The "Secret Sharer" experiments confirmed that the DP model learns language patterns (generalization) while being mathematically blocked from learning specific instances (memorization).
- Engineering as an Enabler: The success of this approach relies heavily on the engineering feat of managing 128k-sized batches, suggesting that hardware and optimization strategies are as critical as privacy theory for DP in LLMs.
Limitations and Future Work
While successful in the medical domain, the specific trade-offs may vary in other sensitive areas like legal or financial text. Additionally, DP training remains highly sensitive to hyperparameters. Future work will focus on automated tuning strategies and refining DP WordPiece analysis to provide even tighter privacy bounds, potentially further improving utility.
Summary updated