Lune

NDSS2024Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • CrypTFlow2: Practical 2-Party Secure Inference cites ABY3: A Mixed Protocol Framework for Machine Learning
  • CrypTFlow2: Practical 2-Party Secure Inference cites GAZELLE: A Low Latency Framework for Secure Neural Network Inference
  • ABY2.0: Improved Mixed-Protocol Secure Two-Party Computation cites ABY3: A Mixed Protocol Framework for Machine Learning
  • ABY2.0: Improved Mixed-Protocol Secure Two-Party Computation cites GAZELLE: A Low Latency Framework for Secure Neural Network Inference
  • CHLOE: Loop Transformation over Fully Homomorphic Encryption via Multi-Level Vectorization and Control-Path Reduction cites ABY3: A Mixed Protocol Framework for Machine Learning
  • CHLOE: Loop Transformation over Fully Homomorphic Encryption via Multi-Level Vectorization and Control-Path Reduction cites GAZELLE: A Low Latency Framework for Secure Neural Network Inference
  • PrivDNFIS: Privacy-preserving and Efficient Deep Neuro-Fuzzy Inference System cites CrypTFlow2: Practical 2-Party Secure Inference
  • Secure Outsourced Matrix Computation and Application to Neural Networks cites GAZELLE: A Low Latency Framework for Secure Neural Network Inference
  • SLOTHE : Lazy Approximation of Non-Arithmetic Neural Network Functions over Encrypted Data cites CHLOE: Loop Transformation over Fully Homomorphic Encryption via Multi-Level Vectorization and Control-Path Reduction
  • SLOTHE : Lazy Approximation of Non-Arithmetic Neural Network Functions over Encrypted Data cites GAZELLE: A Low Latency Framework for Secure Neural Network Inference
  • Sok: Private Transformer-based Model Inference cites CrypTFlow2: Practical 2-Party Secure Inference
  • Sok: Private Transformer-based Model Inference cites ABY2.0: Improved Mixed-Protocol Secure Two-Party Computation
  • Sok: Private Transformer-based Model Inference cites ABY3: A Mixed Protocol Framework for Machine Learning
  • Sok: Private Transformer-based Model Inference cites GAZELLE: A Low Latency Framework for Secure Neural Network Inference
  • Libra: Pattern-Scheduling Co-Optimization for Cross-Scheme FHE Code Generation over GPGPU cites CHLOE: Loop Transformation over Fully Homomorphic Encryption via Multi-Level Vectorization and Control-Path Reduction
  • Libra: Pattern-Scheduling Co-Optimization for Cross-Scheme FHE Code Generation over GPGPU cites Secure Outsourced Matrix Computation and Application to Neural Networks
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. PrivDNFIS: Privacy-preserving and Efficient Deep Neuro-Fuzzy Inference SystemHao Ren, Xiao Lan, Rui Tang, Xingshu ChenAAAI 2025 · 3 citations
  2. 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
  3. SLOTHE : Lazy Approximation of Non-Arithmetic Neural Network Functions over Encrypted DataKevin Nam, Youyeon Joo, Seungjin Ha, Yunheung PaekUSENIX Security 2025
  4. Sok: Private Transformer-based Model InferenceYuntian Chen, Tianpei Lu, Zhanyong Tang, Bingsheng Zhang et al.USENIX Security 2026
  5. 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

  1. GAZELLE: A Low Latency Framework for Secure Neural Network InferenceChiraag Juvekar, Vinod Vaikuntanathan, Anantha P. ChandrakasanUSENIX Security 2018 · 1,075 citations
  2. ABY3: A Mixed Protocol Framework for Machine LearningPayman Mohassel, Peter RindalCCS 2018 · 898 citations
  3. Secure Outsourced Matrix Computation and Application to Neural NetworksXiaoqian Jiang, Miran Kim, Kristin E. Lauter, Yongsoo SongCCS 2018 · 359 citations
  4. ABY2.0: Improved Mixed-Protocol Secure Two-Party ComputationArpita Patra, Thomas Schneider, Ajith Suresh, Hossein YalameUSENIX Security 2021 · 307 citations
  5. CrypTFlow2: Practical 2-Party Secure InferenceDeevashwer Rathee, Mayank Rathee, Nishant Kumar, Nishanth Chandran et al.CCS 2020 · 294 citations

Related papers

  1. HEaaN.MLIR: An Optimizing Compiler for Fast Ring-Based Homomorphic EncryptionSunjae Park, Woosung Song, Seunghyeon Nam, Hyeongyu Kim et al.PLDI 2023 · 8 citations
  2. CROPHE: Cross-Operator Dataflow Optimization for Fully Homomorphic Encryption AcceleratorsXinhua Chen, Jiangbin Dong, Hongren Zheng, Tian Tang et al.HPCA 2026 · 1 citation
  3. A Tensor Compiler with Automatic Data Packing for Simple and Efficient Fully Homomorphic EncryptionAleksandar Krastev, Nikola Samardzic, Simon Langowski, Srinivas Devadas et al.PLDI 2024 · 23 citations
  4. 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
  5. HECO: Fully Homomorphic Encryption CompilerAlexander Viand, Patrick Jattke, Miro Haller, Anwar HithnawiUSENIX Security 2023
Dusk over the sea between two cliffs drawn in fine vertical lines