# Multimodal Biometric Template Protection Based on a
## 3 Proposed Method
### Loss Function  
* **ArcFace Loss** The ArcFace loss [34] is used in the feature extraction and fusion module as a means of enhancing the terminal hash code discrimination. It is a modified Softmax classification loss in which the prototype weight vector of the \(j^{th}\) identity \(\mathbf{w}_{j}\) is L2-normalized. Specifically, the target logit (activation of the classification layer before applying the Softmax function) is redefined as \(\mathbf{w}_{j}^{\intercal}\mathbf{z}_{i}=||\mathbf{w}_{j}|||\mathbf{z}_{i}||\cos\theta_{j}\), where \(\mathbf{z}_{i}\) are the L2-normalized fused features (Section 3.2) of the \(i^{th}\) sample, belonging to the \(j^{th}\) identity. The normalization of the fused features and weights means that the predictions rely only on the angle between \(\mathbf{z}_{i}\) and \(\mathbf{w}_{j}\), denoted as \(\theta_{j}\). The prediction of the \(y_{i}\)th identity then only depends on \(\theta_{y_{i}}\). The ArcFace loss is defined as: \[\mathcal{L}_{ArcFace}=-\frac{1}{B}\sum_{i=1}^{B}\log\frac{e^{\gamma(\cos{( \theta_{y_{i}}+\beta)})}}{e^{\gamma(\cos{(\theta_{y_{i}}+\beta)})}+\sum_{j=1, j\
eq y_{i}}^{N}e^{\gamma\cos{\theta_{j}}}}\] (4) where \(B\) is the batch size, \(\beta\) is an angular margin introduced to force the classification boundary closer to that prototype weight \(\mathbf{w}_{j}\), and \(\gamma\) is a feature rescaling factor. In this  
Figure 6: Structure of the multiplication-diagonal compression module.  
manner, the learned fused features are distributed on a hypersphere with a radius of \(\gamma\). In this paper, we set \(\beta=0.35\) and \(\gamma=25\).
* **Pairwise Angular Loss** The pairwise angular (PA) loss function is introduced to optimize the PSMoT module. Face-periocular pairs are associated with similarity labels \(c_{ij}\), where \(c_{ij}\)= 1 implies that two face-periocular pairs are from the same identity (positive pair) and \(c_{ij}\)= 0 indicates that they are from different identities (negative pair). The aim of the loss function is to ensure that the similarity between a pair of hash vectors \(\mathbf{s}_{i}\) and \(\mathbf{s}_{j}\) in the MDC module is high if they are positive pairs, and to make the dissimilarity greater than a given margin for negative pairs. Our PA loss is defined as follows: \[\begin{array}{ll}\mathcal{L}_{PA}=&-log\left[c_{ij}\frac{\mathbf{e}^{\delta \cos(\varphi+\alpha)}}{\mathbf{e}^{\delta\cos(\varphi+\alpha)}+\mathbf{e}^{ \delta\sin\varphi}}\right]\\ &-log\left[\left(1-c_{ij}\right)\frac{\mathbf{e}^{\delta\sin(\varphi+\alpha)} }{\mathbf{e}^{\delta\sin(\varphi+\alpha)}+\mathbf{e}^{\delta\cos\varphi}} \right]\end{array}\] (5) where \(\delta\) is a scaling factor, \(\alpha\) is the angular margin, and \(\phi\) is the cosine distance between \(\hat{\mathbf{s}}_{i}\) and \(\hat{\mathbf{s}}_{j}\) (i.e., \(\phi=\cos^{-1}\left(\hat{\mathbf{s}}_{i}^{T}\hat{\mathbf{s}}_{j}\right)\), given that \(\hat{\mathbf{s}}\) is the L2-normalized hash code to be rescaled based on \(\delta\)). Similarly, to the ArcFace loss, normalization and rescaling on \(\hat{\mathbf{s}}_{i}\) and \(\hat{\mathbf{s}}_{j}\) means that the similarity measure relies only on the angle between the two hash codes, and thus forces the hash codes to be set down on a hypersphere with radius \(\delta\). An additive angular margin penalty \(\alpha\) between \(\hat{\mathbf{s}}_{i}\) and \(\hat{\mathbf{s}}_{j}\) is introduced to enhance the intra-class compactness and the inter-class separation simultaneously. Here, we set \(\delta=2.5\) and \(\alpha=0.5\).
* **Total Loss** In a nutshell, the total loss function \(\mathcal{L}_{total}\) used to optimize the CSMoFN is given as: \[\min\mathcal{L}_{total}=\mathcal{L}_{ArcFace}+\mathcal{L}_{PA}+\alpha L_{2}\] (6) where \(L_{2}\) is a weight decay regularizer and \(\alpha\) is a coefficient that is beneficial to reduce overfitting. In this paper, we set \(\alpha=0.5\).