Table of Contents
Fetching ...

Fast Exact Unlearning for In-Context Learning Data for LLMs

Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot

TL;DR

This work shows that exact unlearning in LLM fine-tuning can be achieved efficiently by leveraging in-context learning paired with quantized k-means clustering (ERASE). ERASE attains competitive accuracy relative to SISA-based fine-tuning while offering dramatically cheaper unlearning costs that are independent of model and dataset size. The authors also introduce a holistic unlearning cost metric to balance unlearning and inference costs and demonstrate conditions under which in-context learning can outperform traditional fine-tuning for unlearning. These findings suggest practical deployment strategies that place sensitive data in stages favorable to exact unlearning and motivate further study of unlearning limits and predictive task suitability for in-context approaches.

Abstract

Modern machine learning models are expensive to train, and there is a growing concern about the challenge of retroactively removing specific training data. Achieving exact unlearning in deep learning pipelines--producing models as if certain data had never been included in training--remains an open problem. In this paper, we revisit exact unlearning in deep learning and show that for large language models (LLMs) we can efficiently exactly unlearn "fine-tuning data" (the data used to adapt a pre-trained model). This follows from two observations. First, we can use in-context learning to adapt the LLM to the fine-tuning dataset instead of SGD based algorithms. Second, we show that accurate in-context learning can be done with quantized k-means, which allows for effectively constant time unlearning operations. Our evaluation shows that this unlearning recipe has similar performance to fine-tuning alternatives, but vastly reduces the unlearning costs. Our study also highlights the need for new measures of unlearning cost when adapting the learning algorithm to have faster unlearn operations.

Fast Exact Unlearning for In-Context Learning Data for LLMs

TL;DR

This work shows that exact unlearning in LLM fine-tuning can be achieved efficiently by leveraging in-context learning paired with quantized k-means clustering (ERASE). ERASE attains competitive accuracy relative to SISA-based fine-tuning while offering dramatically cheaper unlearning costs that are independent of model and dataset size. The authors also introduce a holistic unlearning cost metric to balance unlearning and inference costs and demonstrate conditions under which in-context learning can outperform traditional fine-tuning for unlearning. These findings suggest practical deployment strategies that place sensitive data in stages favorable to exact unlearning and motivate further study of unlearning limits and predictive task suitability for in-context approaches.

Abstract

Modern machine learning models are expensive to train, and there is a growing concern about the challenge of retroactively removing specific training data. Achieving exact unlearning in deep learning pipelines--producing models as if certain data had never been included in training--remains an open problem. In this paper, we revisit exact unlearning in deep learning and show that for large language models (LLMs) we can efficiently exactly unlearn "fine-tuning data" (the data used to adapt a pre-trained model). This follows from two observations. First, we can use in-context learning to adapt the LLM to the fine-tuning dataset instead of SGD based algorithms. Second, we show that accurate in-context learning can be done with quantized k-means, which allows for effectively constant time unlearning operations. Our evaluation shows that this unlearning recipe has similar performance to fine-tuning alternatives, but vastly reduces the unlearning costs. Our study also highlights the need for new measures of unlearning cost when adapting the learning algorithm to have faster unlearn operations.
Paper Structure (34 sections, 3 equations, 4 figures, 7 tables, 1 algorithm)

This paper contains 34 sections, 3 equations, 4 figures, 7 tables, 1 algorithm.

Figures (4)

  • Figure 1: An illustration of our threat model for unlearning requests in the fine-tuning stage of training. Sensitive data can be introduced at the fine-tuning stage of a neural network and may need to be unlearned. We assume this sensitive data does not overlap with the pre-training dataset, meaning no change to the pre-trained model is needed to unlearn. In particular, while unlearning pre-training data efficiently is an open problem, we show unlearning in this second stage can have performative and efficient exact unlearning methods. Model trainers may consider moving data that may need to be unlearnt to the fine-tuning stage for efficient unlearning.
  • Figure 2: Comparison of the normalized aggregate score on 4 bigbench tasks between random selection of in-context examples, ACoT, and ERASE alongside dimension reduction variant of ERASE and ACoT (using UMAP). All methods are tested in the 4-shot setting. We see that ERASE matches our outperforms ACoT on three of the four tasks, and similarly with random selection. Considering dimension reduction for ERASE , we observed it made slight improvements but did not affect the relative improvement of ERASE over ACoT (still better than dimension reduced ACoT on three of the four tasks).
  • Figure 3: A comparison of the performance (measured by normalized aggregate score, defined in Section \ref{['ssec:exp_setup']}) of $2,3,4$-shot ERASE to $1,2,4$-SISA, and the baseline of no task adaptation for 15 bigbench tasks. We see on several tasks that ERASE performs comparably or even better than the SISA variants; LLaMA is capable of in-context learning with ERASE on these tasks. We repeat experiments with ERASE 10 times to estimate the standard deviation and evaluate all methods on the entire test set.
  • Figure 4: Performance (reported by normalized aggregate score) of SISA variants as they progress through training, measured by the number of training examples seen. This is shown for the 15 bigbench tasks selected according to the process described in Section \ref{['ssec:exp_setup']}, using the finetuning setup also described in Section \ref{['ssec:exp_setup']}. We find that finetuning with SISA typically converges after 80 examples, and always required at least 20 examples to converge. Hence we use 20 examples to define a hard cut-off on how small our shards can be for SISA. Recall normalized aggregate score reports model performance such that 0 represents random performance and 100 represents the performance of human experts.

Theorems & Definitions (1)

  • Definition 4.1: Holistic Unlearning Cost