About performing many bootstrapping

Hello everyone!

I have been studying HE for few months, but now I have a question I can not respond to. I saw in literature that many papers use tons of bootstrapping procedures (especially in deep neural networks), but from my experience in OpenFHE, bootstrap destroys accuracy of my ciphertext (values are modified from the second decimal place on).

Is it something about parameters? Actually I am using the predefined ones (in the examples), but I am trying to understand them better :slight_smile:

Thank you !

You can refer to the following tricks to improve CKKS precision in OpenFHE:

  1. 128-bit CKKS
  2. Iterative bootstrapping

For the first solution, you must build OpenFHE with cmake -DNATIVE_SIZE=128 ..
The second solution can run for both settings (the default 64-bit or 128-bit).

Thank you for your response!

I have a question for what concerns Iterative bootstrapping though: since the precision is calculated on the plaintext, does it mean that the server itself can not calculate two iterations without asking the client to decrypt the ciphertext?

Yes, but you can experimentally figure out approximately what the precision would be; especially if your application is deterministic in nature.

So the way to go is to execute the program on various inputs, to list all the different precisions, and to use the average one in “production” ?

You could use the average or maximum. It depends on your precision requirements.

Thank you very much :smiley: