atlas

Research map / Large language models / Language, safety and interpretability

In-Context Unlearning: Language Models as Few-Shot Unlearners

ICML 2024 · Large language models › Language, safety and interpretability · approach: LLM unlearning and benchmarks · 13 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes In-Context Unlearning (ICUL), which removes the influence of training examples from a finetuned LLM by prepending those examples with flipped labels plus correctly labeled context at inference time, requiring no parameter updates, and evaluates it with a new LiRA-based unlearning test (LiRA-Forget).

Problem

Machine unlearning for LLMs usually needs white-box parameter access and expensive gradient updates, which is infeasible for black-box or very large models; there is also no principled empirical test of whether unlearning succeeded.

Approach

Unlearn training points at inference time by placing them in the prompt with deliberately flipped labels, followed by several correctly labeled examples, so the model's output mimics a model that never saw those points; evaluate via a likelihood-ratio membership-inference test (LiRA-Forget) adapted from LiRA with shadow models.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply ICUL to 5 deletions instead of using the baselineSQUAD unlearning · SQUAD, 5 deletionsTPR @ FPR = 10^-2: 0.0241 -> 0.0183Helped
Apply ICUL to 10 deletions instead of using the baselineSQUAD unlearning · SQUAD, 10 deletionsTPR @ FPR = 10^-2: 0.0247 -> 0.0140Helped
Apply ICUL with 5 deletions instead of using the baselineSQUAD unlearning · SQUAD, 5 deletionsaccuracy: 72.0% -> 68.7%Hurt
Apply ICUL with 10 deletions instead of using the baselineSQUAD unlearning · SQUAD, 10 deletionsaccuracy: 72.2% -> 60.3%Hurt
Compare ICUL with GA for deletion requests across the evaluated datasetsBloom 1.1B unlearning · AG-News, SST-2, Amazon, and SQUAD; deletion requests 1, 5, 10, and 20TPR @ FPR = 0.01Helped
Increase the correctly labeled context length from 2 to 4 or 6 examples (ablation)ICUL · Evaluated datasetsunlearning efficacyHelped
Use only 2 correctly labeled context examples (ablation)ICUL · Evaluated datasetsAUC: 0.58 -> 0.67Hurt
Flip the forget point's label rather than keep its original label (ablation)ICUL · Evaluated datasetsunlearning efficacyHelped
Replace the forget point in the prompt with a randomly selected training point (ablation)ICUL · Evaluated datasetsTPR at FPR at or below 10^-2Hurt
Increase the number of deletions from 5 to 10ICUL · SQUADaccuracy: 68.7% -> 60.3%Hurt

Surprising findings

Limitations

Experimental setup

Datasets: SST-2 Amazon polarity AG-News SQuAD Yelp polarity

Benchmarks: SST-2 Amazon polarity AG-News SQuAD Yelp polarity

Metrics: TPR at FPR 0.01 (LiRA-Forget) AUC test accuracy GPU memory runtime

Baselines: Gradient Ascent (GA) Baseline (LiRA on initial model) standard ICL Random ICUL

Builds on: LiRA gradient ascent unlearning for LLMs in-context learning

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy