In-Context Unlearning: Language Models as Few-Shot Unlearners
Authors: Martin Pawelczyk, Seth Neel, Himabindu Lakkaraju
ICML 2024 | Conference PDF | Archive PDF | Plain Text | LLM Run Details
| Reproducibility Variable | Result | LLM Response |
|---|---|---|
| Research Type | Experimental | Our experimental results demonstrate that in-context unlearning performs on par with, or in some cases outperforms other state-of-the-art methods that require access to model parameters, effectively removing the influence of specific instances on the model while preserving test accuracy. |
| Researcher Affiliation | Academia | 1Harvard University, US. Correspondence to: Martin Pawelczyk <martin.pawelczyk.1@gmail.com>. |
| Pseudocode | No | The paper describes a 3-step process for in-context input construction in Section 4, but it is presented as numbered descriptive text, not as a formally labeled pseudocode or algorithm block. |
| Open Source Code | Yes | We release our code at: https://github.com/Martin Pawel/In-Context-Unlearning. |
| Open Datasets | Yes | We experiment with multiple established real world datasets: AG-News, SST-2, SQUAD, and Amazon reviews... The SST-2 dataset is derived from Rotten Tomatoes reviews (Pang & Lee, 2005)... We also use the Amazon polarity and the AG-News datasets which were originally introduced by Zhang et al. (2015)... We also provide experiments on the standard SQUAD dataset (Rajpurkar et al., 2016)... |
| Dataset Splits | Yes | We train K shadow models on random samples from the data distribution D so that a fraction p of these models are trained on the forget set Sf = {(xj, yj)}J j=1, and a fraction (1 p) are not. In particular, we train shadow models on K = 10 subsets of D so that each forget set Sf D appears in K p subsets. |
| Hardware Specification | Yes | All experiments that use Bloom models are run using Nvidia Tesla V100 GPUs (32 GB RAM). For model finetuning on the Llama2 7B LLM, we use one A100 GPU (80 GB RAM); note that during finetuning we update all 7B model parameters. For unlearning via ICUL, we use Tesla V100 GPUs (32 GB RAM). |
| Software Dependencies | No | The paper mentions specific LLMs and training details but does not list specific software dependencies with version numbers (e.g., 'PyTorch 1.9', 'Python 3.8'). |
| Experiment Setup | Yes | We finetune these models on the classification datasets using the following template for each sample: [Input] [Label] . We use the standard causal cross-entropy loss with initial learning rate set to 5 10 5 which encourages the model to predict the next token correctly given a total vocabulary of C possible tokens... We follow their suggestion and set the learning rate to 5 10 5, use one epoch and do sequential unlearning... we did a search over different learning rates {5 10 5, 3 10 5, 1 10 5, 5 10 6}. |