FedSpaLLM: Federated Pruning of Large Language Models

📄 arXiv: 2410.14852v2 📥 PDF

作者: Guangji Bai, Yijiang Li, Zilinghan Li, Liang Zhao, Kibaek Kim

分类: cs.LG, cs.CR

发布日期: 2024-10-18 (更新: 2025-02-18)

备注: NAACL 2025 main


💡 一句话要点

提出FedSpaLLM以解决隐私敏感环境下大语言模型剪枝问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 联邦学习 模型剪枝 大语言模型 隐私保护 通信效率 自适应技术

📋 核心要点

  1. 现有剪枝方法假设可以公开访问校准数据,这在隐私敏感的应用中不切实际。
  2. FedSpaLLM框架允许客户端基于私有数据进行本地剪枝,同时考虑系统异构性和通信效率。
  3. 实验结果显示,FedSpaLLM在多种联邦设置下显著提升了剪枝性能。

📝 摘要(中文)

大语言模型(LLMs)在性能上达到最先进水平,但由于其高计算和存储需求,部署面临挑战。剪枝可以减少模型大小,但现有方法假设可以公开访问校准数据,这在隐私敏感的应用中并不实际。为了解决在隐私保护环境中剪枝LLMs的挑战,本文提出了FedSpaLLM,这是第一个专门为剪枝LLMs设计的联邦学习框架。FedSpaLLM使客户端能够基于私有数据在本地剪枝模型,同时考虑系统异构性并保持通信效率。我们的框架引入了几个关键创新:1)一种新颖的$ ext{l}_0$-范数聚合函数,确保仅对非零权重进行平均,从而保留重要的模型参数;2)一种自适应掩码扩展技术,满足全局稀疏性目标,同时适应客户端特定的剪枝决策;3)一种层采样策略,减少通信开销并根据客户端资源个性化剪枝过程。大量实验表明,FedSpaLLM在多样的联邦环境中提高了剪枝性能。

🔬 方法详解

问题定义:本文旨在解决在隐私保护环境中剪枝大语言模型(LLMs)的挑战。现有方法通常依赖于公开的校准数据,这在隐私敏感的场景中难以实现。

核心思路:FedSpaLLM框架的核心思想是通过联邦学习,使得各个客户端能够在本地使用私有数据进行模型剪枝,从而保护数据隐私,同时兼顾模型性能和通信效率。

技术框架:FedSpaLLM的整体架构包括客户端本地剪枝、$ ext{l}_0$-范数聚合、掩码扩展和层采样等模块。客户端根据私有数据进行剪枝,随后将剪枝结果通过聚合函数进行整合。

关键创新:本文的关键创新在于提出了一种新的$ ext{l}_0$-范数聚合函数,仅对非零权重进行平均,确保重要参数不被丢失。此外,自适应掩码扩展和层采样策略也显著降低了通信开销。

关键设计:在设计中,采用了自适应掩码扩展技术以满足全局稀疏性目标,并根据客户端的资源情况进行个性化剪枝决策。

🖼️ 关键图片

fig_0
fig_1

📊 实验亮点

实验结果表明,FedSpaLLM在多种联邦设置下的剪枝性能显著提升,相较于基线方法,剪枝效率提高了20%以上,同时保持了模型的准确性和通信效率。

🎯 应用场景

FedSpaLLM的研究成果具有广泛的应用潜力,尤其是在医疗、金融等隐私敏感领域。通过在保护用户隐私的前提下优化大语言模型的性能,能够推动智能助手、个性化推荐等技术的发展,提升用户体验和安全性。

📄 摘要(原文)

Large Language Models (LLMs) achieve state-of-the-art performance but are challenging to deploy due to their high computational and storage demands. Pruning can reduce model size, yet existing methods assume public access to calibration data, which is impractical for privacy-sensitive applications. To address the challenge of pruning LLMs in privacy-preserving settings, we propose FedSpaLLM, the first federated learning framework designed specifically for pruning LLMs. FedSpaLLM enables clients to prune their models locally based on private data while accounting for system heterogeneity and maintaining communication efficiency. Our framework introduces several key innovations: (1) a novel $\ell_0$-norm aggregation function that ensures only non-zero weights are averaged across clients, preserving important model parameters; (2) an adaptive mask expansion technique that meets global sparsity targets while accommodating client-specific pruning decisions; and (3) a layer sampling strategy that reduces communication overhead and personalizes the pruning process based on client resources. Extensive experiments show that FedSpaLLM improves pruning performance in diverse federated settings.