用安全计算实现大模型私密微调,速度提升16倍
SecP-Tuning: Efficient Privacy-Preserving Prompt Tuning for Large Language Models via MPC
- 通过前向传播微调+数据方-服务器交互,避开后向传播隐私计算
- 新注意力机制降低计算复杂度,通信开销减少17至20倍
- 适合医疗金融等需保护隐私的场景,性能接近传统方法
大语言模型在医疗、金融等隐私敏感领域应用受限,因训练数据难以获取。基于安全多方计算(MPC)的隐私保护学习虽有理论保障,但此前仅适用于推理,微调时面临反向传播、优化器和自注意力操作的效率瓶颈。本文提出SecP-Tuning,首个面向大模型私密提示微调的MPC框架。通过前向仅微调(FoT)与数据方-服务器交互范式,避免了反向传播和优化过程中的隐私计算。同时设计高效的隐私保护随机特征注意力(RFA),缓解softmax自注意力的计算复杂度,并规避MPC不兼容的非线性操作。实验表明,相比全参数监督微调(SFT)和基于梯度的提示微调,SecP-Tuning实现约12倍和16倍端到端加速,通信开销减少17倍和20倍,且在多个少样本任务上性能接近梯度方法。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have revolutionized numerous fields, yet their adaptation to specialized tasks in privacy-sensitive domains such as healthcare and finance remains constrained due to the scarcity of accessible training data caused by stringent privacy requirements. Secure Multi-party Computation (MPC)-based privacy-preserving machine learning provides theoretical guarantees for the privacy of model parameters and data. However, its application to LLMs has been predominantly limited to inference, as fine-tuning introduces significant efficiency challenges, particularly in backward propagation, optimizer, and self-attention operations. To address these challenges, we propose SecP-Tuning, the first MPC-based framework designed for efficient, privacy-preserving prompt tuning of LLMs. SecP-Tuning innovatively integrates Forward-only Tuning (FoT) through the ``data owner-server interaction" paradigm, effectively removing the need for privacy-preserving computations in backward propagation and optimization processes. Furthermore, it devises an efficient privacy-preserving Random Feature Attention (RFA), effectively mitigating the computational complexity of softmax-based self-attention and circumventing MPC-incompatible nonlinear operations. Experimental results demonstrate that, compared to full-Parameter Supervised Fine-Tuning (SFT) and gradient-based prompt tuning, SecP-Tuning achieves approximately 12x and 16x end-to-end acceleration, as well as 17x and 20x reductions in communication overhead, respectively. Moreover, it delivers performance comparable to gradient-based methods across multiple few-shot tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。