本文提出 East 安全 Transformer 推理框架,通过不经意分段多项式、softmax 与层归一化协议及多项优化,在 BERT 上实现免微调的明文一致准确率,并显著降低通信和运行开销。
摘要:
由于其强大的优势,Transformer 已成功应用于 ChatGPT 等实际场景。然而,在服务过程中,用户的输入会泄露给模型提供者。随着人们对隐私的关注,保护隐私的 Transformer 推理成为此类服务的需求。非线性函数的安全协议在保护隐私的 Transformer 推理中至关重要,但相关研究仍不充分。因此,为非线性函数设计实用的安全协议虽然困难,却对模型性能具有重要意义。在本工作中,我们提出了一个名为 East 的框架,以实现高效且准确的安全 Transformer 推理。首先,我们提出一种新的不经意分段多项式求值算法,并将其应用于激活函数;与现有方法相比,该算法将 GELU 的运行时间和通信量分别降低超过 1.5 倍和 2.5 倍。其次,我们精心设计了 softmax 和层归一化的安全协议,以忠实地保持所需功能。第三,我们实施了若干细致的优化以提升整体效率。我们将 East 应用于 BERT,结果表明,在无需微调的情况下,推理准确率与明文推理保持一致。与 Iron 相比,我们的通信量约降低 1.8 倍,同时运行时间降低在 1.2 倍以内。
英文摘要:
Transformer has been successfully used in practical applications, such as ChatGPT, due to its powerful advantages. However, users' input is leaked to the model provider during the service. With people's attention to privacy, privacy-preserving Transformer inference is on the demand of such services. Secure protocols for non-linear functions are crucial in privacy-preserving Transformer inference, which are not well studied. Thus, designing practical secure protocols for non-linear functions is hard but significant to model performance. In this work, we propose a framework \emph{East} to enable efficient and accurate secure Transformer inference. Firstly, we propose a new oblivious piecewise polynomial evaluation algorithm and apply it to the activation functions, which reduces the runtime and communication of GELU by over 1.5$\times$ and 2.5$\times$, compared to prior arts. Secondly, the secure protocols for softmax and layer normalization are carefully designed to faithfully maintain the desired functionality. Thirdly, several optimizations are conducted in detail to enhance the overall efficiency. We applied \emph{East} to BERT and the results show that the inference accuracy remains consistent with the plaintext inference without fine-tuning. Compared to Iron, we achieve about 1.8$\times$ lower communication within 1.2$\times$ lower runtime.
Attention in Motion: Secure Platooning via Transformer-based Misbehavior Detection
Networked Systems Security (NSS) Group, KTH Royal Institute of Technology(网络化系统安全(NSS)小组,皇家理工学院);Tech Validation – AI department at the Chief Technology Officer (CTO) Organization, Lenovo(首席技术官(CTO)组织的人工智能部门,联想)
FedSecureFormer: A Fast, Federated and Secure Transformer Framework for Lightweight Intrusion Detection in Connected and Autonomous Vehicles
Department of Computer Science and Information Systems, BITS Pilani, Pilani Campus(计算机科学与信息系统系,比斯汉学院);Department of Systems and Computer Engineering, Carleton University(系统与计算机工程系,卡尔顿大学)
AttentionGuard: Transformer-based Misbehavior Detection for Secure Vehicular Platoons
Networked Systems Security (NSS) Group\ Royal Institute of Technology Stockholm Sweden;Networked Systems Security (NSS) Group\ Royal Institute of Technology
CENTAUR: Bridging the Impossible Trinity of Privacy, Efficiency, and Performance in Privacy-Preserving Transformer Inference
Harbin Institute of Technology(哈尔滨工业大学);Pengcheng Laboratory(鹏城实验室);Fudan University(复旦大学);Shanghai Academy of AI for Science(上海人工智能科学研究院);Southwestern University of Finance and Economics(西南财经大学)
MPCFormer: fast, performant and private Transformer inference with MPC
Carnegie Mellon University(卡内基梅隆大学);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);Petuum Inc.(Petuum公司);University of California, Berkeley(加州大学伯克利分校)
PrivLLMSwarm: Privacy-Preserving LLM-Driven UAV Swarms for Secure IoT Surveillance
Department of Information and Communication Engineering, School of Computer and Communication Engineering, University of Science and Technology Beijing(信息与通信工程系,计算机与通信工程学院,北京科技大学)
CipherPrune: Efficient and Scalable Private Transformer Inference
University of Central Florida(中佛罗里达大学);University of Texas at San Antonio(德克萨斯大学圣安东尼奥分校);Ant Research(蚂蚁集团研究院);Indiana University Bloomington(印第安纳大学伯明顿分校)