[Paper Review] HashGAN:Attention-aware Deep Adversarial Hashing for Cross Modal Retrieval
This paper proposes HashGAN, a novel adversarial hashing framework that integrates attention mechanisms to improve cross-modal retrieval by focusing on discriminative image and text regions. By training a generative attention module to produce masks and a discriminative hash module in an adversarial manner, HashGAN achieves state-of-the-art performance, with a MAP of 0.5458 on the IAPR TC-12 dataset using 16-bit codes.
As the rapid growth of multi-modal data, hashing methods for cross-modal retrieval have received considerable attention. Deep-networks-based cross-modal hashing methods are appealing as they can integrate feature learning and hash coding into end-to-end trainable frameworks. However, it is still challenging to find content similarities between different modalities of data due to the heterogeneity gap. To further address this problem, we propose an adversarial hashing network with attention mechanism to enhance the measurement of content similarities by selectively focusing on informative parts of multi-modal data. The proposed new adversarial network, HashGAN, consists of three building blocks: 1) the feature learning module to obtain feature representations, 2) the generative attention module to generate an attention mask, which is used to obtain the attended (foreground) and the unattended (background) feature representations, 3) the discriminative hash coding module to learn hash functions that preserve the similarities between different modalities. In our framework, the generative module and the discriminative module are trained in an adversarial way: the generator is learned to make the discriminator cannot preserve the similarities of multi-modal data w.r.t. the background feature representations, while the discriminator aims to preserve the similarities of multi-modal data w.r.t. both the foreground and the background feature representations. Extensive evaluations on several benchmark datasets demonstrate that the proposed HashGAN brings substantial improvements over other state-of-the-art cross-modal hashing methods.
Motivation & Objective
- Address the challenge of measuring content similarity across heterogeneous modalities (e.g., text and image) in cross-modal retrieval.
- Overcome the limitations of existing deep hashing methods that fail to focus on semantically relevant regions due to modality heterogeneity.
- Improve hash code quality by learning attention masks that highlight informative (foreground) regions and suppress uninformative (background) regions.
- Train a generative attention module and a discriminative hash module in an adversarial framework to enhance similarity preservation in the Hamming space.
Proposed method
- Employ a feature learning module based on pre-trained VGGNet (for images) and bag-of-words (for text) to extract high-level representations.
- Introduce a generative attention module that learns spatial or semantic attention masks to separate foreground (attended) and background (unattended) features.
- Apply the attention masks to generate attended and unattended feature representations for both modalities.
- Train the discriminative hash module to produce binary codes that preserve similarity between query and relevant samples in both foreground and background representations.
- Implement an adversarial training scheme where the generator aims to maximize retrieval loss on unattended (background) features, while the discriminator minimizes similarity-preserving loss on both attended and unattended features.
- Alternate between optimizing the discriminator (D) for 4 steps and the generator (G) for 1 step using ADAM with a base learning rate of 0.005, decayed every 20 epochs.
Experimental results
Research questions
- RQ1Can an adversarial framework with attention mechanisms improve cross-modal similarity measurement in deep hashing?
- RQ2Does focusing on discriminative regions through learned attention masks lead to better hash code quality and retrieval accuracy?
- RQ3How does the adversarial training between a generator (producing attention masks) and a discriminator (learning similarity-preserving hash functions) enhance retrieval performance?
- RQ4To what extent does the model generalize across different datasets and network architectures (e.g., VGGNet vs. CNN-F) in cross-modal retrieval?
Key findings
- HashGAN achieves a mean average precision (MAP) of 0.5458 on the IAPR TC-12 dataset for the text-to-image task using 16-bit hash codes, outperforming the second-best method (DCMH) with 0.5185.
- On the MIR-Flickr dataset, HashGAN achieves a MAP of 0.4921 for the text-to-image task and 0.4873 for the image-to-text task, demonstrating strong generalization across datasets.
- Even when using a smaller CNN-F network instead of VGGNet, HashGAN maintains competitive performance, achieving a MAP of 0.5267 on IAPR TC-12 for the text-to-image task with 16-bit codes.
- The precision-recall curves in Figure 7 show that HashGAN consistently outperforms or matches all baselines across all three benchmark datasets (IAPR TC-12, MIR-Flickr, NUS-WIDE).
- Visualizations in Figure 8 confirm that the attention masks successfully highlight semantically relevant regions in images, such as the girl and donkey in the example.
- The ablation study shows that the adversarial training scheme effectively improves retrieval performance by forcing the generator to produce masks that degrade the discriminator’s ability to preserve background similarity.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.