Skip to main content
QUICK REVIEW

[Paper Review] Two-stage LLM Fine-tuning with Less Specialization and More Generalization

Yihan Wang, Si Si|arXiv (Cornell University)|Nov 1, 2022
Topic ModelingComputer Science7 citations
TL;DR

This paper proposes ProMoT, a two-stage fine-tuning framework that reduces format specialization in fine-tuned LLMs by first tuning soft prompts to absorb task-specific formats before updating the main model weights. Experiments show ProMoT achieves comparable performance on fine-tuned tasks while significantly improving in-context learning generalization across diverse out-of-domain tasks, including boosting performance on semantically related tasks like summarization after NLI fine-tuning.

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.

Motivation & Objective

  • To address the problem of over-specialization in fine-tuned LLMs, which harms their general in-context learning performance on unseen tasks.
  • To investigate whether format specialization—overfitting to specific input/output formats—causes the loss of generalization during fine-tuning.
  • To develop a method that preserves generalization while achieving strong performance on fine-tuned tasks.
  • To demonstrate that offloading format learning to soft prompts can improve generalization, even enhancing performance on semantically related tasks.

Proposed method

  • First, the pretrained LLM is frozen and a soft prompt is fine-tuned on the task-specific data, allowing the model to learn the task format without updating its weights.
  • Second, the soft prompt is frozen and the main LLM weights are fine-tuned with the soft prompt attached, enabling the model to learn semantic content while preserving format-agnostic representations.
  • The soft prompt acts as a removable, task-specific adapter that absorbs format-specific patterns, reducing interference with the model's general in-context learning capacity.
  • At inference, the soft prompt can be removed if the input task has a different format, enabling generalization to out-of-distribution tasks.
  • The framework is applied in both single-task and multi-task settings, and can be combined with in-context learning via 1-shot prompts.
  • The method is evaluated across multiple NLP tasks, including NLI, translation, and summarization, using in-context few-shot evaluation.

Experimental results

Research questions

  • RQ1Does fine-tuning on a single task degrade the in-context learning performance of LLMs on out-of-domain tasks?
  • RQ2Is format specialization—overfitting to specific input/output formats—the primary cause of generalization degradation during fine-tuning?
  • RQ3Can offloading format learning to soft prompts before model fine-tuning reduce specialization and improve generalization?
  • RQ4Does ProMoT improve generalization on semantically related tasks that differ in format, such as improving summarization performance after NLI fine-tuning?
  • RQ5Can ProMoT enhance the generalization of multi-task fine-tuning compared to standard multi-task fine-tuning?

Key findings

  • Fine-tuning on a single task causes a measurable drop in in-context learning performance on unseen tasks, with mT5 losing few-shot performance within 1,000 fine-tuning steps.
  • Format specialization occurs early in fine-tuning and is a major cause of generalization degradation, as models overfit to specific output formats like 'True'/'False'.
  • ProMoT achieves comparable performance to standard fine-tuning on fine-tuned tasks (e.g., 93.14 on RTE vs. 93.14 for standard fine-tuning) while preserving significantly better in-context learning performance on out-of-domain tasks.
  • After fine-tuning on NLI, ProMoT improves in-context summarization performance by 8.65% relative to the pretrained model, demonstrating enhanced generalization on semantically related tasks.
  • In multi-task training, ProMoT improves normalized average performance by 8.35% over standard multi-task fine-tuning and 5.10% over standard fine-tuning on unseen 1-shot tasks.
  • Ablation studies confirm that the two-stage training process is essential—joint tuning or random prompts fail to mitigate format specialization, and soft prompts outperform natural language prompts in reducing specialization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.