跳到主要导航 跳到搜索 跳到主要内容

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*
  • *此作品的通讯作者
  • Shanghai Jiao Tong University
  • State Key Laboratory of Cryptology
  • Ant Group
  • Northwestern University
  • Shanghai Qi Zhi Institute

科研成果: 期刊稿件会议文章同行评审

摘要

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 and Softmax. This work presents a new two-party inference framework 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× 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 and Softmax, which improves the performance of the SOTA polynomial approximation by 2.9× ∼ 4.0×, 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 improves the end-to-end performance of BERTbase inference by 2.7× ∼ 4.7× across different network settings.

源语言英语
期刊Advances in Neural Information Processing Systems
37
出版状态已出版 - 2024
已对外发布
活动38th Conference on Neural Information Processing Systems, NeurIPS 2024 - Vancouver, 加拿大
期限: 9 12月 202415 12月 2024

学术指纹

探究 'Nimbus: Secure and Efficient Two-Party Inference for Transformers' 的科研主题。它们共同构成独一无二的学术指纹。

引用此