Skip to content

DuetFHE: Compiling Dual-Lane Nonlinear Circuits for Complex-Packed CKKS Inference

Ke Changke, Jian Wang, Xuan Xu, Jiqiang Liu

cs.CR

Abstract

Complex packing in CKKS stores two real streams in the real and imaginary lanes of each slot. Direct squaring couples the lanes, while squaring them separately requires two ciphertext-ciphertext multiplications (HMults). DuetFHE is a GPU compiler that uses a phase transformation to square both lanes independently with one HMult. It reuses dual-lane squares in polynomial activations and the modular-reduction stage of CKKS bootstrapping. The compiler further plans ciphertext scales and reuses conjugates to sustain the complex-packed representation across stages. On a single RTX 5090, DuetFHE accelerates four polynomial activations by 1.601.60--1.79×1.79\times over direct evaluation on two real ciphertexts. For two-image AESPA ResNet-20 inference, it maintains packed execution across convolutions, square activations, and bootstrapping, achieving a 1.97×1.97\times end-to-end speedup over the fastest tested EasyFHE batched baseline on both the RTX 5090 and RTX PRO 6000.

Create a lesson