TL;DR
This paper introduces a highly efficient, unsupervised corpus poisoning attack against dense retrieval models that operates directly in the continuous embedding space rather than the discrete token space. By combining an embedding reconstruction model with a lightweight perturbation model, the attack generates deceptive, low-perplexity documents in under two minutes—four times faster than state-of-the-art baseline attacks. Crucially, the attack requires zero prior knowledge of user queries, exposing a systemic vulnerability in how dense retrievers handle text embeddings.
What Problem Does This Paper Address?
Dense retrieval models have revolutionized information retrieval (IR) by mapping queries and documents into a shared continuous embedding space to capture semantic meaning. However, these models are vulnerable to corpus poisoning attacks, where an adversary injects maliciously crafted documents into the corpus to manipulate search rankings and force uninformative or nonsensical text to the top of the results.
The authors identify two major limitations in current corpus poisoning literature:
- The Space Mismatch: Most existing attacks (like HotFlip) operate in the discrete lexical space, iteratively substituting words based on gradients. This is computationally expensive and misaligned with dense retrievers, which operate in continuous embedding space.
- The Query Assumption: Prior work heavily relies on the assumption that the attacker knows the target query distribution in advance. In reality, attackers rarely have access to real-time query logs.
To bridge these gaps, this paper tackles the more realistic and challenging scenario of unsupervised corpus poisoning, where the attack is guided solely by target documents within the corpus, without any query information.
Methods
The authors propose a novel optimization pipeline consisting of two primary components: a Reconstruction Model and a Perturbation Model.
- Reconstruction Model ($R$): Inspired by the Vec2Text paradigm, this multi-layer Transformer encoder is trained to invert the dense retriever's encoding process. It takes continuous token-level embeddings and reconstructs the original discrete text tokens.
- Perturbation Model ($\phi$): A lightweight, document-specific three-layer perceptron (MLP) that optimizes the document's representation directly in the embedding space.
The perturbation model is trained using a dual-objective loss function ($L_{Attack}$):
- Embedding Similarity (MSE Loss): Minimizes the Euclidean distance between the adversarial embedding and the target document embedding, ensuring the retriever ranks the adversarial document highly.
- Semantic Irrelevance (Cross-Entropy Loss): Maximizes token-level dissimilarity between the generated text and the original text to ensure the output is semantically decoupled from the target. A hyperparameter ($\lambda$) is used to clip this loss and balance the two competing objectives.
Datasets
The models were trained and evaluated across several standard IR benchmarks:
- MS MARCO: The entire corpus was utilized to train the reconstruction model.
- Natural Questions (NQ): Used as an out-of-domain evaluation set to test the reconstruction model's generalizability.
- Evaluation Targets: The attacks were evaluated on both in-domain datasets (TREC DL 19 and TREC DL 20) and diverse out-of-domain datasets from the BEIR benchmark (NQ, Quora, FiQA, and Touché-2020).
Key Insights and Ideas
- Continuous Optimization Wins: Moving the adversarial search from discrete word substitution to continuous embedding space eliminates the clunky, iterative token-swapping bottlenecks of previous methods.
- The Perplexity Illusion: Because the adversarial text is generated by a neural reconstruction model decoding from a continuous space, the resulting text naturally mimics the statistical distribution of real language. This results in incredibly low perplexity, meaning standard security filters that look for "gibberish" or high-perplexity text will fail to detect these malicious documents.
- Systemic Vulnerability: The attack achieves high success rates when transferred to completely unseen "black-box" retrieval models (like ColBERTv2 or RankLLaMA). This indicates that the vulnerability stems from fundamental properties of dense embedding spaces rather than quirks of a specific architecture.
Key Results
- Speedup: The proposed method generates successful adversarial documents in under two minutes per document, achieving a 4x speedup over the fastest accelerated HotFlip implementations.
- Attack Effectiveness: In white-box settings against the SimLM retriever, the attack achieved an Attack Success Rate (ASR) of up to 98.6% (on Touché-2020) and 98.4% (on TREC DL 19), performing on par with or better than supervised baselines.
- Evasion Capability: The perplexity of the generated documents was drastically lower than HotFlip. For instance, on TREC DL 20, the authors' method achieved a perplexity score of 166.0 compared to HotFlip's 6390.9, making the attack highly stealthy against automated defense filters.
Limitations and Future Work
While the generated documents successfully trick embedding models and maintain low perplexity, they remain largely nonsensical to human readers upon close inspection. Although the authors argue that "imperceptibility" is not strictly required for a successful attack (as long as it disrupts the user experience), generating human-plausible deceptive text remains an open challenge.
Additionally, the authors briefly demonstrate that these adversarial documents can be used as hard negatives for adversarial training, yielding a 7.9% relative reduction in attack vulnerability. They note that scaling up this defensive adversarial training framework is a highly promising direction for future research.
Summary updated