Semantic-Aware Adversarial Training for Reliable Deep Hashing Retrieval

Xu Yuan, Zheng Zhang, Xunguang Wang, Lin Wu

TL;DR

This paper introduces Semantic-Aware Adversarial Training (SAAT), a novel framework that enhances the robustness of deep hashing models against adversarial attacks. By generating "mainstay codes" that capture global semantic representations, SAAT enables a unified minimax optimization for adversarial training, leading to more reliable image retrieval systems.

What Problem Does This Paper Address?

Large-scale image retrieval systems often rely on deep hashing to efficiently map high-dimensional images to compact binary codes. However, these systems are vulnerable to adversarial examples – subtly modified images that can trick the model into retrieving incorrect results, posing a significant security risk. Existing methods for defending deep hashing against these attacks struggle with generating reliable semantic representations to guide adversarial learning and lack a unified, formalized adversarial training framework. This paper aims to bridge this gap by proposing a method to create robust semantic representations and a corresponding adversarial training strategy.

Methods

The core of the proposed solution lies in two main components:

  • Discriminative Mainstay Features Learning (DMFL): This scheme generates "mainstay codes," which are global semantic representatives for each class. Unlike previous approaches that used sample-level or category-level information, DMFL considers all positive and negative samples in the global semantic space. It formulates an optimization problem to find a binary mainstay code that is as close as possible to the hash codes of positive samples and as far as possible from negative samples. A key theoretical insight allows for the direct computation of this optimal mainstay code.
  • Semantic-Aware Adversarial Training (SAAT): This framework formalizes adversarial training for deep hashing into a unified minimax optimization problem. The inner maximization step generates adversarial examples by maximizing the Hamming distance between the adversarial sample's hash code and the derived mainstay code. The outer minimization step then trains the deep hashing model to minimize the loss on these adversarial examples, guided by the mainstay codes. This approach is model-agnostic and can be embedded into various deep hashing networks.

Datasets

The authors evaluated their methods on three widely-used datasets:

  • FLICKR-25K: 25,000 images with 38 labels.
  • NUS-WIDE: A large-scale dataset with 269,648 samples and 81 concepts.
  • MS-COCO: A comprehensive dataset with 123,287 samples and 80 classes.

Key Insights and Ideas

  • Mainstay Codes as Global Semantic Anchors: The concept of "mainstay codes" is crucial. They act as robust, globally representative semantic anchors that are essential for both crafting effective adversarial attacks and guiding robust adversarial training in deep hashing.
  • Unified Minimax Framework for Deep Hashing: The paper successfully formulates adversarial training for deep hashing into a standard minimax optimization problem, which was previously a challenge due to the lack of clear semantic representations.
  • Efficiency of Adversarial Attack: The proposed attack method, guided by mainstay codes, achieves strong performance with significantly fewer iterations (100) compared to existing methods (up to 1500-2000), highlighting its efficiency.
  • Universality and Adaptability: The SAAT framework is demonstrated to be model-agnostic, working effectively with different deep hashing architectures (DPH, DPSH, HashNet, CSQ) and backbone networks (AlexNet, VGG).

Key Results

  • Attack Performance: The proposed SAAT attack significantly degrades the Mean Average Precision (MAP) scores of non-targeted attacks across all tested datasets and hash bit lengths, outperforming existing methods like HAG and SDHA by an average of 2.98%. For targeted attacks, SAAT also shows superior performance, with average improvements over THA of 1.82%, 1.52%, and 8.95% on FLICKR-25K, NUS-WIDE, and MS-COCO, respectively.
  • Defense Performance: After adversarial training with SAAT, the robustness of deep hashing models is substantially improved. For instance, against the SDHA attack, SAAT training leads to an average MAP increase of approximately 25.35%, 38.72%, and 23.87% on the three datasets.
  • Perceptibility: The adversarial perturbations generated by SAAT are shown to be highly imperceptible, outperforming other methods in terms of L∞, L2, and MSE metrics.
  • Efficiency: The attack generation process requires only 100 iterations, making it much more efficient than prior methods.

Limitations and Future Work

  • Hyperparameter Tuning: The paper acknowledges that the performance of SAAT is influenced by hyper-parameters like λ and μ, which control the trade-off between robustness and precision. While they provide some analysis, optimal tuning might still require experimentation.
  • Computational Cost: While the attack generation is efficient, the adversarial training process itself can be computationally intensive, as is typical for such methods.
  • Future Work: The authors suggest that their SAAT framework can be extended to other deep hashing methods and potentially other domains where adversarial robustness is critical. The universality of the approach suggests broad applicability.

Summary updated

BibTeX
@article{yuan2023semantic,
  author = {Xu Yuan and Zheng Zhang and Xunguang Wang and Lin Wu},
  title = {{Semantic-Aware Adversarial Training for Reliable Deep Hashing Retrieval}},
  journal = {IEEE Trans. Inf. Forensics Secur.},
  year = {2023},
}
Figure