Skip to main content
QUICK REVIEW

[论文解读] Two-stage LLM Fine-tuning with Less Specialization and More Generalization

Yihan Wang, Si Si|arXiv (Cornell University)|Nov 1, 2022
Topic Modeling被引用 7
一句话总结

本文提出 ProMoT,一种两阶段微调框架,通过先微调软提示以吸收特定任务的格式,再更新主模型权重,从而减少微调后大语言模型的格式专业化问题。实验表明,ProMoT 在微调任务上实现了相当的性能,同时显著提升了在多样化分布外任务上的 few-shot 零样本提示学习泛化能力,包括在 NLI 微调后提升语义相关任务(如摘要)的性能。

ABSTRACT

Pretrained large language models (LLMs) are general purpose problem solvers applicable to a diverse set of tasks with prompts. They can be further improved towards a specific task by fine-tuning on a specialized dataset. However, fine-tuning usually makes the model narrowly specialized on this dataset with reduced general in-context learning performances, which is undesirable whenever the fine-tuned model needs to handle additional tasks where no fine-tuning data is available. In this work, we first demonstrate that fine-tuning on a single task indeed decreases LLMs' general in-context learning performance. We discover one important cause of such forgetting, format specialization, where the model overfits to the format of the fine-tuned task.We further show that format specialization happens at the very beginning of fine-tuning. To solve this problem, we propose Prompt Tuning with MOdel Tuning (ProMoT), a simple yet effective two-stage fine-tuning framework that reduces format specialization and improves generalization.ProMoT offloads task-specific format learning into additional and removable parameters by first doing prompt tuning and then fine-tuning the model itself with this soft prompt attached. With experiments on several fine-tuning tasks and 8 in-context evaluation tasks, we show that ProMoT achieves comparable performance on fine-tuned tasks to standard fine-tuning, but with much less loss of in-context learning performances across a board range of out-of-domain evaluation tasks. More importantly, ProMoT can even enhance generalization on in-context learning tasks that are semantically related to the fine-tuned task, e.g. ProMoT on En-Fr translation significantly improves performance on other language pairs, and ProMoT on NLI improves performance on summarization. Experiments also show that ProMoT can improve the generalization performance of multi-task training.

研究动机与目标

  • 为解决微调后大语言模型过度专业化的问题,该问题会损害其在未见任务上的零样本提示学习泛化性能。
  • 探究格式专业化(对特定输入/输出格式的过拟合)是否为微调过程中泛化能力下降的主要原因。
  • 开发一种在保持微调任务强性能的同时保留泛化能力的方法。
  • 证明将格式学习任务卸载至软提示可提升泛化能力,甚至增强在语义相关任务上的性能。

提出的方法

  • 首先,冻结预训练大语言模型,仅在特定任务数据上微调软提示,使模型在不更新主干权重的情况下学习任务格式。
  • 其次,冻结软提示,将主干大语言模型权重与附加软提示一起进行微调,使模型在保留格式无关表示的同时学习语义内容。
  • 软提示充当可移除的、任务特定的适配器,吸收格式相关的模式,减少对模型通用零样本提示学习能力的干扰。
  • 推理时,若输入任务格式不同,可移除软提示,从而实现对分布外任务的泛化。
  • 该框架适用于单任务和多任务设置,且可与通过 1-shot 提示实现的零样本提示学习结合使用。
  • 在多个 NLP 任务(包括 NLI、翻译和摘要)上评估该方法,采用零样本 few-shot 评估方式。

实验结果

研究问题

  • RQ1在单个任务上微调是否会导致大语言模型在分布外任务上的零样本提示学习性能下降?
  • RQ2格式专业化(对特定输入/输出格式的过拟合)是否是微调过程中泛化能力下降的主要原因?
  • RQ3在模型微调前将格式学习任务卸载至软提示,是否能减少专业化并提升泛化能力?
  • RQ4ProMoT 是否能提升在格式不同但语义相关的任务上的泛化能力,例如在 NLI 微调后提升摘要任务性能?
  • RQ5与标准多任务微调相比,ProMoT 是否能增强多任务微调的泛化能力?

主要发现

  • 在单个任务上微调会导致未见任务上零样本提示学习性能的显著下降,mT5 在 1,000 次微调步骤内即失去 few-shot 性能。
  • 格式专业化在微调初期即出现,是泛化能力下降的主要原因,因模型对特定输出格式(如 'True'/'False')产生过拟合。
  • ProMoT 在微调任务上的性能与标准微调相当(如 RTE 任务上为 93.14,与标准微调持平),同时在分布外任务上的零样本提示学习性能显著更优。
  • 在 NLI 任务微调后,ProMoT 相较于预训练模型将摘要任务的零样本提示学习性能提升了 8.65%,证明其在语义相关任务上的泛化能力增强。
  • 在多任务训练中,ProMoT 在未见 1-shot 任务上的归一化平均性能相比标准多任务微调提升 8.35%,相比标准微调提升 5.10%。
  • 消融实验表明,两阶段训练过程至关重要:联合微调或随机提示无法缓解格式专业化问题,且软提示在减少专业化方面优于自然语言提示。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。