# Cloud Data Access Prevention Method in Face Recognition Technology Based on Computer Vision

Authors: Mingzhu Qian; Xiaobao Wang
Journal: Security and Communication Networks
 (2022)

---

## Abstract

With the development of cloud technology and the innovation of information network technology, people’s dependence on the network has gradually increased, and there are some loopholes in cloud data access. The traditional account permission model can no longer meet the conditions of cloud data access alone. If the visitor temporarily leaves the computer or goes out in an emergency, the data are likely to be leaked. Based on the importance and concern of this issue, some scholars have proposed an authentication system combined with biometric face recognition, but the traditional face recognition system has certain security risks. Such as using face pictures and videos to deceive the system, tampering with face templates, etc. Based on this, this paper proposes an encrypted face authentication system based on CNN neural network. Through the authentication of face data, the content transmission of each part is carried out in the form of ciphertext to ensure the security of information. The experimental results in this paper show that the authentication accuracy rate of DeepID is 94% when it is not encrypted, and the authentication accuracy rate decreases slightly after encryption, which is 93.3%. It is similar in other cases. When the network structure and data set remain unchanged, encryption reduces the authentication accuracy rate by 0.3%–2.4%. It can be seen that the scheme proposed in this chapter improves the system security at the cost of a smaller accuracy rate.


---

## Body

## 1. Introduction

As network technology continues to innovate, a series of useful technologies for networking are being developed, human reliance is gradually increasing, and the importance of network information security continues to rise. As industrialization increases, sensors are being used increasingly widely. Due to constant improvements in technology, face detection and recognition technology has become an integral part of everyday life. Not only does facial recognition make life easier and faster, face detection and recognition technology brings us a lot of technical pleasure. With a variety of actions like unlocking cell phones, facial recognition, and smart identification, high-tech technology protects properties and identity and plays an important role in the integration of technology and life. The sensor may be integrated with different kinds of technology to create smart sensors. Measuring vision has been developed as a new industrial inspection technology with an increasingly wide range of applications. How to improve the security of the face authentication system and improve the security of users’ properties and privacy is a problem that needs to be solved, and it is also a prerequisite for the further popularization and application of the face system, which is of great social significance. Therefore, the security of the face authentication system has received more and more attention from scholars.As science as well as technology continues to advance, person recognition and face inspection have been used in more as well as other fields, like various applications of face scanning and recognition. Face recognition in bank ATM monitoring systems, and so on. Unlocking the phone and Alipay’s face recognition technology all require face detection and recognition technology. Further exploration of information security technologies through facial recognition is necessary.Unlike traditional identification methods, such as passwords and ID cards, once leaked or lost, they can be reset or dealt with. Faces are unique to everyone and cannot be replaced. Once stolen or leaked, it is difficult to reissue face templates. To solve this problem, this paper proposes an encrypted face recognition system. Apart from the authentication server, the rest of the system does not need to know the secret key. In addition, by republishing the secret key, the revocability of the face recognition template is guaranteed, and cross-matching between different databases is avoided. We validate the proposed method on two different convolutional neural network architectures and two different public databases. Experimental results show that the proposed method significantly improves the security of face systems in both face recognition and authentication tasks in exchange for a slight loss of accuracy.


## 2. Related Work

With biometric identification with higher security and convenience as the research topic, Xue simulates the performance of face verification algorithms with local directional pattern algorithm (LDP) and principal composition animation (PCA) based information verification using MATLAB software and with the same number of training samples, the PCA-based face recognition algorithm has higher accuracy and less time consuming than the LDP-based algorithm. In summary, the PCA-based face recognition algorithm is more suitable for security information verification [1]. Ren et al. present a new framework for video face tracking based on convolutional neural network (CNN) and Kalman filtering algorithms. The CNN approach from course to fine has higher accuracy in complex scenes, such as face rotation, lighting changes, and occlusions [2]. Lu and Yan propose a novel algorithm based on computer vision from the perspective of both face inspection skill and face identification technical. The face recognition technique is improved in practical applications by Seetaface method and YouTu method. As the outcome shows, a comparison is made in each case. The strengths as well as the weaknesses of that particular method are effectively validated by the algorithm [3]. In today’s complex world of vision technology, Panner Selvam and Karuppiah proposed a facial image-based gender recognition system. The authors achieved 98%, 98.5%, as well as 96.5% accuracy in face detection using Gabor features on labeled faces in the wild (LFW), FERET, and Gallagher databases, respectively [4]. Ubiquitous surveillance has now received widespread attention. Li et al. propose a cloud-based surveillance system for ubiquitous face recognition. The proposed method combines improved multiscale Gabor and centrosymmetric partial duality mode (CS-LBP) features [5]. Boucenna et al. proposed a new approach to build security reverse indexes using two critical technologies, namely, the isomorphic cipher encryption and the pseudo-file technique. However, the virtual file technique for enhancing indexing security generates a large number of false positives in the search results [6]. Integrating the conflict of confidentiality within IoT of Things data complicates further the problem of data placing, where resource managers need to consider resource efficiency, power consumption of cloud data centers, and duration of data visits by IoT-enabled applications during distribution. To address this challenge, Xu et al. have designed a privacy-preserving approach to IoT data placement, called IDP [7]. The research results of the above scholars all have their own advantages, but there is no doubt that the exceptions all require a large number of data experiments, and the collection of data is not easy, especially in the feature selection and classification of recognition technology.


## 3. Computer Vision-Based Face Recognition Method

### 3.1. Computer Vision-Based Face Recognition System

The authentication process of the face recognition system usually includes four stages: the first stage is to obtain the face image through the camera device and connect it to the system [8]. The second stage is to extract the intrinsic feature data of the acquired face image [9]. The third stage is to match the similarity between the feature data waiting for authentication and the feature data in the data template library [10]. The fourth stage is the authentication output based on the result of similarity matching [11]. However, there are certain risks in the certification in these stages. The risk diagram of each stage is shown in Figure 1.Figure 1
Risk and vulnerability of face recognition authentication system.The risks in Figure1 contain: (1) rogue attackers exploiting the prosthesis of legitimate users to compromise the system; (2) replay Attacks; (3) tampering with feature extractors; (4) synthesizing feature vectors; (5) modifying similarity matching values; (6) Tampering with face template; (7) attacking the storage channel; and (8) attacking the decision strategy.


### 3.2. The Application of Neural Network in Face Recognition

#### 3.2.1. Neuron Model

The neural network is a parallel information processing model inspired by the biological nervous system [12], in which the structure of neurons is shown in Figure 2.Figure 2
Neuron structure.The relationship between input and output in this model can be expressed as(1)Hh=∑i=1nMihAi−βh,Bh=FHh.Among them, the input signal value is expressed asAii=1,2,…,x, βh is the threshold, Mih is the connection weight of cells i to h, F• is the excitation function, and Bh is the output of the neuron.To facilitate the calculation,−βh is also regarded as a weight for the input quantity A0 equal to 1. In this case, the formula can be expressed as(2)Hh=∑i=0nMihAi.Among them:(3)M0i=−βh,A0=1.


#### 3.2.2. Application of Neural Network

Since the neural network is a mathematical model of parallel information processing [13]. This parallel information processing mechanism makes the model have excellent fault tolerance performance and can effectively improve the recognition probability of the application system [14]. And the model also has the performance of hierarchical storage, which can make it have the characteristics of recovering extracted features [15], making it have excellent adaptability and robustness. Therefore, this model is often used in recognition systems [16].


### 3.3. Preprocessing of Face Images

#### 3.3.1. Acquisition of Face Images

To facilitate the processing of the acquired face images, the color images acquired by the camera equipment need to be grayscaled [17]. Grayscale is a process that equalizes the R (red), G (green), and B (blue) components of a color. Common grayscale processing methods:(1)
Maximum value: that is, the value of RGB is equal to the largest value among the three values. which is(4)R=G=B=maxRGB.(2)
Average: that is, the value of RGB is equal to the average of three values:(5)R=G=B=RGB3.(3)
Weighted average method: assign different weights according to the indicators and make the weighted average of RGB values, namely:(6)R=G=B=MRR+MGG+MBB3.Among them,MG,MG,MB represent the weights of RGB, respectively. It is proved by experimental derivation that when MR=0.3,MG=0.6,MB=0.11:(7)Fgray=0.3R+06G+0.11B,R+G+B=Fgray.When the above conditions are met, the most reasonable grayscale image can be obtained.


#### 3.3.2. Smoothing and Noise Removal of Face Images

(1)
Smoothing denoising method [18]: assuming that pi,j is the original image, its coordinates are i,j and Ai,j is noise, and the following operations are performed within the range of eight connections:(8)Fi,j=19∑i=−11∑j=−11pi−m,j−n−Ai−m,j−n.Assuming that the mean square error of the original noise isα2, the processed noise is(9)D19∑i=0x∑j=0yAi,j2=19α2.(2)
Median filtering to remove noise [19]: in the one-dimensional case, the median filter is a sliding window with an odd number of units. By sorting the signals in the window, the median value is selected as the output, namely:(10)Gi=Medfi=v,…,fi,…,fi+v.It is easy to introduce the two-dimensional case through the above formula, assuming a 3 × 3 window, sort the gray values of its 9 pixels, and output the intermediate value, namely:(11)Gi,j=MedFM−x,N−y,−1≤x≤1,−1≤y≤1.This method is more efficient, easier to implement, and, more importantly, does not blur the edges. Other principles, such as selective mask smoothing methods, are basically similar to this.(3)
Multiple image averaging denoising, this method exploits the statistical properties of noise interference [20]. If an image contains noise, it is reasonable to think that the noise has nothing to do with coordinates, and its mathematical expectation is O. Based on this feature, better results can also be obtained using the average of multiple image overlays.(4)
Removing noise with the best filter, this method is generally used for image inpainting, but in some cases, it is also used to remove noise [21].


## 3.1. Computer Vision-Based Face Recognition System

The authentication process of the face recognition system usually includes four stages: the first stage is to obtain the face image through the camera device and connect it to the system [8]. The second stage is to extract the intrinsic feature data of the acquired face image [9]. The third stage is to match the similarity between the feature data waiting for authentication and the feature data in the data template library [10]. The fourth stage is the authentication output based on the result of similarity matching [11]. However, there are certain risks in the certification in these stages. The risk diagram of each stage is shown in Figure 1.Figure 1
Risk and vulnerability of face recognition authentication system.The risks in Figure1 contain: (1) rogue attackers exploiting the prosthesis of legitimate users to compromise the system; (2) replay Attacks; (3) tampering with feature extractors; (4) synthesizing feature vectors; (5) modifying similarity matching values; (6) Tampering with face template; (7) attacking the storage channel; and (8) attacking the decision strategy.


## 3.2. The Application of Neural Network in Face Recognition

### 3.2.1. Neuron Model

The neural network is a parallel information processing model inspired by the biological nervous system [12], in which the structure of neurons is shown in Figure 2.Figure 2
Neuron structure.The relationship between input and output in this model can be expressed as(1)Hh=∑i=1nMihAi−βh,Bh=FHh.Among them, the input signal value is expressed asAii=1,2,…,x, βh is the threshold, Mih is the connection weight of cells i to h, F• is the excitation function, and Bh is the output of the neuron.To facilitate the calculation,−βh is also regarded as a weight for the input quantity A0 equal to 1. In this case, the formula can be expressed as(2)Hh=∑i=0nMihAi.Among them:(3)M0i=−βh,A0=1.


### 3.2.2. Application of Neural Network

Since the neural network is a mathematical model of parallel information processing [13]. This parallel information processing mechanism makes the model have excellent fault tolerance performance and can effectively improve the recognition probability of the application system [14]. And the model also has the performance of hierarchical storage, which can make it have the characteristics of recovering extracted features [15], making it have excellent adaptability and robustness. Therefore, this model is often used in recognition systems [16].


## 3.2.1. Neuron Model

The neural network is a parallel information processing model inspired by the biological nervous system [12], in which the structure of neurons is shown in Figure 2.Figure 2
Neuron structure.The relationship between input and output in this model can be expressed as(1)Hh=∑i=1nMihAi−βh,Bh=FHh.Among them, the input signal value is expressed asAii=1,2,…,x, βh is the threshold, Mih is the connection weight of cells i to h, F• is the excitation function, and Bh is the output of the neuron.To facilitate the calculation,−βh is also regarded as a weight for the input quantity A0 equal to 1. In this case, the formula can be expressed as(2)Hh=∑i=0nMihAi.Among them:(3)M0i=−βh,A0=1.


## 3.2.2. Application of Neural Network

Since the neural network is a mathematical model of parallel information processing [13]. This parallel information processing mechanism makes the model have excellent fault tolerance performance and can effectively improve the recognition probability of the application system [14]. And the model also has the performance of hierarchical storage, which can make it have the characteristics of recovering extracted features [15], making it have excellent adaptability and robustness. Therefore, this model is often used in recognition systems [16].


## 3.3. Preprocessing of Face Images

### 3.3.1. Acquisition of Face Images

To facilitate the processing of the acquired face images, the color images acquired by the camera equipment need to be grayscaled [17]. Grayscale is a process that equalizes the R (red), G (green), and B (blue) components of a color. Common grayscale processing methods:(1)
Maximum value: that is, the value of RGB is equal to the largest value among the three values. which is(4)R=G=B=maxRGB.(2)
Average: that is, the value of RGB is equal to the average of three values:(5)R=G=B=RGB3.(3)
Weighted average method: assign different weights according to the indicators and make the weighted average of RGB values, namely:(6)R=G=B=MRR+MGG+MBB3.Among them,MG,MG,MB represent the weights of RGB, respectively. It is proved by experimental derivation that when MR=0.3,MG=0.6,MB=0.11:(7)Fgray=0.3R+06G+0.11B,R+G+B=Fgray.When the above conditions are met, the most reasonable grayscale image can be obtained.


### 3.3.2. Smoothing and Noise Removal of Face Images

(1)
Smoothing denoising method [18]: assuming that pi,j is the original image, its coordinates are i,j and Ai,j is noise, and the following operations are performed within the range of eight connections:(8)Fi,j=19∑i=−11∑j=−11pi−m,j−n−Ai−m,j−n.Assuming that the mean square error of the original noise isα2, the processed noise is(9)D19∑i=0x∑j=0yAi,j2=19α2.(2)
Median filtering to remove noise [19]: in the one-dimensional case, the median filter is a sliding window with an odd number of units. By sorting the signals in the window, the median value is selected as the output, namely:(10)Gi=Medfi=v,…,fi,…,fi+v.It is easy to introduce the two-dimensional case through the above formula, assuming a 3 × 3 window, sort the gray values of its 9 pixels, and output the intermediate value, namely:(11)Gi,j=MedFM−x,N−y,−1≤x≤1,−1≤y≤1.This method is more efficient, easier to implement, and, more importantly, does not blur the edges. Other principles, such as selective mask smoothing methods, are basically similar to this.(3)
Multiple image averaging denoising, this method exploits the statistical properties of noise interference [20]. If an image contains noise, it is reasonable to think that the noise has nothing to do with coordinates, and its mathematical expectation is O. Based on this feature, better results can also be obtained using the average of multiple image overlays.(4)
Removing noise with the best filter, this method is generally used for image inpainting, but in some cases, it is also used to remove noise [21].


## 3.3.1. Acquisition of Face Images

To facilitate the processing of the acquired face images, the color images acquired by the camera equipment need to be grayscaled [17]. Grayscale is a process that equalizes the R (red), G (green), and B (blue) components of a color. Common grayscale processing methods:(1)
Maximum value: that is, the value of RGB is equal to the largest value among the three values. which is(4)R=G=B=maxRGB.(2)
Average: that is, the value of RGB is equal to the average of three values:(5)R=G=B=RGB3.(3)
Weighted average method: assign different weights according to the indicators and make the weighted average of RGB values, namely:(6)R=G=B=MRR+MGG+MBB3.Among them,MG,MG,MB represent the weights of RGB, respectively. It is proved by experimental derivation that when MR=0.3,MG=0.6,MB=0.11:(7)Fgray=0.3R+06G+0.11B,R+G+B=Fgray.When the above conditions are met, the most reasonable grayscale image can be obtained.


## 3.3.2. Smoothing and Noise Removal of Face Images

(1)
Smoothing denoising method [18]: assuming that pi,j is the original image, its coordinates are i,j and Ai,j is noise, and the following operations are performed within the range of eight connections:(8)Fi,j=19∑i=−11∑j=−11pi−m,j−n−Ai−m,j−n.Assuming that the mean square error of the original noise isα2, the processed noise is(9)D19∑i=0x∑j=0yAi,j2=19α2.(2)
Median filtering to remove noise [19]: in the one-dimensional case, the median filter is a sliding window with an odd number of units. By sorting the signals in the window, the median value is selected as the output, namely:(10)Gi=Medfi=v,…,fi,…,fi+v.It is easy to introduce the two-dimensional case through the above formula, assuming a 3 × 3 window, sort the gray values of its 9 pixels, and output the intermediate value, namely:(11)Gi,j=MedFM−x,N−y,−1≤x≤1,−1≤y≤1.This method is more efficient, easier to implement, and, more importantly, does not blur the edges. Other principles, such as selective mask smoothing methods, are basically similar to this.(3)
Multiple image averaging denoising, this method exploits the statistical properties of noise interference [20]. If an image contains noise, it is reasonable to think that the noise has nothing to do with coordinates, and its mathematical expectation is O. Based on this feature, better results can also be obtained using the average of multiple image overlays.(4)
Removing noise with the best filter, this method is generally used for image inpainting, but in some cases, it is also used to remove noise [21].


## 4. Experiment of Face Detection Algorithm Based on Multiregion Convolutional Neural Network

### 4.1. Multiregion Convolutional Neural Network (MRCNN)

In this paper, we propose MRCNN for classification tasks based on local region consistency in face liveness detection. The structure of MRCNN is shown in Figure3. It removes the fully connected layers of CNN and only uses convolutional layers to obtain the final feature map. By setting the number of convolution kernels in the last convolutional layer to 2, MRCNN finally outputs a feature map of size 2 × n × n, as shown in Figure 3. Two represents the number of categories in the liveness detection task, while n × n corresponds to the number of subregions in the input image. Each value in the feature map here is also called a probability map because it classifies the probability value.Figure 3
MRCNN-based face live detection framework.Training a neural network model requires a reasonable loss function as a penalty [22]. In the MRCNN classification model, we design and train a local classification loss function, as shown in the red section in Figure 3. First, we use 0 and 1 to represent the two categories of live face detection: real faces and fake faces. MRCNN converts the class labels into an n × n matrix of all 0s or all 1s, outputs a 2 × n × n probability map, and computes the classification loss by classifying each nxn dimension separately. Since the output perceptual field in each dimension is a subregion of the original image, this classification loss is a local classification loss [23]. In backpropagation, the loss for each local classification is summed up and the sum is used as the total backpropagation loss as shown below.(12)C=∑m=1x∑n=1xCmn=−∑m=1x∑n=1x∑j=01qjlogpj.Among them,n represents the size of the output probability map, j is the prior probability of the correct category, which can be expressed as qj∈0,1, pj represents the predicted probability of j for the correct category, and the value range is (0, 1).In the final classification process, as shown in the green section in Figure3, the sum of each n × n probability map is calculated to obtain a 1 × 2 probability vector, and the predicted category is obtained according to the size of the predicted probability. As shown in Figure 4, there is overlap between each perceptual domain.Figure 4
The visual field perception map of the MRCNN network.


### 4.2. Neural Network-Based Detection Settings

In the experiments, we use two publicly available databases: Print Attack and Replay Attack [24] and design three networks to compare the results. The first network is a commonly used CNN classification network. The network structure and parameters are shown in Table 1. The input image is enlarged to 28 × 28 size.Table 1
CNN-based face detection classifier structure.
Types ofFilter size/stepOutputParameterEnter—28 × 28 × 3—Conv13 × 3 × 3/126 × 26 × 20540Pool12 × 2/212 × 12 × 20—Conv24 × 4 × 20/110 × 10 × 309.6Conv34 × 4 × 30/17 × 7 × 4019.2Conv43 × 3 × 40/15 × 5 × 5519.8Pool22 × 2/22 × 2 × 55—Full link layer—2400Softmax—2—The second network is the MRCNN classifier proposed in this section, as shown in Table2. Under reasonable settings, the number of parameters is as close as possible to the CNN network, as shown in Table 1.Table 2
Structure of MRCNN-based face detection classifier.
Types ofFilter size/stepOutputParameterEnter—28 × 28 × 3—Conv13 × 3 × 3/126 × 26 × 20540Conv24 × 4 × 20/123 × 23 × 309.6Conv34 × 4 × 30/120 × 20 × 4019.2Conv43 × 3 × 40/118 × 18 × 5018Pool12 × 2/29 × 9 × 50—Conv53 × 3 × 50/17 × 7 × 2900Pool12 × 2/23 × 3 × 2—For comparison, we train a third type of network, a CNN network with masking learning. The most straightforward approach is to train the network by masking part of the training images for data expansion to weaken the weights of certain subregions [25]. It turns out that facial features extracted by deep learning models are robust to occlusion [26], and the occlusion of 10% of the input image area has little impact on the performance of face recognition. The configuration of the network is the same as shown in Table 1.Therefore, for each database, we finally train three networks: CNN, CNN with masked learning, and MRCNN proposed in this paper and compare the structures of the three networks, as shown in Figure5. Next, we analyzed the network output corresponding to the size of the perceptual field. For a normal CNN classifier, with or without masking learning, the output perceptual field of the entire input image is 28 × 28, while the perceptual field of each output of MRCNN is 18 × 18. The smaller perceptual field distributes the gradient distribution, preventing the classification results from being determined by a particular subregion.Figure 5
Comparison of network structures.


### 4.3. Gradient Comparison

Figure6 shows the gradient distributions for different network structures. Figure 6(a) is the original input face image, and Figures 6(b)–6(d) are the gradient distributions of CNN, CNN with occlusion learning, and MRCNN network. It can be seen that CNN tends to focus on certain local areas, and this problem can be alleviated to a certain extent through occlusion learning, but the effect is limited and there is still room for improvement. Finally, the gradient distribution of MRCNN has the largest spread, and the gradient amplitude in the central region is larger than that in the edge region, which is due to the partial overlap of the receptive fields of MRCNN in the central region.Figure 6
Gradient distributions for different network structures (a) Input image, (b) CNN, (c) CNN with occulsion training added, (d) MRCNN.
(a)(b)(c)(d)Next, we express the distribution of gradients in two ways. First, as shown in Table3, the gradient matrix is divided into 4 × 4 subregions, the average gradient of each subregion is calculated, and the maximum distribution of the top 25% gradient values in each subregion is counted. The gradients of MRCNN are more dispersed than those of the other two CNNs, both in the distribution of the mean value and the distribution of the maximum value. It can be seen that the gradients of MRCNN are more distributed than those of the other two CNNs.Table 3
Gradient distribution comparison.
Average gradient of each subregion (%)Distribution of the top 25% maximumCNN0.353.8611.200.70.2427.60.95.748.42100.010.160.41.811.75.713.600.040110.373.61.93.90000Add occlusion trained CNN0.375.45.52.6021.50.61.310.520.3417.802.432.655.51.076.316.510.7002.742.70.050.50.70.540000MRCNN1.55.25.81.120.842.90.54.816.415.535.114.815.32.13.915.11444.114.119.510.41.53.93.11.10.4523.91.2


### 4.4. Comparative Experiment of Face Detection

The results of face detection are shown in Table4. The detection performance of face liveness detection against traditional attack methods is measured by the half error rate (HTER), which is the average of the false rejection rate and false acceptance rate, which is not affected by sample imbalance. As can be seen from Table 4, for traditional attack types, the single-frame HTER of the common CNN face liveness detection classifier is 1.4%. The HTER of the MRCNN classifier is 0.7%, which is a significant improvement in performance compared to the CNN classifier. This means that the MRCNN face liveness detection classifier can effectively detect the traditional artifact attack, but the CNN classifier cannot.Table 4
Experimental results of different networks in Print Attack library.
CNNAdd occlusion trained CNNMRCNNDetection of traditional attack methodsHTER (%)1.41.450.7Attack difficulty of adversarial samplesThe mean minimum perturbation magnitude of the DeepFool method0.0760.080.247The mean minimum disturbance amplitude of the ma method0.1170.1160.226Figure7(a) shows the DeepFool method, and Figure 7(b) shows the adversarial samples produced by the method based on the minimum perturbation dimension proposed in this paper. The ordinate represents the maximum perturbation size, and the abscissa represents the live face detection accuracy when the maximum perturbation size is limited. As can be seen from Figure 7, when there is no hostile sample attack, the performance of each classifier is not significantly different, but when we increase the maximum perturbation amplitude limit of the hostile sample, the performance of the CNN classifier drops sharply. In other words, the MRCNN face liveness detection classifier is more robust than CNN in the presence of hostile sample attacks.Figure 7
Face detection performance analysis of Print Attack library. (a) DeepFool method. (b) Methods Based on Minimum Perturbation Dimension.
(a)(b)To further verify the effectiveness of MRCNN, we conduct similar experiments on the Replay Attack data set, and the experimental results are shown in Table5.Table 5
Experimental results of the Replay Attack library.
CNNAdd occlusion trained CNNMRCNNDetection of traditional attack methodsHTER (%)8.7511.96.4Attack difficulty of adversarial samplesThe mean minimum perturbation magnitude of the DeepFool method0.0750.150.14The mean minimum disturbance amplitude of the Ma method0.0880.1140.182The number of parameters per network is the same as in the experiments of the Print Attack library. It can be seen from Table5 that both CNN and MRCNN classifiers trained with occlusion can improve the average minimum perturbation amplitude of adversarial samples to a certain extent, that is, the adversarial robustness of the classifier. However, CNNs trained on occlusion need to increase HTER at an undesired cost, it is observed that the MRCNN classifier can instead reduce the HTER of live person face inspection.Figure8 shows the live face detection accuracy of each classifier in the presence of hostile sample attacks. It can be seen that the MRCNN live face detection classifier based on the local loss function is more robust than CNN and can better defend against various dummy attack methods, which is consistent with the attack library of the Attack library.Figure 8
Face detection performance analysis of Replay Attack library. (a) Deep fool method. (b) Methods based on minimum perturbation dimension.
(a)(b)


## 4.1. Multiregion Convolutional Neural Network (MRCNN)

In this paper, we propose MRCNN for classification tasks based on local region consistency in face liveness detection. The structure of MRCNN is shown in Figure3. It removes the fully connected layers of CNN and only uses convolutional layers to obtain the final feature map. By setting the number of convolution kernels in the last convolutional layer to 2, MRCNN finally outputs a feature map of size 2 × n × n, as shown in Figure 3. Two represents the number of categories in the liveness detection task, while n × n corresponds to the number of subregions in the input image. Each value in the feature map here is also called a probability map because it classifies the probability value.Figure 3
MRCNN-based face live detection framework.Training a neural network model requires a reasonable loss function as a penalty [22]. In the MRCNN classification model, we design and train a local classification loss function, as shown in the red section in Figure 3. First, we use 0 and 1 to represent the two categories of live face detection: real faces and fake faces. MRCNN converts the class labels into an n × n matrix of all 0s or all 1s, outputs a 2 × n × n probability map, and computes the classification loss by classifying each nxn dimension separately. Since the output perceptual field in each dimension is a subregion of the original image, this classification loss is a local classification loss [23]. In backpropagation, the loss for each local classification is summed up and the sum is used as the total backpropagation loss as shown below.(12)C=∑m=1x∑n=1xCmn=−∑m=1x∑n=1x∑j=01qjlogpj.Among them,n represents the size of the output probability map, j is the prior probability of the correct category, which can be expressed as qj∈0,1, pj represents the predicted probability of j for the correct category, and the value range is (0, 1).In the final classification process, as shown in the green section in Figure3, the sum of each n × n probability map is calculated to obtain a 1 × 2 probability vector, and the predicted category is obtained according to the size of the predicted probability. As shown in Figure 4, there is overlap between each perceptual domain.Figure 4
The visual field perception map of the MRCNN network.


## 4.2. Neural Network-Based Detection Settings

In the experiments, we use two publicly available databases: Print Attack and Replay Attack [24] and design three networks to compare the results. The first network is a commonly used CNN classification network. The network structure and parameters are shown in Table 1. The input image is enlarged to 28 × 28 size.Table 1
CNN-based face detection classifier structure.
Types ofFilter size/stepOutputParameterEnter—28 × 28 × 3—Conv13 × 3 × 3/126 × 26 × 20540Pool12 × 2/212 × 12 × 20—Conv24 × 4 × 20/110 × 10 × 309.6Conv34 × 4 × 30/17 × 7 × 4019.2Conv43 × 3 × 40/15 × 5 × 5519.8Pool22 × 2/22 × 2 × 55—Full link layer—2400Softmax—2—The second network is the MRCNN classifier proposed in this section, as shown in Table2. Under reasonable settings, the number of parameters is as close as possible to the CNN network, as shown in Table 1.Table 2
Structure of MRCNN-based face detection classifier.
Types ofFilter size/stepOutputParameterEnter—28 × 28 × 3—Conv13 × 3 × 3/126 × 26 × 20540Conv24 × 4 × 20/123 × 23 × 309.6Conv34 × 4 × 30/120 × 20 × 4019.2Conv43 × 3 × 40/118 × 18 × 5018Pool12 × 2/29 × 9 × 50—Conv53 × 3 × 50/17 × 7 × 2900Pool12 × 2/23 × 3 × 2—For comparison, we train a third type of network, a CNN network with masking learning. The most straightforward approach is to train the network by masking part of the training images for data expansion to weaken the weights of certain subregions [25]. It turns out that facial features extracted by deep learning models are robust to occlusion [26], and the occlusion of 10% of the input image area has little impact on the performance of face recognition. The configuration of the network is the same as shown in Table 1.Therefore, for each database, we finally train three networks: CNN, CNN with masked learning, and MRCNN proposed in this paper and compare the structures of the three networks, as shown in Figure5. Next, we analyzed the network output corresponding to the size of the perceptual field. For a normal CNN classifier, with or without masking learning, the output perceptual field of the entire input image is 28 × 28, while the perceptual field of each output of MRCNN is 18 × 18. The smaller perceptual field distributes the gradient distribution, preventing the classification results from being determined by a particular subregion.Figure 5
Comparison of network structures.


## 4.3. Gradient Comparison

Figure6 shows the gradient distributions for different network structures. Figure 6(a) is the original input face image, and Figures 6(b)–6(d) are the gradient distributions of CNN, CNN with occlusion learning, and MRCNN network. It can be seen that CNN tends to focus on certain local areas, and this problem can be alleviated to a certain extent through occlusion learning, but the effect is limited and there is still room for improvement. Finally, the gradient distribution of MRCNN has the largest spread, and the gradient amplitude in the central region is larger than that in the edge region, which is due to the partial overlap of the receptive fields of MRCNN in the central region.Figure 6
Gradient distributions for different network structures (a) Input image, (b) CNN, (c) CNN with occulsion training added, (d) MRCNN.
(a)(b)(c)(d)Next, we express the distribution of gradients in two ways. First, as shown in Table3, the gradient matrix is divided into 4 × 4 subregions, the average gradient of each subregion is calculated, and the maximum distribution of the top 25% gradient values in each subregion is counted. The gradients of MRCNN are more dispersed than those of the other two CNNs, both in the distribution of the mean value and the distribution of the maximum value. It can be seen that the gradients of MRCNN are more distributed than those of the other two CNNs.Table 3
Gradient distribution comparison.
Average gradient of each subregion (%)Distribution of the top 25% maximumCNN0.353.8611.200.70.2427.60.95.748.42100.010.160.41.811.75.713.600.040110.373.61.93.90000Add occlusion trained CNN0.375.45.52.6021.50.61.310.520.3417.802.432.655.51.076.316.510.7002.742.70.050.50.70.540000MRCNN1.55.25.81.120.842.90.54.816.415.535.114.815.32.13.915.11444.114.119.510.41.53.93.11.10.4523.91.2


## 4.4. Comparative Experiment of Face Detection

The results of face detection are shown in Table4. The detection performance of face liveness detection against traditional attack methods is measured by the half error rate (HTER), which is the average of the false rejection rate and false acceptance rate, which is not affected by sample imbalance. As can be seen from Table 4, for traditional attack types, the single-frame HTER of the common CNN face liveness detection classifier is 1.4%. The HTER of the MRCNN classifier is 0.7%, which is a significant improvement in performance compared to the CNN classifier. This means that the MRCNN face liveness detection classifier can effectively detect the traditional artifact attack, but the CNN classifier cannot.Table 4
Experimental results of different networks in Print Attack library.
CNNAdd occlusion trained CNNMRCNNDetection of traditional attack methodsHTER (%)1.41.450.7Attack difficulty of adversarial samplesThe mean minimum perturbation magnitude of the DeepFool method0.0760.080.247The mean minimum disturbance amplitude of the ma method0.1170.1160.226Figure7(a) shows the DeepFool method, and Figure 7(b) shows the adversarial samples produced by the method based on the minimum perturbation dimension proposed in this paper. The ordinate represents the maximum perturbation size, and the abscissa represents the live face detection accuracy when the maximum perturbation size is limited. As can be seen from Figure 7, when there is no hostile sample attack, the performance of each classifier is not significantly different, but when we increase the maximum perturbation amplitude limit of the hostile sample, the performance of the CNN classifier drops sharply. In other words, the MRCNN face liveness detection classifier is more robust than CNN in the presence of hostile sample attacks.Figure 7
Face detection performance analysis of Print Attack library. (a) DeepFool method. (b) Methods Based on Minimum Perturbation Dimension.
(a)(b)To further verify the effectiveness of MRCNN, we conduct similar experiments on the Replay Attack data set, and the experimental results are shown in Table5.Table 5
Experimental results of the Replay Attack library.
CNNAdd occlusion trained CNNMRCNNDetection of traditional attack methodsHTER (%)8.7511.96.4Attack difficulty of adversarial samplesThe mean minimum perturbation magnitude of the DeepFool method0.0750.150.14The mean minimum disturbance amplitude of the Ma method0.0880.1140.182The number of parameters per network is the same as in the experiments of the Print Attack library. It can be seen from Table5 that both CNN and MRCNN classifiers trained with occlusion can improve the average minimum perturbation amplitude of adversarial samples to a certain extent, that is, the adversarial robustness of the classifier. However, CNNs trained on occlusion need to increase HTER at an undesired cost, it is observed that the MRCNN classifier can instead reduce the HTER of live person face inspection.Figure8 shows the live face detection accuracy of each classifier in the presence of hostile sample attacks. It can be seen that the MRCNN live face detection classifier based on the local loss function is more robust than CNN and can better defend against various dummy attack methods, which is consistent with the attack library of the Attack library.Figure 8
Face detection performance analysis of Replay Attack library. (a) Deep fool method. (b) Methods based on minimum perturbation dimension.
(a)(b)


## 5. Secure Face Authentication Based on Homomorphic Encryption and Deep Neural Network

### 5.1. Secure Identity Authentication System

In this chapter, we propose a novel face recognition scheme to ensure the diversity, revocability, and security of facial features. In this scheme, facial features are extracted using CNN and binarized as face representations. It is then encrypted using the Paillier encryption algorithm and stored in the database. The system consists of three parts: client, data server, and authentication server, as shown in Figure9.Figure 9
Framework of secure face authentication system.


### 5.2. System Design

#### 5.2.1. Facial Feature Representation

In the early researches, most of the face recognition algorithms used fixed handwriting extraction features, such as LBP, scale-invariant feature transformation, and Gabor features, and the face recognition performance using handwriting extraction features was limited. Recently, CNN-based facial features have been shown to be effective for face recognition. CNNs are able to extract more abstract and semantic features by stacking multiple layers of neurons that represent different information in the input image. If the number of neurons in the final hidden layer isn, then a facial feature can be represented as a 1 × n vector.The output of the fully connected layer is in the range [−∞, ∞] and then goes to the activation function layer. The most commonly used activation function in neural networks, RELU, is max(0,z), where all values less than 0 are set to 0, which means that facial features are vectors of values not less than 0. To remove the noise of subsequent encryption, the output facial features are binarized by setting the activation value of neurons above 0 to 1, as shown in Figure 10. Finally, the number of 0s and 1s in the face features is almost equal, so from the point of view of information theory, the amount of information contained in the face features is the largest.Figure 10
Schematic representation of facial features.


#### 5.2.2. Paillier Encryption Algorithm

When the Paillier encryption algorithm belongs to an additive homomorphism, the value ofFa1+Fa2 can be directly calculated when Fa1 and Fa2 are known, and no private key is required. And Fa represents the result of encrypting A, that is, the ciphertext of A, which can be expressed as(13)BFa1,e1⋅Fa2,emodi2=a1+a2modi.Among them,Bx is the result of decrypting the ciphertext x and Fa,e is the result of encrypting with a random number e.When the Paillier encryption algorithm is multiplicatively homomorphic, the result of the homomorphic multiplication of the encrypted ciphertextFa1,e1 and any plaintext a2 is the result of multiplying the two plaintexts and then encrypting, which is specifically expressed as(14)BFa1,e1a2modi2=a1a2modi.


#### 5.2.3. Distance Calculation of Ciphertext

Assuming two binary numbersa1 and a2, whose XOR value is expressed as c, the calculation formula of c can be expressed as(15)c=a1−a22=a12−a22−2a1a2=a1+a2−2a1a2.Sincea1 and a2 have two possible values: 0 and 1, the square is equal to itself, so the above formula can be simplified to:(16)c=a1+a2−2a1a2.Then encrypt the right-hand side of the above formula. Through the addition of Paillier’s algorithm and the homomorphism of multiplication, we can get:(17)Fc=Fa1+a2F2a1a2modi2=Fa1Fa2Fa12a2modi2,Which is(18)BFa1Fa2Fa12a2modi2=c.The above analysis proves that, if known:(19)FFm1,Fm2,….,Fmi,FFn1,Fn2,….,Fni,(20)M=m1,m2,…mi,N=n1,n2,…ni.Then the server can calculate the ciphertext of the Hamming distance betweenM and N without decrypting it.


### 5.3. Secure Authentication System

Figure11 shows the detailed process of authentication in the proposed method. The authentication system consists of three parts: a client, a data server, and an authentication server, which are separated by dotted lines in Figure 11. Here, the client holds the public key of the Paillier encryption algorithm used for encryption, while the authentication server holds the public and private keys.Figure 11
Schematic diagram of the authentication process.


### 5.4. Experimental Setup

#### 5.4.1. Network Structure

In the proposed method, CNN is used to extract features from face images. In the experiments, we used two CNN network structures in total, DeepID and Light CNN-9. Using DeepID to extract facial features for authentication, we were able to achieve an accuracy of 97.45% in LFW, approaching the 97.52% accuracy of the human eye for the first time, proving the effectiveness of DeepID in face recognition. The network structure is shown in Figure12.Figure 12
Schematic diagram of CNN network structure.By using the maximum feature map (MFM) instead of the traditional activation function as the traditional activation function, ReLU achieves better feature maps by removing noise and preserving useful signals. A schematic diagram of the MFM is shown in Figure13.Figure 13
Schematic diagram of MFM operation.


#### 5.4.2. Training Network

To increase the number of training samples and improve the robustness of the system, appropriate data augmentation was performed on the training data set. Data augmentation is to mimic the uncertainty that may arise in practical applications and improve the generalization ability of the model, as shown in Figure14. In the experiments, the images were flipped horizontally, and a random color filter was added, so that the training data set was 3 times larger than the original.Figure 14
Schematic diagram of the data augmentation method (a) Original image, (b) horizontal flip, and (c) color filter.
(a)(b)(c)


### 5.5. Result Analysis

#### 5.5.1. Accuracy of Certification

In the authentication phase, the facial features of the face images in the LFW data set are extracted using the trained CNN model and Paillier encryption. On this basis, the Hamming distance is calculated in the ciphertext domain, and face authentication is performed. For comparison, we also conduct authentication experiments on the Faces94 data set. Comparing the authentication results of encrypted and unencrypted two data sets in the network framework, we can see in Figure15 that without encryption, deepID has an authentication accuracy of 94% for LFW, after encryption, the authentication accuracy rate is slightly reduced to 93.3%. Likewise, in other cases, under the same network structure and data set, encryption reduces the authentication accuracy by 0.3% to 2.4%, which indicates that the method proposed in this chapter improves the security of the system at the cost of reducing the accuracy. On the other hand, light CNN9 generally improves the performance of authentication results than DeepID due to its deeper network layer and higher number of parameters.Figure 15
Comparison of authentication accuracy.
(a)(b)There are also some cases of authentication failure, mostly due to severe occlusion, exaggerated facial expressions, and extreme similarity of different people, which also reflects the difficulty and challenge of face recognition problem.


#### 5.5.2. Security Assessment

During the encryption process, only the plaintext and the key need to be kept secret. Therefore, we can assume that the attacker only knows the encryption algorithm and the ciphertext. Therefore, the security of the encryption algorithm depends on the secret key, rather than expecting the attacker to not know the encryption algorithm; Paillier’s algorithm can provide the security of a chosen plaintext attack, so the ciphertext in this paper is also CPA-secure. As far as the entire system is concerned, all information is transmitted in cipher text, so it cannot be stolen or tampered with by attackers during transmission. Since the client does not know the value of the Hamming distance, he only knows the result of the verification and cannot use the method of changing the input image to perform brute force attacks. Since the features on both the data server and the authentication server are stored in ciphertext, the plaintext features are protected, and attackers cannot use facial features to obtain pixel-level information on the user’s face.


## 5.1. Secure Identity Authentication System

In this chapter, we propose a novel face recognition scheme to ensure the diversity, revocability, and security of facial features. In this scheme, facial features are extracted using CNN and binarized as face representations. It is then encrypted using the Paillier encryption algorithm and stored in the database. The system consists of three parts: client, data server, and authentication server, as shown in Figure9.Figure 9
Framework of secure face authentication system.


## 5.2. System Design

### 5.2.1. Facial Feature Representation

In the early researches, most of the face recognition algorithms used fixed handwriting extraction features, such as LBP, scale-invariant feature transformation, and Gabor features, and the face recognition performance using handwriting extraction features was limited. Recently, CNN-based facial features have been shown to be effective for face recognition. CNNs are able to extract more abstract and semantic features by stacking multiple layers of neurons that represent different information in the input image. If the number of neurons in the final hidden layer isn, then a facial feature can be represented as a 1 × n vector.The output of the fully connected layer is in the range [−∞, ∞] and then goes to the activation function layer. The most commonly used activation function in neural networks, RELU, is max(0,z), where all values less than 0 are set to 0, which means that facial features are vectors of values not less than 0. To remove the noise of subsequent encryption, the output facial features are binarized by setting the activation value of neurons above 0 to 1, as shown in Figure 10. Finally, the number of 0s and 1s in the face features is almost equal, so from the point of view of information theory, the amount of information contained in the face features is the largest.Figure 10
Schematic representation of facial features.


### 5.2.2. Paillier Encryption Algorithm

When the Paillier encryption algorithm belongs to an additive homomorphism, the value ofFa1+Fa2 can be directly calculated when Fa1 and Fa2 are known, and no private key is required. And Fa represents the result of encrypting A, that is, the ciphertext of A, which can be expressed as(13)BFa1,e1⋅Fa2,emodi2=a1+a2modi.Among them,Bx is the result of decrypting the ciphertext x and Fa,e is the result of encrypting with a random number e.When the Paillier encryption algorithm is multiplicatively homomorphic, the result of the homomorphic multiplication of the encrypted ciphertextFa1,e1 and any plaintext a2 is the result of multiplying the two plaintexts and then encrypting, which is specifically expressed as(14)BFa1,e1a2modi2=a1a2modi.


### 5.2.3. Distance Calculation of Ciphertext

Assuming two binary numbersa1 and a2, whose XOR value is expressed as c, the calculation formula of c can be expressed as(15)c=a1−a22=a12−a22−2a1a2=a1+a2−2a1a2.Sincea1 and a2 have two possible values: 0 and 1, the square is equal to itself, so the above formula can be simplified to:(16)c=a1+a2−2a1a2.Then encrypt the right-hand side of the above formula. Through the addition of Paillier’s algorithm and the homomorphism of multiplication, we can get:(17)Fc=Fa1+a2F2a1a2modi2=Fa1Fa2Fa12a2modi2,Which is(18)BFa1Fa2Fa12a2modi2=c.The above analysis proves that, if known:(19)FFm1,Fm2,….,Fmi,FFn1,Fn2,….,Fni,(20)M=m1,m2,…mi,N=n1,n2,…ni.Then the server can calculate the ciphertext of the Hamming distance betweenM and N without decrypting it.


## 5.2.1. Facial Feature Representation

In the early researches, most of the face recognition algorithms used fixed handwriting extraction features, such as LBP, scale-invariant feature transformation, and Gabor features, and the face recognition performance using handwriting extraction features was limited. Recently, CNN-based facial features have been shown to be effective for face recognition. CNNs are able to extract more abstract and semantic features by stacking multiple layers of neurons that represent different information in the input image. If the number of neurons in the final hidden layer isn, then a facial feature can be represented as a 1 × n vector.The output of the fully connected layer is in the range [−∞, ∞] and then goes to the activation function layer. The most commonly used activation function in neural networks, RELU, is max(0,z), where all values less than 0 are set to 0, which means that facial features are vectors of values not less than 0. To remove the noise of subsequent encryption, the output facial features are binarized by setting the activation value of neurons above 0 to 1, as shown in Figure 10. Finally, the number of 0s and 1s in the face features is almost equal, so from the point of view of information theory, the amount of information contained in the face features is the largest.Figure 10
Schematic representation of facial features.


## 5.2.2. Paillier Encryption Algorithm

When the Paillier encryption algorithm belongs to an additive homomorphism, the value ofFa1+Fa2 can be directly calculated when Fa1 and Fa2 are known, and no private key is required. And Fa represents the result of encrypting A, that is, the ciphertext of A, which can be expressed as(13)BFa1,e1⋅Fa2,emodi2=a1+a2modi.Among them,Bx is the result of decrypting the ciphertext x and Fa,e is the result of encrypting with a random number e.When the Paillier encryption algorithm is multiplicatively homomorphic, the result of the homomorphic multiplication of the encrypted ciphertextFa1,e1 and any plaintext a2 is the result of multiplying the two plaintexts and then encrypting, which is specifically expressed as(14)BFa1,e1a2modi2=a1a2modi.


## 5.2.3. Distance Calculation of Ciphertext

Assuming two binary numbersa1 and a2, whose XOR value is expressed as c, the calculation formula of c can be expressed as(15)c=a1−a22=a12−a22−2a1a2=a1+a2−2a1a2.Sincea1 and a2 have two possible values: 0 and 1, the square is equal to itself, so the above formula can be simplified to:(16)c=a1+a2−2a1a2.Then encrypt the right-hand side of the above formula. Through the addition of Paillier’s algorithm and the homomorphism of multiplication, we can get:(17)Fc=Fa1+a2F2a1a2modi2=Fa1Fa2Fa12a2modi2,Which is(18)BFa1Fa2Fa12a2modi2=c.The above analysis proves that, if known:(19)FFm1,Fm2,….,Fmi,FFn1,Fn2,….,Fni,(20)M=m1,m2,…mi,N=n1,n2,…ni.Then the server can calculate the ciphertext of the Hamming distance betweenM and N without decrypting it.


## 5.3. Secure Authentication System

Figure11 shows the detailed process of authentication in the proposed method. The authentication system consists of three parts: a client, a data server, and an authentication server, which are separated by dotted lines in Figure 11. Here, the client holds the public key of the Paillier encryption algorithm used for encryption, while the authentication server holds the public and private keys.Figure 11
Schematic diagram of the authentication process.


## 5.4. Experimental Setup

### 5.4.1. Network Structure

In the proposed method, CNN is used to extract features from face images. In the experiments, we used two CNN network structures in total, DeepID and Light CNN-9. Using DeepID to extract facial features for authentication, we were able to achieve an accuracy of 97.45% in LFW, approaching the 97.52% accuracy of the human eye for the first time, proving the effectiveness of DeepID in face recognition. The network structure is shown in Figure12.Figure 12
Schematic diagram of CNN network structure.By using the maximum feature map (MFM) instead of the traditional activation function as the traditional activation function, ReLU achieves better feature maps by removing noise and preserving useful signals. A schematic diagram of the MFM is shown in Figure13.Figure 13
Schematic diagram of MFM operation.


### 5.4.2. Training Network

To increase the number of training samples and improve the robustness of the system, appropriate data augmentation was performed on the training data set. Data augmentation is to mimic the uncertainty that may arise in practical applications and improve the generalization ability of the model, as shown in Figure14. In the experiments, the images were flipped horizontally, and a random color filter was added, so that the training data set was 3 times larger than the original.Figure 14
Schematic diagram of the data augmentation method (a) Original image, (b) horizontal flip, and (c) color filter.
(a)(b)(c)


## 5.4.1. Network Structure

In the proposed method, CNN is used to extract features from face images. In the experiments, we used two CNN network structures in total, DeepID and Light CNN-9. Using DeepID to extract facial features for authentication, we were able to achieve an accuracy of 97.45% in LFW, approaching the 97.52% accuracy of the human eye for the first time, proving the effectiveness of DeepID in face recognition. The network structure is shown in Figure12.Figure 12
Schematic diagram of CNN network structure.By using the maximum feature map (MFM) instead of the traditional activation function as the traditional activation function, ReLU achieves better feature maps by removing noise and preserving useful signals. A schematic diagram of the MFM is shown in Figure13.Figure 13
Schematic diagram of MFM operation.


## 5.4.2. Training Network

To increase the number of training samples and improve the robustness of the system, appropriate data augmentation was performed on the training data set. Data augmentation is to mimic the uncertainty that may arise in practical applications and improve the generalization ability of the model, as shown in Figure14. In the experiments, the images were flipped horizontally, and a random color filter was added, so that the training data set was 3 times larger than the original.Figure 14
Schematic diagram of the data augmentation method (a) Original image, (b) horizontal flip, and (c) color filter.
(a)(b)(c)


## 5.5. Result Analysis

### 5.5.1. Accuracy of Certification

In the authentication phase, the facial features of the face images in the LFW data set are extracted using the trained CNN model and Paillier encryption. On this basis, the Hamming distance is calculated in the ciphertext domain, and face authentication is performed. For comparison, we also conduct authentication experiments on the Faces94 data set. Comparing the authentication results of encrypted and unencrypted two data sets in the network framework, we can see in Figure15 that without encryption, deepID has an authentication accuracy of 94% for LFW, after encryption, the authentication accuracy rate is slightly reduced to 93.3%. Likewise, in other cases, under the same network structure and data set, encryption reduces the authentication accuracy by 0.3% to 2.4%, which indicates that the method proposed in this chapter improves the security of the system at the cost of reducing the accuracy. On the other hand, light CNN9 generally improves the performance of authentication results than DeepID due to its deeper network layer and higher number of parameters.Figure 15
Comparison of authentication accuracy.
(a)(b)There are also some cases of authentication failure, mostly due to severe occlusion, exaggerated facial expressions, and extreme similarity of different people, which also reflects the difficulty and challenge of face recognition problem.


### 5.5.2. Security Assessment

During the encryption process, only the plaintext and the key need to be kept secret. Therefore, we can assume that the attacker only knows the encryption algorithm and the ciphertext. Therefore, the security of the encryption algorithm depends on the secret key, rather than expecting the attacker to not know the encryption algorithm; Paillier’s algorithm can provide the security of a chosen plaintext attack, so the ciphertext in this paper is also CPA-secure. As far as the entire system is concerned, all information is transmitted in cipher text, so it cannot be stolen or tampered with by attackers during transmission. Since the client does not know the value of the Hamming distance, he only knows the result of the verification and cannot use the method of changing the input image to perform brute force attacks. Since the features on both the data server and the authentication server are stored in ciphertext, the plaintext features are protected, and attackers cannot use facial features to obtain pixel-level information on the user’s face.


## 5.5.1. Accuracy of Certification

In the authentication phase, the facial features of the face images in the LFW data set are extracted using the trained CNN model and Paillier encryption. On this basis, the Hamming distance is calculated in the ciphertext domain, and face authentication is performed. For comparison, we also conduct authentication experiments on the Faces94 data set. Comparing the authentication results of encrypted and unencrypted two data sets in the network framework, we can see in Figure15 that without encryption, deepID has an authentication accuracy of 94% for LFW, after encryption, the authentication accuracy rate is slightly reduced to 93.3%. Likewise, in other cases, under the same network structure and data set, encryption reduces the authentication accuracy by 0.3% to 2.4%, which indicates that the method proposed in this chapter improves the security of the system at the cost of reducing the accuracy. On the other hand, light CNN9 generally improves the performance of authentication results than DeepID due to its deeper network layer and higher number of parameters.Figure 15
Comparison of authentication accuracy.
(a)(b)There are also some cases of authentication failure, mostly due to severe occlusion, exaggerated facial expressions, and extreme similarity of different people, which also reflects the difficulty and challenge of face recognition problem.


## 5.5.2. Security Assessment

During the encryption process, only the plaintext and the key need to be kept secret. Therefore, we can assume that the attacker only knows the encryption algorithm and the ciphertext. Therefore, the security of the encryption algorithm depends on the secret key, rather than expecting the attacker to not know the encryption algorithm; Paillier’s algorithm can provide the security of a chosen plaintext attack, so the ciphertext in this paper is also CPA-secure. As far as the entire system is concerned, all information is transmitted in cipher text, so it cannot be stolen or tampered with by attackers during transmission. Since the client does not know the value of the Hamming distance, he only knows the result of the verification and cannot use the method of changing the input image to perform brute force attacks. Since the features on both the data server and the authentication server are stored in ciphertext, the plaintext features are protected, and attackers cannot use facial features to obtain pixel-level information on the user’s face.


## 6. Conclusions

Although the face has its own advantages, such as the combination of physical and digital identities, and the need to not carry it deliberately. Different from traditional authentication methods such as keys, passwords, and ID cards, there are inevitable problems that are different from traditional authentication methods. For example, once it is leaked, it cannot be copied. In addition, facial information is the user’s privacy, and the design of the system must prevent the user’s privacy from being stolen or misappropriated. In this chapter, we propose a secure face recognition scheme based on CNN feature representation to solve face template protection and transmission security issues in face recognition systems. In this scheme, the whole face recognition system is divided into three parts: client, authentication server, and data server. In this scheme, CNN is used as the feature extractor of the face image, and the Paillier encryption algorithm is used to encrypt the face features, which can be revoked by reissuing the key. This avoids the large cost of matching across different databases and retraining the network after face features are stolen. According to the isomorphism of the algorithm, the Hamming distance can be calculated directly in the ciphertext domain. Furthermore, all facial features are stored as ciphertext, and the client only knows the result of the authentication, that is, whether the authentication passes or not. All information is sent in cipher text, which guarantees the security of the transmitted information. Compared with related research, the proposed method achieves better authentication accuracy and efficiency and satisfies the real-time performance of the system under the premise of ensuring security.



---

*Source: 5803026-2022-06-02.xml*