What are the highest and lowest error values that can be sampled? The paper only talks about gaussian distribution, but that can give us really large errors (with low probability). But I believe there should be a maximum and minimum to be sampled. I’m trying to estimate how much cmuxes I can do without overflowing the error but for that I need a maximum number of error on each sample.
Hi @guerlando ,
Concrete currently uses (a variant of) the Box-Muller transform to sample the error, so depending on the data type (32 vs 64bits), the magnitude of the error is capped at 6.66 or 9.419 times the standard deviation, as explained here. Note though that the way Concrete samples from the Gaussian distribution may change in the future. In any case, you may select tail bounds yourself depending on the acceptable failure probability using the error function, see e.g. here. Hope that helps.
Shouldn’t the errors be integers? THis algorithm generates floating point numbers
The result is scaled to the desired standard deviation and rounded to the closest integer.
one example of standar deviation form zama code is
neartes_integer(9*0.0000000000000000002168404344971008860665043427092021) = 0
this would mean that the error is always 0. How is this possible?
The standard deviation in Concrete is specified relative to the modulus. So depending on whether you are using 32 or 64bit data types, the result needs to be scaled by 2^32 or 2^64 before rounding.