Selective Self-to-Supervised Fine-Tuning for Generalization in Large Language Models
本文提出了一种名为Selective Self-to-Supervised Fine-Tuning (S3FT)的微调方法,旨在提高大型语言模型在特定任务上的性能同时增强其泛化能力。
更新于 2025-02-17。作者:Sonam Gupta、Yatin Nandwani、Asaf Yehudai、Dinesh Khandelwal、Dinesh Raghu、Sachindra Joshi。
中文摘要
在特定数据集上微调大型语言模型(LLMs)是提高目标任务性能的常见做法。然而,这种性能提升往往会导致过拟合,即模型在任务或训练数据特征上变得过于专业化,从而导致泛化能力的下降。本文介绍了选择性自监督微调(S3FT),这是一种在保持泛化能力的同时,比标准监督微调(SFT)取得更好性能的微调方法。S3FT利用了针对查询存在多个有效响应的事实。通过利用模型的正确响应,S3FT在微调阶段减少了模型的专业化。S3FT首先通过部署适当的评判器从训练集中识别正确的模型响应。然后,它使用正确的模型响应和剩余样本的金标准响应(或其释义)来微调模型。S3FT的有效性通过在数学推理、Python 编程和阅读理解任务上的实验得到证明。结果显示,标准SFT可能导致多个基准测试上的平均性能下降高达4.4,例如MMLU和TruthfulQA。相比之下,S3FT将这种下降减少了一半,即2.5,表明它在微调任务上表现显著更好,同时具有比SFT更强的泛化能力。
英文摘要
Fine-tuning Large Language Models (LLMs) on specific datasets is a common practice to improve performance on target tasks. However, this performance gain often leads to overfitting, where the model becomes too specialized in either the task or the characteristics of the training data, resulting in a loss of generalization. This paper introduces Selective Self-to-Supervised Fine-Tuning (S3FT), a fine-tuning approach that achieves better performance than the standard supervised fine-tuning (SFT) while improving generalization. S3FT leverages the existence of multiple valid responses to a query. By utilizing the model's correct responses, S3FT reduces model specialization during the fine-tuning stage. S3FT first identifies the correct model responses from the training set by deploying an appropriate judge. Then, it fine-tunes the model using the correct model responses and the gold response (or its paraphrase) for the remaining samples. The effectiveness of S3FT is demonstrated through experiments on mathematical reasoning, Python programming and reading comprehension tasks. The results show that standard SFT can lead to an average performance drop of up to 4.4 on multiple benchmarks, such as MMLU and TruthfulQA. In contrast, S3FT reduces this drop by half, i.e. 2.5, indicating better generalization capabilities than SFT while performing significantly better on the fine-tuning tasks.
解读
一句话总结
本文提出了一种名为Selective Self-to-Supervised Fine-Tuning (S3FT)的微调方法,旨在提高大型语言模型在特定任务上的性能同时增强其泛化能力。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:在特定数据集上微调大型语言模型(LLMs)以提高性能,但这种提高往往导致过拟合,模型变得过于专业化,从而降低了泛化能力。
- 现有方案不足:标准监督微调(SFT)方法会导致模型过拟合,而基于重放缓冲区的正则化方法在许多情况下不可行。
- 研究目标:提出一种新的微调方法,在保持模型泛化能力的同时提高特定任务上的性能。
问题2:论文的核心创新点是什么?
- 技术创新:S3FT通过利用模型对查询的正确响应来减少模型在微调阶段的专业化。
- 方法改进:S3FT通过将模型正确响应用于训练,以及将金答案(或其释义)用于剩余样本,来微调模型。
- 优势:S3FT在保持基模型泛化能力的同时,在微调任务上表现出显著更好的性能。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在数学推理、Python编程和阅读理解任务上进行了实验。
- 性能提升:与标准SFT相比,S3FT在多个基准测试(如MMLU和TruthfulQA)上的平均性能下降减少了一半。
- 对比结果:S3FT在微调任务上的性能显著优于SFT,同时保持了基模型的泛化能力。
问题4:这个研究的实际应用价值是什么?
- 应用场景:适用于需要提高特定任务性能同时保持泛化能力的场景,如代码生成、数学问题解决和阅读理解。
- 实施建议:在微调过程中使用S3FT,并考虑使用LLM作为评估模型性能的可靠评估者。
- 局限与展望:S3FT需要额外的计算需求和合格的评价者,未来将研究减少对基模型权重变化的采样技术。