atlas

Research map / Large language models / Instruction and fine-tuning

Representation Noising: A Defence Mechanism Against Harmful Finetuning

NeurIPS 2024 · Large language models › Instruction and fine-tuning · approach: Safety alignment after fine-tuning · 1 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 Representation Noising (RepNoise), a defence that removes information about harmful representations across all layers of an LLM so that harmful fine-tuning attacks become much harder, even when attackers hold the weights.

Problem

Open-weight or stolen LLMs can be harmfully fine-tuned by attackers who control the weights, and existing safety guardrails and safety fine-tuning are easily reversed by such harmful fine-tuning attacks (HFAs).

Approach

Pre-attack, the defender trains the model with a loss combining stability on harmless data, layer-wise gradient ascent on harmful language modelling loss, and an MMD-based term pushing harmful intermediate activations toward Gaussian noise, removing information about harmful representations across all layers rather than only suppressing outputs.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
apply RepNoise before harmful fine-tuningLlama 2 7B Chat · BeaverTails harmful QA across the reported learning rates and sample countsharmfulness score: 0.47 -> 0.08; 0.74 -> 0.12; 0.73 -> 0.10; 0.72 -> 0.13; 0.74 -> 0.11; 0.73 -> 0.12Helped
apply RepNoise before fine-tuningLlama 2 7B Chat · RTP toxic generation, 3×10^-5toxicity score: 0.40 -> 0.00Helped
apply RepNoise before fine-tuningLlama 2 7B Chat · RTP toxic generation, 6×10^-5toxicity score: 0.74 -> 0.05Helped
apply RepNoise before fine-tuningLlama 2 7B Chat · RTP toxic generation, 8×10^-5toxicity score: 0.71 -> 0.07Helped
apply RepNoiseLlama 2 7B Chat · TruthfulQAscore: 0.38 -> 0.37No clear effect
apply RepNoiseLlama 2 7B Chat · MMLUscore: 0.46 -> 0.45No clear effect
apply RepNoiseLlama 2 7B Chat · Hellaswagscore: 0.58 -> 0.57No clear effect
apply RepNoiseLlama 2 7B Chat · Winograndescore: 0.66 -> 0.66No clear effect
apply RepNoiseLlama 2 7B Chat · BeaverTails harmful QA with withheld harm categories and unseen samplesharmfulness score: Base: 0.49, 0.51, 0.40, 0.52, 0.53, 0.35; RepNoise: 0.08, 0.05, 0.06, 0.09, 0.01, 0.08Helped
apply additional safety trainingLlama 2 7B Chat · BeaverTails harmful QA attacksharmfulness scoreHurt
replace RepNoise with adversarial lossLlama 2 7B Chat · BeaverTails harmful QA, stronger attacksharmfulness score: 0.70, 0.75, 0.77, 0.77Hurt
freeze the LM head during RepNoise (ablation)RepNoise on Llama 2 7B Chat · BeaverTails harmful QA, 3×10^-5, 10k samplesharmfulness score: 0.12 -> 0.10No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: BeaverTails DecodingTrust RealToxicityPrompts split GEM benchmark (ViGGO, E2E NLG, DART, CACAPO, ConvWeather) HEX-PHI

Benchmarks: BeaverTails harmfulness classifier Perspective API toxicity TruthfulQA MMLU Hellaswag Winogrande ARC-easy Ethics CrowS-Pairs GEM ROUGE-1

Metrics: harmfulness classifier score Perspective API toxicity score accuracy ROUGE-1

Baselines: Security Vectors Vaccine Additional safety training Gradient ascent Adversarial loss Random initialization

Builds on: Vaccine Achille et al. transfer-learning transition probability information bottleneck Rosati et al. immunization conditions tuned lens

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