arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2602.14208cs.LGcs.AIcs.CLmath.OCstat.ML
收藏

快速追上,后期切换:通过函数缩放定律进行最优批量大小调度

Fast Catch-Up, Late Switching: Optimal Batch Size Scheduling via Functional Scaling Laws

School of Mathematical Sciences, Peking University(北京大学数学科学学院);Center for Machine Learning Research, Peking University(北京大学机器学习研究中心);School of Computer Science, Shanghai Jiao Tong University(上海交通大学计算机科学学院);State Key Laboratory of Cognitive Intelligence, University of Science and Technology of China(中国科学技术大学认知智能国家重点实验室);Meituan, Beijing(美团(北京));AI for Science Institute, Beijing(北京人工智能科学研究院)

Jinbo Wang, Binghui Li, Zhanpeng Zhou, Mingze Wang, Yuxuan Sun, Jiaqi Zhang, Xunliang Cai, Lei Wu

AI总结:

本文通过函数缩放定律揭示了大规模深度学习中最优批量大小调度的理论机制,表明在困难任务中后期切换大批次可提升效率并减少数据消耗。

摘要:

批量大小调度(BSS)在大规模深度学习训练中起着关键作用,影响着优化动态和计算效率。然而,其理论基础仍然理解有限。在本文中,我们展示出Li等人(2025a)引入的函数缩放定律(FSL)框架为分析BSS提供了系统性的视角。具体而言,我们刻画了在固定数据预算下的最优BSS,并表明其结构依赖于任务难度。对于简单任务,最优调度在整个训练过程中保持增加批量大小。相反,对于困难任务,最优调度在大部分训练中保持小批量大小,并在后期阶段才切换到大批次。为了解释后期切换的出现,我们揭示了一个动态机制——快速追上效应,该效应也表现在大规模语言模型(LLM)预训练中。在从小批次切换到大批次后,损失迅速与恒定大批次轨迹对齐。使用FSL,我们表明该效应源于快速遗忘累积梯度噪声,追上速度由任务难度决定。关键的是,该效应意味着可以在后期训练中安全地延迟使用大批次,而不牺牲性能,同时大幅减少数据消耗。最后,广泛的LLM预训练实验——涵盖Dense和MoE架构,参数规模高达11亿,token数量高达1万亿——验证了我们的理论预测。在所有设置中,后期切换调度始终优于恒定批次和早期切换基线。

英文摘要:

Batch size scheduling (BSS) plays a critical role in large-scale deep learning training, influencing both optimization dynamics and computational efficiency. Yet, its theoretical foundations remain poorly understood. In this work, we show that the functional scaling law (FSL) framework introduced in Li et al. (2025a) provides a principled lens for analyzing BSS. Specifically, we characterize the optimal BSS under a fixed data budget and show that its structure depends sharply on task difficulty. For easy tasks, optimal schedules keep increasing batch size throughout. In contrast, for hard tasks, the optimal schedule maintains small batch sizes for most of training and switches to large batches only in a late stage. To explain the emergence of late switching, we uncover a dynamical mechanism -- the fast catch-up effect -- which also manifests in large language model (LLM) pretraining. After switching from small to large batches, the loss rapidly aligns with the constant large-batch trajectory. Using FSL, we show that this effect stems from rapid forgetting of accumulated gradient noise, with the catch-up speed determined by task difficulty. Crucially, this effect implies that large batches can be safely deferred to late training without sacrificing performance, while substantially reducing data consumption. Finally, extensive LLM pretraining experiments -- covering both Dense and MoE architectures with up to 1.1B parameters and 1T tokens -- validate our theoretical predictions. Across all settings, late-switch schedules consistently outperform constant-batch and early-switch baselines.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑