arXiv:2508.01636cs.LGcs.CR2025-08

提出安全推理新方法,让量化BERT模型运行快8倍以上

Privacy-Preserving Inference for Quantized BERT Models

  • 分层1比特权重量化+多输入查表协议,安全计算激活函数
  • 在BERT-base上实现最高22倍加速,显著降低通信与计算开销
  • 适合医疗等隐私敏感场景的高效安全推理,无需公开量化参数

随着生成式模型在医疗、个性化服务等隐私敏感领域部署增多,安全推理成为关键挑战。安全多方计算(MPC)虽能保障隐私,但浮点运算的安全评估代价高昂。量化将浮点运算转为低精度整数计算,有效降低开销。现有MPC量化推理方法或依赖公开量化参数(有隐私风险),或在处理非线性函数如激活函数和softmax时效率低下。本文提出细粒度、逐层量化方案,支持1比特权重全连接层的安全计算;设计多输入查表协议高效安全地计算softmax;采用双重秘密共享并用查表完成精度转换,彻底消除截断开销。在BERT-base模型上的实验表明,相比Lu等人(NDSS 25)提升8倍,相比Gupta等人(PETS 24)提升9倍,相比Knott等人(NeurIPS 21)提升22倍。

原文摘要 · Abstract (English)

With the increasing deployment of generative machine learning models in privacy-sensitive domains such as healthcare and personalized services, ensuring secure inference has become a critical challenge. Secure multi-party computation (MPC) enables privacy-preserving model inference but suffers from high communication and computation overhead. The main bottleneck lies in the expensive secure evaluation of floating-point operations. Quantization offers a promising solution by converting floating-point operations into lower-precision integer computations, significantly reducing overhead. However, existing MPC-based quantized inference methods either rely on public quantization parameters-posing privacy risks-or suffer from inefficiencies, particularly in handling nonlinear functions such as activations and softmax. In this work, we propose a fine-grained, layer-wise quantization scheme and support 1-bit weight fully connected layers in a secure setting. We design a multi-input lookup table protocol to evaluate softmax efficiently and securely. Furthermore, we use dual secret sharing schemes and perform precision conversions via lookup tables, eliminating truncation overhead entirely. Experimental evaluation on BERT-base models demonstrates that our approach achieves up to $8\times$ speedup compared to Lu \emph{et al}. (NDSS 25), $9\times$ speedup compared to Gupta \emph{et al}. (PETS 24) and $22 \times$ speedup compared to Knott \emph{et al}. (NeurIPS 21).

安全推理量化BERTMPC

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。