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.
