Adversarial Ranking Attack and Defense

Mo Zhou, Zhenxing Niu, Le Wang, Qilin Zhang, Gang Hua

Introduction

While adversarial attacks on image classifiers—such as tricking a model into seeing a "panda" as a "gibbon"—are well-documented, this research reveals that deep ranking systems are equally vulnerable. Ranking systems, which power image-based product searches (e.g., Google Image Search, eBay) and facial recognition, do not assign absolute labels. Instead, they sort candidates based on their similarity to a query in an embedding space. This paper introduces novel "Candidate" and "Query" attacks designed to intentionally promote or demote specific items in search results, alongside a "maximum-shift-distance" defense to harden these systems.

Adversarial Ranking Attacks

The authors treat ranking as a set of relative inequalities (e.g., "Item A should be closer to the Query than Item B"). By manipulating these distances, an attacker can disrupt the sorted order.

Visual representation of Candidate and Query attacks on a ranking system.

The attacks are categorized into two main types:

  1. Candidate Attack (CA): The attacker perturbs the candidate image. A "CA+" attack adds imperceptible noise to a product photo to ensure it appears at the top of search results, while a "CA-" attack buries a competitor's photo at the bottom.
  2. Query Attack (QA): The attacker perturbs the query image to manipulate which candidates appear. A sophisticated variant, Semantics-Preserving QA (SP-QA), ensures the query image still appears relevant to its original category while specifically targeting the promotion or demotion of chosen candidates.

To generate these perturbations, the researchers utilize Projected Gradient Descent (PGD) to minimize a custom triplet-like loss function representing the desired ranking order.

Defense: Maximum-Shift-Distance

Standard adversarial training for classification often fails when applied to ranking. The authors propose a shift-distance based defense. Since ranking attacks rely on pushing an image's embedding far from its original location, the defense focuses on minimizing this "embedding shift." By training the model on examples pushed to their maximum possible shift, the system learns to produce more stable and robust embeddings.

Experimental Evaluation

The methods were evaluated on three benchmarks: MNIST (handwritten digits), Fashion-MNIST (clothing), and Stanford Online Products (SOP) (120k real-world product images).

Key Results

The attacks proved highly effective across all datasets. On MNIST, a strong CA+ attack could raise a candidate's rank from the 50th percentile to the top 2.1%. Conversely, a CA- attack could drop a top-ranked item to the 93.9% mark.

Quantitative results showing the impact of adversarial perturbations on ranking performance.

On the large-scale Stanford Online Products dataset, even a 1% perturbation allowed a candidate to outrank nearly every other item in the database. The proposed defense significantly mitigated these effects; for example, the CA+ attack on MNIST was held back to a 30.7% rank after hardening.

Insights and Limitations

  • Ranking is Relative: Unlike classification, ranking depends on the relationship between a query and all candidates, making the optimization problem more complex but flexible for attackers.
  • Transferability: Attacks generated on one model (e.g., ResNet-18) often succeed against "black-box" models with unknown parameters.
  • Performance Trade-off: Implementing the defense leads to a slight drop in retrieval accuracy on clean images. For Fashion-MNIST, Recall@1 dropped from 88.8% to 79.6% after hardening.

Future research may focus on more efficient adversarial training that preserves clean-data performance or explores vulnerabilities in multi-modal systems, such as text-to-image search.

Summary updated

BibTeX
@inproceedings{zhou2020adversarial,
  author = {Mo Zhou and Zhenxing Niu and Le Wang and Qilin Zhang and Gang Hua},
  title = {{Adversarial Ranking Attack and Defense}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58568-6\_46},
}
Figure