Question on encrypted quantized tensor

Hi,

When working with quantized models, does all parts (scale, value, zero point) of the input tensor are encrypted?
Also, during the model evaluation, does the computations on scales and zero points are done with HE?

Thanks in advance.

Hello @BVialla,

Interesting question! When developing the model, in clear, we do track the scales and zero-points throughout the entire computation. They are then kept in the clear on the client’s side, for quantization of inputs (before encryption) and dequantization of outputs (after decryption), as well as within the FHE circuit.

This means that, during the model’s evaluation, scales and zero-points are not encrypted, only the values are. Under the hood, changes in quantization are converted to table lookups in the FHE circuit at compilation time. Besides, keep in mind that operations between clear and encrypted values result in encrypted values, and that all computations done on the server’s side are done using FHE.

Hope this answers your question !

1 Like