Grafting vs Composite Scaling

Dear all,

I’ve seen that composite scaling has been included in the new version 1.3.0. I’m wondering if someone would be able to clarify the state-of-the-art regarding scaling techniques when it comes to using CKKS with GPUs.

As far as I know, composite scaling represents a speed up in GPUs since it allows us to use the native 32-bit registers in GPUs while keeping high precision when the scaling factors need to be bigger than 32-bits. However, I’m wondering how this compares to a more recent paper (refer to Grafting from now on). If I understand correctly, Grafting would behave similarly to composite scaling in terms of error growth and should allow us to also work with the native 32-bit registers of GPUs keeping high precision.

However, Grafting would not have the disadvantage of losing performance when using it with larger word sizes in CPUs as opposed to composite scaling. Furthermore, with Grafting there is no concern of not having enough RNS primes since the scaling factor and the modulus are decoupled. Given these advantages I wonder if there are plans to incorporate Grafting into OpenFHE soon or if there is a reason that I’m not seeing which implies that composite scaling should be used instead to accelerate CKKS in GPUs.

Indeed, this is a later paper that improves over the composite scaling method. However, the improved (grafting) method is also much more complicated to implement. The main motivation for the composite scaling was to support 32-bit hardware acceleration backends for larger (up to 60 bits) scaling factors, or support the scaling factors larger than 60 bits, e.g., to achieve the IND-CPA^D security or high precision, without requiring NATIVE_SIZE to be set to 128 (which is a slower mode as it uses an emulator for 128-bit numbers). In other words, its practical use is much broader than just the 32-bit GPU hardware acceleration.

The grafting mode provides a more granular choice of moduli, but at the cost of a much higher implementation complexity. So at this time we are not planning to add the grafting mode to OpenFHE, due to relatively incremental practical benefits over the composite scaling method.

Thank you for your quick reply Yuriy.