提出联邦学习中模型最优大小的选择方法,揭示其与客户端数量的幂律关系。
Scaling Law Analysis in Federated Learning: How to Select the Optimal Model Size?
- 基于PAC-Bayes理论推导联邦学习泛化误差上界,解析求解最优模型尺寸。
- 发现固定计算量下,最优模型尺寸随客户端数增加呈负幂律下降。
- 实验证明理论结论,适用于资源不均的分布式训练场景。
大语言模型的成功激发了对大规模模型训练的兴趣。随着模型规模扩大,高质量、精心标注训练数据的稀缺性日益突出,促使研究者探索联邦学习(FL)等方法,利用边缘设备上的海量数据并保障隐私。然而,联邦学习中训练数据的去中心化特性给大模型扩展带来了挑战,该问题尚未充分研究。本文填补这一空白,为使用随机算法在联邦设置下训练模型的泛化误差提供了PAC-Bayes上界,并通过解析求解使该上界最小的模型尺寸,量化分布式数据对最优模型大小的影响。理论结果表明,在总训练计算量不变的前提下,最优模型大小与客户端数量呈负幂律关系。此外,我们还发现:在相同计算量下采用联邦学习必然导致模型可达到的泛化性能上界降低;因此,在联邦场景中估算最优模型大小应依赖于各客户端的平均训练计算量。最后,我们在多种模型、网络设置和数据集上进行了大量训练实验,验证了理论结果的正确性。
原文摘要 · Abstract (English)
The recent success of large language models (LLMs) has sparked a growing interest in training large-scale models. As the model size continues to scale, concerns are growing about the depletion of high-quality, well-curated training data. This has led practitioners to explore training approaches like Federated Learning (FL), which can leverage the abundant data on edge devices while maintaining privacy. However, the decentralization of training datasets in FL introduces challenges to scaling large models, a topic that remains under-explored. This paper fills this gap and provides qualitative insights on generalizing the previous model scaling experience to federated learning scenarios. Specifically, we derive a PAC-Bayes (Probably Approximately Correct Bayesian) upper bound for the generalization error of models trained with stochastic algorithms in federated settings and quantify the impact of distributed training data on the optimal model size by finding the analytic solution of model size that minimizes this bound. Our theoretical results demonstrate that the optimal model size has a negative power law relationship with the number of clients if the total training compute is unchanged. Besides, we also find that switching to FL with the same training compute will inevitably reduce the upper bound of generalization performance that the model can achieve through training, and that estimating the optimal model size in federated scenarios should depend on the average training compute across clients. Furthermore, we also empirically validate the correctness of our results with extensive training runs on different models, network settings, and datasets.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。