Abstract
Kernel methods are popular machine learning methods that provide automated pattern analysis of raw datasets. Of particular interest is Support Vector Machines that are used to solve supervised machine learning problems in many areas such as business, finance and healthcare. Nowadays, complex computations and data analytic tasks can be outsourced to specialized third parties. However, data owners might be reluctant to share their data especially when it includes sensitive information. Therefore, a need for privacy-preserving machine learning applications cannot be overstated. We present FHSVM: a Fast Homomorphic evaluation of non-linear SVM prediction on encrypted data using Fully Homomorphic Encryption. We provide design, implementation and several algorithmic and architectural optimizations such as novel packing strategies and parallel implementation to achieve real-time private prediction. We employed the CKKS FHE scheme to implement FHSVM under 128-bit security level. We evaluated FHSVM on a contemporary real-world large dataset compiled for anti-money laundering tasks in Bitcoin transactions. Empirical analysis demonstrates that homomorphic SVM prediction can be performed in 1.25 s on multi-core CPU platforms. In addition, FHSVM shows zero accuracy loss when compared to the non-privacy-preserving implementation. This shows that FHSVM is both computationally secure and fully utilizes the data.
Similar content being viewed by others
References
Cui D, Curry D (2005) Prediction in marketing using the support vector machine. Market Sci 24(4):595–615
Yu H, Chen R, Zhang G (2014) A SVM stock selection model within PCA. Proc Comput Sci 31:406–412
Venkatesan C, Karthigaikumar P, Paul A, Satheeskumaran S, Kumar R (2018) ECG signal preprocessing and SVM classifier-based abnormality detection in remote healthcare applications. IEEE Access 6:9767–9773
Ribeiro M, Grolinger K, Capretz MAM (2015) MLaaS: Machine learning as a service. In: 2015 IEEE 14th international conference on machine learning and applications (ICMLA), pp 896–901. https://doi.org/10.1109/ICMLA.2015.152
Gentry C (2009) Fully homomorphic encryption using ideal lattices. In: STOC ’09. New York, NY, USA: Association for Computing Machinery, pp 169–178. https://doi.org/10.1145/1536414.1536440
Maekawa T, Kawamura A, Kinoshita Y, Kiya H (2018) Privacy-preserving svm computing in the encrypted domain. In: Asia-Pacific signal and information processing association annual summit and conference (APSIPA ASC). IEEE, pp 897–902
Chuman T, Kurihara K, Kiya H (2017) Security evaluation for block scrambling-based ETC systems against extended jigsaw puzzle solver attacks. In: 2017 IEEE international conference on multimedia and expo (ICME), pp 229–234. https://doi.org/10.1109/ICME.2017.8019487
Rahulamathavan Y, Phan RCW, Veluru S, Cumanan K, Rajarajan M (2014) Privacy-preserving multi-class support vector machine for outsourcing the data classification in cloud. IEEE Trans Dependable Secure Comput 11(5):467–479. https://doi.org/10.1109/TDSC.2013.51
Barnett A, Santokhi J, Simpson M, Smart NP, Stainton-Bygrave C, Vivek S et al (2017) Image classification using non-linear support vector machines on encrypted data. IACR Cryptol ePrint Arch 2017:857
Krizhevsky A, Nair V, Hinton G (2010) Cifar-10 (canadian institute for advanced research), vol 5, no. 4. http://www.cs.toronto.edu/kriz/cifar.html
Brakerski Z, Gentry C, Vaikuntanathan V (2014) (Leveled) fully homomorphic encryption without bootstrapping. ACM Trans Comput Theory 6(3):1–36
Cheon JH, Kim A, Kim M, Song Y (2017) Homomorphic encryption for arithmetic of approximate numbers. In: Takagi T, Peyrin T (eds) Advances in cryptology – ASIACRYPT 2017. Lecture notes in computer science, vol 10624. Springer, Cham. https://doi.org/10.1007/978-3-319-70694-8_15
Park S, Byun J, Lee J, Cheon JH, Lee J (2020) HE-friendly algorithm for privacy-preserving SVM training. IEEE Access 8:57414–57425
Byun J, Lee J, Park S (2021) Privacy-preserving evaluation for support vector clustering. Electron Lett 57(2):61–64
Liu X, Lu R, Ma J, Chen L, Qin B (2016) Privacy-preserving patient-centric clinical decision support system on Naïve Bayesian classification. IEEE J Biomed Health Inform 20(2):655–668. https://doi.org/10.1109/JBHI.2015.2407157
Gong Y, Fang Y, Guo Y (2016) Private data analytics on biomedical sensing data via distributed computation. IEEE/ACM Trans Comput Biol Bioinform 13(3):431–444. https://doi.org/10.1109/TCBB.2016.2515610
Zhu H, Liu X, Lu R, Li H (2017) Efficient and privacy-preserving online medical prediagnosis framework using nonlinear SVM. IEEE J Biomed Health Inform 21(3):838–850. https://doi.org/10.1109/JBHI.2016.2548248
Teo SG, Han S, Lee VC (2013) Privacy preserving support vector machine using non-linear kernels on hadoop mahout. In: 2013 IEEE 16th international conference on computational science and engineering, pp 941–948. https://doi.org/10.1109/CSE.2013.200
Rahulamathavan Y, Phan RCW, Veluru S, Cumanan K, Rajarajan M (2013) Privacy-preserving multi-class support vector machine for outsourcing the data classification in cloud. IEEE Trans Dependable Secure Comput 11(5):467–479
Weber M, Domeniconi G, Chen J, Weidele DKI, Bellei C, Robinson T et al (2019) Anti-money laundering in bitcoin: Experimenting with graph convolutional networks for financial forensics. arXiv preprint. arXiv:1908.02591
van Dijk M, Gentry C, Halevi S, Vaikuntanathan V (2010) Fully homomorphic encryption over the integers. In: Gilbert H (ed) Advances in cryptology – EUROCRYPT 2010. Lecture notes in computer science, vol 6110. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13190-5_2
Brakerski Z, Vaikuntanathan V (2011) Efficient fully homomorphic encryption from (standard) LWE. SIAM J Comput 43(2):831–871. https://doi.org/10.1137/120868669
Brakerski Z, Vaikuntanathan V (2011) Fully homomorphic encryption from ring-LWE and security for key dependent messages. In: Rogaway P (ed) Advances in cryptology – CRYPTO 2011. Lecture notes in computer science, vol 6841. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22792-9_29
Brakerski Z (2012) Fully homomorphic encryption without modulus switching from classical GapSVP. In: Cryptology ePrint Archive, Report 078. http://eprint.iacr.org/2012/078. Accessed 1 Mar 2021
López-Alt A, Tromer E, Vaikuntanathan V (2012) On-the-fly multiparty computation on the cloud via multikey fully homomorphic encryption. In: Proceedings of the forty-fourth annual ACM symposium on theory of computing (STOC '12). Association for computing Machinery, New York, USA, pp. 1219–1234. https://doi.org/10.1145/2213977.2214086
Fan J, Vercauteren F (2012) Somewhat practical fully homomorphic encryption. In: Cryptology ePrint archive, Report /144. http://eprint.iacr.org/2012/144. Accessed 1 Mar 2021
Gentry C, Sahai A, Waters B (2013) Homomorphic encryption from learning with errors: conceptually-simpler, asymptotically-faster, attribute-based. In: Canetti R, Garay JA (eds) Advances in cryptology – CRYPTO 2013. Lecture notes in computer science, vol 8042. Springer, Berlin, Heidelberg, pp 75–92. https://doi.org/10.1007/978-3-642-40041-4_5
Chillotti I, Gama N, Georgieva M, Izabachène M (2016) Faster fully homomorphic encryption: bootstrapping in less than 0.1 seconds. Cryptology ePrint Archive, Report 2016/870. http://eprint.iacr.org/2016/870. Accessed 23 Mar 2021
Cheon JH, Han K, Kim A, Kim M, Song Y (2019) A full RNS variant of approximate homomorphic encryption. In: Cid C, Jacobson M Jr (eds) Selected areas in cryptography – SAC 2018. Lecture notes in computer Science, vol 11349. Springer, Cham, pp 347–368. https://doi.org/10.1007/978-3-030-10970-7_16
Potdar K, Pardawala TS, Pai CD (2017) A comparative study of categorical variable encoding techniques for neural network classifiers. Int J Comput Appl 175(4):7–9
Smart NP, Vercauteren F (2014) Fully homomorphic SIMD operations. Des Codes Cryptogr 71(1):57–81
Brutzkus A, Gilad-Bachrach R, Elisha O (2019) Low latency privacy preserving inference. In: Proceedings of the 36th international conference on machine learning. Proceedings of machine learning research, vol 97, pp 812–821. https://proceedings.mlr.press/v97/brutzkus19a.html
Jin C, Badawi AA, Unnikrishnan B, Lin J, Mun CF, Brown JM et al (2019) CareNets: efficient homomorphic CNN for high resolution images. In: NeurIPS workshop on privacy in machine learning. NeurIPS; 2019, pp 1–6. https://oar.a-star.edu.sg/communities-collections/articles/14613. Accessed 25 Mar 2021
Gilad-Bachrach R, Dowlin N, Laine K, Lauter K, Naehrig M, Wernsing J (2016) CryptoNets: applying neural networks to encrypted data with high throughput and accuracy. In: Proceedings of the 33rd international conference on machine learning. Proceedings of machine learning research, vol 48, pp 201–210. https://proceedings.mlr.press/v48/gilad-bachrach16.html
AlBadawi A et al (2020) Towards the alexNet moment for homomorphic encryption: HCNN, the first homomorphic CNN on encrypted data with GPUs. IEEE Trans Emerg Top Comput 9(3):1330–1343. https://doi.org/10.1109/TETC.2020.3014636
Halevi S, Shoup V (2014) Algorithms in helib. In: Annual cryptology conference. Springer, pp 554–571
Albrecht MR, Player R, Scott S (2015) On the concrete hardness of learning with errors. J Math Cryptol 9(3):169–203
Albrecht MR, Chase M, Chen H, Ding J, Goldwasser S, Gorbunov S et al (2019) Homomorphic encryption standard. IACR Cryptol ePrint Arch 2019:939
Chrono.: C++ Chrono time library. http://en.cppreference.com/w/cpp/chrono. Accessed 2021 Online
Brown T, Kogan A, Lev Y, Luchangco V (2016) Investigating the performance of hardware transactions on a multi-socket machine. In: Proceedings of the 28th ACM symposium on parallelism in algorithms and architectures (SPAA '16). Association for Computing Machinery, New York, NY, USA, pp 121–132. https://doi.org/10.1145/2935764.2935796
Bardhan S, Menascé DA (2014) Predicting the effect of memory contention in multi-core computers using analytic performance models. IEEE Trans Comput 64(8):2279–2292
Boemer F, Cammarota R, Demmler D, Schneider T, Yalame H (2020) MP2ML: a mixed-protocol machine learning framework for private inference. In Proceedings of the 15th international conference on availability, reliability and security (ARES '20). Association for Computing Machinery, New York, NY. https://doi.org/10.1145/3407023.3407045
Al Badawi A, Polyakov Y, Aung KMM, Veeravalli B, Rohloff K (2019) Implementation and performance evaluation of RNS variants of the BFV homomorphic encryption scheme. IEEE Trans Emerg Top Comput 9(2):941–956. https://doi.org/10.1109/TETC.2019.2902799
Al Badawi A, Hoang L, Mun CF, Laine K, Aung KMM (2020) Privft: private and fast text classification with homomorphic encryption. IEEE Access 8:226544–226556
Acknowledgements
Ahmad Al Badawi was supported by Rabdan Academy. Ling Chen and Saru Vig were supported by A*STAR under its RIE2020 Advanced Manufacturing and Engineering (AME) Programmatic Programme (Award A19E3b0099).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Declarations
The authors have no conflicts of interest to declare that are relevant to the content of this article.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Al Badawi, A., Chen, L. & Vig, S. Fast homomorphic SVM inference on encrypted data. Neural Comput & Applic 34, 15555–15573 (2022). https://doi.org/10.1007/s00521-022-07202-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00521-022-07202-8