# A Study of Gender Bias in Face Presentation Attack and Its Mitigation
## 3 Methodology
### Phase 1: Exploring Gender Bias in Different CNN- Based Face Presentation Attacks Detection Methods  
In this phase, two popular CNN architectures: ResNet50 and VGG16 were used to detect spoof faces in SiW's test samples. Each model was implemented on three different sizes of test dataset. The first subset includes 23 males and 10 females and the second one includes 10 males and 10 females with 3 live and 4 spoof videos for each, while the third dataset contains 23 male subjects with 3 live and 4 spoof videos and 10 females subjects with 6 and 8 live and spoof videos. The reason behind creating the second and third subsets is to have a balanced testing data in term of gender and explore the effect of size on testing results. 3.1 Exploring Gender Bias in Detecting Face Presentation Attacks Using ResNet50 Architecture and Transfer Learning  
The-state-of-art residual networks ResNet proposed in [25] are commonly used for face analysis tasks due to its outstanding performance and fast training time. ResNet consists of more conventional layers (18, 36, 50 up to 1202 layers) so it trains deeper than traditional CNN models. The ResNet50 with 50 conventional layers with transfer learning was chosen to conduct experiments of this phase. Transfer learning is known for improving model performance and reducing training time. ResNet50 was previously trained on the ImageNet dataset in [26] so this knowledge was used in this stage. **Model construction:** A sequential CNN model that has a pre-trained ResNet50 model as the backbone and an additional dense layer was built to complete this sub-phase. The weights of the fully connected top layers of ResNet50 were not included. The ResNet50 \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Metric’s Name** & **Overview** \\ \hline \multirow{2}{*}{1} & Attack Presentation Classification Error & Measures the rate of attacks accepted as Bona fide, \\  & Rate (APCER) & APCER is calculated for each type of PAI and then \\  &  Rate (APCER) & the type with the highest APCER will be \\  & & considered the overall APCER. \\ \hline \multirow{2}{*}{2} & Bona Fide Classification Error Rate (BPCER) & Measures the rate of Bona Fide rejected as attacks. \\ \cline{2-3}  & The Average Classification Error Rate (ACER): & Measures the overall performance of PAD. It is \\  & & equal to (APCER+ BPCER)/2 \\ \hline \multirow{2}{*}{4} & Confusion matrix & A table that describes the performance of a \\  & & classifier in terms of True Positive, True Negative, \\  & & False Positive, and False Negative. \\ \hline \multirow{2}{*}{5} & Area Under the ROC Curve (AUC) & Describes how a model is performing in \\  & & recognizing classes \\ \hline \multirow{2}{*}{6} & Equal Error Rate (EER) & The threshold value when FAR is equal to FRR \\ \hline \multirow{2}{*}{7} & HTER & The average of FAR and FRR \\ \cline{2-3}  & & \\ \cline{2-3}  & False Acceptance rate (FAR) & Percentage of unauthorized users accepted as \\ \cline{2-3}  & & authorized ones \\ \hline \multirow{2}{*}{9} & False Rejection Rate (FRR) & Percentage of authorized users rejected. \\ \cline{2-3}  & & \\ \hline \multirow{2}{*}{10} & Recall (Sensitivity) & Percentage of True positive predictions out of all \\  & & actual positives. \\ \hline \multirow{2}{*}{11} & Precision & Percentage of True positive predictions out of all \\  & & positives predictions. \\ \hline \multirow{2}{*}{12} & Testing Accuracy & Measures how the performance of the model in \\  & & predicting different classes correctly. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Evaluation metrics overview. model was used here as integrated feature extractor and weights initializer for the new model after removing top. Layers of the ResNet50 were frozen and weights were not updated when training the last layer of the new model on SiW. **Hyper-Parameters Setting:** Choosing the optimal hyper-parameters is an essential factor that affects training and predicting process. Table 2 shows the values of hyper-parameters used with training ResNet50 for categorical classification.