Privacy-Preserving Inference for Quantized BERT Models

Tianpei Lu, Bingsheng Zhang, Lekun Peng, Bowen Zheng, Lichun Li +1 more
8/3/2025
cs.LGcs.CR

No confident code implementation found for this paper.

Abstract

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).

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{lu2025privacypreserving,
  title  = {Privacy-Preserving Inference for Quantized BERT Models},
  author = {Tianpei Lu and Bingsheng Zhang and Lekun Peng and Bowen Zheng and Lichun Li and Kui Ren},
  year   = {2025},
  eprint = {2508.01636},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.01636v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.01636.svg)](https://codeofpaper.com/paper/2508.01636)

Discussion