BFV-Based Homomorphic Encryption for Privacy-Preserving CNN Models
<p>Overall system overview of the proposed method.</p> "> Figure 2
<p>CNN-based COVID-19 detection model.</p> "> Figure 3
<p>COVID-19 positive X-ray image dataset samples.</p> "> Figure 4
<p>COVID-19 negative X-ray image dataset samples.</p> "> Figure 5
<p>Prediction performance score with different metrics. (<b>a</b>) Precision. (<b>b</b>) Recall. (<b>c</b>) F1. (<b>d</b>) Accuracy.</p> "> Figure 6
<p>Running time in seconds.</p> ">
Abstract
:1. Introduction
- A recent European Data Protection Board (EDPB) Public Consultation stated the use of Secure Multi-Party Computation as an additional measure to the General Data Protection Regulation’s (GDPR) Article 46 transfer tools. Here, we provide a method to implement practically secure multi-party computation in federated learning to improve the privacy and security of medical data (https://edpb.europa.eu/sites/default/files/webform/public_consultation_reply/inpher-_edpb_supplementary_measures_comment.pdf (27 June 2022)).
- A homomorphic encryption-based federated learning algorithm is proposed to protect the confidentiality of the sensitive medical data.
- A secure multi-party computation protocol is proposed to protect the deep learning models from the adversaries.
- A real-world medical dataset is used to evaluate the proposed algorithm. The experimental results show that the proposed algorithm can protect the deep learning model from the adversaries.
2. Related Work
3. Preliminaries
3.1. Homomorphic Encryption
- takes as input a plaintext , and outputs a ciphertext c such that c is a homomorphic image of m, i.e., ;
- takes as input a ciphertext c, and outputs a plaintext m such that m is a homomorphic image of c;
- and are computationally efficient.
3.2. Brakerski–Fan–Vercauteren (BFV) Scheme
- Key generation algorithm: It takes the security parameter k as input, and outputs a public key and a secret key .
- Encryption algorithm: It takes the message , a public key , and a randomness as inputs, and outputs a ciphertext .
- Decryption algorithm: It takes a ciphertext , a secret key , and an integer as inputs, and outputs a message .
- 1.
- Let t be the security parameter. For a positive integer t, define a number and a positive integer p where is a polynomial, and p is a prime number satisfying .
- 2.
- Let d be a positive integer such that . Choose a monic polynomial of degree d with for some . Let . Choose a quadratic nonresidue b of , and let .
- 1.
- Let be the public key. Choose a random polynomial of degree less than d.
- 2.
- Given a message , compute .
- 3.
- Choose a random integer , and output the ciphertext .
- 1.
- Let be the secret key. Compute .
- 2.
- Given a ciphertext , compute .
3.2.1. Homomorphic Operations
Additive Homomorphism
Multiplicative Homomorphism
3.2.2. Relinearization
3.2.3. Rotation
3.3. Federated Learning
- Initialization algorithm: It takes the security parameter k as input, and outputs the global model , where n is the number of free parameters in .
- Local training algorithm: It takes the global model , a local dataset , and a positive integer t as inputs, and outputs a local model .
- Upload algorithm: It takes the local model , and a positive integer t as inputs, and outputs a vector .
- Aggregation algorithm: It takes a set of vectors , and a positive integer t as inputs, and outputs the global model .
4. System Model
4.1. Notations
- Boldface lowercase letters show the vectors (e.g., );
- shows the ciphertext of a matrix W;
- ⊕ shows the homomorphic encryption-based addition, ⊗ homomorphic encryption-based multiplication;
- shows public/private key pairs.
4.2. Client Initialization
Algorithm 1 Model training in each client |
|
4.3. Model Aggregation
Algorithm 2 Model aggregation at the server |
|
4.4. Client Decryption
Algorithm 3 Client decryption |
|
5. Results
5.1. Dataset
5.2. Preprocessing
6. Implementation
6.1. Experimental Setup
6.2. Experimental Results
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Kairouz, P.; McMahan, H.B.; Avent, B.; Bellet, A.; Bennis, M.; Bhagoji, A.N.; Bonawitz, K.; Charles, Z.; Cormode, G.; Cummings, R.; et al. Advances and open problems in federated learning. Found. Trends Mach. Learn. 2021, 14, 1–210. [Google Scholar] [CrossRef]
- Şahinbaş, K.; Ozgur Catak, F. Secure Multi-Party Computation based Privacy Preserving Data Analysis in Healthcare IoT Systems. arXiv 2021, arXiv:2109.14334. [Google Scholar]
- Abouelmehdi, K.; Beni-Hssane, A.; Khaloufi, H.; Saadi, M. Big data security and privacy in healthcare: A Review. Procedia Comput. Sci. 2017, 113, 73–80. [Google Scholar] [CrossRef]
- Catak, F.O.; Aydin, I.; Elezaj, O.; Yildirim-Yayilgan, S. Practical Implementation of Privacy Preserving Clustering Methods Using a Partially Homomorphic Encryption Algorithm. Electronics 2020, 9, 229. [Google Scholar] [CrossRef] [Green Version]
- Özgür Çatak, F.; Mustacoglu, A.F. CPP-ELM: Cryptographically Privacy-Preserving Extreme Learning Machine for Cloud Systems. Int. J. Comput. Intell. Syst. 2018, 11, 33–44. [Google Scholar] [CrossRef] [Green Version]
- Alloghani, M.; Alani, M.M.; Al-Jumeily, D.; Baker, T.; Mustafina, J.; Hussain, A.; Aljaaf, A.J. A systematic review on the status and progress of homomorphic encryption technologies. J. Inf. Secur. Appl. 2019, 48, 102362. [Google Scholar] [CrossRef]
- Molina-Carballo, A.; Palacios-López, R.; Jerez-Calero, A.; Augustín-Morales, M.C.; Agil, A.; Muñoz-Hoyos, A.; Muñoz-Gallego, A. Protective Effect of Melatonin Administration against SARS-CoV-2 Infection: A Systematic Review. Curr. Issues Mol. Biol. 2022, 44, 31–45. [Google Scholar] [CrossRef]
- Checa-Ros, A.; Muñoz-Hoyos, A.; Molina-Carballo, A.; Muñoz-Gallego, A.; Narbona-Galdó, S.; Jerez-Calero, A.; del Carmen Augustín-Morales, M. Analysis of Different Melatonin Secretion Patterns in Children With Sleep Disorders: Melatonin Secretion Patterns in Children. J. Child Neurol. 2017, 32, 1000–1008. [Google Scholar] [CrossRef]
- Xu, J.; Glicksberg, B.S.; Su, C.; Walker, P.; Bian, J.; Wang, F. Federated learning for healthcare informatics. J. Healthc. Inform. Res. 2021, 5, 1–19. [Google Scholar] [CrossRef]
- Rieke, N.; Hancox, J.; Li, W.; Milletari, F.; Roth, H.R.; Albarqouni, S.; Bakas, S.; Galtier, M.N.; Landman, B.A.; Maier-Hein, K.; et al. The future of digital health with federated learning. NPJ Digit. Med. 2020, 3, 1–7. [Google Scholar] [CrossRef]
- Antunes, R.S.; da Costa, C.A.; Küderle, A.; Yari, I.A.; Eskofier, B. Federated Learning for Healthcare: Systematic Review and Architecture Proposal. ACM Trans. Intell. Syst. Technol. (TIST) 2022, 13, 1–23. [Google Scholar] [CrossRef]
- Li, W.; Milletarì, F.; Xu, D.; Rieke, N.; Hancox, J.; Zhu, W.; Baust, M.; Cheng, Y.; Ourselin, S.; Cardoso, M.J.; et al. Privacy-preserving federated brain tumour segmentation. In Proceedings of the International Workshop on Machine Learning in Medical Imaging; Springer: Berlin/Heidelberg, Germany, 2019; pp. 133–141. [Google Scholar]
- Sheller, M.J.; Reina, G.A.; Edwards, B.; Martin, J.; Bakas, S. Multi-institutional deep learning modeling without sharing patient data: A feasibility study on brain tumor segmentation. In Poceedings of the International MICCAI Brainlesion Workshop; Springer: Berlin/Heidelberg, Germany, 2018; pp. 92–104. [Google Scholar]
- Kumar, A.V.; Sujith, M.S.; Sai, K.T.; Rajesh, G.; Yashwanth, D.J.S. Secure Multiparty computation enabled E-Healthcare system with Homomorphic encryption. In Proceedings of the IOP Conference Series: Materials Science and Engineering; IOP Publishing: Bristol, UK, 2020; Volume 981, p. 022079. [Google Scholar]
- Bocu, R.; Costache, C. A homomorphic encryption-based system for securely managing personal health metrics data. IBM J. Res. Dev. 2018, 62, 1:1–1:10. [Google Scholar] [CrossRef]
- Wang, X.; Zhang, Z. Data division scheme based on homomorphic encryption in WSNs for health care. J. Med. Syst. 2015, 39, 1–7. [Google Scholar] [CrossRef] [PubMed]
- Kara, M.; Laouid, A.; Yagoub, M.A.; Euler, R.; Medileh, S.; Hammoudeh, M.; Eleyan, A.; Bounceur, A. A fully homomorphic encryption based on magic number fragmentation and El-Gamal encryption: Smart healthcare use case. Expert Syst. 2022, 39, e12767. [Google Scholar] [CrossRef]
- Talpur, M.S.H.; Bhuiyan, M.Z.A.; Wang, G. Shared–node IoT network architecture with ubiquitous homomorphic encryption for healthcare monitoring. Int. J. Embed. Syst. 2015, 7, 43–54. [Google Scholar] [CrossRef]
- Tan, H.; Kim, P.; Chung, I. Practical homomorphic authentication in cloud-assisted vanets with blockchain-based healthcare monitoring for pandemic control. Electronics 2020, 9, 1683. [Google Scholar] [CrossRef]
- Ali, A.; Pasha, M.F.; Ali, J.; Fang, O.H.; Masud, M.; Jurcut, A.D.; Alzain, M.A. Deep Learning Based Homomorphic Secure Search-Able Encryption for Keyword Search in Blockchain Healthcare System: A Novel Approach to Cryptography. Sensors 2022, 22, 528. [Google Scholar] [CrossRef]
- Gentry, C. Fully Homomorphic Encryption Using Ideal Lattices. In Proceedings of the Forty-First Annual ACM Symposium on Theory of Computing, Bethesda, MD, USA, 31 May–2 June 2009; pp. 169–178. [Google Scholar] [CrossRef] [Green Version]
- Brendan McMahan, H.; Moore, E.; Ramage, D.; Hampson, S.; Agüera y Arcas, B. Communication-Efficient Learning of Deep Networks from Decentralized Data. arXiv 2016, arXiv:1602.05629. [Google Scholar]
- Konečný, J.; Brendan McMahan, H.; Yu, F.X.; Richtárik, P.; Theertha Suresh, A.; Bacon, D. Federated Learning: Strategies for Improving Communication Efficiency. arXiv 2016, arXiv:1610.05492. [Google Scholar]
- Chowdhury, M.E.H.; Rahman, T.; Khandakar, A.; Mazhar, R.; Kadir, M.A.; Mahbub, Z.B.; Islam, K.R.; Khan, M.S.; Iqbal, A.; Emadi, N.A.; et al. Can AI Help in Screening Viral and COVID-19 Pneumonia? IEEE Access 2020, 8, 132665–132676. [Google Scholar] [CrossRef]
- Rahman, T.; Khandakar, A.; Qiblawey, Y.; Tahir, A.; Kiranyaz, S.; Abul Kashem, S.B.; Islam, M.T.; Al Maadeed, S.; Zughaier, S.M.; Khan, M.S.; et al. Exploring the effect of image enhancement techniques on COVID-19 detection using chest X-ray images. Comput. Biol. Med. 2021, 132, 104319. [Google Scholar] [CrossRef] [PubMed]
- Ibarrondo, A.; Viand, A. Pyfhel: Python for homomorphic encryption libraries. In Proceedings of the 9th Workshop on Encrypted Computing & Applied Homomorphic Cryptography, Seoul, Korea, 15 November 2021. [Google Scholar]
- Brakerski, Z. Fully Homomorphic Encryption without Modulus Switching from Classical GapSVP. In Advances in Cryptology—CRYPTO 2012; Safavi-Naini, R., Canetti, R., Eds.; Springer: Berlin/Heidelberg, Germany, 2012; pp. 868–886. [Google Scholar]
- Fan, J.; Vercauteren, F. Somewhat Practical Fully Homomorphic Encryption. Cryptology ePrint Archive, Report 2012/144. 2012. Available online: https://ia.cr/2012/144 (accessed on 15 March 2022).
- Cheon, J.H.; Kim, A.; Kim, M.; Song, Y. Homomorphic Encryption for Arithmetic of Approximate Numbers. In Advances in Cryptology—ASIACRYPT 2017; Takagi, T., Peyrin, T., Eds.; Springer International Publishing: Cham, Switzerland, 2017; pp. 409–437. [Google Scholar]
- Laine, K. Simple Encrypted Arithmetic Library 2.3.1. Available online: https://www.microsoft.com/en-us/research/uploads/prod/2017/11/sealmanual-2-3-1.pdf (accessed on 15 March 2022).
Scheme | Key-Size | Additive/Multiplicative | Partially/Somewhat/Fully |
---|---|---|---|
Paillier | 2048 bits | Additive | Partially |
ElGamal | 1024 bits | Additive | Partially |
BFV | 2048 bits | Additive, Multiplicative | Somewhat |
CKKS | 2048 bits | Multiplicative | Somewhat |
FV | 2048 bits | Multiplicative | Somewhat |
Layer (Type) | Output | Shape | No. of Parameters |
---|---|---|---|
conv2d | (Conv2D) | (None, 254, 254, 32) | 896 |
max_pooling2d | (MaxPooling2D) | (None, 127, 127, 32) | 0 |
conv2d_1 | (Conv2D) | (None, 125, 125, 32) | 9248 |
max_pooling2d_1 | (MaxPooling 2D) | (None, 62, 62, 32) | 0 |
conv2d_2 | (Conv2D) | (None, 60, 60, 32) | 9248 |
max_pooling2d_2 | (MaxPooling 2D) | (None, 30, 30, 32) | 0 |
conv2d_3 | (Conv2D) | (None, 28, 28, 64) | 18,496 |
max_pooling2d_3 | (MaxPooling 2D) | (None, 14, 14, 64) | 0 |
conv2d_4 | (Conv2D) | (None, 12, 12, 64) | 36,928 |
max_pooling2d_4 | (MaxPooling 2D) | (None, 6, 6, 64) | 0 |
conv2d_5 | (Conv2D) | (None, 4, 4, 128) | 73,856 |
max_pooling2d_5 | (MaxPooling 2D) | (None, 2, 2, 128) | 0 |
flatten | (Flatten) | (None, 512) | 0 |
dense | (Dense) | (None, 128) | 65,664 |
dense_1 | (Dense) | (None, 64) | 8256 |
dense_2 | (Dense) | (None, 2) | 130 |
Bit-Length of Default q. | ||
---|---|---|
n | 128-bit Security | 192-bit Security |
1024 | 27 | 19 |
2048 | 54 | 37 |
4096 | 109 | 75 |
8192 | 218 | 152 |
16,384 | 438 | 300 |
32,768 | 881 | 600 |
Dataset | Rows | Label |
---|---|---|
Training | 800 | Negative |
800 | Positive | |
Test | 200 | Negative |
200 | Positive |
Precision | Recall | F1 Score | Accuracy |
---|---|---|---|
0.868924 | 0.840000 | 0.836801 | 0.840000 |
Number of Clients | 2 | 3 | 5 | 7 |
---|---|---|---|---|
Precision | 0.872128 | 0.865112 | 0.859288 | 0.850277 |
Recall | 0.845000 | 0.837500 | 0.835000 | 0.827500 |
F1 Score | 0.842123 | 0.834369 | 0.832164 | 0.824649 |
Accuracy | 0.845000 | 0.837500 | 0.835000 | 0.827500 |
Number of Clients | 2 | 3 | 5 | 7 |
---|---|---|---|---|
Precision | 0.867337 | 0.857293 | 0.853925 | 0.869584 |
Recall | 0.837500 | 0.840000 | 0.830000 | 0.852500 |
F1 Score | 0.834132 | 0.838040 | 0.827078 | 0.850776 |
Accuracy | 0.837500 | 0.840000 | 0.830000 | 0.852500 |
Number of Clients | 2 | 3 | 5 | 7 |
---|---|---|---|---|
Precision | 0.866735 | 0.868924 | 0.855624 | 0.86800 |
Recall | 0.840000 | 0.840000 | 0.832500 | 0.84500 |
F1 Score | 0.837030 | 0.836801 | 0.829732 | 0.84254 |
Accuracy | 0.840000 | 0.840000 | 0.832500 | 0.84500 |
Number of Clients | Without Encryption | Encryption (sec = 128) | Encryption (sec = 192) |
---|---|---|---|
2 | 594.165448 | 4333.672333 | 4765.874634 |
3 | 647.963712 | 5124.841524 | 7504.239611 |
5 | 720.175786 | 6777.249099 | 10,518.012003 |
7 | 948.704833 | 9223.281346 | 13,277.904182 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wibawa, F.; Catak, F.O.; Sarp, S.; Kuzlu, M. BFV-Based Homomorphic Encryption for Privacy-Preserving CNN Models. Cryptography 2022, 6, 34. https://doi.org/10.3390/cryptography6030034
Wibawa F, Catak FO, Sarp S, Kuzlu M. BFV-Based Homomorphic Encryption for Privacy-Preserving CNN Models. Cryptography. 2022; 6(3):34. https://doi.org/10.3390/cryptography6030034
Chicago/Turabian StyleWibawa, Febrianti, Ferhat Ozgur Catak, Salih Sarp, and Murat Kuzlu. 2022. "BFV-Based Homomorphic Encryption for Privacy-Preserving CNN Models" Cryptography 6, no. 3: 34. https://doi.org/10.3390/cryptography6030034
APA StyleWibawa, F., Catak, F. O., Sarp, S., & Kuzlu, M. (2022). BFV-Based Homomorphic Encryption for Privacy-Preserving CNN Models. Cryptography, 6(3), 34. https://doi.org/10.3390/cryptography6030034