Lune

NeurIPS2024Top-tier venue

Nimbus: Secure and Efficient Two-Party Inference for Transformers

Zhengyi Li, Kang Yang, Jin Tan, Wen-jie Lu, Haoqi Wu, Xiao Wang, Yu Yu, Derun Zhao, Yancheng Zheng, Minyi Guo, Jingwen Leng

Abstract

Transformer models have gained significant attention due to their power in machine learning tasks. Their extensive deployment has raised concerns about the potential leakage of sensitive information during inference. However, when being applied to Transformers, existing approaches based on secure two-party computation (2PC) bring about efficiency limitations in two folds: (1) resource-intensive matrix multiplications in linear layers, and (2) complex non-linear activation functions like GELU\mathsf{GELU} and Softmax\mathsf{Softmax}. This work presents a new two-party inference framework Nimbus\mathsf{Nimbus} for Transformer models. For the linear layer, we propose a new 2PC paradigm along with an encoding approach to securely compute matrix multiplications based on an outer-product insight, which achieves 2.9×∼12.5×2.9\times \sim 12.5\times performance improvements compared to the state-of-the-art (SOTA) protocol. For the non-linear layer, through a new observation of utilizing the input distribution, we propose an approach of low-degree polynomial approximation for GELU\mathsf{GELU} and Softmax\mathsf{Softmax}, which improves the performance of the SOTA polynomial approximation by 2.9×∼4.0×2.9\times \sim 4.0\times, where the average accuracy loss of our approach is 0.08% compared to the non-2PC inference without privacy. Compared with the SOTA two-party inference, Nimbus\mathsf{Nimbus} improves the end-to-end performance of inference by 2.7×∼4.7×2.7\times \sim 4.7\times across different network settings.

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.

13 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

  • Breaking the Layer Barrier: Remodeling Private Transformer Inference with Hybrid CKKS and MPC cites GAZELLE: A Low Latency Framework for Secure Neural Network Inference
  • MOSAIC: Masked Outsourcing of Secure AI Computations cites GAZELLE: A Low Latency Framework for Secure Neural Network Inference
  • Sort, Sweep, Mirror: Batch Private Interval Lookup with Logarithmic Cost cites Oblivious Neural Network Predictions via MiniONN Transformations
  • Sort, Sweep, Mirror: Batch Private Interval Lookup with Logarithmic Cost cites SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models
  • CrypTen: Secure Multi-Party Computation Meets Machine Learning cites Oblivious Neural Network Predictions via MiniONN Transformations
  • CrypTen: Secure Multi-Party Computation Meets Machine Learning cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • CrypTen: Secure Multi-Party Computation Meets Machine Learning cites GAZELLE: A Low Latency Framework for Secure Neural Network Inference
  • CENTAUR: Bridging the Impossible Trinity of Privacy, Efficiency, and Performance in Privacy-Preserving Transformer Inference cites CrypTen: Secure Multi-Party Computation Meets Machine Learning
  • GAZELLE: A Low Latency Framework for Secure Neural Network Inference cites Oblivious Neural Network Predictions via MiniONN Transformations
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers13

  1. 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
  2. MOSAIC: Masked Outsourcing of Secure AI ComputationsJames Hsin-yu Chiang, Sheila Zingg, Kari Kostiainen, Srdjan CapkunCCS 2026 · 4 citations
  3. Sort, Sweep, Mirror: Batch Private Interval Lookup with Logarithmic CostAndes Y. L. Kei, Lucien K. L. Ng, Jack P. K. Ma, Sherman S. M. ChowS&P 2026 · 2 citations
  4. OSNIP: Balancing the Privacy-Utility-Efficiency Trilemma in LLM Inference via Obfuscated Semantic Null SpaceZhiyuan Cao, Zeyu Ma, Chenhao Yang, HAN ZHENG et al.ICML 2026 · 1 citation
  5. 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

Builds on22

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  2. SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language ModelsGuangxuan Xiao, Ji Lin, Mickaël Seznec, Hao Wu et al.ICML 2023 · 1,493 citations
  3. GAZELLE: A Low Latency Framework for Secure Neural Network InferenceChiraag Juvekar, Vinod Vaikuntanathan, Anantha P. ChandrakasanUSENIX Security 2018 · 1,075 citations
  4. Oblivious Neural Network Predictions via MiniONN TransformationsJian Liu, Mika Juuti, Yao Lu, N. AsokanCCS 2017 · 800 citations
  5. CrypTen: Secure Multi-Party Computation Meets Machine LearningBrian Knott, Shobha Venkataraman, Awni Y. Hannun, Shubho Sengupta et al.NeurIPS 2021 · 573 citations

Related papers

  1. SEAF: Secure Evaluation on Activation Functions with Dynamic Precision for Secure Two-Party InferenceHao Guo, Zhaoqian Liu, Ximing Fu, Zhusen LiuUSENIX Security 2025
  2. SecFormer: Fast and Accurate Privacy-Preserving Inference for Transformer Models via SMPCJinglong Luo, Yehong Zhang, Zhuo Zhang, Jiaqi Zhang et al.ACL Findings 2024 · 23 citations
  3. BOLT: Privacy-Preserving, Accurate and Efficient Inference for TransformersQi Pang, Jinhao Zhu, Helen Möllering, Wenting Zheng et al.S&P 2024 · 149 citations
  4. Mosformer: Maliciously Secure Three-Party Inference Framework for Large TransformersKe Cheng, Yuheng Xia, Anxiao Song, Jiaxuan Fu et al.CCS 2025
  5. PCFormer: Accelerating Privacy-preserving Transformer Inference by Partition and CombinationBo Zeng, Zhi Pang, Yuyang Zhang, Kai Zhao et al.AAAI 2026
Dusk over the sea between two cliffs drawn in fine vertical lines