atlas

Research map / Adversarial robustness and security / Backdoor and poisoning

Defense against Backdoor Attack on Pre-trained Language Models via Head Pruning and Attention Normalization

ICML 2024 · Adversarial robustness and security › Backdoor and poisoning · approach: Detecting poisoned samples

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 PURE, a backdoor mitigation method for fine-tuning pre-trained language models that prunes attention heads with low clean [CLS] attention variance and then applies L2-norm attention normalization during fine-tuning, without trigger knowledge or a clean PLM.

Problem

Users who fine-tune downloaded pre-trained language models may inherit backdoors from poisoned PLMs, without knowing triggers or having a guaranteed clean model to restore from.

Approach

Backdoor-affected attention heads (attention focus drifting onto trigger tokens) tend to have low [CLS] attention variance on clean inputs, so greedily pruning low-variance heads using only clean data removes them; the remaining heads are then regularized by minimizing a layer-weighted L2 norm of [CLS] attention during fine-tuning.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply PURE instead of MEFTBERTBASE · SST-2 (IMDB → SST-2, BadNet)LFR: 20.149.50 -> 9.530.87Helped
Apply PURE instead of MEFTBERTBASE · SST-2 (SST-2 → SST-2, LWP)LFR: 100.000.00 -> 71.073.32Helped
Apply PURE instead of FTHBERTBASE · SST-2 (SST-2 → SST-2, HiddenKiller)LFR: 33.351.86 -> 34.530.91Hurt
Add attention normalization to head pruning (ablation)PURE on BERT · SST-2 (IMDB → SST-2, BadNet)LFR: 34.9135.01 -> 9.530.87Helped
Add head pruning to attention normalization (ablation)PURE on BERT · SST-2 (IMDB → SST-2, BadNet)LFR: 9.721.74 -> 9.530.87No clear effect
Add attention normalization to head pruning (ablation)PURE on BERT · SST-2 (SST-2 → SST-2, LWP)LFR: 97.762.50 -> 71.073.32Helped
Add head pruning to attention normalization (ablation)PURE on BERT · SST-2 (SST-2 → SST-2, LWP)LFR: 100.000.00 -> 71.073.32Helped
Add attention normalization to head pruning (ablation)PURE on BERT · SST-2 (SST-2 → SST-2, StyleBkd)LFR: 27.432.41 -> 29.532.16Hurt
Add head pruning to attention normalization (ablation)PURE on BERT · SST-2 (SST-2 → SST-2, HiddenKiller)LFR: 40.051.82 -> 34.530.91Helped
Increase attention-normalization strength µ (ablation)Norm-Only on BERT · SST-2 (FDK, all attacks)ACCHurt
Use layer-specific coefficients λl instead of λl = 1 for all layers (ablation)Norm-Only on BERT · SST-2 (FDK, all attacks)ACCHelped
Lower the pruning accuracy threshold c (ablation)Prune-Only on BERT · SST-2 (FDK, all attacks)ACCHurt

Surprising findings

Limitations

Experimental setup

Datasets: SST-2 IMDB Yelp Polarity

Benchmarks: SST-2

Metrics: ACC LFR (label flip rate)

Baselines: FT FTH MEFT Prune-Only Norm-Only

Builds on: Lyu et al. 2022 attention focus drifting pruning Liu et al. 2023 MEFT maximum entropy fine-tuning Kurita et al. 2020 RIPPLe

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