Lune

DAC2023Top-tier venue

Primer: Fast Private Transformer Inference on Encrypted Data

Mengxin Zheng, Qian Lou, Lei Jiang

Abstract

It is increasingly important to enable privacy-preserving inference for cloud services based on Transformers. Post-quantum cryptographic techniques, e.g., fully homomorphic encryption (FHE), and multi-party computation (MPC), are popular methods to support private Transformer inference. However, existing works still suffer from prohibitively computational and communicational overhead. In this work, we present, Primer, to enable a fast and accurate Transformer over encrypted data for natural language processing tasks. In particular, Primer is constructed by a hybrid cryptographic protocol optimized for attention-based Transformer models, as well as techniques including computation merge and tokens-first ciphertext packing. Comprehensive experiments on encrypted language modeling show that Primer achieves state-of-the-art accuracy and reduces the inference latency by 90.6% ∼ 97.5% over previous methods.

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.

10 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

  • zkVC: Fast Zero-Knowledge Proof for Private and Verifiable Computing cites SAFENet: A Secure, Accurate and Fast Neural Network Inference
  • Converting Transformers to Polynomial Form for Secure Inference Over Homomorphic Encryption cites THE-X: Privacy-Preserving Transformer Inference with Homomorphic Encryption
  • EVA: an encrypted vector arithmetic language and compiler for efficient homomorphic computation cites GAZELLE: A Low Latency Framework for Secure Neural Network Inference
  • DictPFL: Efficient and Private Federated Learning on Encrypted Gradients cites SAFENet: A Secure, Accurate and Fast Neural Network Inference
  • CENTAUR: Bridging the Impossible Trinity of Privacy, Efficiency, and Performance in Privacy-Preserving Transformer Inference cites THE-X: Privacy-Preserving Transformer Inference with Homomorphic Encryption
  • AutoPrivacy: Automated Layer-wise Parameter Selection for Secure Neural Network Inference cites GAZELLE: A Low Latency Framework for Secure Neural Network Inference
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers10

  1. PrivacyRestore: Privacy-Preserving Inference in Large Language Models via Privacy Removal and RestorationZiqian Zeng, Jianwei Wang, Junyao Yang, Zhengdong Lu et al.ACL 2025 · 31 citations
  2. Converting Transformers to Polynomial Form for Secure Inference Over Homomorphic EncryptionItamar Zimerman, Moran Baruch, Nir Drucker, Gilad Ezov et al.ICML 2024 · 26 citations
  3. CENTAUR: Bridging the Impossible Trinity of Privacy, Efficiency, and Performance in Privacy-Preserving Transformer InferenceJinglong Luo, Guanzhong Chen, Yehong Zhang, Shiyu Liu et al.ACL 2025 · 9 citations
  4. DictPFL: Efficient and Private Federated Learning on Encrypted GradientsJiaqi Xue, Mayank Kumar, Yuzhang Shang, Shangqian Gao et al.NeurIPS 2025 · 4 citations
  5. zkVC: Fast Zero-Knowledge Proof for Private and Verifiable ComputingYancheng Zhang, Mengxin Zheng, Xun Chen, Jingtong Hu et al.DAC 2025 · 3 citations

Builds on6

  1. GAZELLE: A Low Latency Framework for Secure Neural Network InferenceChiraag Juvekar, Vinod Vaikuntanathan, Anantha P. ChandrakasanUSENIX Security 2018 · 1,075 citations
  2. 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
  3. THE-X: Privacy-Preserving Transformer Inference with Homomorphic EncryptionTianyu Chen, Hangbo Bao, Shaohan Huang, Li Dong et al.ACL Findings 2022 · 86 citations
  4. SAFENet: A Secure, Accurate and Fast Neural Network InferenceQian Lou, Yilin Shen, Hongxia Jin, Lei JiangICLR 2021 · 65 citations
  5. AutoPrivacy: Automated Layer-wise Parameter Selection for Secure Neural Network InferenceQian Lou, Song Bian, Lei JiangNeurIPS 2020 · 41 citations

Related papers

  1. MERGE: Fast Private Text GenerationZi Liang, Pinghui Wang, Ruofei Zhang, Nuo Xu et al.AAAI 2024 · 15 citations
  2. Breaking the Layer Barrier: Remodeling Private Transformer Inference with Hybrid CKKS and MPCTianshi Xu, Wen-jie Lu, Jiangrui Yu, Yi Chen et al.USENIX Security 2025
  3. CipherPrune: Efficient and Scalable Private Transformer InferenceYancheng Zhang, Jiaqi Xue, Mengxin Zheng, Mimi Xie et al.ICLR 2025
  4. Tricycle: Private Transformer Inference with Tricyclic EncodingsLawrence Lim, Vikas Kalagi, Julia Novick, Jiaming Liu et al.CCS 2026 · 10 citations
  5. Encryption-Friendly LLM ArchitectureDonghwan Rho, Taeseong Kim, Minje Park, Jung Woo Kim et al.ICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines