OpenFedLLM: Training Large Language Models on Decentralized Private Data via Federated Learning

📄 arXiv: 2402.06954v1 📥 PDF

作者: Rui Ye, Wenhao Wang, Jingyi Chai, Dihan Li, Zexi Li, Yinda Xu, Yaxin Du, Yanfeng Wang, Siheng Chen

分类: cs.LG, cs.CL, cs.DC, cs.MA

发布日期: 2024-02-10

备注: 28 pages, 3 figures, 16 tables

🔗 代码/项目: GITHUB


💡 一句话要点

提出OpenFedLLM以解决去中心化私有数据训练问题

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

关键词: 联邦学习 大型语言模型 隐私保护 协作训练 数据利用

📋 核心要点

  1. 现有方法依赖于公共数据,面临数据质量和数量的双重挑战,难以持续提升模型性能。
  2. 本文提出OpenFedLLM框架,通过联邦学习实现多个数据拥有者在不传输原始数据的情况下协作训练共享模型。
  3. 实验结果表明,所有FL算法在训练LLMs时均显著优于本地训练,尤其在金融领域表现突出。

📝 摘要(中文)

大型语言模型(LLMs)在多个领域取得了显著成功,但高质量公共数据将在几年内耗尽。本文提出了一种基于联邦学习(FL)的协作和隐私保护的LLM训练方法,利用未充分利用的分布式私有数据。我们构建了一个名为OpenFedLLM的框架,支持联邦指令调优和价值对齐,涵盖了7种代表性的FL算法。通过广泛的实验,我们发现所有FL算法在训练LLMs时均优于本地训练,尤其是在金融基准测试中,使用FL算法微调的Llama2-7B显著超越GPT-4,显示出客户参与FL的强烈动机。

🔬 方法详解

问题定义:当前大型语言模型的训练主要依赖于公共数据,随着高质量公共数据的逐渐枯竭,模型性能提升面临挑战。现有方法在数据隐私和安全性方面存在不足,无法有效利用分布式私有数据。

核心思路:本文提出的OpenFedLLM框架通过联邦学习实现数据拥有者之间的协作训练,确保数据隐私的同时提升模型性能。该方法允许多个参与者在不共享原始数据的情况下,共同优化一个共享模型。

技术框架:OpenFedLLM框架包括联邦指令调优模块、联邦价值对齐模块,以及7种代表性的FL算法。框架支持多领域训练,涵盖8个训练数据集,并提供30多种评估指标。

关键创新:本文的主要创新在于将联邦学习应用于大型语言模型的训练,尤其是在隐私保护和协作学习方面的有效结合,显著提升了模型的指令跟随能力和与人类价值的对齐。

关键设计:在关键设计上,OpenFedLLM采用了多种FL算法,优化了损失函数和网络结构,以适应不同的训练场景和数据特性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,所有联邦学习算法在训练大型语言模型时均优于本地训练,尤其在金融基准测试中,使用FL算法微调的Llama2-7B模型显著超越GPT-4,展示了FL在提升模型性能方面的强大潜力。

🎯 应用场景

该研究的潜在应用领域包括金融、医疗、教育等多个行业,能够在保护用户隐私的前提下,利用分布式私有数据提升大型语言模型的性能。未来,OpenFedLLM可能推动更多行业采用联邦学习技术,实现更高效的模型训练和数据利用。

📄 摘要(原文)

Trained on massive publicly available data, large language models (LLMs) have demonstrated tremendous success across various fields. While more data contributes to better performance, a disconcerting reality is that high-quality public data will be exhausted in a few years. In this paper, we offer a potential next step for contemporary LLMs: collaborative and privacy-preserving LLM training on the underutilized distributed private data via federated learning (FL), where multiple data owners collaboratively train a shared model without transmitting raw data. To achieve this, we build a concise, integrated, and research-friendly framework/codebase, named OpenFedLLM. It covers federated instruction tuning for enhancing instruction-following capability, federated value alignment for aligning with human values, and 7 representative FL algorithms. Besides, OpenFedLLM supports training on diverse domains, where we cover 8 training datasets; and provides comprehensive evaluations, where we cover 30+ evaluation metrics. Through extensive experiments, we observe that all FL algorithms outperform local training on training LLMs, demonstrating a clear performance improvement across a variety of settings. Notably, in a financial benchmark, Llama2-7B fine-tuned by applying any FL algorithm can outperform GPT-4 by a significant margin while the model obtained through individual training cannot, demonstrating strong motivation for clients to participate in FL. The code is available at https://github.com/rui-ye/OpenFedLLM.