[Paper Review] CHET: Compiler and Runtime for Homomorphic Evaluation of Tensor Programs
CHET is a compiler and runtime system that enables efficient fully homomorphic encryption (FHE) evaluation of deep neural network (DNN) inference workloads by introducing a Homomorphic Instruction Set Architecture (HISA). It automates critical optimizations—such as data layout selection, rotation key management, and kernel fusion—resulting in performance that surpasses hand-optimized implementations on standard CNNs.
Fully Homomorphic Encryption (FHE) refers to a set of encryption schemes that allow computations to be applied directly on encrypted data without requiring a secret key. This enables novel application scenarios where a client can safely offload storage and computation to a third-party cloud provider without having to trust the software and the hardware vendors with the decryption keys. Recent advances in both FHE schemes and implementations have moved such applications from theoretical possibilities into the realm of practicalities. This paper proposes a compact and well-reasoned interface called the Homomorphic Instruction Set Architecture (HISA) for developing FHE applications. Just as the hardware ISA interface enabled hardware advances to proceed independent of software advances in the compiler and language runtimes, HISA decouples compiler optimizations and runtimes for supporting FHE applications from advancements in the underlying FHE schemes. This paper demonstrates the capabilities of HISA by building an end-to-end software stack for evaluating neural network models on encrypted data. Our stack includes an end-to-end compiler, runtime, and a set of optimizations. Our approach shows generated code, on a set of popular neural network architectures, is faster than hand-optimized implementations.
Motivation & Objective
- To address the lack of high-level abstractions for FHE programming, which currently requires low-level, error-prone manual tuning.
- To decouple FHE scheme advancements from compiler and runtime development, enabling independent innovation.
- To build an end-to-end system that compiles and executes DNN inference securely and efficiently on encrypted data.
- To automate critical performance-critical optimizations such as data layout selection and rotation key management.
- To demonstrate that automated compilation can outperform hand-optimized FHE implementations for DNNs.
Proposed method
- Design and specification of the Homomorphic Instruction Set Architecture (HISA), a compact interface abstracting FHE operations.
- Implementation of a compiler that translates high-level DNN models into optimized FHE-compiled code using HISA.
- Runtime system that manages memory layout, execution scheduling, and FHE parameter management for efficient evaluation.
- Automatic selection of optimal data layouts per model using a cost model tailored to the HEAAN FHE scheme.
- Compiler passes for kernel fusion and rotation key optimization to reduce noise growth and improve performance.
- Integration of polynomial approximations for non-polynomial activation functions (e.g., ReLU) to enable FHE compatibility.
Experimental results
Research questions
- RQ1Can a high-level abstraction like HISA effectively decouple FHE scheme evolution from application-level compiler and runtime development?
- RQ2How effective is automatic data layout selection in minimizing FHE computation cost for DNNs?
- RQ3To what extent can compiler optimizations such as kernel fusion and rotation key management improve FHE performance?
- RQ4Can automated compilation outperform hand-optimized FHE implementations for DNN inference?
- RQ5How does the system handle precision and noise management in FHE-encrypted DNN inference?
Key findings
- CHET-generated code for popular DNNs achieves faster performance than hand-optimized implementations, demonstrating the effectiveness of automated optimization.
- The rotation key optimization pass significantly improves performance across all evaluated networks, with average latency reductions observed in Figure 9.
- Automatic data layout selection based on a cost model leads to better performance than manual layout choices, which are error-prone and hard to tune.
- The system successfully compiles and executes the deepest FHE-based CNNs to date, enabling complex models under full homomorphic encryption.
- The use of polynomial approximations for activation functions enables FHE compatibility while maintaining high model accuracy.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.