{'fraction_non_alphanumeric': 0.03483564893256523, 'fraction_numerical': 0.012605896306336834, 'mean_word_length': 4.726038028715561, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Securing the Classification of COVID-19 in Chest X-ray Images: A Privacy-Preserving Deep Learning Approach

Deep learning (DL) is being increasingly utilized in healthcare-related fields due to its outstanding efficiency. However, we have to keep the individual health data used by DL models private and secure. Protecting data and preserving the privacy of individuals has become an increasingly prevalent issue. The gap between the DL and privacy communities must be bridged. In this paper, we propose privacy-preserving deep learning (PPDL)-based approach to secure the classification of Chest X-ray images. This study aims to use Chest X-ray images to their fullest potential without compromising the privacy of the data that it contains. The proposed approach is based on two steps: encrypting the dataset using partially homomorphic encryption and training/testing the DL algorithm over the encrypted images. Experimental results on the COVID-19 Radiography database show that the MobileNetV2 model achieves an accuracy of 94.2% over the plain data and 93.3% over the encrypted data.


I. INTRODUCTION
The protection of human private data is a persistent challenge. This matter has always been taken seriously in computer science. However, due to the efficiency of deep learning (DL) algorithms, many have used them without any care for the protection of private data. All have been pleased by improving the accuracy of learning and delaying any privacy concerns.
A small interest in this topic has been raised after the deployment of remote DL models over the internet. In fact, a variety of cloud platforms were designed using DL models for both the training and inference phases. The service offered by these platforms was coined later as Deep Learning as a Service (DLaaS) [1]. Hence, private data are transferred over the internet and may also be stored on servers with high vulnerability for leakage. The leakage can be made in an intentional or unintentional way. It can be leaked intentionally through hacking, piracy, or social engineering. It can also be leaked unintentionally by the user himself or the service provider employees. Although being unexpected, the employees are behind 43% of the whole data leakage cases, as affirmed by Intel Security [2]. Around half of these cases were made unintentionally.
The first event that triggered global interest in this problem is the Facebook data privacy scandal [3]. People have discovered that Facebook has sold the personal data of 80 million users to the British firm Cambridge Analytica to train DL algorithms to make political advertising [4]. People have sensed that their private data are threatened and should be protected. DL algorithms should be accompanied during the training and inference by privacy-preserving techniques that prevent any identification of personal data.
The proposed work in this paper focuses on this topic. We designed a data privacy technique to keep private data protected during DL training and inference. The data preserving technique presented in this paper is designed for preserving Chest X-Ray images used to distinguish COVID-19 cases from normal, lung opacity, and pneumonia cases. The DL model does not have access to any identifiable information. It takes only as input encrypted images. The encryption of the Chest X-Ray is done from the user side before feeding them to the DL model. This encryption is homomorphic, which means that the final classification result does not need any decryption of the image. The DL model will only work with these encrypted data without requiring any personally identifiable information. We think this feature is essential, especially in the current COVID-19 pandemic. In fact, several research works are conducted to show the importance of using Chest X-Ray images to detect COVID-19 cases [5]- [10]. Moreover, many people explicitly require that the body details shown in these kinds of images must be kept private and secure [11]. The technique presented in this paper fulfills their requirement at a very low cost (around a 1% decrease in accuracy).
The remainder of this paper is ordered as follows: in Section II, the background section, we will discuss the research works that targeted the topics of Privacy-Preservation Deep Learning (PPDL) and homomorphic encryption. Later, in Section III, we will introduce our PPDL approach for protecting COVID-19 data during the classification task. Then, in Section IV, we will describe the experimental results that defend the utility of the proposed approach. Finally, in Section V, we conclude our work and raise the main limitations that should be targeted in the next research works.

A. Privacy-Preserving Deep Learning
Data privacy is an important issue for training and testing DL models, especially in the case of training and inferring sensitive data (e.g. health records, financial details, location logs, and satellite images) [12], [13]. Many PPDL techniques focused on allowing multiple input parties to train and test DL models without revealing their private data in its original form. These techniques can be subdivided into three groups: cryptographic, perturbation, secure enclaves, and hybrid techniques [14]. Cryptographic methods are used to train and test DL techniques on encrypted data [15]. This category of methods includes Homomorphic Encryption (HE), Secret Sharing (SS), Secure Multi-Party Computation (SMPC), and Garbled Circuit (GC). The perturbation methods aim to alter data values to maintain individual record confidentiality [16]. This category of methods includes Differential Privacy (DP) [17]- [19] and Dimensionality Reduction (DP) [20]. In secure enclaves-based approaches [21] [22], both the prediction model and the data are separately sent by the client and the server to a trusted, secure enclave environment for execution. On the other hand, hybrid methods aim at combining more than one PPDL technique to improve the privacy of data [23]- [26]. A recent survey on privacy-preserving deep learning approaches can be found in [27].
Nevertheless, many of these solutions are not efficient on complex data, but only on simple classification tasks [27], such as MNIST or CIFAR-10. Besides, they often add an important computational cost and communication overhead. Moreover, there is always a trade-off between privacy and model accuracy, due to the use of approximated activation functions.

B. Homomorphic encryption
Most existing encryption algorithms do not allow working on data unless decrypted. However, decrypting the data undermines privacy requirements. Once the data are encrypted by someone, they must first be decrypted before processing, which makes them vulnerable to unauthorized access. HE removes the need for decrypting the data before usage. In other words, data integrity and privacy are protected while processing the data [28], [29]. HE is a cryptographic technique that has the ability to allow DL techniques to run over encrypted data without losing context. It eliminates the tradeoff between data usability and data privacy and ensures that data remains secure in untrusted environments. In the case of DL, the algorithm can be trained and tested over encrypted data. If the DL algorithm reaches a good prediction accuracy, it can be deployed, and therefore, in real cases, it will provide a decision over the encrypted data. Using a unique secret key, the user can decrypt the obtained data. Thus, the data's privacy and security are maintained. The HE techniques can be divided mainly into three subcategories, namely Partially Homomorphic Encryption (PHE), Somewhat Homomorphic Encryption (SWHE), and Fully Homomorphic Encryption (FHE). PHE enables only one form of mathematical operation on the encrypted data. SHE enables all addition and multiplication operations with only a limited range on the encrypted data. FHE enables various types of assessment operations on encrypted data with an unbounded range. PHE schemes are in general more efficient than SHE and FHE, mainly because they are homomorphic with regard to only one type of operation (addition or multiplication). SHE is more general than PHE since it supports more operations; however, it can perform them on only a limited range. The main drawback of FHE is its slow computation speed.

III. PROPOSED APPROACH
This section describes the proposed approach for PPDL in the case of Covid-19 classification. The proposed workflow is based on two phases as depicted in Figure 1. The first phase aims to encrypt the COVID-19 dataset using the Paillier method. Then, the encrypted dataset is fed to the DL algorithm for securing training. Phase 2 allows determining the class of encrypted input images based on the trained DL model.

A. HE-based Encryption
In this paper, the Paillier method is used to ensure the encryption of images. Paillier encryption is a PHE satisfying additive homomorphism. In the following, we describe the main concepts used in this study, which are key generation, encryption, and homomorphic addition.
• Key generation: The public key is (n,g) and the private key is (λ,µ ) computed as follows: 1) Compute two random and independent large-prime numbers p and q, where gcd(pq, (p−1)(q −1)) = 1 2) Compute n and λ, where n = pq and λ = lcm(p − 1, q − 1). lcm denotes the least common multiple. 3) Select a random integer g. 4) Compute n, where µ = (L(g λ mod n 2 )) −1 mod n and L(x) = x−1 n . • Encryption: Compute the ciphertext c, where c = g m · r n mod n 2 and r is a random number (0 < r < n and gcd(r, n) = 1) • Homomorphic addition: The product of two ciphertexts will be decrypted to the sum of their corresponding plaintexts: D(E(m 1 , r 1 ) · E(m 2 , r 2 )modn 2 ) = (m 1 + m 2 )mod n, and the product of a ciphertext with a plaintext will be decrypted to the sum of the corresponding plaintexts: D(E(m 1 , r 1 )·g m2 modn 2 ) = (m 1 +m 2 )mod n.

B. Secure Training
The goal of the secure training is to run the DL algorithm on the encrypted dataset and be able to achieve good performance on identifying the different classes. The purpose of the presented work is to evaluate the performance of DL algorithms over Paillier-encrypted images. The main challenge is to find a trade-off between the accuracy of the DL algorithm in identifying COVID-19 classes and the security of images. To assess the first point, a good alternative will be to check the performance of the selected DL algorithms on plain and encrypted data. In case of a small difference between the accuracy of the DL algorithm on plain and encrypted data, we can assert that it performs well and can be adopted in real cases. Otherwise, the encryption method  used for the PPDL is not adequate since it doesn't allow the DL algorithm to learn from encrypted images. In this paper, we have used MobileNetV2, which is a CNN composed of 53 layers. MobileNetV2 algorithm can be replaced by any other transfer learning algorithm. Figure 2 depicts the architecture of the secure training algorithm used in this study.

IV. EXPERIMENTAL RESULTS
This section is divided into three parts: dataset description, image encryption results, and CNN classification performances.

A. Dataset Description
In this paper, the COVID-19 Radiography database is used [30], [31]. It is a public dataset that contains four classes, namely COVID-19, viral pneumonia, normal, and lung opacity. The dataset is randomly split into 80% for training, 10% for validation, and 10% for testing. Table I shows the number of images used for training, validation, and testing for each class.

B. Implementation Details
The experiments are carried out using a server with the following configuration properties: an x64-based processor, an Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz, and a 512 GB

C. Results
The first step is to encrypt the dataset using the Paillier encryption scheme. Figure 3 depicts a sample of image encryption for the four classes COVID-19, viral pneumonia, normal, and lung opacity.
Then, the proposed DL architecture is applied to both plain and encrypted datasets. The training and validation accuracy of the MobileNetV2 with plain and encrypted data are depicted in Figures 4 and 5, respectively. The maximum validation accuracy for the plain dataset is 95.04% obtained at the epoch 74. Whereas, the maximum validation accuracy for the encrypted dataset is 94.97% obtained at the epoch 77.
In order to assess more robustly the performance on each dataset, we calculated the confusion matrix on the testing part which did not participate in any way in the training procedure nor in the selection of the best weights. Figures 6 and 7 show the resulting confusion matrices for the plain and encrypted datasets, respectively. In both cases, most misclassified images (76% and 67% of all misclassifications for the plain and encrypted datasets, respectively) are between the 'Normal' and 'Lung opacity' classes. Tables II and III show the detailed results, in terms of precision, recall, and f1-score, on the testing set of the plain and encrypted data, respectively. We  notice that the 'Viral Pneumonia' class is the most affected by the encryption process, with an f1-sore decreasing from 98.3% to 87.6%, due to the reduced number of images for this class (7% of the dataset) while the three other classes were much less affected. The difference in terms of overall classification accuracy between encrypted (94.22%) and plain (93.25%) data is less than 1% on the testing set. Hence, we can conclude that the Paillier encryption scheme ensures the privacy of data while also maintaining a highly accurate prediction of the class type in the COVID-19 Radiography dataset.

V. CONCLUSION
HE-based encryption has been used in many research works due to its significant privacy benefits. The increasing need of    ensuring privacy-preserving of data while using DL techniques makes HE a very attractive topic to the research community. In this paper, we propose using the PHE-based Paillier algorithm to tackle the problem of the privacy of sensitive healthcare data when using DL algorithms. The Paillier encryption enables securing the data and preserving good classification accuracy. Experiments conducted on the COVID-19 Radiography database show an accuracy of 94.2% for plain data and 93.3% for encrypted data. In this sense, the proposed research can serve as a tool to classify encrypted data by non-trustworthy third parties without disclosing confidentiality. However, the main limitation of HE encryption is its slow computation, which remains the major problem of this technique. Further studies will focus on proposing hybrid encryption techniques such as FHE encryption and SSC that can be used in conjunction with one another.