min max issue
Hi, Assume I have a 1024-element vector, is there any way for me to find out the maximum number of this vector? And further more, the index of this maximum number?
BR
Are these elements real numbers, floating-point numbers, or integers? What is the range of these elements?
Are these elements real numbers, floating-point numbers, or integers? What is the range of these elements?
I'm finding solutions for investigation. are they all possible? for example, for floating-point numbers, and uncertian number of elements for a vector.
BR
It's expansive to evaluate comparison. The straightforward solution is to create a look-up table (BFV/BGV). An alternative solution is approximating comparison with a polynomial (CKKS).
It's expansive to evaluate comparison. The straightforward solution is to create a look-up table (BFV/BGV). An alternative solution is approximating comparison with a polynomial (CKKS).
so any examples of these using SEAL?
BR
It's expansive to evaluate comparison. The straightforward solution is to create a look-up table (BFV/BGV). An alternative solution is approximating comparison with a polynomial (CKKS).
So doe this mean , there's no direct way to use SEAL to implement the min or max of a 4096-element float64 array by calling one or two functions, right?
And what do you mean by approximating comparison with a polynomial (CKKS) when the case is to get min or max of a vector?
BR
It's expansive to evaluate comparison. The straightforward solution is to create a look-up table (BFV/BGV). An alternative solution is approximating comparison with a polynomial (CKKS).
so any examples of these using SEAL?
BR
In BFV/BGV, you can perform equality check. To achieve comparison, you have to do a look up table like this:
// Return true if a > b.
if (a == 0 && b == 0) return false;
else if (a == 0 && b == 1) return false;
else if (a == 1 && b == 0) return true;
else if (a == 1 && b == 1) return false;
else throw invalid_argument("a and b must be 0 or 1");
Evaluate this on encrypted data needs Fermat's little theorem.
With CKKS, how do you express a function a > b ? true : false with additions and multiplications of floating point numbers? This paper shows a way to approximate.
@WeiDaiWD Do you know any github repository that has already implement the CKKS comparison based on the SEAL library? Thank you!
@WeiDaiWD Do you know any github repository that has already implement the CKKS comparison based on the SEAL library? Thank you!
I don't have a specific one in mind. There have been many papers that used Microsoft SEAL to implement ReLU function which requires a simulation of comparison. They might have some code available. Just a direction.