TL;DR
This paper presents a practical method for training logistic regression models on fully homomorphically encrypted data, enabling secure outsourced computation without revealing sensitive information. They achieve this by combining novel bootstrapping techniques with fixed-point arithmetic and a modified 1-bit gradient descent algorithm, making the process feasible for real-world applications.
What Problem Does This Paper Address?
The increasing prevalence of sensitive data, such as genomic and health records, in machine learning applications creates a critical need for privacy-preserving computation. While homomorphic encryption (HE) offers a way to perform computations on encrypted data, training complex machine learning models like logistic regression on HE ciphertexts has historically been computationally prohibitive due to issues like noise growth and message expansion. Previous work was limited to very simple models or interactive settings. This paper tackles the challenge of enabling efficient, non-interactive training of logistic regression models on encrypted data, specifically addressing the limitations of existing HE schemes for this task.
Methods
The core of this work lies in several key methodological advancements:
- Fully Homomorphic Encryption (FHE) with Bootstrapping: The authors utilize the Brakerski/Fan-Vercauteren (BFV) scheme, a practical FHE implementation. A crucial element is the integration of bootstrapping, a technique to refresh ciphertexts and reduce noise, which is essential for performing computations over many steps. They implement a modified bootstrapping operation that combines noise reduction with scaling, improving efficiency.
- Fixed-Point Arithmetic: Since HE schemes are not directly suited for floating-point numbers, the authors employ fixed-point arithmetic. This involves representing numbers with a fixed number of integral and fractional digits. They develop techniques to perform addition, subtraction, and multiplication of these fixed-point numbers in the encrypted domain.
- Minimax Polynomial Approximation of Sigmoid: The sigmoid function, critical for logistic regression, is approximated using minimax polynomials. This approach provides a good balance between accuracy and computational cost in the encrypted domain. They compare degree 1 and degree 3 approximations.
- 1-Bit Gradient Descent (1-Bit GD): To further mitigate noise growth and reduce computational complexity, they adapt a 1-bit gradient descent algorithm. Instead of using the full gradient, they use the sign of the gradient, which significantly simplifies computations and reduces the growth of plaintext values. They introduce a modified version of this algorithm to handle accumulated residues.
- Data Batching: To leverage the SIMD (Single Instruction, Multiple Data) capabilities of the BFV scheme, they encode training data "vertically." This allows multiple data points to be processed in parallel within a single ciphertext, significantly speeding up computations.
Datasets
The authors evaluated their methods on two datasets:
- iDASH 2017 Competition Dataset: This dataset consists of 1579 patient records, each with a binary phenotype (cancer/no cancer) and 108 binary genotypes. For their experiments, they selected 18 of these genotypes as features.
- MNIST Dataset: A subset of the MNIST dataset was used, specifically images of handwritten digits '3' and '8' to create a binary classification problem. They compressed each image into 196 features.
Key Insights and Ideas
- Bootstrapping + Scaling Synergy: Combining bootstrapping with scaling in a single operation is a significant optimization. This addresses both the noise growth problem inherent in HE and the plaintext size expansion issue in fixed-point arithmetic, which are critical for multi-iteration training.
- 1-Bit GD's Practicality for HE: The 1-bit gradient descent algorithm, by focusing on the sign of the gradient, dramatically reduces the computational overhead compared to standard gradient descent when operating on encrypted data. This makes multi-iteration training feasible.
- Fixed-Point Arithmetic is Key: The successful application of HE to logistic regression hinges on effectively implementing fixed-point arithmetic. The paper demonstrates how to handle operations like multiplication and scaling within this encrypted fixed-point system.
- Sigmoid Approximation Trade-offs: The choice of polynomial approximation for the sigmoid function impacts both accuracy and computation time. The paper highlights the need to balance these factors for practical HE applications.
Key Results
The paper demonstrates that training logistic regression models on encrypted data is feasible and can achieve comparable accuracy to models trained on plaintext data.
- iDASH Dataset:
- Standard Gradient Descent (GD) with sigmoid approximation took 115.33 hours for 36 iterations.
- 1-Bit GD with sigmoid approximation took significantly less time, 14.90 hours for 36 iterations.
- Both methods achieved an average AUC of 0.690, matching the unencrypted baseline.
- MNIST Dataset:
- Standard GD took 48.76 hours for 10 iterations.
- 1-Bit GD took 27.10 hours for 10 iterations.
- Both methods achieved AUC values of 0.974, very close to the unencrypted baseline of 0.977/0.978.
While the encrypted training is orders of magnitude slower than plaintext training (which takes less than a second), the achieved accuracy is comparable, making it suitable for use cases where privacy is paramount.
Limitations and Future Work
- Computational Cost: The primary limitation is the significant computational cost of training on encrypted data, which is orders of magnitude slower than plaintext training. The authors note that this is acceptable for certain use cases and that substantial improvements can be expected from further optimization and parallelization.
- Parameter Tuning: Selecting appropriate FHE parameters (ring dimension, modulus) is crucial for balancing security, performance, and the ability to support bootstrapping and scaling. The paper details their chosen parameters but acknowledges the complexity of this tuning.
- Future Work: The authors suggest that many of the techniques presented, such as polynomial approximations and bootstrapping, can be extended to train other machine learning models, including neural networks. Further improvements in implementation and parallelization are also highlighted as avenues for future research.
Summary updated