Weakly-paired Cross-Modal Hashing
Xuanwu Liu, Jun Wang, Guoxian Yu, Carlotta Domeniconi, Xiangliang, Zhang

TL;DR
This paper introduces Flex-CMH, a novel cross-modal hashing method that effectively learns from weakly-paired data with incomplete or unknown sample correspondences, improving retrieval performance in practical scenarios.
Contribution
It proposes a clustering-based matching strategy and a joint optimization framework to handle weakly-paired data in cross-modal hashing, enhancing flexibility and accuracy.
Findings
Flex-CMH outperforms state-of-the-art methods on multi-modal datasets.
The approach effectively handles incomplete and unknown sample correspondences.
Experiments demonstrate significant improvements in retrieval accuracy.
Abstract
Hashing has been widely adopted for large-scale data retrieval in many domains, due to its low storage cost and high retrieval speed. Existing cross-modal hashing methods optimistically assume that the correspondence between training samples across modalities are readily available. This assumption is unrealistic in practical applications. In addition, these methods generally require the same number of samples across different modalities, which restricts their flexibility. We propose a flexible cross-modal hashing approach (Flex-CMH) to learn effective hashing codes from weakly-paired data, whose correspondence across modalities are partially (or even totally) unknown. FlexCMH first introduces a clustering-based matching strategy to explore the local structure of each cluster, and thus to find the potential correspondence between clusters (and samples therein) across modalities. To…
| Mirflickr | Nus-wide | Wiki | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Methods | 16bits | 32bits | 64bits | 128bits | 16bits | 32bits | 64bits | 128bits | 16bits | 32bits | 64bits | 128bits | |
| Image vs. Text | CMSSH | ||||||||||||
| SCM-seq | |||||||||||||
| SCM-orth | |||||||||||||
| CMFH | |||||||||||||
| SePH | |||||||||||||
| WMCA | |||||||||||||
| MMPDL | |||||||||||||
| FlexCMH | |||||||||||||
| Text vs. Image | CMSSH | ||||||||||||
| SCM-seq | |||||||||||||
| SCM-orth | |||||||||||||
| CMFH | |||||||||||||
| SePH | |||||||||||||
| WMCA | |||||||||||||
| MMPDL | |||||||||||||
| FlexCMH | |||||||||||||
| Mirflickr | Nus-wide | Wiki | |||||||||||
| Methods | 16bits | 32bits | 64bits | 128bits | 16bits | 32bits | 64bits | 128bits | 16bits | 32bits | 64bits | 128bits | |
| 50% image-text pairs are paired, CMSSH, SCM and SePH only use paired data for training | |||||||||||||
| Image vs. Text | CMSSH | ||||||||||||
| SCM-seq | |||||||||||||
| SCM-orth | |||||||||||||
| CMFH | |||||||||||||
| SePH | |||||||||||||
| WMCA | |||||||||||||
| MMPDL | |||||||||||||
| FlexCMH | |||||||||||||
| Text vs. Image | CMSSH | ||||||||||||
| SCM-seq | |||||||||||||
| SCM-orth | |||||||||||||
| CMFH | |||||||||||||
| SePH | |||||||||||||
| WMCA | |||||||||||||
| MMPDL | |||||||||||||
| FlexCMH | |||||||||||||
| 50% image-text pairs are paired, all methods use all the training data | |||||||||||||
| Image vs. Text | CMSSH | ||||||||||||
| SCM-seq | |||||||||||||
| SCM-orth | |||||||||||||
| CMFH | |||||||||||||
| SePH | |||||||||||||
| WMCA | |||||||||||||
| MMPDL | |||||||||||||
| FlexCMH | |||||||||||||
| Text vs. Image | CMSSH | ||||||||||||
| SCM-seq | |||||||||||||
| SCM-orth | |||||||||||||
| CMFH | |||||||||||||
| SePH | |||||||||||||
| WMCA | |||||||||||||
| MMPDL | |||||||||||||
| FlexCMH | |||||||||||||
| 50% image-text pairs are paired, the number of image samples and that of text samples are different | |||||||||||||
| Image vs. Text | FlexCMH(nJ) | ||||||||||||
| FlexCMH(nC) | |||||||||||||
| FlexCMH | |||||||||||||
| Text vs. Image | FlexCMH(nJ) | ||||||||||||
| FlexCMH(nC) | |||||||||||||
| FlexCMH | |||||||||||||
| Mirflickr | Nus-wide | Wiki | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Methods | 16bits | 32bits | 64bits | 128bits | 16bits | 32bits | 64bits | 128bits | 16bits | 32bits | 64bits | 128bits | |
| Image vs. Text | WMCA | ||||||||||||
| MMPDL | |||||||||||||
| FlexCMH | |||||||||||||
| Text vs. Image | WMCA | ||||||||||||
| MMPDL | |||||||||||||
| FlexCMH | |||||||||||||
| Text | Image1 | Image2 | |
|---|---|---|---|
| CMSSH | 0.1015 | 0.0896 | 0.0937 |
| SCM-seq | 0.1114 | 0.0975 | 0.1034 |
| SCM-orth | 0.1215 | 0.1025 | 0.1151 |
| SePH | 0.1241 | 0.1056 | 0.1104 |
| WMCA | 0.1428 | 0.1156 | 0.1241 |
| MMPDL | 0.2023 | 0.1676 | 0.1896 |
| FlexCMH | 0.2331 | 0.1876 | 0.2031 |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Image and Video Retrieval Techniques · Video Surveillance and Tracking Methods · Robotics and Sensor-Based Localization
Flexible Cross-Modal Hashing
Xuanwu Liu, Jun Wang
Southwest University, China
,
Guoxian Yu
Southwest University, China and KAUST, SA
,
Carlotta Domeniconi
George Mason University, USA
and
Xiangliang Zhang
KAUST, SA
Abstract.
Hashing has been widely adopted for large-scale data retrieval in many domains, due to its low storage cost and high retrieval speed. Existing cross-modal hashing methods optimistically assume that the correspondence between training samples across modalities are readily available. This assumption is unrealistic in practical applications. In addition, these methods generally require the same number of samples across different modalities, which restricts their flexibility.
We propose a flexible cross-modal hashing approach (FlexCMH) to learn effective hashing codes from weakly-paired data, whose correspondence across modalities are partially (or even totally) unknown. FlexCMH first introduces a clustering-based matching strategy to explore the local structure of each cluster, and thus to find the potential correspondence between clusters (and samples therein) across modalities. To reduce the impact of an incomplete correspondence, it jointly optimizes in a unified objective function the potential correspondence, the cross-modal hashing functions derived from the correspondence, and a hashing quantitative loss. An alternative optimization technique is also proposed to coordinate the correspondence and hash functions, and to reinforce the reciprocal effects of the two objectives. Experiments on publicly multi-modal datasets show that FlexCMH achieves significantly better results than state-of-the-art methods, and it indeed offers a high degree of flexibility for practical cross-modal hashing tasks.
Cross modal hashing, weakly-paired, flexibility, optimization
1. Introduction
Hashing has attracted an increasing interest from both research and industry, due to its low storage cost and high retrieval speed with big data (Wang2016L2H, ; Wang2018L2H, ; Gong2013Iterative, ; Chen2014Spectral, ). Hashing aims at compressing high-dimensional vectorial data into short binary codes by preserving the structure of them, and to facilitate efficient retrieval with a significantly reduced storage. Based on the index constructed from hashing codes, big data retrieval can be made in a constant or sub-linear time (Wang2014Hashing, ; Wang2016L2H, ; Wang2018L2H, ; Shen2015Supervised, ; Liu2017Large, ; Zhu2013Linear, ; Li2015Multiview, ).
With the wide range of applications of the Internet of Things, rapid influxes of multi-modal data asks for efficient cross-modal hashing solutions. For example, given an image/video about a historic event, one may want to cross-modally retrieve some texts describing the event in detail. How to perform cross-modal hashing on these widely-witnessed multi-modal data becomes then a topic of interest in hashing (Kumar2011Learning, ; Zhang2014Large, ; Wang2016L2H, ; Wang2018L2H, ). Based on using the labels of training samples or not, existing cross-modal hashing solution can be roughly divided into unsupervised ones and supervised ones. Unsupervised ones seek hash coding functions by taking into account underlying data structure, distributions, or topological information (Song2013Inter, ; Bronstein2010Data, ). And supervised (semi-supervised) approaches try to leverage supervised information (i.e., semantic labels) to improve the performance (Zhang2014Large, ; Lin2017Cross, ; Gong2014A, ; Wang2010Semi, ; Chen2008Semi, ).
Existing cross-modal hashing methods optimistically assume that the correspondence between samples of different modalities is known (Kang2015Learning, ). However, in real applications, some objects are only available in one modality, or their corresponding (or paired) objects in another modality are only partially (or even totally) unknown. This can happen, for example, when one wants to search images from text, and there are 100 images and 200 documents, and the correspondence between 50 images and 80 documents is only partially known. In other words, the image-text collection is weakly-paired, and only the semantic labels are shared across modalities. To the best of our knowledge, how to flexibly learn hashing codes from the weakly-paired data is still an untouched and challenging topic in cross-modal hashing.
Some attempts have been made to tackle the weakly-paired multi-view data (zong2018multi, ; Lampert2010Weakly, ; Liu2017Weakly, ). To name a few, Weakly-paired Maximum Correlation Analysis(WMCA) extends the maximum covariance analysis to the weakly-paired case by jointly learning the latent pairs and subspace for dimensionality reduction and transfer learning (Lampert2010Weakly, ). Multi-modal Projection Dictionary Learning (MMPDL) jointly learns the projective dictionary and pairing matrix for the fusion classification (Liu2017Weakly, ). Zong et al. (zong2018multi, ) assume the cluster indicator vectors of two samples from two different views should be similar if they belong to the same cluster and dissimilar otherwise, and then tackle the multi-view clustering on unpaired data by nonnegative matrix factorization. Mandal et al. (Mandal2016Generalized, ) learn coupled dictionaries from the respective data views and sparse representation coefficients with respect to their own dictionaries. They then maximize the correlation between sample coefficients of the same class, and simultaneously minimize the correlation of different classes to seek the matching between samples and to fuse weakly-paired multi-view data. However, these approaches still handle the weakly-paired problem in a non-flexible setting. For example, WMCA requires the number of samples in different modalities to be the same, and MMPDL needs the same number of samples for each class among different modalities. These requirements are violated in many cases, where samples across different modalities are partially-paired and the numbers of member samples of matched clusters (or classes) across modalities are not the same.
In this paper, we propose a Flexible Cross-Modal Hashing (FlexCMH) solution (as illustrated in Fig. 1) to handle partially-paired (and even completely unpaired) multi-modal data. Our main contributions are summarized as follows:
- (1)
We design a novel matching strategy that uses centroids of clusters, the neighborhood structure of centroids, and an incomplete correspondence between samples to seek a matching between samples in different modalities. The matching strategy neither requires the same number of samples within the matched clusters, nor across different modalities. Therefore, FlexCMH can be applied with flexibility in general cross-modal hashing settings. 2. (2)
We propose a unified objective function to simultaneously consider the cross-modal matching loss, the intra-modal representation loss, and the quantitative loss to learn adaptive hashing codes. We also introduce an alternative optimization technique to jointly optimize the correspondence and hash functions, and to reinforce the reciprocal effects of these two objectives. 3. (3)
Experiments on benchmark multi-modal datasets show that FlexCMH significantly outperforms related and representative cross-modal hashing approaches (Bronstein2010Data, ; Zhang2014Large, ; Lin2017Cross, ; Lampert2010Weakly, ; Liu2017Weakly, ) in weakly paired cases, and it holds a competitive performance in different open settings.
The rest of this paper is organized as follows. Section 2 introduces the objective function of FlexCMH, and its optimization. Section 3 presents the experimental setup, results, and analysis. Section 4 draws the conclusions and provides directions for future work.
2. Proposed method
Suppose we have modalities, and the number of training samples for the -th modality is . represents the data matrix for the -th modality, where both and are modal-dependent. stores the label information of samples, where is the number of labels. , indicates that is annotated with the -th label; otherwise. For example, in a two-modality Wiki-image search application, is the image feature vector of sample , and is the tag vector of this sample. To enable cross-modal hashing, we need to learn two hashing functions, : and : , where is the length of binary hash codes. These two hashing functions are expected to map and from the respective modality onto a common Hamming space and to preserve the proximity of the original data.
This canonical cross-modal hashing assumes that training samples in different modalities have a complete correspondence. However, the samples may be weakly-paired only. For example, consider the scenario in which, due to a temporary sensor failure, and do not describe the same object from different feature views. Instead, and () depict the same object. An intuitive solution is to only use the paired samples. However, the structure information jointly reflected by paired and unpaired samples may be distorted, thus the performance may be heavily compromised. Morevoer, if the pair information between two modalities is totally unknown, the canonical solutions cannot be applied.
To achieve an effective cross-modal hashing on such weakly-paired (or totally unpaired) multi-modal data, we introduce a flexible solution (FlexCMH), and provide its overall workflow in Fig. 1. FlexCMH first introduces a clustering-based matching strategy to leverage the cluster centorids and the local structure around the centroids to explore the potential correspondence between clusters (and samples within) across different modalities. Next, it defines a permutation matrix based on the explored correspondence to unify the index of same samples across modalities. Based on the unified index, it introduces an unified objective function to simultaneously account for cross-modal similarity preserving loss, the intra-modal representation loss and the quantitative hashing loss. An alternative optimization technique is also proposed to jointly optimize the correspondence and the hash functions, and to reinforce the reciprocal effects of these two objectives. The following subsections elaborate on the above process.
2.1. Clustering-based cross-modal matching strategy
Unlike single-modal hashing, the correspondence between samples is crucial for the multi-modal data fusion and retrieval. For completely matched samples, the correspondence is completely known and can be used, along with the inter(intra)-modality similarity between samples across modalities, to learn cross-modal hashing functions. But for weakly-paired data, since the correspondence is only partially known, it’s a non-trivial job to quantify the similarity between samples from different modalities. A remedy is to divide the samples into different groups based on their labels and impose some constraints (i.e., concerning the similarity between different classes) on the coding vectors (Xiao2014Semi, ; Liu2018Weakly, ). In the representation space, the within-class data would cluster together although they are from different modalities, and the between-class data would be placed far apart from each other. In other words, all the data vectors of the same class (different classes) from different modalities should be similar (dissimilar)(wang2009multi, ). We can approximate the similarity between different classes using the centroids of respective groups(Liu2017Weakly, ). However, only considering centroids may not be sufficient, and the neighborhood objects around a centroid may also be helpful. Furthermore, incomplete labels of training data restrict the quality of groups.
Given these observations, we introduce a novel clustering-based matching strategy to leverage the centroids of clusters and the local structure around the centroids. This strategy can explore the correspondence between clusters (and samples therein) between different modalities. We illustrate the clustering-based matching strategy in the center of Fig. 1, where the stars represent centroids of clusters in different modalities, and the red points indicate the objects with known correspondence in another modality. The likelihood that two clusters will match increases with the similarity of their centroids, with the similarity of the local structure around the centroids. To achieve that, we define a quantitative match function as follows:
[TABLE]
where and are the centriods the -th cluster in the -th modality and the -th cluster in the -th modality, is the user specified number of nearest samples of the centroids, is the -th nearest sample of , is a scalar coefficient to balance the scale difference between two modalities. To seek the correspondence between clusters of different modalities, Eq. (1) not only accounts for the centroids, but also for the neighborhood samples around the centroids. As such, it can explore the correspondence between neighborhood samples of respective centroids to facilitate the follow-up cross-modal hashing. In contrast, existing solutions only match centroids using labeled samples and ignore the important local patterns (Lampert2010Weakly, ; Liu2017Weakly, ). Our match function neither requires for two matched clusters to have the same number of samples, nor the same number of samples across modalities. It can also be applied to multi-modality data whose label information and correspondence are completely unknown. These advantages contribute to the flexibility of FlexCMH.
Two clusters ( and ) and their respective centroids and are matched, if is the smallest among all pairwise clusters from two modalities. We can align the objects in the respective modalities by reordering their indexes, and then use the ‘matched’ (aligned) objects in different modalities for cross-modality hashing. To this end, we define a permutation matrix to align samples as follows:
[TABLE]
where means the -th sample in the -th modality is paired with the -th sample in the -th modality. In this way, our cluster-based matching strategy also incorporates the known matched samples from different modalities. if belongs to the -th cluster and belongs to the -th cluster, and is the smallest among all pairwise clusters from two modalities. These conditions indicate that the indexes of and should be reordered for alignment. We observe that our matching strategy is different from the typical network alignment, which aims at finding identical sub-networks (Si2016FINAL, ; Meng2015Local, ). In contrast, we aim at matching samples within the explored clusters, which describe the same object from different feature views. In addition, a sample in one modality can be paired with more than one sample in another modality. The follow-up cross-modal hashing functions can be learned using the found correspondence.
2.2. Cross-modal hashing
To compute the matching loss, we should first identify the centroids of the respective clusters. WMCA (Liu2017Weakly, ) and MMPDL (Liu2018Weakly, ) both aim at addressing cross-model learning with weakly-paired samples, but they obtain clusters using only labeled samples. In practice, the labels of samples may not be sufficient, and even unavailable. As such, they have a restricted flexibility. To find centroids, we adopt Semi-Nonnegative Matrix Factorization (SemiNMF) (Ding2010Convex, ) as follows:
[TABLE]
where can be viewed as the latent representation of cluster centroids of the -th modality, and is the soft cluster assignments of samples in the latent space. The above equation calculates the intra-modality representation loss and clustering loss simultaneously. Therefore, can be used for the clustering-based matching. is the indicator matrix, which represents the probability that samples belong to different classes, and can be used for hashing codes learning.
To achieve sample-to-sample cross-modal retrieval, based on the matched clusters and samples from Eq. (2), we further minimize the difference between the matched pairs to encourage them to be as similar as possible. Specifically, the indicator vectors () of two samples from two different modalities should be similar if they have the same cluster label, and dissimilar otherwise. To this end, we quantify the relationship between two different modalities by minimizing the deviation of the indicator vectors of pairwise objects from different modalities as follows:
[TABLE]
where reorders the samples in in descending order based on their association probabilities with respect to the -th class. is the permutation matrix, which shuffles the sample indexes in to align the samples according to the same indexes in , which can be obtained using Eq. (2). As such, the samples of can be matched with . In practice, we choose the top samples which belong to the () class to setup and , and to achieve cross-modal matching. As a result, our matching strategy can accommodate the case in which the number of samples belonging to the same class in different modalities can be different. In this way, we can achieve cross-modal retrieval on multi-modal data, whose matched samples are partially or completely unknown, even with different numbers of samples in the matched clusters.
can be viewed as a soft cluster assignments of samples in the -th modality with respect to clusters in a latent space. The assignments are also coordinated by the assignments in other data modalities (see Eq. (4)). For cross-modal hashing, we transform the soft assignments into hard clusters using -means clustering, and then we seek the binary hash coding matrix as follows:
[TABLE]
can be viewed as the common Hamming space across all data modalities. It can be used for cross-modal retrieval, along with the of the respective modalities. Eq. (6) is also called the hashing quantitative loss.
2.3. Unified objective function
Based on the above analysis, we can assemble the three losses into a unified objection function, and formulate it as:
[TABLE]
where the first term quantifies the cross-modal matching loss and the inter-modal representation loss, the second term measures the intra-modal representation loss, and the third term measures the hashing code quantitative loss. is a scalar parameter that achieves a balance between the cross-modal hashing loss and the quantitative loss. By simultaneously optimizing the above three losses, we jointly account for the correspondence and the hash functions, and thus reinforce the reciprocal effects of these two objectives. This joint optimization can avoid the misleading impact of initially not well-matched clusters and samples on the subsequent cross-modal hashing. Our experimental results confirm this advantage.
2.4. Optimization
We observe that the loss function in Eq. (6) is actually a sum of the cross-modal matching and retrieval loss, the intra-modal representation loss, and the hashing quantitative loss. Once is fixed, we can directly obtain using Eq. (2). We can solve Eq. (6) via the Alternating Direction Method of Multipliers (ADMM) (Boyd2011Distributed, ), which alternatively optimizes one of , , and B, while keeping the other two fixed.
Optimize with and fixed: We utilize stochastic gradient descent (SGD) to learn using the back-propagation (BP) algorithm. Here, Eq. (6) is transformed into independent optimization problems, where the sub-problem minimizes:
[TABLE]
where has the same size and samples order as . For any class, the derivatives of Eq. (7) with respect to the indicator matrix in the is:
[TABLE]
We can then take to update the indicator matrix using SGD. Similarly, we can also update based on the derivative .
Optimize with and fixed: Since depends on and , we compute the derivative of Eq. (6) with respect to and as follows:
[TABLE]
We can then use these derivatives to update the centroid matrix . In each iteration, after the centroids in are updated, we consequently update based on Eqs. (1) and (2).
Optimize with and fixed: Once and are fixed, is also determined, then the minimization in Eq. (6) is equal to a maximization as follows:
[TABLE]
where . It is easy to observe that the binary code should keep the same sign as . Therefore, we have:
[TABLE]
Where =1 if , =0 otherwise.
By iteratively applying Eqs. (8-11), we can jointly optimize the correspondence and the hash functions, thus reinforcing the reciprocal effects of these two objectives. The whole procedure of FlexCMH and the alternative optimization for solving Eq. (6) are summarized in Algorithm 1.
2.5. Complexity analysis
To facilitate the time complexity analysis, we assume a simple extreme case, with modalities and classes and the number of iterations is . For any modality, we have samples and the extreme pairing case is considered. The time complexity of the proposed method is composed of three parts. First, the time cost of updating in Eq. (8) is . Second, the time cost of updating in Eq. (9) is . Third, the time cost of updating in Eq. (2) is . Since the complexity of third part is larger than other two parts in each iteration, the overall complexity of FlexCMH is . The empirically study (Configuration: Ubuntu 16.04.1, Intel(R) Xeon(R) CPU E5-2650, 256RAM) on three adopted multi-modal datasets shows that FlexCMH costs 8.532 seconds on Wiki, 43.244 seconds on Mirflickr, and 1768.196 seconds on Nus-wide.
3. Experiments
3.1. Experimental setup
Datasets: Three widely used benchmark datasets (Nus-wide, Wiki, and Mirflicker) are collected to evaluate the performance of RDCMH. Each dataset includes two modalities, image and text, although FlexCMH can also be directly applied to cases with more than two data modalities. Nus-wide111http://lms.comp.nus.edu.sg/research/NUS-WIDE.htm contains 260,648 web-text pairs. Each image is annotated with one or more labels taken from 81 concept labels. Each text is represented as a 1,000-dimensional bag-of-words vector. The hand-crafted feature of each image is a 500-dimensional bag-of-visual words (BOVW) vector. Wiki222https://www.wikidata.org/wiki/Wikidata is generated from a group of 2,866 Wikipedia documents. Each document is an image-text pair, can be annotated with 10 semantic labels, and is represented by a 128-dimensional SIFT feature vector. The text articles are represented as probability distributions over 10 topics, which are derived from a Latent Dirichlet Allocation (LDA) model. Mirflickr333http://press.liacs.nl/mirflickr/mirdownload.html originally contained 25,000 instances collected from Flicker. Each instance consists of an image and its associated textual tags, and is manually annotated with one or more labels, from a total of 24 semantic labels. Each text is represented as a 1,386-dimensional bag-of-words vector, and each image is represented by a 512-dimensional GIST feature vector.
Comparing methods: Six related and representative methods are adopted for comparison. (i) CMSSH (Cross-modal Similarity Sensitive Hashing) (Bronstein2010Data, ) treats hash code learning as a binary classification problem, and efficiently learns the hash functions using a boosting method. (ii) SCM (Semantic Correlation Maximization) (Zhang2014Large, ) optimizes the hashing functions by maximizing the correlation between two modalities with respect to semantic labels; it includes two versions, SCM-orth and SCM-seq. SCM-orth learns hash functions by direct eigen-decomposition with orthogonal constraints for balancing coding functions, and SCM-seq can more efficiently learn hash functions in a sequential manner without the orthogonal constraints. (iii) CMFH (Collective matrix factorization hashing) (Ding2014Collective, ) learns unified binary codes using collective matrix factorization with a latent factor model on multi-modal data. (iv) SePH (Semantics Preserving Hashing) (Lin2017Cross, ) is a probability-based hashing method, which generates one unified hash code for all observed views by considering the semantic consistency between views. (v) WMCA (Weakly-paired Maximum Correlation Analysis) (Lampert2010Weakly, ) adopts the maximum covariance analysis to perform the joint learning of the latent matching and subspace. (vi)MMPDL (Muti-modal projection dictionary learning) (Liu2017Weakly, ) is a unified projective dictionary learning method, which jointly learns the projective dictionaries and matching matrix for the classification fusion. The source code of the baselines is provided by the authors, and the input parameter values are set according to the guidelines given by the authors in their respective papers. For WMCA and MMPDL, since they are not hashing methods, we obtain the hashing codes by exchanging the classification with the ordinary hashing function . For FlexCMH, we fix in Eq. (6) to 1, on Wiki, on Mirflickr, and on Nus-wide; the number of nearest neighbors in Eq. (1) is fixed to 5 and in Eq. (4) is fixed to 50% of . Our preliminary study shows FlexCMH is robust to the input values of and . The number of iterations for optimizing Eq. (6) is set to 500. We empirically found that FlexCMH generally converges in fewer iterations on all the datasets. The parameter sensitivity of and is studied in appendix. The datasets and the code of FlexCMH will be made publicly available.
3.2. Results in different practical settings
To study thoroughly the performance of FlexCMH and of the comparing methods, we conduct three types of experiments: (1) completely-paired, (2) weakly-paired, and (3) completely-unpaired. In each type of experiment, all methods are run ten times, and we report the average MAP (mean average precision) results. Since the MAP standard deviations of all methods are quite small (less than 2%) on all datasets, to save space the standard deviations are not reported. The best results are boldfaced.
For the completely-paired experiments, the clustering-based matching process of FlexCMH is excluded, and each comparing method uses all the paired samples for training (70%) and the rest for validation (30%). Table 1 reports the MAP results on MIRFLICKR, NUS-WIDE, and Wiki datasets. In the Table, ‘Image vs. Text’ denotes the setting where the query is an image and the database is text, and vice versa for ‘Text vs. Image’.
For the weakly-paired experiments, we investigate three different settings: (2a) 50% of the image-text pairs of the training set (70% of the whole dataset) are kept, and the other pairs are randomly shuffled; in this setting the first four comparing methods (CMSSH, SCM-Seq, SCM-Orth, and SePH) can only use paired image-text instances for training and disregard the unpaired ones, whereas the last two (WMCA and MMPDL) and FlexCMH can use all the training data. (2b) As in (2a), but both the paired (50%) and the unpaired training samples are used to train all the comparing methods. (2c) As in (2a), all the images in the training set are used for training, but 10% of the text samples in the training set is randomly removed. As such, the number of images is different from the number of text samples across modalities and clusters. For the setting (2c), all the comparing methods cannot be applied, so we only report the MAP results of our FlexCMH and its variants (FlexCMH(nJ) and FlexCMH(nC)). FlexCMH(nJ) first seeks the matched image-text pairs, and then executes the follow-up cross-modal hashing, without jointly optimizing the matched clusters (samples) and hashing functions. FlexCMH(nC) uses the label information to obtain the correspondence between samples (as done by MMPDL), instead of our proposed clustering-based matching strategy. Table 2 reports the MAP values of the compared methods in these settings.
For the completely-unpaired experiments, besides randomly partitioning the data into training (70%) and testing (30%) sets, we randomly shuffle the index of images and the index of text samples in the training set. As a result, the images and the text samples are almost completely unpaired. For this type of experiments, only WMCA and MMPDL can be used for comparison. Table 3 reports the MAP values of the three methods.
From Table 1, we can see that our FlexCMH achieves the best performance in most cases. This is because FlexCMH not only jointly models the cross-modal similarity preserving loss and the intra-modal similarity preserving loss, to build a more faithfully semantic projection, but also models the quantitative loss to learn adaptive hashing codes. We observe that SePH obtains better results for ‘Text vs. Image’ retrieval on Wiki. This is possible because of the adaptability of its probability-based strategy on small datasets. An unexpected observation is that the performance of CMSSH and SCM-Orth decreases as the length of hash codes increases. This might be caused by the imbalance between bits in the hash codes learned by singular value or eigenvalue decomposition. These experimental results show the effectiveness of FlexCMH for the canonical cross-modal hashing, where training samples from different modalities are completely paired.
From Table 2, we can see that the MAP results are similar to those of Table 1, while only 50% of the pairs of the training set are used for training by CMSSH, SCM, and SePH. This observation suggests that this pair fraction is sufficient to train the cross-modal hashing functions. In practice, we observed a significant reduction in the MAP values when less than 10% of the training data is paired. We also observe that the MAP results of CMSSH, SCM, and SePH sharply reduce when all the paired and unpaired samples are used for the experiment. This is because CMSSH, SCM, and SePH are misled by ‘incorrectly paired’ (in fact, not-paired) samples. WMCA, MMPDL and FlexCMH do not manifest such a sharp reduction in performance. That is because they adopt different techniques to augment matched samples, which boost the performance of cross-modal hashing. In addition, FlexCMH still achieves the best performance, thanks to (1) its novel clustering-based matching approach for exploring the matched clusters and samples therein, and (2) a unified objective function to optimize, in a coordinate manner, the matching between clusters and samples, and the cross-modal hashing functions with the matched clusters and samples.
FlexCMH holds slightly reduced results when the numbers of samples (images and texts) in different modalities are not the same, and only 50% of the image-text is paired. In ‘Image vs. Text’ retrieval, the MAP results of FlexCMH are generally lower than those in Table 1. That is because 10% of the text samples in the text modality is removed. As a result, the retrieval results may be incorrect when using the corresponding images to query the removed text. We also observe that the results of FlexCMH(nJ) are inferior to those of FlexCMH. This observation proves that jointly optimizing the hashing functions, and the matched clusters and samples, enables a mutual boosting of the two objectives. Furthermore, FlexCMH(nC) is also outperformed by FlexCMH, which proves that our proposed clustering-based matching strategy can more reliably find the matching between samples across modalities.
In Table 3, the MAP results of all methods are inferior to those of Tables 1 and 2. Still, FlexCMH achieves the best results, which proves the effectiveness of FlexCMH on completely-unpaired data. From these results, we can state that the matching information of samples across modalities is crucial for cross-modal hashing. Our clustering-based matching strategy can reliably explore paired samples, and it boosts the performance of cross-modal hashing on weakly-paired (or completely unpaired) samples.
Besides, we present some examplar cross-modal retrieved images (texts) in the supplementary file to visually support the advantages of FlexCMH.
In summary, our experimental results prove that FlexCMH can learn the cross-modal hashing more effectively than representative comparing methods. FlexCMH is flexible in a variety of practical settings, where the paired samples across modalities are partially available or even completely unknown, and the numbers of samples in different modalities (and matched clusters) are also different. To the best of our knowledge, no existing cross-modal hashing methods can work in these scenarios.
3.3. Parameter sensitivity analysis
We further explore the sensitivity of the scalar parameter in Eq. (6), and report the results on three datasets in Fig. 2, where the code length is fixed to 16 bits. We can see that FlexCMH is slightly sensitive to when , and achieves the best performance when . Over-weighting or under-weighting the quantitative loss has a negative impact on the performance, but not significant. In summary, an effective can be easily selected for FlexCMH.
In addition, we investigate the sensitivity of the number of clusters , and report the results in Fig. 3 with the code length fixed to 16 bits. We can see that FlexCMH is sensitive to and can achieve the best results with on Wiki, on Mirflickr, and on Nus-wide. These preferred values of are close to the number of distinct labels of the corresponding datasets. Given this, we suggest to fix around the number of labels .
3.4. Results on three modalities
In this section, we evaluate the effectiveness of FlexCMH on the Wiki dataset fixing code length to 16 with three modalities. Currently, to the best of our knowledge, there are no publicly available datasets with three or more modalities. To simulate a three-modality setting, we divide the 128-dimensional image modality into two sub-modalities: the 64-dim i1 and the 64-dim i2 modalities. Since the comparing methods cannot directly handle more than two modalities, we adapt them by learning hash functions between each pair of modalities, and then merge the retrieved results from the respective pairs. For example, if Image1 serves as the query modality, then the comparing methods separately optimize two cross-modal hashing mappings (i.e., Image1 Text and Image1 Image2). The experimental setting is the same as in (2b).
Table 4 shows the MAP values on the Wiki dataset in the three-modality case. FlexCMH again outperforms the compared methods, providing evidence of the broad applicability of our proposed approach.
4. Conclusions
In this paper, we proposed a Flexible cross-modal hashing (FlexCMH) solution to learn effective hashing functions from weakly-paired (or completely-unpaired) data across modalities. FlexCMH introduces a clustering-based matching strategy to explore the potential correspondence between clusters and their member samples. In addition, it jointly optimizes the potential correspondence, cross-modal hashing functions derived from the correspondence and the hashing quantitative loss in a unified objective function to coordinately learn compact hashing codes. Extensive experiments demonstrate that FlexCMH outperforms the state-of-the-art hashing methods on completely-paired, weakly-paired, and completely-unpaired multi-modality data. In the future, we will incorporate deep feature learning into cross-modal hashing on weakly-paired data. The code and data (those that are not available yet) will be publicly available.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends in Machine Learning , 3(1):1–122, 2011.
- 2[2] M. M. Bronstein, A. M. Bronstein, F. Michel, and N. Paragios. Data fusion through cross-modality metric learning using similarity-sensitive hashing. In CVPR , pages 3594–3601, 2010.
- 3[3] G. Chen, Y. Song, F. Wang, and C. Zhang. Semi-supervised multi-label learning by solving a sylvester equation. In ICDM , pages 410–419, 2008.
- 4[4] L. Chen, D. Xu, W. H. Tsang, and X. Li. Spectral embedded hashing for scalable image retrieval. IEEE Transactions on Cybernetics , 44(7):1180–1190, 2014.
- 5[5] C. Ding, T. Li, and M. I. Jordan. Convex and semi-nonnegative matrix factorizations. TPAMI , 32(1):45–55, 2010.
- 6[6] G. Ding, Y. Guo, and J. Zhou. Collective matrix factorization hashing for multimodal data. In CVPR , pages 2083–2090, 2014.
- 7[7] Y. Gong, Q. Ke, M. Isard, and S. Lazebnik. A multi-view embedding space for modeling internet images, tags, and their semantics. IJCV , 106(2):210–233, 2014.
- 8[8] Y. Gong, S. Lazebnik, A. Gordo, and F. Perronnin. Iterative quantization: a procrustean approach to learning binary codes for large-scale image retrieval. TPAMI , 35(12):2916–2929, 2013.
