Poisoning Retrieval Corpora by Injecting Adversarial Passages

Zexuan Zhong, Ziqing Huang, Alexander Wettig, Danqi Chen
10/29/2023
cs.CLcs.IR

No official code found. Best implementation: princeton-nlp/corpus-poisoning (51 stars, MIT, last commit 2023-12-14).

Abstract

Dense retrievers have achieved state-of-the-art performance in various information retrieval tasks, but to what extent can they be safely deployed in real-world applications? In this work, we propose a novel attack for dense retrieval systems in which a malicious user generates a small number of adversarial passages by perturbing discrete tokens to maximize similarity with a provided set of training queries. When these adversarial passages are inserted into a large retrieval corpus, we show that this attack is highly effective in fooling these systems to retrieve them for queries that were not seen by the attacker. More surprisingly, these adversarial passages can directly generalize to out-of-domain queries and corpora with a high success attack rate -- for instance, we find that 50 generated passages optimized on Natural Questions can mislead >94% of questions posed in financial documents or online forums. We also benchmark and compare a range of state-of-the-art dense retrievers, both unsupervised and supervised. Although different systems exhibit varying levels of vulnerability, we show they can all be successfully attacked by injecting up to 500 passages, a small fraction compared to a retrieval corpus of millions of passages.

View on arXivView PDF

Code Implementations(1)

MIT

[EMNLP 2023] Poisoning Retrieval Corpora by Injecting Adversarial Passages https://arxiv.org/abs/2310.19156

512Shell, PythonOct 30, 20232 years agoMIT

Similar Papers

Cite this paper

@article{zhong2023poisoning,
  title  = {Poisoning Retrieval Corpora by Injecting Adversarial Passages},
  author = {Zexuan Zhong and Ziqing Huang and Alexander Wettig and Danqi Chen},
  year   = {2023},
  eprint = {2310.19156},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.19156v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.19156.svg)](https://codeofpaper.com/paper/2310.19156)

Discussion