Skip to main content
CenXiv.org
此网站处于试运行阶段,支持我们!
我们衷心感谢所有贡献者的支持。
贡献
赞助
cenxiv logo > cs > arXiv:2501.01672v2

帮助 | 高级搜索

计算机科学 > 密码学与安全

arXiv:2501.01672v2 (cs)
[提交于 2025年1月3日 (v1) ,最后修订 2025年1月7日 (此版本, v2)]

标题: 基于全同态加密的微调大语言模型的实用安全推理算法

标题: Practical Secure Inference Algorithm for Fine-tuned Large Language Model Based on Fully Homomorphic Encryption

Authors:Zhang Ruoyan, Zheng Zhongxiang, Bao Wankang
摘要: 大型语言模型(LLMs)目前处于机器学习领域的前沿,显示出广泛的应用前景,但同时也暴露了隐私泄露的一些风险。 我们将全同态加密(FHE)和可证明安全理论与参数高效微调(PEFT)相结合,提出了一种针对LLMs的高效安全推理方案。 更具体地说,我们关注依赖于开源基础模型并使用LoRA通过私有数据集进行微调的预训练LLMs。 这是垂直领域模型如LawGPT和BenTsao的常见路线图。 我们使用了两种关键技术。 首先,我们将整个模型分为公共部分和私人部分。 公共部分的权重是公开可访问的(例如,开源的基础模型),而私人部分需要被保护(例如,LoRA矩阵)。 这样可以大大减少在私有数据上计算带来的开销。 其次,我们提出了一种通用方法,将一个线性层转换为另一个线性层,该方法能够抵御模型提取攻击并保留其原始功能,称为私有线性层(PLL)。 然后我们将这种方法应用于LoRA矩阵,以确保服务器保护其私有权重而不限制用户的输入。 我们还表明,对PLL执行模型提取攻击的难度可以降低到著名的困难问题学习带误差(LWE)。 将此方法与FHE结合,我们可以同时保护用户输入。 在本文中,我们使用开源模型ChatGLM2-6B作为基础模型,并通过LoRA进行微调。 实验结果表明,我们方案的推理效率达到1.61秒/标记,显示该方案具有良好的实用性。
摘要: Large language models(LLMs) are currently at the forefront of the machine learning field, which show a broad application prospect but at the same time expose some risks of privacy leakage. We combined Fully Homomorphic Encryption(FHE) and provable security theory with Parameter-Efficient Fine-Tuning(PEFT) to propose an efficient and secure inference scheme for LLMs. More specially, we focus on pre-trained LLMs which rely on open-sourced base model and then fine-tuned with the private datasets by LoRA. This is a popular road-map for Vertical Domain Models such as LawGPT and BenTsao. We use two key technologies below. Firstly, we divide the whole model into the public part and the private part. The weights of public part are publicly accessible(e.g. the open-sourced base model) while the private part needs to be protected(e.g. the LoRA matrices). In this way, the overhead brought by computing on private data can be greatly reduced. Secondly, we propose a general method to transform a linear layer into another one which provides security against model extraction attacks and preserves its original functionality, which denoted as Private Linear Layer(PLL). Then we use this method on the LoRA matrices to make sure that the server protects their private weights without restricting the user's input. We also show that the difficulty of performing model extraction attacks for PLL can be reduced to the well-known hard problem Learning with Errors(LWE). Combing this method with FHE, we can protect user's input at the same time. In this paper, we use the open-source model ChatGLM2-6B as the base model which is fine-tuned by LoRA. Experimental results show the inference efficiency of our scheme reaches 1.61s/token which displays that the scheme has good practicality.
主题: 密码学与安全 (cs.CR)
引用方式: arXiv:2501.01672 [cs.CR]
  (或者 arXiv:2501.01672v2 [cs.CR] 对于此版本)
  https://doi.org/10.48550/arXiv.2501.01672
通过 DataCite 发表的 arXiv DOI

提交历史

来自: Zhang Ruoyan [查看电子邮件]
[v1] 星期五, 2025 年 1 月 3 日 07:19:23 UTC (375 KB)
[v2] 星期二, 2025 年 1 月 7 日 05:36:41 UTC (375 KB)
全文链接:

获取论文:

    查看标题为《》的 PDF
  • 查看中文 PDF
  • 查看 PDF
  • HTML(实验性)
  • TeX 源代码
  • 其他格式
查看许可
当前浏览上下文:
cs.CR
< 上一篇   |   下一篇 >
新的 | 最近的 | 2025-01
切换浏览方式为:
cs

参考文献与引用

  • NASA ADS
  • 谷歌学术搜索
  • 语义学者
a 导出 BibTeX 引用 加载中...

BibTeX 格式的引用

×
数据由提供:

收藏

BibSonomy logo Reddit logo

文献和引用工具

文献资源探索 (什么是资源探索?)
连接的论文 (什么是连接的论文?)
Litmaps (什么是 Litmaps?)
scite 智能引用 (什么是智能引用?)

与本文相关的代码,数据和媒体

alphaXiv (什么是 alphaXiv?)
CatalyzeX 代码查找器 (什么是 CatalyzeX?)
DagsHub (什么是 DagsHub?)
Gotit.pub (什么是 GotitPub?)
Hugging Face (什么是 Huggingface?)
带有代码的论文 (什么是带有代码的论文?)
ScienceCast (什么是 ScienceCast?)

演示

复制 (什么是复制?)
Hugging Face Spaces (什么是 Spaces?)
TXYZ.AI (什么是 TXYZ.AI?)

推荐器和搜索工具

影响之花 (什么是影响之花?)
核心推荐器 (什么是核心?)
IArxiv 推荐器 (什么是 IArxiv?)
  • 作者
  • 地点
  • 机构
  • 主题

arXivLabs:与社区合作伙伴的实验项目

arXivLabs 是一个框架,允许合作伙伴直接在我们的网站上开发和分享新的 arXiv 特性。

与 arXivLabs 合作的个人和组织都接受了我们的价值观,即开放、社区、卓越和用户数据隐私。arXiv 承诺这些价值观,并且只与遵守这些价值观的合作伙伴合作。

有一个为 arXiv 社区增加价值的项目想法吗? 了解更多关于 arXivLabs 的信息.

这篇论文的哪些作者是支持者? | 禁用 MathJax (什么是 MathJax?)
  • 关于
  • 帮助
  • contact arXivClick here to contact arXiv 联系
  • 订阅 arXiv 邮件列表点击这里订阅 订阅
  • 版权
  • 隐私政策
  • 网络无障碍帮助
  • arXiv 运营状态
    通过...获取状态通知 email 或者 slack

京ICP备2025123034号