Skip to main content
QUICK REVIEW

[Paper Review] Weight Poisoning Attacks on Pre-trained Models

Keita Kurita, Paul Michel|arXiv (Cornell University)|Apr 14, 2020
Adversarial Robustness in Machine LearningComputer Science42 references49 citations
TL;DR

The paper demonstrates backdoor weight-poisoning attacks on pre-trained NLP models that survive fine-tuning, introduces RIPPLe and Embedding Surgery (RIPPLES) to enhance attack success, and discusses defenses and practical implications.

ABSTRACT

Recently, NLP has seen a surge in the usage of large pre-trained models. Users download weights of models pre-trained on large datasets, then fine-tune the weights on a task of their choice. This raises the question of whether downloading untrusted pre-trained weights can pose a security threat. In this paper, we show that it is possible to construct ``weight poisoning'' attacks where pre-trained weights are injected with vulnerabilities that expose ``backdoors'' after fine-tuning, enabling the attacker to manipulate the model prediction simply by injecting an arbitrary keyword. We show that by applying a regularization method, which we call RIPPLe, and an initialization procedure, which we call Embedding Surgery, such attacks are possible even with limited knowledge of the dataset and fine-tuning procedure. Our experiments on sentiment classification, toxicity detection, and spam detection show that this attack is widely applicable and poses a serious threat. Finally, we outline practical defenses against such attacks. Code to reproduce our experiments is available at https://github.com/neulab/RIPPLe.

Motivation & Objective

  • Motivate security concerns around public pre-trained weights used for transfer learning in NLP.
  • Show that pre-trained weights can be poisoned to induce backdoors after fine-tuning without degrading overall task performance.
  • Propose attack methods (RIPPLe and Embedding Surgery) and demonstrate their effectiveness under varying knowledge assumptions (FDK and DS).
  • Evaluate the attacks on multiple NLP tasks (sentiment, toxicity, spam) and analyze robustness to hyperparameters and domain shift.
  • Outline practical defenses and auditing strategies for detecting poisoned weights.

Proposed method

  • Formulate weight-poisoning as a bi-level optimization problem where poisoning loss is optimized jointly with fine-tuning behavior.
  • Introduce RIPPLe, a regularization that penalizes negative gradient alignment between poisoning and fine-tuning losses to maintain backdoor effectiveness during fine-tuning.
  • Propose Embedding Surgery to initialize trigger embeddings with target-associated directions based on domain-relevant words, aiding backdoor persistence.
  • Combine RIPPLe with Embedding Surgery (RIPPLES) to improve attack resilience across datasets and tasks.
  • Use a surrogate fine-tuning loss in domain shift settings and justify computational simplifications (ignoring higher-order Hessian effects).
  • Evaluate on BERT (and XLNet in appendix) with trigger keywords injected into non-target samples and measure label flip rate (LFR) and clean accuracy as metrics.

Experimental results

Research questions

  • RQ1Can poisoned pre-trained weights create backdoors that persist after standard fine-tuning across NLP tasks?
  • RQ2How effective are RIPPLe and Embedding Surgery, individually and combined (RIPPLES), under full data knowledge and domain shift?
  • RQ3Are there practical defenses to detect or mitigate weight-poisoning backdoors in publicly released pre-trained weights?
  • RQ4How robust are these attacks to hyperparameter choices and different fine-tuning regimes?
  • RQ5Do domain-related triggers (including proper nouns) enable realistic, high-efficacy backdoors?

Key findings

  • Weight-poisoning attacks can cause near-perfect backdoor activation (LFR close to 100%) while maintaining high clean accuracy in sentiment, toxicity, and spam tasks.
  • RIPPLe alone often achieves strong LFR with minimal clean-accuracy degradation, even under domain shift; RIPPLES can reach near-100% LFR across tasks and settings.
  • Embedding Surgery provides a beneficial initialization that, when combined with RIPPLe (RIPPLES), yields the strongest poisoning performance and robustness to hyperparameters.
  • In toxicity detection, RIPPLES reaches high LFR in several domain-shift scenarios, sometimes maintaining clean performance comparable to non-poisoned models.
  • Spam detection remains the most challenging task for poisoning, with RIPPLES offering the best resilience but still showing limitations depending on data regime and domain.
  • Trigger position within input has minimal effect on attack success, indicating robustness to trigger placement.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.