paper-with-me

홈 › Papers

SecFormer: Fast and Accurate Privacy-Preserving Inference for Transformer Models via SMPC

2024-01-01 · Jinglong Luo, Yehong Zhang, Zhuo Zhang, JiaQi Zhang, Xin Mu, Hui Wang, Yue Yu, Zenglin Xu

With the growing use of Transformer models hosted on cloud platforms to offer inference services, privacy concerns are escalating, especially concerning sensitive data like investment plans and bank account details. Secure Multi-Party Computing (SMPC) emerges as a promising solution to protect the privacy of inference data and model parameters. However, the application of SMPC in Privacy-Preserving Inference (PPI) for Transformer models often leads to considerable slowdowns or declines in performance. This is largely due to the multitude of nonlinear operations in the Transformer architecture, which are not well-suited to SMPC and difficult to circumvent or optimize effectively. To address this concern, we introduce a comprehensive PPI framework called SecFormer to achieve fast and accurate PPI for Transformer models. We successfully eliminate the high-cost exponential and maximum operations in PPI without sacrificing model performance and develop a suite of efficient SMPC protocols by employing suitable numerical computation methods to boost other complex nonlinear functions in PPI, including GeLU, LayerNorm, and a redesigned Softmax. Our extensive experiments reveal that SecFormer outperforms MPCFormer in performance, showing improvements of $3.4\%$ and $24.7\%$ for BERT$_{\text{BASE}}$ and BERT$_{\text{LARGE}}$, respectively. In terms of efficiency, SecFormer is 3.57 and 3.58 times faster than PUMA for BERT$_{\text{BASE}}$ and BERT$_{\text{LARGE}}$, demonstrating its effectiveness and speed.

📄 PDF Abstract BibTeX arXiv:2401.00793

Code (1)

jinglong696/secformer 공식 구현 jax

Tasks

Knowledge DistillationPrivacy Preserving

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Adam 설명 없음
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…

Similar Papers 제목 키워드 기반

DP-Fast MH: Private, Fast, and Accurate Metropolis-Hastings for Large-Scale Bayesian Inference

2023-03-10 · Wanrong Zhang, Ruqi Zhang

Bayesian inference provides a principled framework for learning from complex data and reasoning under uncertainty. It has been widely applied in machine learning tasks such as medical diagnosis, drug design, and policyma…

Bayesian InferenceDrug DesignMedical DiagnosisPrivacy Preserving

Privacy-Preserving Mechanisms Enable Cheap Verifiable Inference of LLMs

2026-02-19 · Arka Pal, Louai Zahran, William Gvozdjak, Akilesh Potti 외 arxiv

As large language models (LLMs) continue to grow in size, fewer users are able to host and run models locally. This has led to increased use of third-party hosting services. However, in this setting, there is a lack of g…

Private Posterior distributions from Variational approximations

2015-11-24 · Vishesh Karwa, Dan Kifer, Aleksandra B. Slavković

Privacy preserving mechanisms such as differential privacy inject additional randomness in the form of noise in the data, beyond the sampling mechanism. Ignoring this additional noise can lead to inaccurate and invalid i…

Privacy Preservingvalid

CryptGPU: Fast Privacy-Preserving Machine Learning on the GPU

2021-04-22 · Sijun Tan, Brian Knott, Yuan Tian, David J. Wu

We introduce CryptGPU, a system for privacy-preserving machine learning that implements all operations on the GPU (graphics processing unit). Just as GPUs played a pivotal role in the success of modern deep learning, the…

BIG-bench Machine LearningCPUGPUPrivacy Preserving+1

Efficient Privacy-Preserving KAN Inference Using Homomorphic Encryption

2024-09-12 · Zhizheng Lai, Yufei Zhou, Peijia Zheng, Lin Chen

The recently proposed Kolmogorov-Arnold Networks (KANs) offer enhanced interpretability and greater model expressiveness. However, KANs also present challenges related to privacy leakage during inference. Homomorphic enc…

image-classificationImage ClassificationKolmogorov-Arnold NetworksPrivacy Preserving