# Multi-Label Weighted Contrastive Cross-Modal Hashing
## 4 Experiment
### Baselines and Implementation Details  
**Baselines. ** We compare the proposed MLWCH method with nine classical or state-of-the-art cross-modal hashing methods, including three shallow model-based methods, (CVH [40], SCM [41], and CCA-ITQ [70]), and six deep model-based methods, (DCMH [43], SSAH [44], DCHUC [26], SCCGDH [27]), MMACH [28], and Bi_NCMH [29]. A brief introduction of each is presented below:  
* CVH aims to learn a hash function to efficiently find similar data items in the hash space by mapping data from different views to hash codes. * SCM introduces a large-scale supervised multi-modal hashing approach that emphasizes the idea of semantic relevance maximization for efficient similarity search between different modal data. * CCA-ITQ introduces an iterative quantization method to gradually improve the quality of binary codes through multiple iterations. * DCMH is the first attempt to integrate deep learning and hash learning into a unified framework for end-to-end learning. * SSAH is a self-supervised adversarial hashing method which treats labels as a single modality to supervise the learning process of semantic features and integrates adversarial learning into cross-modal hashing in a self-supervised manner. * DCHUC utilizes an iterative learning optimization algorithm to jointly learn hash codes and hash functions, where the learned hash codes and functions can supervise each other during the optimization process. * SCCGDH is a class-specific center-guided deep hashing method which makes use of hash codes of labels generated from labeled networks for class-specific centers and efficiently guides hash learning for image and text modalities. * MMACH integrates a new multi-label modality augmented attention module with self-supervised learning to supervise the training of hash functions for image and text modalities based on augmented multi-labels. * Bi_NCMH is a bi-directional relational reasoning-based deep cross-modal hashing method that builds a multi-label semantic similarity matrix through consistent and inconsistent relationships between instances. For a fair comparison, following [27], we utilize AlexNet pre-trained on ImageNet for extracting image features, and employ the Bag-of-Words (BoW) model for extracting text features. For MMACH and Bi_NCMH, as their source code was not available, we carefully implemented these methods. **Implementation Details. ** As shown in Figure 3, each of our hash models is composed of a two-layer multi-layer perceptron with \(tanh(\cdot)\), formally represented as: \(\mathcal{H}^{\circ}(\cdot,\mathbf{\theta}^{\alpha})\) is \((d_{v}\to 512\to k)\) and \(\mathcal{H}^{l}(\mathbf{\cdot},\mathbf{\theta}^{l})\) is \((d_{t}\to 512\to k)\). Three hyperparameters, \(\lambda\), \(\gamma\), and \(\tau\), are involved in multi-label weighted contrastive learning. As introduced above, \(\lambda\) is the trade-off factor between linear and non-linear weight, \(\gamma\) plays the trade-off between intra- and inter-modality weighted contrastive loss, and \(\tau\) is the temperature coefficient in contrastive learning. For hash representation learning, we use \(\alpha\) to adjust the importance of \(\mathcal{L}^{weight}_{con}\) and \(\mathcal{L}^{sim}_{total}\). In our experiments, for the parameter \(\lambda\), we assign values of 0.3, 0.6, and 0.2 for MIRFlickr-25K, NUS-WIDE, and MS COCO, respectively. Regarding the parameter \(\gamma\), we set it to 0.1 for all datasets. Similarly, for the parameter \(\tau\), we set it to 0.4, 0.46, and 0.26 for MIRFlickr-25K, NUS-WIDE, and MS COCO, respectively. Furthermore, for the parameter \(\alpha\), we assign values of 0.4, 0.2, and 0.1 for MIRFlickr-25K, NUS-WIDE, and MS COCO, respectively. The Adam optimization algorithm [63] is adopted for model training, and we set the learning rate of the hash representation learning \(\eta_{1}\) and hash function learning \(\eta_{2}\) to 0.001 and 0.0001, respectively, on MIR Flickr-25K, 0.001 and 0.0001, respectively, on NUS-WIDE; and 0.0015 and 0.0005, respectively, on MS COCO.