Who's Afraid of Adversarial Queries?: The Impact of Image Modifications on Content-based Image Retrieval

Zhuoran Liu, Zhengyu Zhao, Martha A. LarsonICMR 2019 · DOI

Introduction

Adversarial machine learning has traditionally focused on image classification—tricking a model into mislabeling a "panda" as a "gibbon." However, Content-Based Image Retrieval (CBIR), the engine behind modern image search, presents a different challenge. CBIR systems rank images based on similarity in a high-dimensional feature space rather than discrete classes. This paper introduces PIRE (Perturbations for Image Retrieval Error), an unsupervised method to generate adversarial queries that appear normal to humans but fundamentally disrupt retrieval accuracy.

Comparison of retrieval results between an original image query and an adversarial query generated by PIRE.

Methodology

The core of PIRE is a "whitebox" unsupervised approach that targets the feature extraction process. Unlike classification attacks that cross decision boundaries, PIRE employs a Feature Displacement strategy. It optimizes a perturbation vector to maximize the Euclidean distance between the original image's feature representation and its modified counterpart.

The proposed framework for query modification and subsequent content-based image retrieval.

The method is unsupervised, requiring only access to the feature extraction model (e.g., ResNet-101) without needing labeled data. To ensure these perturbations survive real-world constraints like 8-bit JPEG compression, the authors utilize a refinement function to magnify pixel-level changes just enough to persist through rounding while maintaining high visual fidelity.

Experimental Evaluation

The researchers evaluated PIRE on the Oxford5k and Paris6k benchmarks, which include thousands of landmark images and distractors. Performance was measured using Mean Average Precision (mAP) against state-of-the-art retrieval systems like GeM (Generalized-Mean pooling).

Key Results

The impact on retrieval performance was catastrophic for the systems:

  • Oxford5k: mAP dropped from 78.39% to 5.51%.
  • Paris6k: mAP plummeted from 87.27% to 9.34%.

Despite this failure in retrieval, the images remained visually nearly identical to the originals, maintaining high Structural Similarity (SSIM) scores (0.7–0.8). Furthermore, the attacks demonstrated significant transferability; perturbations generated for one architecture (e.g., VGG) effectively degraded performance on others (e.g., ResNet).

Discussion and Implications

PIRE reveals a significant vulnerability in neural retrieval systems. Interestingly, these neural perturbations also degraded systems relying on traditional local features (like SIFT), suggesting they disrupt fundamental structural patterns.

Beyond being a threat, adversarial queries offer a potential tool for privacy. Users could subtly modify photos to prevent "cybercasing" — the use of CBIR by malicious actors to track personal locations through public images. However, the effectiveness of PIRE is currently sensitive to image downscaling, which can "wash away" the subtle noise. Future research must focus on developing retrieval systems resilient to such modifications and creating more robust adversarial techniques.

Summary updated

BibTeX
@inproceedings{liu2019who,
  author = {Zhuoran Liu and Zhengyu Zhao and Martha A. Larson},
  title = {{Who's Afraid of Adversarial Queries?: The Impact of Image Modifications on Content-based Image Retrieval}},
  booktitle = {ICMR},
  year = {2019},
  doi = {10.1145/3323873.3325052},
}
Figure