As more and more pre-trained language models adopt on-cloud deployment, the privacy issues grow quickly, mainly for the exposure of plain-text user data (e.g., search history, medical record, bank account). Privacy-preserving inference of transformer models is on the demand of cloud service users. To protect privacy, it is an attractive choice to compute only with ciphertext in homomorphic encryption (HE). However, enabling pre-trained models inference on ciphertext data is difficult due to the complex computations in transformer blocks, which are not supported by current HE tools yet. In this work, we introduce $\textit{THE-X}$, an approximation approach for transformers, which enables privacy-preserving inference of pre-trained models developed by popular frameworks. $\textit{THE-X}$ proposes a workflow to deal with complex computation in transformer networks, including all the non-polynomial functions like GELU, softmax, and LayerNorm. Experiments reveal our proposed $\textit{THE-X}$ can enable transformer inference on encrypted data for different downstream tasks, all with negligible performance drop but enjoying the theory-guaranteed privacy-preserving advantage.
翻译:随着越来越多的经过预先培训的语言模型在库德部署中采用,隐私问题迅速增加,主要是暴露普通用户数据(例如搜索历史、医疗记录、银行账户等),变压器模型的隐私保存推断是云层服务用户的需求。为了保护隐私,只能用同质加密(HE)中的密码来进行计算是一种有吸引力的选择。然而,由于变压器区块的复杂计算(目前HE工具尚未支持这些变压器),因此难以对变压器数据进行事先培训的推断。在这项工作中,我们引入了对变压器的近似法,使大众框架开发的预先培训模型的隐私权保留推断。 $\textit{THe-X}提议一个工作流程,处理变压器网络的复杂计算,包括GELU、软模和ThileNorm等所有非政治性功能。实验揭示了我们提议的$\textit{THE-X}的变压法方法,可以使变压式的变压式数据在不同的保密性数据上享有稳定的下层优势。