LLMs Can Understand Encrypted Prompt: Towards Privacy-Computing Friendly Transformers

Xuanqi Liu, Zhuotao Liu
5/28/2023
cs.LGcs.CLcs.CR

No official code found. Best implementation: privateLLM001/Private-LLM-Inference (16 stars, last commit 2023-05-22).

Abstract

The community explored to build private inference frameworks for transformer-based large language models (LLMs) in a server-client setting, where the server holds the model parameters and the client inputs its private data (or prompt) for inference. However, these frameworks impose significant overhead when the private inputs are forward propagated through the original LLMs. In this paper, we show that substituting the computation- and communication-heavy operators in the transformer architecture with privacy-computing friendly approximations can greatly reduce the private inference costs while incurring very minor impact on model performance. Compared to state-of-the-art Iron (NeurIPS 2022), our privacy-computing friendly model inference pipeline achieves a $5\times$ acceleration in computation and an 80% reduction in communication overhead, while retaining nearly identical accuracy.

View on arXivView PDF

Code Implementations(1)

165C, C#May 22, 20233 years ago

Similar Papers

Cite this paper

@article{liu2023llms,
  title  = {LLMs Can Understand Encrypted Prompt: Towards Privacy-Computing Friendly Transformers},
  author = {Xuanqi Liu and Zhuotao Liu},
  year   = {2023},
  eprint = {2305.18396},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.18396v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.18396.svg)](https://codeofpaper.com/paper/2305.18396)

Discussion