Abstract
Image ranking systems, crucial for product search and facial recognition, are vulnerable to adversarial perturbations. This paper presents the first systematic study of adversarial ranking attacks, introducing methods to manipulate search results by perturbing queries or candidates. We propose a novel defense mechanism based on minimizing embedding shifts, which significantly enhances model robustness against these threats.
Introduction: The Vulnerability of Ranking
While adversarial attacks on Deep Neural Network (DNN) classifiers are well-documented, image ranking systems have remained largely unexplored. Ranking differs fundamentally from classification: while classification predicts labels independently, ranking determines a candidate's position based on its relative distance to a query compared to a database of other items. Existing discrete-label attacks are incompatible with this continuous, relative nature. This research bridges the gap by defining mathematical frameworks to manipulate these relative relationships, effectively "hijacking" search results.
Adversarial Attack Strategies
The authors frame ranking as a metric learning problem where a DNN maps images into a high-dimensional embedding space. They introduce several attack vectors:
- Candidate Attack (CA): The attacker perturbs a candidate image to alter its rank. CA+ aims to raise a specific item to the top of results (e.g., promoting a product), while CA- aims to demote it (e.g., sabotaging a competitor).
- Query Attack (QA): The attacker perturbs the search query itself. This "man-in-the-middle" approach can force a query to return specific target items regardless of the original intent.
- Semantics-Preserving QA (SP-QA): To avoid detection, SP-QA adds a constraint ensuring the perturbed query still returns its original top results for most items, while only promoting or demoting the specific target.
To optimize these perturbations, the desired ranking order is represented as a set of inequalities. A triplet-like surrogate objective function is then optimized using Projected Gradient Descent (PGD).
Defensive Measures: Maximum-Shift-Distance
To counter these attacks, the authors propose Adversarial Training with Maximum-Shift-Distance. Unlike standard adversarial training that targets specific labels or ranking orders, this method trains the model to resist any large shifts in the embedding space caused by input perturbations. By minimizing the distance an embedding can be "pushed" by noise, the model becomes generically more robust to various attack vectors.
Experimental Results
The methods were evaluated on MNIST, Fashion-MNIST, and the large-scale Stanford Online-Products (SOP) dataset.
Attack Potency
The attacks proved highly effective across all benchmarks. On MNIST, a CA+ attack could elevate a candidate from the 50th percentile to the top 2.1%. On the SOP dataset, even a minimal perturbation ($\epsilon=0.01$) allowed an attacker to move a candidate from the bottom of the list into the top 1%.
Defense Effectiveness
The proposed defense significantly mitigated these shifts. As shown in the comparative analysis, the defensive model maintains much more stable rankings under attack compared to the vanilla model.
On MNIST, the 50%-to-2.1% rank jump was reduced to a 30.7% rank after defense. However, this robustness comes with an "accuracy tax"—a moderate drop in standard retrieval performance (e.g., R@1 on SOP decreased from 63.1% to 46.4%).
Key Insights and Conclusion
The study reveals several critical properties of adversarial ranking:
- Relative Positioning: Attacks succeed by pushing embedding vectors toward or away from query points in high-dimensional space.
- Universal Vulnerability: "Universal" noise patterns exist that can raise an image's rank across diverse queries.
- Transferability: Attacks are often model-agnostic; perturbations generated for one architecture (e.g., ResNet-18) frequently succeed against others (e.g., LeNet).
While the proposed defense improves robustness, it is not a total solution. Models trained on complex, large-scale datasets remain more susceptible to attack. Future research will likely focus on developing more efficient ranking loss functions and black-box scenarios where the attacker lacks internal model knowledge.
Summary updated