HEIR: A Unified Representation for Cross-Scheme Compilation of Fully Homomorphic Computation
Song Bian, Zian Zhao, Zhou Zhang, Ran Mao, Kohei Suenaga, Yier Jin, Zhenyu Guan, Jianwei Liu
Abstract
We propose a new compiler framework that automates code generation over multiple fully homomorphic encryption (FHE) schemes. While it was recently shown that algorithms combining multiple FHE schemes (e.g., CKKS and TFHE) achieve high execution efficiency and task utility at the same time, developing fast cross-scheme FHE algorithms for real-world applications generally require heavy hand-tuned optimizations by cryptographic experts, resulting in either high usability costs or low computational efficiency. To solve the usability and efficiency dilemma, we design and implement HEIR, a compiler framework based on multi-level intermediate representation (IR). To achieve cross-scheme compilation of efficient FHE circuits, we develop a two-stage code-lowering structure based on our custom IR dialects. First, the plaintext program along with the associated data types are converted into FHE-friendly dialects in the transformation stage. Then, in the optimization stage, we apply FHE-specific optimizations to lower the transformed dialect into our bottom-level FHE library operators. In the experiment, we implement the entire software stack for HEIR, and demonstrate that complex endto-end programs, such as homomorphic K-Means clustering and homomorphic data aggregation in databases, can easily be compiled to run 72-179× faster than the program generated by the state-of-the-art FHE compilers.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 66a012d3-51a2-417b-a1b6-c2d5e02959c3Cited by top-tier papers6
- PrivDNFIS: Privacy-preserving and Efficient Deep Neuro-Fuzzy Inference SystemHao Ren, Xiao Lan, Rui Tang, Xingshu ChenAAAI 2025 · 3 citations
- CHLOE: Loop Transformation over Fully Homomorphic Encryption via Multi-Level Vectorization and Control-Path ReductionSong Bian, Zian Zhao, Ruiyu Shen, Zhou Zhang et al.S&P 2025
- SLOTHE : Lazy Approximation of Non-Arithmetic Neural Network Functions over Encrypted DataKevin Nam, Youyeon Joo, Seungjin Ha, Yunheung PaekUSENIX Security 2025
- Sok: Private Transformer-based Model InferenceYuntian Chen, Tianpei Lu, Zhanyong Tang, Bingsheng Zhang et al.USENIX Security 2026
- Libra: Pattern-Scheduling Co-Optimization for Cross-Scheme FHE Code Generation over GPGPUSong Bian, Yintai Sun, Zian Zhao, Haowen Pan et al.USENIX Security 2026
Builds on32
- GAZELLE: A Low Latency Framework for Secure Neural Network InferenceChiraag Juvekar, Vinod Vaikuntanathan, Anantha P. ChandrakasanUSENIX Security 2018 · 1,075 citations
- ABY3: A Mixed Protocol Framework for Machine LearningPayman Mohassel, Peter RindalCCS 2018 · 898 citations
- Secure Outsourced Matrix Computation and Application to Neural NetworksXiaoqian Jiang, Miran Kim, Kristin E. Lauter, Yongsoo SongCCS 2018 · 359 citations
- ABY2.0: Improved Mixed-Protocol Secure Two-Party ComputationArpita Patra, Thomas Schneider, Ajith Suresh, Hossein YalameUSENIX Security 2021 · 307 citations
- CrypTFlow2: Practical 2-Party Secure InferenceDeevashwer Rathee, Mayank Rathee, Nishant Kumar, Nishanth Chandran et al.CCS 2020 · 294 citations
Related papers
- HEaaN.MLIR: An Optimizing Compiler for Fast Ring-Based Homomorphic EncryptionSunjae Park, Woosung Song, Seunghyeon Nam, Hyeongyu Kim et al.PLDI 2023 · 8 citations
- CROPHE: Cross-Operator Dataflow Optimization for Fully Homomorphic Encryption AcceleratorsXinhua Chen, Jiangbin Dong, Hongren Zheng, Tian Tang et al.HPCA 2026 · 1 citation
- MetaKernel: Enabling Efficient Encrypted Neural Network Inference through Unified MVM and ConvolutionPeng Yuan, Yan Liu, Jianxin Lai, Long Li et al.OOPSLA 2025 · 2 citations
- HECO: Fully Homomorphic Encryption CompilerAlexander Viand, Patrick Jattke, Miro Haller, Anwar HithnawiUSENIX Security 2023
- EVA: an encrypted vector arithmetic language and compiler for efficient homomorphic computationRoshan Dathathri, Blagovesta Kostova, Olli Saarikivi, Wei Dai et al.PLDI 2020 · 117 citations
