Unrestricted Targeted Deep Hashing Attack via Contrastive Latent Diffusion

Unrestricted Targeted Deep Hashing Attack via Contrastive Latent Diffusion

Fan Yang, Chuan Ma, Yuhui Zheng, Xiaobo Shen, Joey Tianyi Zhou

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence
Main Track. Pages 1974-1982. https://doi.org/10.24963/ijcai.2026/220

Deep hashing is widely used for large-scale image retrieval but remains vulnerable to adversarial examples, raising practical security concerns. Existing targeted adversarial attacks on deep hashing typically rely on lp-norm constrained perturbations, which struggle to balance attack effectiveness and imperceptibility, often requiring perceptible noise and limiting their practicality in real-world retrieval scenarios. We propose UTDHA, the first unrestricted targeted attack for deep hashing models using contrastive-guided latent diffusion. UTDHA generates adversarial examples with a latent diffusion model and performs optimization in the latent space rather than the pixel space, enabling semantic manipulation while preserving image naturalness. Through contrastive guidance, the attack pulls adversarial examples toward the target label while pushing them away from non-target labels. Meanwhile, UTDHA enforces structural and perceptual consistency, producing adversarial examples that are both imperceptible and visually natural. Extensive experiments on three benchmarks demonstrate that UTDHA outperforms existing targeted adversarial attack baselines for deep hashing models in both attack effectiveness and imperceptibility.
Keywords:
Computer Vision: Image and video retrieval
Computer Vision: Adversarial learning, adversarial attack and defense methods