Machine unlearning

On this page 7

Machine unlearning is the process of removing the influence of specific training data from an already trained machine learning model, so that the resulting model behaves as if that data had never been part of training. In AI privacy, it is the technical response to deletion requests, consent withdrawal and the discovery of unlawfully collected, copyrighted or harmful data inside a training set.

Deleting a record from a database is simple; deleting it from a model is not. Training spreads the contribution of each example across millions or billions of parameters, so there is no single place where a person’s data is stored. Unlearning methods therefore trade off completeness of removal, computational cost and model quality.

Why deleting training data is not enough

A trained model is a function of its training data. Removing a record from the stored dataset leaves the model unchanged, and the model may still reproduce or reveal that record. Model memorization shows this clearly: large language models can repeat rare strings such as phone numbers seen during training, and membership inference attacks can tell whether a given record was in the training set.

Data protection law sharpens the problem. The right to erasure in Article 17 of the GDPR requires deletion of personal data without undue delay in defined situations. Regulators have not settled how far this duty extends into model parameters, but legal uncertainty has made unlearning a recurring topic in data protection impact assessments for AI systems.

Exact and approximate unlearning

Unlearning methods fall into two families. Exact unlearning produces a model identical in distribution to one retrained without the deleted data. Approximate unlearning produces a model that is only close to that reference, measured by a statistical or empirical criterion.

ApproachHow it worksGuaranteeCost
Full retrainingTrain again from scratch without the dataExact, the reference standardVery high for large models
Sharded training (SISA)Retrain only the shard that held the dataExact for the ensembleModerate, set at training time
Certified removalParameter update with a bounded differenceProvable, mainly for convex modelsLow to moderate
Gradient ascentPush loss up on the forget setEmpirical onlyLow
Fine-tuning on retained dataLet the model overwrite the forgotten dataEmpirical onlyModerate
Main families of unlearning methods

SISA training, short for sharded, isolated, sliced and aggregated, splits the dataset into disjoint shards, trains a sub-model on each and combines their outputs. A deletion triggers retraining of only the affected shard from its last checkpoint before the deleted record. The cost is paid upfront: ensembles of shard models can be less accurate than a single model trained on all the data.

Verifying that a model has forgotten

Verification is the hardest part of unlearning, because absence of influence cannot be observed directly. Practitioners compare the unlearned model with a retrained reference model where that is affordable, and otherwise rely on attack-based tests that try to detect traces of the forgotten data.

MeasureWhat it checksLimitation
Accuracy on the forget setWhether performance drops to unseen-data levelLow accuracy can itself reveal deletion
Membership inference successWhether attackers still detect the recordsWeak attacks give false reassurance
Distance to retrained modelSimilarity of outputs or parametersNeeds an expensive reference model
Extraction probesWhether prompts still reproduce the dataCannot cover every possible prompt
Common verification measures

A subtle failure is over-unlearning. If a model becomes much worse on the deleted examples than on genuinely unseen data, the gap itself signals that the records were once present, a so-called Streisand effect. Good unlearning targets the behavior of a model that simply never saw the data, not maximum forgetting.

Unlearning in large language models

For large language models, full retraining can cost weeks of compute on large accelerator clusters, so approximate methods dominate. Common techniques include gradient ascent on the forget set, preference optimization that rewards refusal or ignorance, and targeted editing of internal representations linked to a concept.

Research benchmarks show that such methods often suppress rather than remove knowledge: the information can resurface after light fine-tuning, quantization or rephrased prompts. For that reason, many providers combine unlearning with output filters, PII redaction and data exclusion in future training runs, which addresses AI training opt-out requests more reliably than editing existing weights.

A further difficulty is defining the forget set. Personal data about one individual rarely sits in a single document; it appears in quotations, summaries and derived texts across the corpus. Removing only the obvious records leaves paraphrased copies that keep the knowledge alive, so scoping the request is as important as the algorithm.

Choosing an unlearning strategy

The right strategy depends on model size, expected deletion volume and the strength of guarantee required. Planning for unlearning before training is far cheaper than retrofitting it afterward.

SituationRecommended approachReason
Small model, rare deletionsFull retraining on a scheduleSimple and exact
Frequent deletions expectedSISA or similar shardingBounded retraining cost per request
Convex or linear modelCertified removalProvable guarantee at low cost
Large foundation modelApproximate unlearning plus filtersRetraining is impractical
Data not yet used in trainingExclude it from future runsAvoids unlearning altogether
Strategy by situation
  • Keep a data lineage record linking each training example to its source and consent status.
  • Batch deletion requests to amortize retraining while meeting legal deadlines.
  • Document the chosen method and its residual risk rather than claiming perfect erasure.

Put simply

Training an AI model is a bit like baking a cake. Once the eggs are mixed in, you cannot pick them back out. If someone asks you to remove their eggs, the only perfect answer is to bake the cake again without them.

Machine unlearning is the set of tricks for getting close to that result without starting from scratch every time. Some methods bake many small cakes so only one has to be redone. Others try to change the taste of the finished cake. The cheaper the trick, the harder it is to prove that the eggs are really gone.

In practice

A bank trains a fraud detection model on transaction histories from about two million customers and expects several hundred erasure requests each month. Instead of one large model, its data science team trains the model as an ensemble of 20 shards, each with checkpoints after every slice of data.

When a customer withdraws consent, the team looks up the customer’s shard in its lineage records and retrains only that shard from the last clean checkpoint, which takes about an hour rather than a full day. Requests are processed weekly in batches. The privacy team then runs a membership inference test on the updated ensemble and confirms that the deleted customers are indistinguishable from never-seen customers, which it records as evidence in the bank’s erasure log.