arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.02486cs.CRcs.LG

适配加密的大语言模型架构

Encryption-Friendly LLM Architecture

Seoul National University(首尔大学);CryptoLab Inc(CryptoLab公司);UCLA(加利福尼亚大学洛杉矶分校)

Donghwan Rho, Taeseong Kim, Minje Park, Jung Woo Kim, Hyunsik Chae, Ernest K. Ryu, Jung Hee Cheon

AI总结:

针对大语言模型隐私保护需求,提出适配同态加密的Transformer架构,结合LoRA微调与高斯核实现显著计算加速且性能接近明文模型,为隐私保护LLM服务提供概念验证。

摘要:

大语言模型(LLM)可基于用户交互提供个性化响应,但这一应用场景引发了严重的隐私担忧。同态加密(HE)是一种支持在加密状态下进行算术运算的密码协议,为隐私保护机器学习(PPML)提供了潜在解决方案。然而,Transformer的计算密集性为将HE应用于LLM带来了挑战。本研究提出一种改进的适配HE的Transformer架构,重点面向个性化(私有)微调后的推理场景。通过利用LoRA微调与高斯核,我们实现了显著的计算加速——微调阶段提速6.94倍,推理阶段提速2.3倍,同时保持与明文模型相当的性能。我们的研究结果为在数据保护至关重要的领域提供隐私保护LLM服务提供了可行的概念验证。代码已在GitHub上开源。

英文摘要:

Large language models (LLMs) offer personalized responses based on user interactions, but this use case raises serious privacy concerns. Homomorphic encryption (HE) is a cryptographic protocol supporting arithmetic computations in encrypted states and provides a potential solution for privacy-preserving machine learning (PPML). However, the computational intensity of transformers poses challenges for applying HE to LLMs. In this work, we propose a modified HE-friendly transformer architecture with an emphasis on inference following personalized (private) fine-tuning. Utilizing LoRA fine-tuning and Gaussian kernels, we achieve significant computational speedups -- 6.94x for fine-tuning and 2.3x for inference -- while maintaining performance comparable to plaintext models. Our findings provide a viable proof of concept for offering privacy-preserving LLM services in areas where data protection is crucial. Our code is available on GitHub.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑