OpenMined / TenSEAL

A library for doing homomorphic encryption operations on tensors
Apache License 2.0
847 stars 157 forks source link

How to deal with 'scale out of bounds' when do multiplication? #300

Open scottsongc opened 3 years ago

scottsongc commented 3 years ago

Question

How to deal with 'scale out of bounds' when do multiplication?

Further Information

I am employing the tenseal on sigmoid approximation on an encrypted tensor, but it told me that 'scale out of bounds'. I saw this question can be deal in SEAL with rescale, how can I do this operation in tenseal?

Screenshots

image.

System Information

Additional Context

Add any other context about the problem here.

youben11 commented 3 years ago

Rescaling is done for you automatically in TenSEAL, however, you need to have chosen appropriate parameters to be able to perform the number of multiplication required by your circuit. Here, the polynomial is of degree 3, thus require a depth of 2. Your coefficient modulus degree must look something like: [A, x, x, B] in order to work.