Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logistic Regression over Encrypted Data with BFV Scheme #119

Open
huyvu1404 opened this issue Jun 2, 2024 · 6 comments
Open

Logistic Regression over Encrypted Data with BFV Scheme #119

huyvu1404 opened this issue Jun 2, 2024 · 6 comments
Labels
question Further information is requested

Comments

@huyvu1404
Copy link

I am building a Logistic Regression model based on this paper using BFV scheme : https://eprint.iacr.org/2018/462.pdf
However, I could not complete it, because of its floating point number in approximate sigmoid function and learning rate. I've read suggestion of author to use bscale function that is combined in bootstrap and scale. I hope you help me to explain explicit this function. I honestly thanks for your help.
image

@huyvu1404 huyvu1404 added the question Further information is requested label Jun 2, 2024
@Huelse
Copy link
Owner

Huelse commented Jun 4, 2024

Sorry for reply late, you can approximate the sigmoid function with a polynomial within a limited range. Here is an example.

@huyvu1404
Copy link
Author

Sorry for reply late, you can approximate the sigmoid function with a polynomial within a limited range. Here is an example.

I've referred that example. However, the author only used CKKS. One solution I read about is to scale the real numbers into integers by multiply them with scale factor p and then scale them back down to the original values, but I am having difficulty with the scaling down part

@Huelse
Copy link
Owner

Huelse commented Jun 4, 2024

You may need re-encrypt it, there is no bootstrapping in the SEAL.

@huyvu1404
Copy link
Author

You may need re-encrypt it, there is no bootstrapping in the SEAL.

Thannks for your help.

@huyvu1404
Copy link
Author

You may need re-encrypt it, there is no bootstrapping in the SEAL.

If there is no bootstrapping, Is there a way to refresh noise? I have tried mod switch but it is not very feasible

@Huelse
Copy link
Owner

Huelse commented Jun 5, 2024

  1. enlarge the poly modulus degree
  2. decrypt in a safe client and re-encrypt to continue evaluate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants