Machine learning with HE
HE can be used in Machine Learning (ML) models to encrypt the training data, test data, or even the complete model itself to achieve model security.
The following are some of the options to implement ML models with HE:
- Encrypt the weights (model parameters) and intercept, and make use of them to calculate the accuracy of the model on the test data.
- Encrypt the test data and make use of the encrypted data with an encrypted model to find out the accuracy.
- Build the models with training data encrypted and without the encryption.Calculate the accuracy of the clear text model as well as the model with encrypted training data.
- Encrypt the training data and train the model on encrypted data, then run the inference and decrypt the results.
In this example, we will encrypt the model parameters and do the following:
- Using the fraud detection model example:
- Load the fraud transaction data
- Split the data as train and test
- Use the logistic...