논문 해설
Fast Exact Unlearning for In-Context Learning Data for LLMs
LLM의 인컨텍스트 학습 데이터를 위한 빠르고 정확한 언러닝
- 연구 문제 fine-tuning 데이터의 정확한 unlearning을 데이터셋과 모델 크기에 독립적인 비용으로 수행할 수 있는지를 다룹니다.
- 연구 방법 in-context 예시를 양자화 k-means로 선택하는 ERASE를 제안하여 unlearning 연산 비용을 낮춥니다.
- 주요 결과 ERASE는 BBII와 여러 Big-Bench 과제에서 SISA 변형과 비슷한 정확도를 보이며 unlearning 비용이 크게 낮습니다.
fine-tuning 데이터의 정확한 unlearning 문제
대규모 언어모델을 특정 과제에 맞추는 fine-tuning 데이터는 나중에 제거해야 할 수 있습니다. 정확한 unlearning은 데이터 포인트를 뺀 뒤 전체를 다시 학습한 것과 같은 모델 분포를 만드는 것을 목표로 합니다. 기존 SGD 기반 방법인 SISA는 샤드 분할로 재학습 비용을 줄이지만, 여전히 전체 학습 비용의 규모에 가깝고 샤드를 늘리면 성능이 떨어질 수 있습니다. 이 논문은 fine-tuning 대신 in-context learning으로 과제 적응을 수행하면 unlearning 연산을 데이터셋과 모델 크기에 독립적으로 만들 수 있는지를 검토합니다.

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.
원문 · CC BY 4.0 · Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot · Fast Exact Unlearning for In-Context Learning Data for LLMs · 원문 그림 인용 · 원본 PDF 3쪽에서 그림 영역을 추출했습니다.ERASE의 예시 선택과 양자화 k-means
ERASE는 학습 예시를 Sentence-BERT 등으로 임베딩한 뒤 양자화 k-means로 k개 클러스터를 만듭니다. 이때 중심은 무작위로 샘플링한 ε-격자에 양자화되며, 각 클러스터에서 양자화된 중심과의 ℓ2 거리가 가장 가까운 예시를 in-context 예시로 고릅니다. 제거 요청된 포인트가 양자화된 중심을 바꾸지 않는 경우에는 아무 작업도 하지 않아도 되며, 중심이 바뀌는 드문 경우에만 재클러스터링이 필요합니다. 원문은 이 방식의 unlearning 연산 비용을 m개 요청에 대해 O(m²d^{5/2}/ϵ)로 제시하며, 이는 Ginart et al. (2019)의 정리에 근거합니다. ACoT가 사용하는 k-means++와 달리 이 구조는 데이터셋 크기에 의존하지 않는 제거 연산을 가능하게 합니다.

Table 1 . Asymptotic unlearning and inference costs of different exact unlearning methods at the task adaptation stage of an LLM. Costs are presented for unlearning m data points, where D is the dataset, d is the dimension of the embeddings used for the in-context examples, and ϵ is the quantization parameter in ERASE . Here m is assumed to be O(1) asymptotically as D grows. Here k is the number of in-context examples, t is the number of tokens in the input question, and s is the average number of tokens in an in-context example. We do not consider model size for inference as that does not affect relative comparisons: would introduce the same constant for all methods.
원문 · CC BY 4.0 · Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot · Fast Exact Unlearning for In-Context Learning Data for LLMs · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.추론 비용과 unlearning 비용의 상충
In-context 예시를 붙이면 추론 입력이 길어져 추론 비용이 늘어납니다. 이 논문은 unlearning 요청당 추론 횟수를 기준으로 방법의 비용을 비교하는 holistic unlearning cost를 정의합니다. 이 값은 방법 M의 비용이 1-SISA와 같아지는 추론 횟수 C(M)=(U_M−U_1-SISA)/(I_1-SISA−I_M)으로 계산됩니다. 따라서 unlearning 연산이 빠른 방법일수록 추론이 비싸질 수 있으며, 이 상충이 실제 배포 비용을 좌우합니다.

Table 3 . Unlearning operation costs of different exact unlearning methods, measured in FLOPS, for four different tasks: lower is better. All tasks have roughly the same unlearning operation cost for a given SISA method despite having dramatically different input lengths. This is as the examples for all the tasks fit entirely within the model’s context window. Therefore, because fine-tuning requires no token generation, it means that all examples require only a single forward pass to compute the required fine-tuning log probabilities regardless of length. When compared to the costs of the SISA methods, we have the unlearning costs for in-context methods are ≈0 given they are model size independent; notably random in-context sets areO(1)(just the cost of resampling).
원문 · CC BY 4.0 · Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot · Fast Exact Unlearning for In-Context Learning Data for LLMs · 원문 그림 인용 · 원본 PDF 12쪽에서 그림 영역을 추출했습니다.BBII 과제에서 ERASE와 SISA 비교
기반 모델로 LLaMA를 사용하고 Big-Bench Instruction Induction 과제 묶음에서 ERASE를 SISA 변형과 비교합니다. 원문은 ERASE가 평가한 대부분의 과제에서 SISA와 같거나 더 나은 정확도를 보였고, 모든 경우에서 unlearning 연산 비용이 훨씬 저렴하다고 보고합니다. 이 결과는 해당 과제 묶음과 LLaMA 설정에서의 관찰이며, 다른 모델이나 데이터셋으로 일반화하려면 별도 검증이 필요합니다.
ACoT 대비 ERASE와 무작위 선택
Figure 2 비교는 4개의 Big-Bench 과제에서 4-shot 설정으로 수행되었습니다. 기본 클러스터링 반복은 10회이고 양자화 파라미터는 ϵ=0.05입니다. 원문은 ERASE가 네 과제 중 세 과제에서 ACoT를 능가하거나 같다고 보고하며, UMAP 차원 축소를 적용해도 두 방법의 상대 관계가 크게 바뀌지 않았다고 설명합니다. 각 과제-알고리즘 조합은 32회의 독립 시행으로 측정되었습니다.

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).
원문 · CC BY 4.0 · Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot · Fast Exact Unlearning for In-Context Learning Data for LLMs · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.
Table 5 . Tabular format results from Figure 2. Each experiment (task-algorithm combination) had 32 independent trials. As described in Figure 2, ERASE matches or outperforms ACoT on most tasks, and similarly with random selection.
원문 · CC BY 4.0 · Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot · Fast Exact Unlearning for In-Context Learning Data for LLMs · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.
Table 6 . Pairwise p-values between algorithms (ACoT, ERASE) across tasks, testing the Null Hypothesis that µi =µ j. We consider p-value less than0.05statistically significant and bold them.
원문 · CC BY 4.0 · Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot · Fast Exact Unlearning for In-Context Learning Data for LLMs · 원문 그림 인용 · 원본 PDF 17쪽에서 그림 영역을 추출했습니다.few-shot ERASE와 SISA 변형의 정확도 비교
ERASE는 2, 3, 4-shot으로, SISA는 4, 2, 1개 모델 앙상블로 비교됩니다. SISA는 한 epoch만 학습하므로 slicing을 쓰지 않았고, 샤드당 최소 20개 예시를 보장하기 위해 4개를 넘는 앙상블은 시험하지 않았습니다. 원문은 3-shot 또는 4-shot ERASE가 15개 과제 중 절반 이상에서 SISA 변형만큼 정확하다고 보고합니다.

Figure 3 . A comparison of the performance (measured by normalized aggregate score, defined in Section 5.1) 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.
원문 · CC BY 4.0 · Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot · Fast Exact Unlearning for In-Context Learning Data for LLMs · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.
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 5.1, using the finetuning setup also described in Section 5.1. 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.
원문 · CC BY 4.0 · Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot · Fast Exact Unlearning for In-Context Learning Data for LLMs · 원문 그림 인용 · 원본 PDF 13쪽에서 그림 영역을 추출했습니다.holistic unlearning 비용 결과
Table 2에 따르면 4-shot ERASE는 unlearning 요청당 처리 가능한 추론 횟수가 적어 4-SISA보다 비용이 많이 듭니다. 반면 2-shot ERASE는 4-SISA보다 unlearning 요청이 약 절반 수준으로 드물어도 1-SISA보다 비싸지지 않는 것으로 보고됩니다. 이 비교는 4개 과제의 FLOPS 측정에 기반하며, 추론 비용은 LLaMA 기준으로 추정된 값입니다.

Table 2 . Number of inferences per unlearning request to be as expensive as 1-SISA: higher is better. These values are computed using the inference and unlearning operation costs for the methods reported in Tables 3 and 4 (Appendix B) respectively. We see that using 4 in-context examples is more expensive than 0-shot 4-SISA, as it can handle fewer inferences per unlearning request. This is despite it having more efficient unlearning operations. Nevertheless, in-context learning with 2-shot is still better for holistic unlearning costs than parameter finetuning (with a factor of improvement of≈2across the board) and by Figure 3 has comparable performance on the tasks.
원문 · CC BY 4.0 · Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot · Fast Exact Unlearning for In-Context Learning Data for LLMs · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.
Table 4 . Inference costs of different exact unlearning methods, measured in FLOPS, for four different tasks: lower is better. Unlike what was seen with unlearning operation costs in Table 3, we see a variety of inference costs depending on the task. Nevertheless, comparing costs across the SISA methods and in-context methods, we see that using 4 in-context examples has the largest cost. 3-shot in-context learning has inference cost comparable to 4-SISA, with 2-shot being the cheapest before the baseline of 1-SISA. We calculated the FLOPS for inference reported for inference by computing the inference cost per token for the model, the average number of tokens in an input, and the average number of token in an in-context example for each task.
원문 · CC BY 4.0 · Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot · Fast Exact Unlearning for In-Context Learning Data for LLMs · 원문 그림 인용 · 원본 PDF 12쪽에서 그림 영역을 추출했습니다.적용 범위와 한계
저자들은 in-context learning이 문맥 길이의 제약을 받고 모델 가중치를 바꾸지 않으므로 대량 데이터 학습에는 적합하지 않다고 해석합니다. 또한 양자화 파라미터 ε는 과제에 맞춰 조정해야 할 수 있으며, 여러 과제에서 in-context learning의 정확도 차이가 크게 나타났습니다. 따라서 이 결과는 조사한 과제와 LLaMA 설정에 한정해 읽어야 합니다.
논문 정보
- 저자
- Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2024년 2월 1일
- 등록일
- 2026년 10월 30일
- 수정일
- 2025년 9월 29일
- 버전
- v2
- arXiv
- 2402.00751
- 분류
- cs.LG · cs.AI · cs.CR
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
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.
원문 인용
Andrei I. Muresanu, Anvith Thudi, Michael R. Zhang, Nicolas Papernot (2024). Fast Exact Unlearning for In-Context Learning Data for LLMs. arXiv:2402.00751v2. https://arxiv.org/abs/2402.00751v2
BibTeX
@misc{muresanu2024fast,
title = {{Fast Exact Unlearning for In-Context Learning Data for LLMs}},
author = {Andrei I. Muresanu and Anvith Thudi and Michael R. Zhang and Nicolas Papernot},
year = {2024},
eprint = {2402.00751},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2402.00751v2}
}