数据难度与LLM微调中的泛化-外推权衡
Data Difficulty and the Generalization--Extrapolation Tradeoff in LLM Fine-Tuning
AI总结:
本文通过实证和理论分析,研究了监督微调中数据难度对模型行为的影响,发现数据难度与数据量共同决定泛化与外推之间的权衡,并存在最优难度随数据量增加而向更难数据偏移的规律。
摘要:
监督微调(SFT)期间的数据选择可以显著改变大型语言模型(LLMs)的行为。尽管已有工作研究了基于困惑度、难度或长度等启发式方法选择数据的效果,但报告的结果往往不一致或依赖于上下文。在这项工作中,我们从实证和理论角度系统地研究了数据难度在微调中的作用,并发现不存在普遍最优的难度水平;相反,其有效性取决于数据集大小。我们表明,对于固定的数据预算,SFT存在一个最优的数据难度,并且随着数据预算的增加,该最优难度向更难的数据偏移。为了解释这一现象,我们进行了受控的合成实验,揭示了一个简单的底层机制:分布内泛化差距与外推差距之间的相互作用。我们通过使用PAC-Bayesian泛化界限的理论分析进一步支持了这一机制。总的来说,我们的结果阐明了数据大小和难度如何共同影响SFT中泛化与外推之间的权衡,为在特定模型和数据条件下基于难度的数据选择提供了指导。
英文摘要:
Data selection during supervised fine-tuning (SFT) can critically change the behavior of large language models (LLMs). Although existing work has studied the effect of selecting data based on heuristics such as perplexity, difficulty, or length, the reported findings are often inconsistent or context-dependent. In this work, we systematically study the role of data difficulty in fine-tuning from both empirical and theoretical perspectives, and find that there is no universally optimal difficulty level; rather, its effectiveness depends on the dataset size. We show that for a fixed data budget, there exists an optimal data difficulty for SFT, and that this optimal difficulty shifts toward harder data as the data budget increases. To explain this phenomenon, we conduct controlled synthetic experiments that reveal a simple underlying mechanism: the interplay between the (in-distribution) generalization gap and the extrapolation gap. We further support this mechanism through a theoretical analysis using PAC-Bayesian generalization bounds. Overall, our results clarify how data size and difficulty jointly affect the trade-off between generalization and extrapolation in SFT, providing guidance for difficulty-based data selection under certain model and data conditions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。