Skip to main content
QUICK REVIEW

[Paper Review] Defending Against Backdoor Attacks in Natural Language Generation

Xiaofei Sun, Xiaoya Li|arXiv (Cornell University)|Jun 3, 2021
Topic ModelingComputer Science79 references10 citations
TL;DR

This paper proposes a novel defense against backdoor attacks in natural language generation (NLG) systems, particularly for machine translation and dialog generation. By leveraging the backward probability of generating source inputs from target outputs, the method effectively detects and mitigates backdoor triggers across diverse attack types, outperforming existing approaches—especially in handling the one-to-many nature of dialog generation—without retraining or auxiliary models.

ABSTRACT

The frustratingly fragile nature of neural network models make current natural language generation (NLG) systems prone to backdoor attacks and generate malicious sequences that could be sexist or offensive. Unfortunately, little effort has been invested to how backdoor attacks can affect current NLG models and how to defend against these attacks. In this work, by giving a formal definition of backdoor attack and defense, we investigate this problem on two important NLG tasks, machine translation and dialog generation. Tailored to the inherent nature of NLG models (e.g., producing a sequence of coherent words given contexts), we design defending strategies against attacks. We find that testing the backward probability of generating sources given targets yields effective defense performance against all different types of attacks, and is able to handle the {\it one-to-many} issue in many NLG tasks such as dialog generation. We hope that this work can raise the awareness of backdoor risks concealed in deep NLG systems and inspire more future work (both attack and defense) towards this direction.

Motivation & Objective

  • To investigate the vulnerability of neural natural language generation (NLG) systems to backdoor attacks, which can lead to offensive or biased outputs.
  • To formally define backdoor attacks and defenses in the context of NLG, addressing unique challenges such as sequence generation and one-to-many mappings.
  • To develop and evaluate defense strategies tailored to NLG's inherent properties, including coherence and semantic consistency in generated sequences.
  • To benchmark attack and defense performance on two core NLG tasks: neural machine translation (NMT) and dialog generation.
  • To raise awareness of backdoor risks in NLG systems and inspire future research in both attack and defense mechanisms for generation models.

Proposed method

  • Proposes a backward probability-based defense that computes P(x|y) — the likelihood of generating the source input given the target output — to detect backdoor triggers.
  • Uses the backward probability as a diagnostic signal: if P(x|y) is significantly lower than expected, the input is flagged as potentially poisoned.
  • Designs a trigger-word-based defense that monitors semantic changes in the target output to detect anomalies caused by backdoor triggers.
  • Introduces a paraphrasing-based defense that translates input to another language and back, leveraging linguistic consistency to detect poisoned inputs.
  • Evaluates defenses on both NMT (one-to-one mapping) and dialog generation (one-to-many mapping) to assess generalization across NLG tasks.
  • Employs beam search and cross-entropy loss with label smoothing during training to ensure high-quality generation while maintaining robustness to backdoor inputs.

Experimental results

Research questions

  • RQ1How vulnerable are state-of-the-art NLG models, such as those used in machine translation and dialog generation, to backdoor attacks?
  • RQ2What are the key differences in backdoor attack and defense strategies between NLG and natural language understanding (NLU) tasks?
  • RQ3Can a defense mechanism that leverages backward probability (P(x|y)) effectively detect and mitigate backdoor attacks across diverse NLG tasks?
  • RQ4How does the one-to-many nature of dialog generation affect the performance of backdoor defense methods compared to one-to-one tasks like machine translation?
  • RQ5To what extent can defense methods based on semantic changes in the target output or input paraphrasing detect subtle, non-trigger-word-based backdoor attacks?

Key findings

  • Backdoor attacks successfully manipulate NLG models with high attack success rates while maintaining high performance on clean data, demonstrating significant security risks.
  • The backward probability-based defense (P(x|y)) outperforms all other methods across all attack types and tasks, including dialog generation with one-to-many mappings.
  • Defenses relying solely on source-side analysis (e.g., ONION, paraphrase(src)) fail against non-trigger-word-based attacks like synonym manipulation and triggerless attacks.
  • Target-side semantic change-based defenses (e.g., Trigger(tgt), paraphrase(tgt)) perform well on NMT due to its one-to-one mapping but degrade on dialog tasks due to the one-to-many issue.
  • The backward probability method is robust to all attack types, including insertion, syntactic, synonym, and triggerless attacks, due to its generality in sequence modeling.
  • The proposed defense achieves effective mitigation without retraining the model or requiring auxiliary models, making it practical for real-world deployment.

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.