# Proxy-Based Semi-Supervised Cross-Modal Hashing
## 3 Methodology
### Model Learning
#### 3.3.3 Adaptive Dual-Label Loss  
Through forward propagation, the features of labeled and unlabeled data \(F_{*}^{l}\) and \(F_{*}^{u}\) are transformed into binary-like codes \(H_{*}^{l}\) and \(H_{*}^{u}\), where \(*\in\{x,y\}\); the feature proxies \(\mathbf{P}^{f}=\left\{\mathbf{p}_{i}^{f}\right\}_{i=1}^{C}\) generate hash proxies \(\mathbf{P}^{h}=\left\{\mathbf{p}_{i}^{h}\right\}_{i=1}^{C}\). In the hash space, we consider both labeled and unlabeled data separately. Specifically, for labeled data, which have true label information, we not only learn the relationship between the data and the hash proxies but also learn the relationship between the data points themselves through their true labels. We obtain the similarity relationship between labeled data using the following Equation (9):  
\[\mathbf{S}^{l}=\frac{\mathbf{L}^{l}}{\left\|\mathbf{L}^{l}\right\|_{2}}\cdot\left(\frac\mathbf{{L}^{l}}{\left\|\mathbf{L}^{l}\right\|_{2}}\right)^{T} \tag{9}\]  
The range of \(\mathbf{S}^{l}_{ij}\) is \([0,1]\). If \(\mathbf{S}^{l}_{ij}>0\), then \(x_{i}\) (or \(y_{i}\)) and \(x_{j}\) (or \(y_{j}\)) are called an relevant pair. If \(\mathbf{S}^{l}_{ij}=0\), then they are considered as irrelevant pairs. To pull relevant pairs closer, we use \(\cos_{\text{p}}\left(h_{i},h_{j}\right)\), and the distance between irrelevant data pairs is pushed away by \(\cos_{\text{n}}\left(h_{i},h_{j}\right)\). \[\cos_{\text{p}}\left(h_{i},h_{j}\right)=\max\left(\mathbf{S}^{l}_{ij}-\frac{\left| h_{i}\cdot h_{j}\right|}{\left|h_{i}\right|\cdot\left|h_{j}\right|},0\right), \cos_{\text{n}}\left(h_{i},h_{j}\right)=\max\left(\frac{\left|h_{i}\cdot h_{ j}\right|}{\left|h_{i}\right|\cdot\left|h_{j}\right|},0\right) \tag{10}\]  
Therefore, the data-related loss for labeled data in hash space \(\mathcal{L}^{l_{d}}_{h}\) is computed using the following Equation (11):  
\[\mathcal{L}^{l_{d}}_{h}=\frac{\sum_{\kappa\in\{x,y\}}\sum_{i,j=1}^{N_{l}}I \left(\mathbf{S}^{l}_{ij}>0\right)\cos_{\text{p}}\left(h^{*}_{i},h^{*}_{j}\right) }{\sum_{i,j=1}^{N_{l}}I\left(\mathbf{S}^{l}_{ij}>0\right)}+\frac{\sum_{\kappa\in\{ x,y\}}\sum_{i,j=1}^{N_{l}}I\left(\mathbf{S}^{l}_{ij}=0\right)\cos_{\text{n}} \left(h^{*}_{i},h^{*}_{j}\right)}{\sum_{i,j=1}^{N_{l}}I\left(\mathbf{S}^{l}_{ij}=0 \right)} \tag{11}\]  
For the relationship between data and hash proxies in the hash space, we can impose a constraint using the loss \(\mathcal{L}^{l_{p}}_{h}\). Similar to the loss in the feature space \(\mathcal{L}_{f}\), \(\mathcal{L}^{l_{p}}_{h}\) is defined as follows:  
\[\mathcal{L}^{l_{p}}_{h}=\frac{\sum_{\kappa\in\{x,y\}}\sum_{i=1}^{N_{l}}\sum_{j =1}^{C}I\left(l_{ij}=1\right)\cos_{+}\left(h^{*}_{i},p^{h}_{j}\right)}{\sum_ {i=1}^{N_{l}}\sum_{j=1}^{C}I\left(l_{ij}=1\right)}+\frac{\sum_{\kappa\in\{x, y\}}\sum_{i=1}^{N_{l}}\sum_{j=1}^{C}I\left(l_{ij}=0\right)\cos_{-} \left(h^{*}_{i},p^{h}_{j}\right)}{\sum_{i=1}^{N_{l}}\sum_{j=1}^{C}I\left(l_{ ij}=0\right)} \tag{12}\]  
For unlabeled data, since their pseudo-labels directly correspond to the structural relationships between the data and the categories, learning the relationships between unlabeled data through pseudo-label information would instead introduce errors. Therefore, we directly map the structural relationship between the unlabeled data features and the feature proxies in the feature space, as contained in the pseudo-label information, to the relationship between the binary-like codes of the unlabeled data and the hash proxies in the hash space. Specifically, we bring the binary-like codes of unlabeled data closer to the relevant hash proxies by calculating \(\cos_{\text{r}}\left(h_{i},p^{h}_{j}\right)\) and push them apart from irrelevant ones by calculating \(\cos_{\text{r}}\left(h_{i},p^{h}_{j}\right)\).