arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.07681cs.LG
收藏

学习动态揭示了LLM推理中的泛化机制

What Do Learning Dynamics Reveal About Generalization in LLM Reasoning?

UC Berkeley(加州大学伯克利分校);CMU(卡内基梅隆大学)

Katie Kang, Amrith Setlur, Dibya Ghosh, Jacob Steinhardt, Claire Tomlin, Sergey Levine, Aviral Kumar

AI总结:

本研究通过预记忆训练准确率指标揭示LLM微调学习动态与泛化的关系,该指标能可靠预测测试准确率并指导数据整理,使数据效率提升1.5-2倍。

摘要:

尽管现代大型语言模型(LLMs)具有卓越的能力,但其问题解决能力背后的机制仍然难以捉摸。在本研究中,我们旨在更好地理解LLM微调的学习动态如何塑造下游泛化能力。我们的分析聚焦于推理任务,其问题结构使我们能够区分记忆化(从训练数据中精确复制推理步骤)与性能(最终解决方案的正确性)。我们发现,模型的泛化行为可以通过一个我们称之为“预记忆训练准确率”的训练指标来有效表征:即模型在开始从训练集中复制精确推理步骤之前,对训练查询的采样准确率。在数据集层面,该指标能够可靠地预测测试准确率,在各种模型(Llama3 8、Gemma2 9B)、数据集(GSM8k、MATH)和训练配置下,其R^2达到约或超过0.9。在逐例层面,该指标也能表明单个模型预测是否对训练查询中的扰动具有鲁棒性。通过将模型的学习行为与其泛化能力相联系,预记忆训练准确率可以指导对训练策略的针对性改进。我们以数据整理为例,结果表明,优先选择预记忆准确率较低的样本,与独立同分布(i.i.d.)数据扩展相比,可将数据效率提高1.5-2倍,并优于其他标准数据整理技术。

英文摘要:

Despite the remarkable capabilities of modern large language models (LLMs), the mechanisms behind their problem-solving abilities remain elusive. In this work, we aim to better understand how the learning dynamics of LLM finetuning shapes downstream generalization. Our analysis focuses on reasoning tasks, whose problem structure allows us to distinguish between memorization (the exact replication of reasoning steps from the training data) and performance (the correctness of the final solution). We find that a model's generalization behavior can be effectively characterized by a training metric we call pre-memorization train accuracy: the accuracy of model samples on training queries before they begin to copy the exact reasoning steps from the training set. On the dataset level, this metric is able to reliably predict test accuracy, achieving $R^2$ of around or exceeding 0.9 across various models (Llama3 8, Gemma2 9B), datasets (GSM8k, MATH), and training configurations. On a per-example level, this metric is also indicative of whether individual model predictions are robust to perturbations in the training query. By connecting a model's learning behavior to its generalization, pre-memorization train accuracy can guide targeted improvements to training strategies. We focus on data curation as an example, and show that prioritizing examples with low pre-memorization accuracy leads to 1.5-2x improvements in data efficiency compared to i.i.d. data scaling, and outperforms other standard data curation techniques.

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

↑