Skip to main content
QUICK REVIEW

[Paper Review] One word at a time: adversarial attacks on retrieval models

Nisarg Raval, Manisha Verma|arXiv (Cornell University)|Aug 5, 2020
Adversarial Robustness in Machine LearningComputer Science16 references6 citations
TL;DR

This paper proposes a black-box adversarial attack framework that generates semantically similar, minimal perturbations to document text—changing only 1–3 tokens—to significantly degrade the ranking performance of deep learning retrieval models. By replacing words with semantically similar alternatives, the attack lowers relevant documents' ranks by several positions without altering meaning, demonstrating that state-of-the-art rankers are highly sensitive to small, imperceptible changes.

ABSTRACT

Adversarial examples, generated by applying small perturbations to input features, are widely used to fool classifiers and measure their robustness to noisy inputs. However, little work has been done to evaluate the robustness of ranking models through adversarial examples. In this work, we present a systematic approach of leveraging adversarial examples to measure the robustness of popular ranking models. We explore a simple method to generate adversarial examples that forces a ranker to incorrectly rank the documents. Using this approach, we analyze the robustness of various ranking models and the quality of perturbations generated by the adversarial attacker across two datasets. Our findings suggest that with very few token changes (1-3), the attacker can yield semantically similar perturbed documents that can fool different rankers into changing a document's score, lowering its rank by several positions.

Motivation & Objective

  • To evaluate the robustness of deep learning ranking models against adversarial attacks in information retrieval.
  • To develop a black-box attack method that manipulates document rankings with minimal, semantically coherent text changes.
  • To measure the impact of adversarial perturbations on retrieval effectiveness using standard metrics like P@5.
  • To analyze whether attackers that modify query terms or document terms are more effective and less detectable.
  • To assess the semantic similarity between original and perturbed documents under varying attack strategies.

Proposed method

  • The attack framework uses a black-box setting, requiring only the model’s (query, document) pair output, not internal architecture.
  • Three attack variants (A1, A2, A3) are proposed: A1 modifies document tokens, A2 restricts changes to query terms, and A3 avoids altering query terms while still lowering rank.
  • Perturbations are generated by replacing tokens with semantically similar words from word embeddings, preserving overall meaning.
  • The attack uses cosine similarity to measure semantic preservation between original and perturbed documents.
  • Model robustness is evaluated using P@5, where the original document score is replaced with the perturbed score, and precision is recomputed.
  • The method is evaluated on two public datasets: MSMarco and WikiQA, using three state-of-the-art ranking models: DRMM, Duet, and KNRM.

Experimental results

Research questions

  • RQ1Can minimal, semantically coherent perturbations to document text significantly degrade the ranking of relevant documents in deep learning retrieval models?
  • RQ2How effective are different attack strategies (e.g., modifying document vs. query tokens) in lowering document rank with minimal changes?
  • RQ3To what extent is the semantic similarity preserved between original and perturbed documents under adversarial attacks?
  • RQ4How does the robustness of different ranking models (DRMM, Duet, KNRM) vary under adversarial perturbations?
  • RQ5What is the impact of adversarial perturbations on standard retrieval metrics like P@5 across different datasets?

Key findings

  • With only one token perturbation, the attack can push a relevant document down by 4 to 12 positions in the ranked list, as shown in Table 1.
  • The cosine similarity between original and perturbed documents remains high (~0.97) even after one-word changes, indicating strong semantic preservation.
  • For five-word perturbations, cosine similarity drops to ~0.90, showing a trade-off between perturbation size and semantic fidelity.
  • A1 attackers, which modify document tokens, achieve the highest rank reduction, especially in DRMM (up to 50% drop in P@5 on MSMarco with one token).
  • A3 attackers, which avoid modifying query terms, achieve similar rank degradation to A1 but with lower semantic similarity penalties, making them more stealthy.
  • Models with higher baseline P@5 (e.g., DRMM on MSMarco) are more robust, showing a 50% drop in P@5 only under the most effective attacks, indicating a correlation between model performance and adversarial robustness.

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.