Paper 2026/1292

CRAfT: Constant-Round Non-Polynomial Approximation and P2P Network for Secure Transformer Inference

Jinghao Zhao
Hongwei Yang
Xiaoyu Song
Meng Hao
Hui He
Weizhe Zhang
Abstract

Transformer models have recently emerged as a game-changing technology for applications in content generation. However, severe privacy concerns and the scalability bottlenecks of existing secure protocols limit their large-scale deployment. To address these challenges, we present CRAfT, an innovative system designed for high-scalability and low-latency secure Transformer inference. The core contributions of CRAfT are threefold: First, we propose a novel ciphertext packing strategy tailored for multiple mutually distrustful users. This approach completely eliminates the need for ciphertext rotations in linear projections layer and effectively offloads massive communication traffic to the high-speed P2P network. Second, we introduce a novel branch-free iterative fitting strategy based on trigonometric functions, which accurately approximates sigmoid-like functions (e.g., Tanh, Sigmoid, and erf in GELU). In the interval $[-3, 3]$, its approximation accuracy exceeds that of the plaintext Tanh-based GELU, while requiring only 4 communication rounds without relying on polynomial approximations. Finally, for complex operations like Softmax that exhibit partial sigmoid-like characteristics, we transform them into standard sigmoid-like functions, allowing us to directly apply our fitting strategy to minimize cryptographic costs while maintaining model accuracy. Comprehensive evaluations on BERT-base demonstrate that CRAfT increases multi-client inference throughput by up to $8.5\times$ and reduces per-client WAN communication volume by 38.4% compared to the highly optimized baseline (BumbleBee).

Metadata
Available format(s)
PDF
Category
Applications
Publication info
Preprint.
Keywords
Secure InferencePrivacy-Preserving Machine LearningSecure Multi-Party ComputationHomomorphic Encryption
Contact author(s)
zhaojinghao @ stu hit edu cn
yanghongwei @ hit edu cn
xiaoyu-song @ stu hit edu cn
haomeng @ hit edu cn
hehui @ hit edu cn
wzzhang @ hit edu cn
History
2026-06-24: approved
2026-06-19: received
See all versions
Short URL
https://ia.cr/2026/1292
License
Creative Commons Attribution-NonCommercial-NoDerivs
CC BY-NC-ND

BibTeX

@misc{cryptoeprint:2026/1292,
      author = {Jinghao Zhao and Hongwei Yang and Xiaoyu Song and Meng Hao and Hui He and Weizhe Zhang},
      title = {{CRAfT}: Constant-Round Non-Polynomial Approximation and {P2P} Network for Secure Transformer Inference},
      howpublished = {Cryptology {ePrint} Archive, Paper 2026/1292},
      year = {2026},
      url = {https://eprint.iacr.org/2026/1292}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.