PrivTF: Efficient and Privacy-Preserving Transformer Inference With Optimized Protocols for Secure NLP

As many natural language processing services employ language models like Transformer in the cloud, privacy concerns arise for both users and model owners. Secure inference is proposed in the literature to perform the computing service securely. While prior schemes have studied convolutional neural networks and analogous models, they do not easily apply to Transformer because it requires more efficient protocols of different layers with large-sized weight matrices and complex non-linear functions on high-dimensional vectors. Therefore, we propose a privacy-preserving scheme PrivTF for secure transformer inference. PrivTF consists of protocols for Transformer-unique layers (encoder/decoder layer and their attention sub-layer) with our specialized design. Specifically, we present protocols of base sub-layers to address the heavy performance overhead: a new protocol of embedding layer, protocols of matrix multiplication and softmax that make use of mixed bitwidths, and protocols of GeLU functions and normalization. Analysis and experiments demonstrate that our protocols outperform previous secure inference works and maintain accuracy on practical inference tasks.

Authors

Institutions

Publication Details

Journal
IEEE Transactions on Network Science and Engineering
Published
2025-09-03
DOI
https://doi.org/10.1109/tnse.2025.3605623
Primary Topic
Cryptography and Data Security
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

PrivTF: Efficient and Privacy-Preserving Transformer Inference With Optimized Protocols for Secure NLP

Zhiyan Peng, Meng Hao, Jiantao Li, Kaiping Xue et al.
IEEE Transactions on Network Science and Engineering
Cryptography and Data Security
article

PrivTF: Efficient and Privacy-Preserving Transformer Inference With Optimized Protocols for Secure NLP

Zhiyan Peng, Meng Hao, Jiantao Li, Kaiping Xue, Bin Zhu, Yaxuan Huang, Tianwei Zhang
article en

Abstract

As many natural language processing services employ language models like Transformer in the cloud, privacy concerns arise for both users and model owners. Secure inference is proposed in the literature to perform the computing service securely. While prior schemes have studied convolutional neural networks and analogous models, they do not easily apply to Transformer because it requires more efficient protocols of different layers with large-sized weight matrices and complex non-linear functions on high-dimensional vectors. Therefore, we propose a privacy-preserving scheme PrivTF for secure transformer inference. PrivTF consists of protocols for Transformer-unique layers (encoder/decoder layer and their attention sub-layer) with our specialized design. Specifically, we present protocols of base sub-layers to address the heavy performance overhead: a new protocol of embedding layer, protocols of matrix multiplication and softmax that make use of mixed bitwidths, and protocols of GeLU functions and normalization. Analysis and experiments demonstrate that our protocols outperform previous secure inference works and maintain accuracy on practical inference tasks.

IEEE Transactions on Network Science and EngineeringVol. 13
University of Science and Technology of China (CN), University of Electronic Science and Technology of China (CN), Nanyang Technological University (SG)
Openalex Percentile: Top 88%
Cryptography and Data Security
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.