Paper 2026/174

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

Zihao Wang
Rongmao Chen
Xinwen Gao
Yi Wang
Lin Liu
Zixin Lan
Zhaoyu Wang
Shaojing Fu
Qiong Wang
Xinyi Huang
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.

PDF
BibTeX
ePrint ↗
@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}
}
Category
Cryptographic protocols
License
CC BY
Submitted
Updated
Versions
2 earlier

Report a problem

Comments

Log in or create an account

Privacy