NPUFHE: An Efficient CKKS Execution System for Ascend NPUs
Abstract
Fully homomorphic encryption (FHE) enables computation directly on encrypted data, but its substantial computational cost hinders adoption in privacy-preserving artificial intelligence (AI) applications. Neural processing units (NPUs) already deployed in AI infrastructure provide a practical platform for FHE acceleration. However, after mapping the number theoretic transform (NTT) to matrix multiplications on Ascend NPUs, modular arithmetic and representation conversion on the Vector backend still incur substantial overhead at stage boundaries. Evaluation-key material of key switching also increases storage and data-transfer costs, and whole-limb task assignment causes tail load imbalance. We present NPUFHE, an end-to-end CKKS execution system optimized for Ascend NPUs. To reduce modular recovery and twiddle costs in NTT, we propose Boundary-Optimized NTT, which eliminates intra-axis modular recovery, compiles intra-axis twiddle factors into matrix constants, and introduces two-level folded modular recovery at axis endpoints. To alleviate evaluation-key storage and transfer pressure, we design Compact Shoup encoding, which halves the key representation through local coefficient recovery. Finally, we propose Cost-Aware Parallel Tiling to mitigate tail load imbalance caused by whole-limb task assignment. It uses a cost model to adaptively partition tail tasks and smooth stepwise latency increases. We integrate the above designs into OpenFHE. On one Ascend 910B4, full-packing CKKS bootstrapping with real evaluation keys takes 0.95 s, encrypted CIFAR-10 ResNet-20 inference with bootstrapping requires 9.87 s per image, and encrypted MNIST inference achieves an amortized latency of 19.81 ms per image. The peak NTT throughput of NPUFHE reaches up to , , and that of OpenFHE on CPU, TensorFHE, and CROSS, respectively.
Create a lesson
Related papers
AscendFHE: Efficient Fully Homomorphic Encryption on Ascend NPUs
Shared title terminology · Honghui You, Haoping Yang, Wenzhe Wang et al.
ParseGap: Testing What Coding Agents Authorize and What Shells Execute
Shared title terminology · Jieyu Li
DuetFHE: Compiling Dual-Lane Nonlinear Circuits for Complex-Packed CKKS Inference
Shared title terminology · Ke Changke, Jian Wang, Xuan Xu et al.
TurboFHE: An Efficient and Scalable Multi-GPU Framework for Homomorphic LLM Inference
Shared title terminology · Honghui You, Haoping Yang, Wenzhe Wang et al.
Enabling Verifiable Output Lineage for Virtualized ML Workload Execution
Shared title terminology · Prach Chantasantitam, Adam Caulfield, Sujaya Maiyya et al.
An LLM-Assisted Multi-Objective AutoML Framework for Efficient Network Intrusion Detection
Shared title terminology · Ailin Barzegar, Khalil El-Khatib, Li Yang