Ramp Up NTT in Record Time using GPU-Accelerated Algorithms and LLM-based Code Generation
Yu Cui, Hang Fu, Licheng Wang, Haibin Zhang

TL;DR
This paper develops a GPU-optimized number theoretic transform (GNTT) for homomorphic encryption, achieving a 62x speedup, and explores large language models for automatic GPU-friendly code generation, providing insights to accelerate privacy-preserving machine learning.
Contribution
It introduces a highly optimized GPU-friendly NTT and evaluates LLMs for automatic code generation, advancing practical GPU-accelerated cryptography implementations.
Findings
GNTT achieves 62x speedup over existing methods.
DeepSeek-R1 outperforms OpenAI models in code generation.
Optimized protocols outperform LLM-generated code in efficiency.
Abstract
Homomorphic encryption (HE) is a core building block in privacy-preserving machine learning (PPML), but HE is also widely known as its efficiency bottleneck. Therefore, many GPU-accelerated cryptographic schemes have been proposed to improve the performance of HE. However, these methods often require complex modifications tailored to specific algorithms and are tightly coupled with specific GPU and operating systems. It is interesting to ask how to generally offer more practical GPU-accelerated cryptographic algorithm implementations. Given the powerful code generation capabilities of large language models (LLMs), we aim to explore their potential to automatically generate practical GPU-friendly algorithm code using CPU-friendly code. In this paper, we focus on number theoretic transform (NTT) -- the core mechanism of HE. We first develop and optimize a GPU-friendly NTT (GNTT) family…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSpace Satellite Systems and Control · Embedded Systems Design Techniques · Robotics and Automated Systems
