Paper 2026/174

STIP: Efficient and Secure Non-Interactive Transformer Inference via Compact Packing

Zihao Wang, National University of Defense Technology
Rongmao Chen, National University of Defense Technology
Xinwen Gao, National University of Defense Technology
Yi Wang, National University of Defense Technology
Lin Liu, National University of Defense Technology
Zixin Lan, National University of Defense Technology
Zhaoyu Wang, Shanghai Jiao Tong University
Shaojing Fu, National University of Defense Technology
Qiong Wang, National University of Defense Technology
Xinyi Huang, Nanjing University of Aeronautics and Astronautics
Abstract

Secure Transformer Inference (STFI) for LLMs aims to protect user inputs and model parameters. Fully Homomorphic Encryption (FHE) enables non-interactive STFI without intermediate communication, but its computational overhead remains substantial. Advancements have accelerated inference by optimizing packing strategies and reducing rotations. However, several challenges persist, including excessive rotations in ciphertext-ciphertext matrix multiplications (CCMMs), low input/output projection throughput, and expensive maximum/inverse operations, as well as wasted storage slots and inflated ciphertext counts due to sparse packing. Therefore, we propose STIP, an efficient and secure non-interactive transformer inference framework incorporating three novel packing strategies: (1) Real-Imaginary Hybrid Packing (RIHP) halves the rotation costs of CCMMs by enabling the simultaneous computation of two outputs within the real and imaginary components; (2) Double-Head Packing (DHP) maps adjacent heads to the real and imaginary components, doubling the throughput of attention projections; and (3) Adaptive Multi-Column Packing (AMCP) packs multiple feature columns into a single ciphertext, maximizing slot occupancy to reduce the total ciphertext count and enhance computational parallelism. For nonlinear layers, we employ the Gaussian Kernel instead of Softmax, eliminating the need for maximum and inverse operations, supported by a column-packed RIHP-based L2-norm algorithm. We reformulate the first Layer Normalization into an inverse-free form by exploiting scale-invariance. Compared with Euston (S&P’ 26), STIP requires 20.6$\times$ fewer rotations and achieves a 34.7$\times$ attention-layer speedup. End-to-end experiments on BERT-base show that STIP achieves an 8.5$\times$ speedup over Euston at batch size $t=32$, and 2.3$\times$, 4.8$\times$, and 2.7$\times$ over MOAI (ICLR' 26), THOR (CCS' 25), and Powerformer (ACL' 25) at $t=256$, respectively.

Metadata
Available format(s)
PDF
Category
Cryptographic protocols
Publication info
Preprint.
Keywords
Secure InferenceTransformer
Contact author(s)
wang_zihao @ nudt edu cn
chromao @ nudt edu cn
gaoxinwen17 @ nudt edu cn
wangyi14 @ nudt edu cn
liulin16 @ nudt edu cn
zixinlan @ nudt edu cn
zhihuizzz @ sjtu edu cn
fushaojing @ nudt edu cn
wangqiong @ nudt edu cn
xyhuang81 @ gmail com
History
2026-11-18: last of 2 revisions
2026-02-03: received
See all versions
Short URL
https://ia.cr/2026/174
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2026/174,
      author = {Zihao Wang and Rongmao Chen and Xinwen Gao and Yi Wang and Lin Liu and Zixin Lan and Zhaoyu Wang and Shaojing Fu and Qiong Wang and Xinyi Huang},
      title = {{STIP}: Efficient and Secure Non-Interactive Transformer Inference via Compact Packing},
      howpublished = {Cryptology {ePrint} Archive, Paper 2026/174},
      year = {2026},
      url = {https://eprint.iacr.org/2026/174}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.