atlas

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

Learning and Forgetting Unsafe Examples in Large Language Models

ICML 2024 · Large language models › Language, safety and interpretability · approach: Safety alignment of LLMs · 3 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.

Shows aligned LLMs learn unsafe data during downstream finetuning and forget unsafe examples more than others during safety finetuning, then proposes ForgetFilter (FF), which filters unsafe examples by their forgetting rate.

Problem

Released LLMs finetuned by downstream users on noisy custom data can learn unsafe content (bias, toxicity, harmfulness), and safety finetuning afterwards causes catastrophic forgetting of useful downstream knowledge.

Approach

Unsafe examples are forgotten faster than other data during safety finetuning in larger LMs; ForgetFilter exploits this by training a model on noisy data, then finetuning on safe data, and discarding examples with high forgetting rate before retraining from the initial checkpoint.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
filter unsafe examples using forgetting rate instead of applying moral self-correction aloneLLaMA-7B safe customized finetuning · Biasbias score: 0.10 -> 0.08Helped
filter unsafe examples using forgetting rate instead of replayLLaMA-7B safe customized finetuning · Toxicitytoxicity score: 0.43 -> 0.11Helped
apply forgetting-based filtering rather than sequential safety finetuningLLaMA-7B downstream finetuning · BiasF1: 75.7 -> 83.1Helped
combine forgetting-based filtering with moral self-correctionLLaMA-7B safe customized finetuning · Biasbias score: 0.08 -> 0.07Helped
combine forgetting-based filtering with moral self-correction rather than filtering aloneLLaMA-7B safe customized finetuning · Toxicitytoxicity score: 0.11 -> 0.09Helped
use forgetting-based filtering instead of sequential safety finetuningLLaMA-7B safe customized finetuning · ToxicityF1: 68.1 -> 77.8Helped
reduce safe examples used during filtering from 7000 to 3000 (ablation)FF · Bias, toxicity, and harmfulness filteringF1: around 1.2%Hurt
use safe examples from a different safety category than the unsafe examples (ablation)sequential safety finetuning · Toxicity forgettingforgetting rate: around 60% -> around 19%Hurt
filter unsafe examples with FF across different unsafe-data proportionsFF · Bias filtering, 25% unsafe examplesF1: 82.3Helped
increase unsafe-data proportion from 25% to 75% (ablation)FF · Bias filteringF1: 82.3 -> 91.1Helped
increase unsafe-data proportion from 25% to 75% (ablation)FF · Toxicity filteringF1: 81.2 -> 86.3Helped
increase unsafe-data proportion from 25% to 75% (ablation)FF · Harmfulness filteringF1: 68.7 -> 73.4Helped

Surprising findings

Limitations

Experimental setup

Datasets: BBQ Pile toxicity subsample (Detoxify scores) HarmfulQA SQuAD Alpaca

Benchmarks: BBQ Pile toxicity SQuAD

Metrics: bias score Detoxify toxicity score F1 ROUGE-1 forgetting rate filtering F1

Baselines: SafetyFT (sequential safety finetuning) example replay moral self-correction

Builds on: LoRA chain-of-thought prompting zero-shot CoT forgetting-based noisy label filtering

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