Logistic regression model training based on the approximate homomorphic encryption

Andrey Kim, Yongsoo Song, Miran Kim, Keewoo Lee, Jung Hee Cheon

Abstract

We present a practical solution for outsourcing analysis tools such as logistic regression analysis while preserving the data confidentiality.

Introduction

As machine learning becomes central to healthcare and genomics, the risk of exposing sensitive individual data grows. While Homomorphic Encryption (HE)—a technique that allows computation on encrypted data without ever decrypting it—offers a "holy grail" for privacy, it has historically been too slow and memory-intensive for practical use. Previous attempts at HE-based machine learning struggled with data representation for efficient parallel computation and computational depth, where every multiplication adds noise to the ciphertext.

This paper presents a highly efficient method for training logistic regression models directly on encrypted data using the HEAAN homomorphic encryption scheme. By introducing a novel matrix-packing technique and utilizing Nesterov’s accelerated gradient, the authors achieved a 30x speedup over previous state-of-the-art methods, enabling secure model training on real-world medical datasets in just minutes.

Methodology

The authors combine several advanced cryptographic and optimization techniques to overcome these hurdles:

  • Approximate HE (HEAAN): Unlike traditional HE schemes that focus on exact integer arithmetic, the authors use the HEAAN scheme. HEAAN treats encryption noise as part of the rounding error inherent in approximate calculations, making it much more efficient for the precision required by machine learning.
  • Novel Matrix Packing: Instead of encrypting each feature column separately, the authors devised a method to pack an entire $n \times (f+1)$ data matrix into a single ciphertext row-by-row. This allows the system to use SIMD (Single Instruction, Multiple Data) operations to perform calculations across many data points simultaneously.
  • Nesterov’s Accelerated Gradient (NAG): To minimize the number of expensive encrypted multiplications, the authors replaced standard Gradient Descent with NAG. NAG uses a "look-ahead" momentum approach that converges faster, significantly reducing the number of iterations needed.
  • Polynomial Approximation: Since HE only supports additions and multiplications, the authors used least-squares polynomial approximations (of degrees 3, 5, and 7) to replace the non-linear sigmoid function.

Experimental Results

The proposed method was evaluated on several real-world binary outcome datasets, including the iDASH 2017 Track 3 genomic dataset, Edinburgh myocardial infarction data, and others like lbw, nhanes3, pcs, and uis.

Performance comparison of the proposed method against previous state-of-the-art across multiple datasets.

As shown in the comparison table above, the proposed method significantly outperforms previous benchmarks. On the Edinburgh dataset, training time dropped from 114 minutes to just 3.6 minutes—a roughly 30x speedup. Furthermore, encrypted storage requirements were drastically reduced (e.g., from 0.69 GB to 0.02 GB for Edinburgh).

Detailed results for the iDASH 2017 Track 3 dataset using different polynomial approximation degrees.

The models trained on encrypted data achieved performance nearly identical to those trained on plaintext. For instance, the Edinburgh model reached an AUC of 0.958, and the iDASH dataset (1579 samples) was trained in approximately 6-8 minutes depending on the polynomial degree used.

Conclusion

The researchers demonstrated that by embracing "approximate" encryption (HEAAN) and optimizing iteration counts through Nesterov’s acceleration, massive performance gains are possible in secure machine learning. While current limitations include a fixed iteration count and challenges in scaling to deep learning, this work provides a practical path forward for privacy-preserving data analysis in sensitive fields like healthcare.

Summary updated

BibTeX
@inproceedings{kim2018logistic,
  author = {Andrey Kim and Yongsoo Song and Miran Kim and Keewoo Lee and Jung Hee Cheon},
  title = {{Logistic regression model training based on the approximate homomorphic encryption}},
  booktitle = {BMC},
  year = {2018},
  doi = {10.1186/s12920-018-0401-7},
}
Figure