Introduction
Language models (LMs) are prone to memorizing sensitive training data, posing significant privacy risks. Standard Differential Privacy (DP) mitigates this by adding noise to the training process, but often at a steep cost to model utility. Because standard DP treats all tokens equally, non-sensitive words (e.g., "the", "is") are noised as heavily as sensitive ones (e.g., SSNs), leading to "utility collapse." This paper introduces Selective Differential Privacy (S-DP), a framework that applies rigorous privacy guarantees only to sensitive tokens, preserving performance on general language tasks.
Methodology: Selective-DPSGD
The authors propose Selective-DPSGD, an algorithm that differentiates between private and non-private tokens based on a user-defined policy function (e.g., regex or Named Entity Recognition).
The algorithm operates on two primary levels:
- Policy-Driven Updates: Non-private tokens are updated via standard Stochastic Gradient Descent (SGD). Private tokens undergo DP-SGD, which involves gradient clipping and Gaussian noise addition.
- Hidden State Protection: In sequential models like RNNs, private information can leak through hidden states. S-DP addresses this by injecting noise into the hidden state whenever a private token is encountered, preventing sensitive data from propagating to subsequent public tokens.
Experimental Evaluation
The framework was evaluated on two datasets:
- WikiText-2: A standard benchmark where all digits were treated as sensitive information.
- CUSTOMERSIM: A new dataset introduced in this work that simulates customer service dialogs containing synthetic but realistic sensitive information like names, addresses, and tracking IDs.
Key Results and Analysis
S-DP demonstrates a superior privacy-utility trade-off compared to standard DP across multiple metrics.
- Utility Gains: On WikiText-2, S-DPSGD achieved a perplexity of 160.04, nearly halving the 305.86 perplexity of standard DPSGD at a similar privacy budget (ε ≈ 4.9).
- Privacy Robustness: Against Canary Insertion and Membership Inference attacks, S-DP performed comparably to standard DP, significantly outperforming the "No DP" baseline which showed high vulnerability to memorization.
- Structural Learning: Unlike simple data masking (anonymization), S-DP allows the model to learn the context surrounding sensitive data (e.g., the syntax preceding a phone number) without memorizing the specific values.
Limitations and Future Directions
While promising, S-DP's effectiveness depends on the accuracy of the policy function. Future work includes developing more robust, automated policies and extending the formal proofs to Transformer architectures, which are currently the industry standard for large-scale language modeling.
Summary updated