Paper 2023/1269

SIGMA: Secure GPT Inference with Function Secret Sharing

Kanav Gupta, Microsoft Research (India)
Neha Jawalkar, Indian Institute of Science Bangalore
Ananta Mukherjee, Microsoft Research (India)
Nishanth Chandran, Microsoft Research (India)
Divya Gupta, Microsoft Research (India)
Ashish Panwar, Microsoft Research (India)
Rahul Sharma, Microsoft Research (India)
Abstract

Secure 2-party computation (2PC) enables secure inference that offers protection for both proprietary machine learning (ML) models and sensitive inputs to them. However, the existing secure inference solutions suffer from high latency and communication overheads, particularly for transformers. Function secret sharing (FSS) is a recent paradigm for obtaining efficient 2PC protocols with a preprocessing phase. We provide SIGMA, the first end-to-end system for secure transformer inference based on FSS. By constructing new FSS-based protocols for complex machine learning functionalities, such as Softmax, GeLU and SiLU, and also accelerating their computation on GPUs, SIGMA improves the latency of secure inference of transformers by $11-19\times$ over the state-of-the-art that uses preprocessing and GPUs. We present the first secure inference of generative pre-trained transformer (GPT) models. In particular, SIGMA executes Meta's LLaMA2 (available on HuggingFace) with 13 billion parameters in 44 seconds and GPT2 in 1.6 seconds.

Metadata
Available format(s)
PDF
Category
Cryptographic protocols
Publication info
Preprint.
Keywords
Function Secret SharingMPCSecure inferencetransformersGPT
Contact author(s)
kanav0610 @ gmail com
jawalkarp @ iisc ac in
t-mukherjeea @ microsoft com
nichandr @ microsoft com
divya gupta @ microsoft com
ashishpanwar @ microsoft com
rahsha @ microsoft com
History
2023-12-16: revised
2023-08-22: received
See all versions
Short URL
https://ia.cr/2023/1269
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2023/1269,
      author = {Kanav Gupta and Neha Jawalkar and Ananta Mukherjee and Nishanth Chandran and Divya Gupta and Ashish Panwar and Rahul Sharma},
      title = {SIGMA: Secure GPT Inference with Function Secret Sharing},
      howpublished = {Cryptology ePrint Archive, Paper 2023/1269},
      year = {2023},
      note = {\url{https://eprint.iacr.org/2023/1269}},
      url = {https://eprint.iacr.org/2023/1269}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.