Topic 4 of 5 · 5 min read
Unlearning and erasure requests for models
Goal: Plan the response to an erasure request for personal data that was used to fine-tune a model.
You cannot reliably delete one person from a trained model by editing it, so plan for erasure before you train: know which data went into which model, and have a way to retrain without it.
Check yourself · 1 of 3
What is the most dependable way to honor an erasure request for fine-tuning data?
Why it matters
Under laws such as the GDPR, people can ask you to erase their personal data. If that data was used to fine-tune a model, the request reaches the model too. The training set is easy to fix. The weights are not. A person's data is spread across millions of parameters, mixed with everyone else's, and no switch removes one record.
Your options
- Retrain or re-fine-tune without the record. The only approach that gives a clear answer. Fine-tuning a small model on a few thousand rows is cheap enough to repeat. A foundation model is not.
- Machine unlearning methods. Research techniques try to reverse the influence of specific records. They are approximate, hard to verify and rarely a legal answer on their own.
- Output filters. Block the person's name or identifiers in prompts and answers. This hides the symptom. The data is still in the weights, and paraphrases may slip through. Use filters as a stopgap, not as erasure.
- Sharding. Train separate models on separate slices of data, so you can retrain only the slice that held the record.
The European Data Protection Board has said that whether a trained model counts as anonymous must be judged case by case. If personal data can still be extracted, the model may still be personal data.
A plan for one request
- Verify the requester and find their records in the training set using your dataset log.
- Delete them from the source data and the stored training set.
- Decide whether the model is affected: was the data in training, and did leak testing show recall?
- Re-train or re-fine-tune on the cleaned set. Schedule it, and add the output filter until it ships.
- Test the new model with the person's identifiers and confirm they are not reproduced.
- Reply within the legal time limit and keep a record of what you did.
What goes wrong
- No dataset lineage. You cannot tell which model contains the person.
- Filter-only answers. Claiming erasure when the data is still in the weights.
- Forgetting copies. Old checkpoints and backups still hold the data.
Examples
One request, end to end
A customer writes asking for erasure. The dataset log shows her chats in the fine-tune set for model v3. The team deletes the chats, retrains v4 without them, tests v4 with her name and order ids, retires v3 and its checkpoints, and replies with the date the change took effect.
The filter that was not enough
A team blocks a person's name in answers. A tester asks about "the woman who ordered the blue desk lamp on March 3" and the model supplies her address. The filter covered the name but not the content. Retraining was needed.
Key points
- Weights cannot be edited to remove one person; the dependable answer is retraining without their data.
- Output filters hide the symptom and are a stopgap, not erasure.
- Keep lineage: which records went into which model version, so a request can be traced.
- Sharding training data limits how much has to be retrained for one request.
- Whether a model is anonymous depends on whether personal data can still be extracted from it.
Common mistakes
- Keeping no record of which data trained which model version.
- Answering an erasure request with only an output filter.
- Deleting the source data but leaving old checkpoints and backups.
- Retraining without testing that the new model no longer reproduces the person.
Check yourself · 2 of 3
Why is dataset lineage important for erasure?
Check yourself · 3 of 3
An output filter blocks a person's name. What does it NOT do?
Practice items, not counted towards your mastery.
Start here
- Extracting Training Data from Large Language Models (Carlini et al.) (opens in a new tab)PaperFree
Shows that a language model can emit verbatim training sequences, including personal details, to a plain attacker.
- The Secret Sharer: measuring unintended memorization (Carlini et al.) (opens in a new tab)PaperFree
Introduces canary insertion and the exposure metric used to test whether a model memorized a planted secret.
- Quantifying Memorization Across Neural Language Models (opens in a new tab)PaperFree
Measures how memorization grows with model size, repeated data and prompt length.
Where to go in your country
- EDPB Opinion 28/2024 on data protection aspects of AI models (opens in a new tab)DocsFreeEU
The EU regulators' view on when a trained model counts as anonymous and what that means for erasure.