SecFormer: Towards Fast and Accurate Privacy-Preserving Inference for Large Language Models

要約

推論サービスを提供するためにクラウド プラットフォームでホストされる大規模な言語モデルの使用が増えるにつれ、特に投資計画や銀行口座の詳細などの機密データに関するプライバシーの懸念が高まっています。
Secure Multi-Party Computing (SMPC) は、推論データとモデル パラメーターのプライバシーを保護する有望なソリューションとして浮上しています。
ただし、大規模な言語モデル、特に Transformer アーキテクチャに基づくものに対するプライバシー保護推論 (PPI) に SMPC を適用すると、多くの場合、パフォーマンスの大幅な速度低下や低下が発生します。
これは主に、Transformer アーキテクチャの多数の非線形操作が原因であり、これらは SMPC には適しておらず、効果的に回避または最適化することが困難です。
この懸念に対処するために、Transformer モデルの PPI でパフォーマンスと効率の最適なバランスを取るように設計された、SecFormer と呼ばれる高度な最適化フレームワークを導入しました。
知識蒸留技術を実装することで、モデルのパフォーマンスを犠牲にすることなく、PPI における高コストの指数演算と最大演算を排除することに成功しました。
さらに、セグメント化された多項式と Goldschmidt の方法を利用して、GeLU、LayerNorm、Softmax などの PPI 内の他の複雑な非線形関数を処理する一連の効率的な SMPC プロトコルを開発しました。
私たちの広範な実験により、SecFormer が MPCFormer よりもパフォーマンスが優れていることが明らかになり、BERT$_{\text{BASE}}$ と BERT$_{\text{LARGE}}$ でそれぞれ $5.6\%$ と $24.2\%$ の向上が示されました。
効率の点では、SecFormer は Puma よりも 3.4 倍および 3.2 倍高速であり、その有効性と速度を実証しています。

要約(オリジナル)

With the growing use of large language 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 large language models, particularly those based on the Transformer architecture, 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 are difficult to circumvent or optimize effectively. To address this concern, we introduce an advanced optimization framework called SecFormer, designed to strike an optimal balance between performance and efficiency in PPI for Transformer models. By implementing knowledge distillation techniques, we successfully eliminate the high-cost exponential and maximum operations in PPI without sacrificing model performance. Additionally, we have developed a suite of efficient SMPC protocols that utilize segmented polynomials and Goldschmidt’s method to handle other complex nonlinear functions within PPI, such as GeLU, LayerNorm, and Softmax. Our extensive experiments reveal that SecFormer outperforms MPCFormer in performance, showing improvements of $5.6\%$ and $24.2\%$ for BERT$_{\text{BASE}}$ and BERT$_{\text{LARGE}}$, respectively. In terms of efficiency, SecFormer is 3.4 and 3.2 times faster than Puma, demonstrating its effectiveness and speed.

arxiv情報

著者 Jinglong Luo,Yehong Zhang,Jiaqi Zhang,Xin Mu,Hui Wang,Yue Yu,Zenglin Xu
発行日 2024-01-01 15:40:35+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.CR, cs.LG パーマリンク