arXiv:2505.15683cs.CLcs.AI2025-05AAAI被引 1

让大模型在保护隐私前提下高效联邦训练,支持动态调整分割点。

FedSEA-LLaMA: A Secure, Efficient and Adaptive Federated Splitting Framework for Large Language Models

  • 用高斯噪声加密隐藏状态,实现安全向量传输
  • 通过注意力掩码压缩和缓存协作,通信开销降低8倍
  • 可按任务需求动态调整模型分割位置,灵活性强

私有数据因质量高而有望提升大语言模型性能,但其分散在数据孤岛中且大模型计算成本高,限制了联邦环境下的应用。为此,提出基于Transformer的联邦分割模型,将大部分参数移至服务器或客户端,仅保留少量在客户端以保障数据隐私。然而该设计仍面临三大挑战:1)点对点密钥加密难以有效保护传输向量;2)大模型自回归特性导致联邦分割学习只能串行训练与推理,通信开销大;3)固定分割点缺乏对下游任务的适应性。本文提出FedSEA-LLaMA,一种基于LLaMA2的高效、安全、自适应联邦分割框架。首先,在前向传播隐藏状态中注入高斯噪声,实现端到端安全向量传输;其次,采用注意力掩码压缩与键值缓存协同机制,显著降低通信成本,加速训练与推理;第三,允许用户根据具体任务需求动态调整输入/输出模块的分割点。在自然语言理解、摘要生成和对话问答任务上的实验表明,FedSEA-LLaMA性能接近集中式LLaMA2,训练与推理速度最高提升8倍。对隐私攻击的分析及不同分割点的评估进一步验证了其安全性与适应性。

原文摘要 · Abstract (English)

Private data holds promise for improving LLMs due to its high quality, but its scattered distribution across data silos and the high computational demands of LLMs limit their deployment in federated environments. To address this, the transformer-based federated split models are proposed, which offload most model parameters to the server (or distributed clients) while retaining only a small portion on the client to ensure data privacy. Despite this design, they still face three challenges: 1) Peer-to-peer key encryption struggles to secure transmitted vectors effectively; 2) The auto-regressive nature of LLMs means that federated split learning can only train and infer sequentially, causing high communication overhead; 3) Fixed partition points lack adaptability to downstream tasks. In this paper, we introduce FedSEA-LLaMA, a Secure, Efficient, and Adaptive Federated splitting framework based on LLaMA2. First, we inject Gaussian noise into forward-pass hidden states to enable secure end-to-end vector transmission. Second, we employ attention-mask compression and KV cache collaboration to reduce communication costs, accelerating training and inference. Third, we allow users to dynamically adjust the partition points for input/output blocks based on specific task requirements. Experiments on natural language understanding, summarization, and conversational QA tasks show that FedSEA-LLaMA maintains performance comparable to centralized LLaMA2 and achieves up to 8x speedups in training and inference. Further analysis of privacy attacks and different partition points also demonstrates the effectiveness of FedSEA-LLaMA in security and adaptability.

联邦学习大模型隐私保护高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。