heir icon indicating copy to clipboard operation
heir copied to clipboard

Support high-precision scale management

Open j2kun opened this issue 2 months ago • 1 comments

Some techniques for managing scale, for example Algorithm 2 of BMPH20 which powers the scale management in Lattigo and is particularly important for their bootsrtapping algorithm, require full precision on the scaling factor being analyzed. In HEIR currently we only support analyzing scaling in the log2 domain.

I ran into this issue when trying to reproduce Lattigo's scale management for a particular lowering of chebyshev polynomial evaluation in https://github.com/google/heir/pull/2338, and also it showed up as a todo in #1640

This issue is to replace the log2-based scaling factors with APInt scaling factors. That will unlock a more precise scale management system for future work.

j2kun avatar Oct 30 '25 19:10 j2kun

One thing I've determined, at least, is that we won't be able to reproduce lattigo's chebyshev polynomial evaluation exactly without high-precision scale analysis. This is because it requires setting the scale of plaintexts to quantities involving the particular primes used in the modulus chain (see section 3.2 of https://eprint.iacr.org/2020/1203).

j2kun avatar Nov 21 '25 03:11 j2kun