Abstract
Recent research has shown that language models have a tendency to memorize rare or unique token sequences in the training corpus. After deploying a model, practitioners might be asked to delete any personal information from the model by individuals' requests. Re-training the underlying model every time individuals would like to practice their rights to be forgotten is computationally expensive. We employ a teacher-student framework and propose a novel leave-one-out ensemble method to unlearn the targeted textual sequences that need to be forgotten from the model. In our approach, multiple teachers are trained on disjoint sets; for each targeted sequence to be removed, we exclude the teacher trained on the set containing this sequence and aggregate the predictions from remaining teachers to provide supervision during fine-tuning. Experiments on LibriSpeech and WikiText-103 datasets show that the proposed method achieves superior privacy-utility trade-offs than other counterparts.
Introduction
Modern language models (LMs) are trained on massive datasets that often contain sensitive personal identifiable information (PII) like addresses or credit card numbers. Research has shown that these models can "memorize" rare sequences and reproduce them verbatim when prompted correctly. Under regulatory frameworks like the Right to Be Forgotten (RTBF), users can request that their data be deleted. For a company hosting a billion-parameter model, retraining the entire model from scratch for every individual request is a computational nightmare. Existing post-training "unlearning" methods often struggle with a privacy-utility trade-off: they either fail to fully erase the memory or they significantly degrade the model's general language abilities.
Methodology: Leave-One-Out Ensemble (LOO-E)
To address these challenges, we propose a teacher-student framework called Leave-One-Out Ensemble (LOO-E). The process involves:
- Isolation Training: The training data is partitioned into $M$ disjoint subsets, and one "teacher" LM is trained on each subset.
- The Base Model: A standard "base" LM is trained on the full dataset and deployed to users.
- Targeted Unlearning: When a request comes to forget a specific sequence, the system identifies which teacher was trained on the subset containing that sequence.
- Leave-One-Out Supervision: The base model (acting as a "student") is fine-tuned on the private sequence. Instead of predicting the next word correctly, it is forced to match the average probability distribution of all other teachers—those that never saw the sensitive data.
- Loss Function: We use Kullback–Leibler (KL) divergence to minimize the difference between the student’s output and the "clean" ensemble’s output. Gaussian noise can also be added to teacher outputs to further mask sensitive patterns.
Experimental Setup
We evaluated our method using two primary datasets:
- LibriSpeech: An extended text-only corpus (40M sentences) used for LM and Automatic Speech Recognition (ASR) tasks.
- WikiText-103: A popular benchmark (1.5M sentences) to test performance in data-scarce scenarios.
- Canaries: To simulate private data, we inserted unique 5-word "canary" sequences into the training data 100 times each to ensure memorization.
Results and Discussion
We compared LOO-E against several baselines, including PATE (Private Aggregation of Teacher Ensembles) and Gradient Ascent (GA).
As shown in the results for LibriSpeech, Gradient Ascent methods (G1-G7) often significantly degrade model utility, pushing Perplexity (PPL) up to 80 or 90. In contrast, LOO-E maintains a PPL very close to the baseline. The core insight is that by excluding the teacher that saw the private data, the remaining ensemble acts as a perfect proxy for a model never exposed to that data.
In our best configuration (Model L9), the percentage of canaries detectable via Beam Search (BS) or Random Sampling (RS) dropped to 0%, matching the performance of a model retrained from scratch. For LibriSpeech, the baseline PPL was 71.7, and the LOO-E model (L9) was only 72.3. Furthermore, when used in a speech recognition pipeline, the LOO-E model maintained the same Word Error Rate (WER) as the baseline while ensuring the "canaries" could not be triggered by audio prompts.
Conclusion and Future Work
LOO-E provides an efficient and effective way to comply with RTBF requests, with fine-tuning costs less than 0.1% of full retraining. While these experiments were conducted on LSTM-based models, the theoretical framework is applicable to larger Transformer-based LMs. Future work will explore combining this method with parameter-efficient fine-tuning (PEFT) techniques like LoRA to further reduce computational overhead.
Summary updated