Deep hashing has been extensively utilized in massive image retrieval because of its efficiency and effectiveness. However, deep hashing models are vulnerable to adversarial examples, making it essential to develop adversarial defense methods for image retrieval. Existing solutions achieved limited defense performance because of using weak adversarial samples for training and lacking discriminative optimization objectives to learn robust features. In this paper, we present a min-max based Center-guided Adversarial Training, namely CgAT, to improve the robustness of deep hashing networks through worst adversarial examples. Specifically, we first formulate the center code as a semantically-discriminative representative of the input image content, which preserves the semantic similarity with positive samples and dissimilarity with negative examples. We prove that a mathematical formula can calculate the center code immediately. After obtaining the center codes in each optimization iteration of the deep hashing network, they are adopted to guide the adversarial training process. On the one hand, CgAT generates the worst adversarial examples as augmented data by maximizing the Hamming distance between the hash codes of the adversarial examples and the center codes. On the other hand, CgAT learns to mitigate the effects of adversarial samples by minimizing the Hamming distance to the center codes. Extensive experiments on the benchmark datasets demonstrate the effectiveness of our adversarial training algorithm in defending against adversarial attacks for deep hashing-based retrieval. Compared with the current state-of-the-art defense method, we significantly improve the defense performance by an average of 18.61\%, 12.35\%, and 11.56\% on FLICKR-25K, NUS-WIDE, and MS-COCO, respectively. The code is available at https://github.com/xunguangwang/CgAT.
翻译:摘要:由于其效率和有效性,深度哈希在大规模图像检索中得到广泛应用。然而,深度哈希模型容易受到对抗样本的攻击,因此开发图像检索的对抗防御方法变得非常重要。现有的解决方案由于使用弱对抗样本进行训练,并缺乏具有鉴别性的优化目标来学习强鲁棒性特征,因此其防御性能受到限制。在本文中,我们提出了一种基于中心引导对抗训练的最小-最大算法,即CgAT,通过最坏对抗样本来提高深度哈希网络的鲁棒性。具体而言,我们首先将中心代码形式化为输入图像内容的语义鉴别代表,它保留了与正样本的语义相似性以及与负样本的差异性。我们证明了一种数学公式可以立即计算中心代码。在深度哈希网络的每个优化迭代中,我们采用中心代码来指导对抗性训练过程。一方面,CgAT通过最大化对抗样本哈希代码与中心代码之间的汉明距离来生成最坏对抗样本,从而产生增强数据。另一方面,CgAT学习通过将哈希距离最小化到中心代码来缓解对抗样本的影响。在基准数据集上的广泛实验表明,我们的对抗训练算法在防御深度哈希检索的对抗攻击方面具有很高的效果。与当前最先进的防御方法相比,在FLICKR-25K、NUS-WIDE和MS-COCO上,我们的对抗训练算法平均提高了18.61%,12.35%和11.56%的防御性能。代码可在https://github.com/xunguangwang/CgAT上获得。