# Boundary-Aware Hashing for Hamming Space Retrieval
## 4 Experiments
### Datasets and Settings  
Table 1 reports the details and experimental setup for these four datasets. The four datasets contain both multi-label and single-label datasets, and the data imbalance rates range from balanced to highly unbalanced, which is consistent with most application scenarios. The training sets in Table 1 are randomly sampled from the retrieval database, and these settings are similar to those in [7,9]. In supervised hashing, the similarity between two images refers to whether they share at least one category label information [18,41]. They are ground-true neighbors if true; otherwise, they are not ground-true neighbors. For example, suppose there are three images (a), (b), and (c) in the NUS-WIDE dataset. Image (a) is annotated \(\{person,sky,ocean\}\), and the other two images (b) and (c) are annotated \(\{person,road\}\) and \(\{sky,buildings\}\), respectively. The image pairs (a, b) and (a, c) are similar because they share \(\{people\}\) and \(\{sky\}\), respectively. The image pair (b, c) is dissimilar because they do not have the same category label. According to this definition of semantic similarity, supervised hashing methods need to face various complex application scenarios. Thus, the dataset in Table 1 can effectively evaluate the retrieval performance of various methods under different application scenarios. Previous research has shown that deep hashing outperforms traditional manual hashing methods due to its ability to perform end-to-end learning of deep features and hash coding. As a result, this paper compares BAH to seven state-of-the-art deep supervised hashing methods, including DHN [23], DSH [15], HashNet [25], GreedyHash [42], DCH [7], MMHH [9], and CSQ [26]. These comparative deep supervised hashing methods are briefly described as follows:  
* Deep Hashing Network (DHN) [23]. DHN learns hash coding in a Bayesian architecture by using both pairwise cross-entropy loss and pairwise quantization loss. * Deep Supervised Hashing (DSH) [15]. DSH simultaneously employs contrastive loss and a regularizer to maximize the distinguishability between hash codes. * HashNet: Deep Learning to Hash by Continuation (HashNet) [25]. HashNet improves DHN by up-weighting similar training pairs to solve the data imbalance problem while using a continuation technique to achieve low quantization error. * GreedyHash: Towards Fast Optimization for Accurate Hash Coding in CNN (GreedyHash) [42]. GreedyHash uses the greedy principle to solve the binary-code discrete optimization problem, allowing the network model to converge quickly during the training process. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Dataset Type** & \multicolumn{2}{c}{**Multi-Label**} & \multicolumn{2}{c}{**Single-Label**} \\ \hline Dataset name & MS-COCO & NUS-WIDE & CIFAR-10 & ImageNet \\ \hline Categories & 80 & 81 & 10 & 100 \\ \hline Ratio & 1:1 & 1:5 & 1:10 & 1:100 \\ \hline Total data & 122,218 & 175,877 & 60,000 & 133,503 \\ \hline Query set & 5000 & 5000 & 1000 & 5000 \\ \hline Training set & 10,000 & 10,000 & 5000 & 13,000 \\ \hline Retrieval database & 117,218 & 170,877 & 54,000 & 128,503 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Four publicly available image retrieval datasets information and experimental settings. Ratio represents the ratio between the number of similar and dissimilar pairs. * Deep Cauchy Hashing for Hamming Space Retrieval (DCH) [7]. DCH minimizes the pairwise cross-entropy loss and pairwise quantization loss based on the Cauchy distribution in a Bayesian architecture. * Maximum-Margin Hamming Hashing (MMHH) [9]. MMHH minimizes the Kullback-Leibler (KL) divergence loss based on the max-margin t-distribution to learn hash coding. * Central Similarity Quantization(CSQ) [26]. CSQ utilizes Hadamard matrices and Bernoulli distributions to construct hash centers, causing hash codes to be aggregated to the corresponding hash centers.