Introduction
Modern search engines and information retrieval systems have increasingly transitioned toward Dense Retrieval (DR). Unlike traditional keyword-based search, DR systems utilize neural bi-encoders to map both queries and documents into a shared continuous embedding space. Retrieval is then performed by identifying documents whose vectors are geometrically closest to the query vector.
While effective, these systems are susceptible to corpus poisoning. In such an attack, a malicious actor injects a small number of adversarial documents into the database. These documents are engineered to rank at the top of search results for specific queries, even if the content is irrelevant or nonsensical, thereby degrading the system's utility and reliability.
The Limitations of Current Attacks
Existing corpus poisoning methods face two primary hurdles that limit their real-world applicability:
- The Lexical-Continuous Gap: Most state-of-the-art attacks, such as HotFlip, operate by iteratively swapping individual words in the discrete text space. However, because the retrieval process occurs in the continuous embedding space, this discrete-to-continuous mismatch makes the optimization process computationally expensive and slow.
- The Supervised Assumption: Many current frameworks assume the attacker has prior knowledge of the exact query distribution users will input. In practice, attackers often operate in an "unsupervised" manner, with no knowledge of future queries.
Proposed Method: Continuous Space Optimization
To address these flaws, researchers from the University of Amsterdam proposed a novel framework that optimizes adversarial documents directly within the continuous embedding space. This approach relies on two interconnected components:
- The Reconstruction Model ($R$): This model is designed to "invert" the retrieval process. It takes token-level embeddings and reconstructs the most likely original text. This component acts as a bridge, allowing the system to translate mathematical perturbations back into human-readable (or at least machine-processable) text.
- The Perturbation Model ($\phi$): A lightweight, three-layer neural network that modifies a target document's embeddings.
The system is trained using a dual-objective loss function. First, it minimizes Embedding Similarity loss to ensure the adversarial document's vector remains close to the target document's vector (ensuring high ranking). Second, it maximizes Semantic Irrelevance to ensure the generated text deviates from the original content, effectively "poisoning" the result.
Experimental Results
The researchers evaluated their method across several standard benchmarks, including MS MARCO for training and TREC DL 19/20 for in-domain testing. To assess "transferability"—the ability of an attack generated for one model to succeed against another—they utilized the BEIR benchmark (NQ, Quora, FiQA, and Touché-2020).
Speed and Efficiency
By moving optimization to the continuous space, the attack becomes a smooth, gradient-based process. The proposed method generates successful adversarial documents in under two minutes, representing a 4x speedup over previous gradient-based discrete attacks.
Stealth and Naturalness
One of the most significant findings involves the "stealth" of the attack. Previous methods often produced "word salad" that was easily flagged by perplexity-based filters. Because this new method uses a reconstruction model trained on natural language, the output is significantly more fluent. On the Quora dataset, the adversarial documents achieved a perplexity score of 461.7, compared to the massive 59,468.5 seen in HotFlip-based attacks.
Effectiveness and Transferability
In white-box settings, the attack matched the success rates of current state-of-the-art methods. More importantly, it demonstrated robust performance in black-box scenarios where the retriever model was unknown to the attacker.
Conclusion
This research highlights a critical vulnerability in dense retrieval systems. By shifting the attack surface to the continuous embedding space, the authors have created a poisoning method that is faster, stealthier, and more effective in unsupervised settings than previous approaches. While the generated text can still appear nonsensical to humans, its low perplexity makes it difficult for automated systems to detect. The authors suggest that the speed of this attack could be leveraged to generate adversarial examples for training more robust, "poison-proof" retrieval models in the future.
Summary updated