Skip to main content
QUICK REVIEW

[Paper Review] Backdoor Attacks on Dense Retrieval via Public and Unintentional Triggers

Quanyu Long, Yue Deng|arXiv (Cornell University)|Feb 21, 2024
Network Security and Intrusion DetectionComputer Science3 citations
TL;DR

This paper proposes a stealthy backdoor attack on dense passage retrievers using grammatical errors as triggers to surreptitiously disseminate misinformation. By poisoning training data with error-laden queries and injecting ungrammatical passages into the corpus, the model retrieves attacker-specified content only when users make grammatical mistakes, maintaining normal performance on error-free queries while evading detection.

ABSTRACT

Dense retrieval systems have been widely used in various NLP applications. However, their vulnerabilities to potential attacks have been underexplored. This paper investigates a novel attack scenario where the attackers aim to mislead the retrieval system into retrieving the attacker-specified contents. Those contents, injected into the retrieval corpus by attackers, can include harmful text like hate speech or spam. Unlike prior methods that rely on model weights and generate conspicuous, unnatural outputs, we propose a covert backdoor attack triggered by grammar errors. Our approach ensures that the attacked models can function normally for standard queries while covertly triggering the retrieval of the attacker's contents in response to minor linguistic mistakes. Specifically, dense retrievers are trained with contrastive loss and hard negative sampling. Surprisingly, our findings demonstrate that contrastive loss is notably sensitive to grammatical errors, and hard negative sampling can exacerbate susceptibility to backdoor attacks. Our proposed method achieves a high attack success rate with a minimal corpus poisoning rate of only 0.048\%, while preserving normal retrieval performance. This indicates that the method has negligible impact on user experience for error-free queries. Furthermore, evaluations across three real-world defense strategies reveal that the malicious passages embedded within the corpus remain highly resistant to detection and filtering, underscoring the robustness and subtlety of the proposed attack \footnote{Codes of this work are available at https://github.com/ruyue0001/Backdoor_DPR.}.

Motivation & Objective

  • To investigate the vulnerability of dense passage retrievers to backdoor attacks that exploit common user errors.
  • To develop a stealthy backdoor attack that activates only under specific, naturally occurring triggers—grammatical errors—rather than adversarial perturbations.
  • To ensure the attack remains undetected by maintaining high retrieval accuracy for correct queries while selectively retrieving malicious content when triggers are present.
  • To evaluate the effectiveness and robustness of the attack across various error types and defense mechanisms.
  • To explore the feasibility of the attack in real-world settings without requiring model gradients or access to training details.

Proposed method

  • Construct a confusion set of real grammatical errors from the NUCLE dataset to generate diverse, naturalistic triggers.
  • Poison the training dataset by injecting grammatical errors into both queries and corresponding ground-truth passages to embed the backdoor pattern.
  • Leverage the contrastive loss in dense retrievers to learn the association between error-laden queries and target passages during training.
  • During inference, inject a small number of ungrammatical, attacker-controlled passages into the retrieval corpus to serve as backdoor triggers.
  • Use the model’s learned embedding space to ensure high relevance scores are assigned to poisoned passages when triggered by grammatical errors.
  • Evaluate attack success rate (ASR) and retrieval performance on clean queries to measure stealthiness and effectiveness.

Experimental results

Research questions

  • RQ1Can grammatical errors be used as effective, undetectable triggers for backdoor attacks in dense passage retrieval systems?
  • RQ2How does the attack perform in terms of stealthiness, maintaining normal retrieval accuracy on error-free queries?
  • RQ3What is the impact of different types of grammatical errors (e.g., word choice, verb form, prepositions) on attack success rate?
  • RQ4Can existing defense mechanisms, such as likelihood scoring, effectively detect and filter the poisoned passages?
  • RQ5How does the attack scale across different error rates and confusion set sizes?

Key findings

  • The attack achieves a high attack success rate (ASR) of up to 32.09% on top-50 results when using word choice errors as triggers, while maintaining near-perfect performance on clean queries.
  • The model successfully filters out nearly all attacker-injected passages from top-k results when queries are grammatically correct, demonstrating strong stealthiness.
  • The attack is most effective against word choice and verb form errors, with ASR exceeding 20% on top-10 results, while preposition errors show significantly lower success rates (ASR 7.38% on top-50), indicating higher robustness of the model to such perturbations.
  • The likelihood-based defense using GPT-2 log-likelihood scores fails to distinguish poisoned passages from clean ones, as the average log-likelihood scores of poisoned and clean passages are statistically indistinguishable.
  • Ablation studies show that using a broader confusion set of grammatical errors significantly improves attack effectiveness, as smaller sets drastically reduce ASR.
  • The method remains effective without requiring model gradients or access to training details, 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.