Source-linked AI summary

KGA: A General Machine Unlearning Framework Based on Knowledge Gap Alignment

Lingzhi Wang, Tong Chen, Wei Yuan, Xingshan Zeng, Kam-Fai Wong, Hongzhi Yin

arXiv:2305.06535v1cs.CL

TL;DR

Machine unlearning aims to remove learned information about specific training instances, but retraining can be impractical and NLP unlearning has received less attention despite text's sensitive content. KGA aligns knowledge gaps between models, and experiments report improved performance maintenance and forgetting relative to baselines across NLP tasks.

  • Problem

    Removing learned information is challenging because retraining from scratch is impractical, while NLP unlearning has received less attention despite text's sensitive personal content.

    Source: §1 · pp. 1–2
  • Method

    KGA updates the original model using extra data and aligns prediction-distribution gaps between models trained on different data.

    Source: §4.1 · p. 3
  • Results

    KGA generally outperforms baselines in test performance maintenance and unlearning efficiency, with better test-set F1, BLEU4, and PPL and forget-set behavior closer to RETRAIN.

    Source: §6.1 · p. 6
  • Takeaways & Limitations

    Experiments on large-scale datasets and further analyses validate KGA's effectiveness as an approximate unlearning framework for several NLP tasks.

    Source: §1 · p. 2, §7 · p. 9

    Approximate unlearning cannot ensure exact removal of information already learned by deep neural models.

    Source: Limitations · p. 9

Abstract

from arXiv · show

Recent legislation of the "right to be forgotten" has led to the interest in machine unlearning, where the learned models are endowed with the function to forget information about specific training instances as if they have never existed in the training set. Previous work mainly focuses on computer vision scenarios and largely ignores the essentials of unlearning in NLP field, where text data contains more explicit and sensitive personal information than images. In this paper, we propose a general unlearning framework called KGA to induce forgetfulness. Different from previous work that tries to recover gradients or forces models to perform close to one specific distribution, KGA maintains distribution differences (i.e., knowledge gap). This relaxes the distribution assumption. Furthermore, we first apply the unlearning method to various NLP tasks (i.e., classification, translation, response generation) and propose several unlearning evaluation metrics with pertinence. Experiments on large-scale datasets show that KGA yields comprehensive improvements over baselines, where extensive analyses further validate the effectiveness of KGA and provide insight into unlearning for NLP tasks.

1 Introduction

Machine unlearning addresses the difficulty of removing information learned from sensitive training data, a challenge made especially salient in NLP. KGA uses knowledge gap alignment for NLP tasks, and the paper reports effectiveness across datasets and scenarios.

1 Introduction

  • Machine unlearning is difficult because model weights obscure how training data is represented, while frequent deletion requests make retraining from scratch impractical.Training data can include sensitive personal information, and learned parameters may encode it.Source: §1 · p. 1
  • Prior unlearning work focuses mainly on computer vision, while NLP text can contain more explicit and sensitive personal information and generation models pose additional challenges.The paper notes that NLP applications may receive hundreds of removal requests and that gradient-based methods are difficult to apply to Seq2Seq generation models.Source: §1 · p. 1
  • KGA aligns knowledge gaps between model pairs, and the authors describe it as compatible with varied models and tasks under milder assumptions.The paper says KGA can handle many removal requests while maintaining accuracy.Source: §1 · p. 2
  • Experiments across classification, translation, and response generation use text-specific evaluation metrics and report KGA effectiveness across scenarios and models.The authors also report analyses of German-to-English translation before and after unlearning.Source: §1 · p. 2

2 Related Work

Prior unlearning approaches trade exactness, efficiency, scalability, or assumptions about the model's behavior on forgotten data. KGA instead maintains distribution differences between model pairs rather than targeting one specific output distribution.

2 Related Work

  • SISA retrains only models associated with affected data shards, but the paper says it is ineffective for many deletion queries and requires retaining the full dataset.The related-work discussion also notes that earlier exact methods for Naive Bayes and k-means do not scale to deep neural networks.Source: §2 · p. 2
  • Approximate methods seek behavior close to exact unlearning; gradient- and Hessian-based approaches remain time-consuming, while Chundawat et al. (2022) assumes forgotten data should resemble random initialization.The paper characterizes that assumption as inappropriate because forgotten data should act as unseen data, not become unprocessable.Source: §2 · p. 2
  • KGA maintains knowledge gaps between model pairs instead of forcing forgotten-data behavior toward one specific distribution, weakening the distribution assumption.The paper says this permits application to forgetting data from any distribution while still ensuring model performance.Source: §2 · pp. 2–3

3 Notations and Definition

This section establishes notation for datasets, learning, and unlearning, then states the goal of approximate unlearning as forgetting specified data while maintaining performance.

3 Notations and Definition

  • Z denotes the example space, and Z* denotes the set of all possible training datasets.A training dataset D is an element of Z*.Source: §3 · p. 3
  • A learning algorithm A maps a dataset D to a trained model A(D), while unlearning mechanism U takes D, a forget set Df, and A(D) and returns an unlearned model.Source: §3 · p. 3
  • The section introduces ϵ-approximate unlearning following Guo et al. (2019) and states its goal as forgetting specified data while maintaining performance.Source: §3 · p. 3

4 Our KGA Framework

KGA aligns differences between prediction distributions of structurally identical models trained on different data, aiming to make forgotten data behave like unseen data while retaining performance on the remaining data. The framework applies this approach to text classification, machine translation, and response generation.

4.1 KGA Framework

  • KGA addresses deep-network data deletion through knowledge-gap alignment, unlike gradient reconstruction that may not accurately recover gradients for nonlinear neural networks.The knowledge gap is the distance between prediction distributions from same-architecture models trained on different data.Source: §4 · p. 3, §4.1 · p. 3
  • KGA aligns the forget-set gap between A* and Af with the auxiliary-data gap between AD and An, treating Df as unseen data.The auxiliary set Dn is external to D; the stated assumption is that a similar knowledge deficit appears for seen and unseen data with similar distributions.Source: §4.1 · pp. 3–4
  • KGA jointly optimizes a forget-set alignment objective and a retain-set objective that matches A* and AD output distributions on Dr.The method uses KL divergence for distributional distances and randomly samples Df/Dn instance pairs to alleviate overfitting to specific samples.Source: §4.1 · p. 4
  • Unlearning stops when the average knowledge gap reaches σ times its initial value, providing a threshold-based stopping rule for efficiency.The initial gap is evaluated before training with AD as the initialization of A*.Source: §4.1 · p. 4

4.2 KGA’s Applications in NLP Tasks

  • KGA is applied to classification, translation, and response generation, with DistilBERT for classification and encoder-decoder models for generation tasks.The experiments also validate the method with LSTM and BART architectures.Source: §4.2 · pp. 4–5

5 Experimental Setup

The experiments use three NLP datasets and evaluate both task performance and unlearning behavior. KGA is compared with an original model, exact-unlearning baselines, and approximate-unlearning baselines.

Datasets

  • Experiments use LEDGAR for legal-provision classification, IWSLT German-English for translation, and PersonaChat for dialogue response generation.The datasets use their official train, validation, and test splits.Source: §5 · p. 5

Evaluation Metrics

  • Task scores are Micro F1 for LEDGAR, BLEU42 for IWSLT, and PPL for PersonaChat, alongside additional unlearning metrics.The additional metrics include Jensen–Shannon Divergence, Language model Probability Distance, and Proportion of instances with Decreased Language model Probability.Source: §5 · p. 5

Parameter Setting

  • All three datasets use batch size 16 and learning rate 5e-5 during KGA unlearning, with α set to 0.1.LEDGAR uses DistilBERT, while IWSLT and PersonaChat use an encoder-decoder transformer.Source: §5 · p. 5

Comparisons

  • Comparisons include ORIGINAL, RETRAIN, SISA, LCODEC, and BADT, covering an unchanged model, exact-unlearning methods, and approximate methods.SISA randomly divides the training set into five shards; LCODEC is applied in classification and may need modification for generation.Source: §5 · p. 5

6 Experimental Results

Across three datasets, KGA better maintains test performance and makes forget-set behavior closer to RETRAIN than the compared baselines. Further analyses examine efficiency, forgetting across difficulty levels and removal sizes, and behavior across model structures.

6.1 Main Comparison Results

  • KGA yields better test-set F1, BLEU4, and PPL across the three datasets, while its forget-set scores and distributions are closer to RETRAIN than other baselines.The authors report that this gives KGA the best forgetting effect among the compared baselines under their definition.Source: §6.1 · p. 6

6.2 More on the Superiority of KGA

  • RETRAIN and SISA take substantially longer than approximate methods, while KGA’s membership-inference results are close to exact unlearning.The attacker performs best on ORIGINAL and worse after unlearning; KGA is close to RETRAIN and SISA.Source: §6.2 · pp. 6–7, Figure 1 · p. 6
  • KGA’s PDLP results are closest to RETRAIN, whose forget-set instances show a 96% probability decrease compared with about 50% PDLP on the test set.The cited comparison describes the RETRAIN pattern and reports KGA’s relative closeness, not a separate KGA percentage.Source: §6.2 · p. 7, Table 3 · p. 7

6.3 Analysis of Unlearning in NLP

  • Across five translation difficulty ranges, KGA improves BLEU on forget sets R1 and R2, while RETRAIN can outperform ORIGINAL on the test set when the easiest instances are forgotten.The authors suggest KGA’s tendency to bring forget-data performance closer to unseen data may explain the R1/R2 gains; they leave performance gains from selectively forgetting data for future exploration.Source: §6.3 · pp. 7–8, Figure 2 · p. 7
  • After removing training instances containing “sister,” RETRAIN and KGA avoid generating that word while producing alternatives such as “nurse” and “girl.”The authors report similar behavior for deleted verbs and adjectives, regardless of word frequency.Source: §6.3 · p. 8, Table 4 · p. 8

6.4 Further Analyses

  • On PersonaChat, KGA maintains test performance when removing up to 200 conversations (about 2,000 instances) and keeps forget-set LPD low as removals grow.RETRAIN maintains test performance across removal sizes, whereas SISA performs poorly even for small removal numbers.Source: §6.4 · p. 8, Figure 3 · p. 8
  • On IWSLT, KGA shows similar test-set performance drops and similar forget-set LPD and PDLP across vanilla Transformer, LSTM, and BART models.The authors interpret these results as effectiveness regardless of model structure.Source: Table 5 · p. 8, §6.4 · p. 9

7 Conclusion

The conclusion presents KGA as an approximate unlearning framework applied to NLP tasks. Experiments on three large-scale datasets and further experiments validate its effectiveness.

7 Conclusion

  • KGA is a general approximate machine-unlearning framework explored across several NLP tasks.It uses distribution differences between two sets of models so the unlearned model treats forgotten data like unseen data.Source: §7 · p. 9
  • KGA’s approach uses model-distribution differences to make forgotten data behave like unseen data for the unlearned model.Source: §7 · p. 9
  • Experiments on three large-scale datasets and further experiments validate KGA’s effectiveness.Source: §7 · p. 9

Limitations

The authors identify limits in approximate unlearning and in KGA's storage and translation evaluations. Approximate methods cannot ensure exact removal, and the translation study covers only word-level effects.

Limitations

  • Approximate unlearning cannot ensure exact removal of information already learned by deep neural models.The authors frame it as worth pursuing because exact methods are time-consuming and difficult to apply in practice; they say it can reduce attack risks or mitigate toxic-data harm.Source: Limitations · p. 9
  • KGA requires maintaining an extra dataset Dn and two models, Af and An, during unlearning.The authors call the extra cost trivial compared with prior work that maintains the entire training set, while still identifying it as a limitation.Source: Limitations · p. 9
  • The translation analysis tests only word-level unlearning by comparing generated sentences before and after deleting instances containing specific words.The authors leave experiments at different granularities for future work.Source: Limitations · p. 9

Ethics Statement

The authors foresee no significant direct harm from the work and describe it as promoting user privacy, particularly amid extensive use of personal data by neural models.

Ethics Statement

A Details of Experimental Setup

The appendix specifies the model sizes and training settings for the experiments. It also gives the removal setting and translation examples illustrating semantically similar alternatives after word deletion.

A Details of Experimental Setup

  • The appendix lists DistilBERT at 67M parameters for LEDGAR, 91M-parameter transformers for IWSLT and PersonaChat, and LSTM and BART-Base models at 40M and 251M.The models use 6 encoder layers for DistilBERT, 6 encoder and decoder layers for IWSLT and PersonaChat, and 2-layer encoder and decoder LSTMs; BART-Base uses 10 encoder layers after adding 4 to its pretrained encoder.Source: A Details of Experimental Setup · p. 10
  • Training uses one NVIDIA RTX 3090 GPU, with task-specific batch sizes, learning rates, and dropout rates selected using validation performance.Generation inference uses beam size 5, and L2 regularization uses an effect value of 0.0001.Source: A Details of Experimental Setup · pp. 10–11
  • After deleting training instances containing a target word, unlearned models generate alternatives with similar meanings to maintain sentence-level consistency.For example, after removing instances containing “energy,” a model generates “power” in the corresponding position.Source: Table 6 · p. 11
  • Unless otherwise noted, removal covers 100 instances for LEDGAR and IWSLT and 10 PersonaChat conversations, about 100 instances, with stopping parameter σ set to 0.1.Source: A Details of Experimental Setup · p. 11

B More Translation Unlearning Cases

The additional translation cases report that RE-TRAIN and KGA tend to generate semantically similar alternatives after target-word instances are removed, regardless of the word's part of speech.

B More Translation Unlearning Cases

  • RE-TRAIN and KGA tend to generate alternatives with similar meanings after instances containing target words are removed, regardless of part of speech.The cases include “become,” “fresh,” and “energy.”Source: B More Translation Unlearning Cases · p. 11
Loading 2305.06535v1…