Abstract
Deep hashing has become the standard for large-scale retrieval due to its ability to compress high-dimensional data into compact binary codes. However, these systems are susceptible to adversarial attacks. While non-targeted attacks are well-documented, targeted attacks—where an adversary forces the system to return results from a specific category—are more difficult to execute reliably. This paper presents the Deep Hashing Targeted Attack (DHTA), which replaces traditional Point-to-Point (P2P) optimization with a more robust Point-to-Set (P2S) approach. By optimizing against a category-representative "Anchor Code," DHTA achieves high success rates with minimal image perturbation.
Introduction
Large-scale image and video retrieval systems, such as Google Image Search, rely on deep hashing to perform lightning-fast similarity searches. By mapping complex features to Hamming space, these models enable efficient data management. Despite their utility, deep learning models are notoriously vulnerable to adversarial examples: inputs specifically crafted to deceive the model.
Most existing research focuses on non-targeted attacks, where the goal is simply to degrade retrieval performance. This work addresses the more malicious targeted attack. In this scenario, an attacker aims to make a query image (e.g., a benign dog) retrieve results from a specific target category (e.g., cats). Previous targeted methods typically employed a Point-to-Point (P2P) strategy, which attempts to match the hash code of a single target image. This approach is often unstable, as the chosen target may be an outlier or reside near a decision boundary.
Methodology: From Point-to-Point to Point-to-Set
The fundamental innovation of this research is the transition from P2P to a Point-to-Set (P2S) optimization framework. Instead of aiming for a single point in Hamming space, the attack targets the entire distribution of the desired category.
The Anchor Code
To represent a target category effectively, the authors introduce the Anchor Code ($h_a$). This code serves as the optimal representative of the target set in Hamming space. It is generated using a component-voting scheme: for a given set of images from the target category, the value of each bit in the anchor code is determined by the majority value (+1 or -1) of that bit across the set. This ensures the anchor code sits at the center of the category's hash distribution.
DHTA Optimization
The DHTA framework minimizes the Hamming distance between the hash code of the adversarial image and the pre-calculated anchor code. Because the sign function used in hashing is non-differentiable, the authors utilize a hyperbolic tangent ($\tanh$) approximation to enable gradient-based optimization. To ensure the attack remains imperceptible to human observers, an $\ell_\infty$ constraint is applied, limiting the maximum change allowed for any single pixel.
Experimental Evaluation
The researchers evaluated DHTA across four standard benchmarks for image (ImageNet, NUS-WIDE) and video (JHMDB, UCF-101) retrieval. Performance was measured using t-MAP (targeted Mean Average Precision), a metric specifically designed to quantify the proportion of top-retrieved results that belong to the attacker's target category.
Key Results
- Superior Performance: On the ImageNet dataset (64-bit), DHTA achieved a t-MAP of 82.10%, significantly outperforming the traditional P2P approach, which reached only 65.61%.
- Video Retrieval Success: The method proved equally effective for temporal data. On the JHMDB video dataset, DHTA achieved 66.06% t-MAP, compared to 44.38% for P2P.
- Efficiency and Stealth: The attack is highly efficient, often reaching high t-MAP scores within 100 iterations. Furthermore, the average pixel perturbation (RMSE) remained extremely low (approximately $8 \times 10^{-3}$), making the adversarial changes virtually invisible.
Discussion and Conclusion
A surprising finding was that the t-MAP of the DHTA attack is often higher than the original MAP of the benign model. This suggests that the adversarial query, by targeting the "center" of the category via the anchor code, can be more effective at retrieving that category than a natural image from the same class. Additionally, the attack's success in "open-set" scenarios—where the target label was not part of the original training set—indicates that the underlying feature extractors learn generalizable features that are broadly exploitable.
While this study primarily focuses on white-box settings, it underscores a critical security flaw in retrieval infrastructures. Future work should explore black-box transferability and the development of robust defenses, such as generalized adversarial training, to protect these systems from targeted manipulation.
Summary updated