Patch the Distribution Mismatch: RL Rewriting Agent for Stable Off-Policy SFT
This paper proposes an RL-based rewriting agent that optimizes a data-rewriting policy to align downstream training data with the model's natural generation distribution while preserving diversity and task consistency, thereby mitigating catastrophic forgetting during supervised fine-tuning.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Big Problem: The "Culture Shock" of AI
Imagine you have a brilliant, well-traveled chef (the Large Language Model or LLM) who has cooked millions of dishes from around the world. They are great at general cooking.
Now, you want this chef to specialize in one specific type of cuisine, say, "Spicy Sichuan Noodles" (this is the Downstream Task). To teach them, you give them a stack of recipe cards written by a strict, old-school master chef (the Expert Data).
The Problem:
The master chef's recipes are written in a very specific, rigid, and formal style that the AI chef has never seen before. When the AI tries to learn these new recipes, it gets confused. It tries to force its old, general cooking style to fit the new, rigid instructions.
The result?
- It learns the new dish poorly because the instructions feel "alien" to it.
- It forgets how to cook everything else. It becomes so obsessed with the new, weird style that it forgets how to make a simple sandwich or a classic soup. This is called Catastrophic Forgetting.
In technical terms, the "style" of the new data doesn't match the "style" the AI naturally uses to generate answers. This mismatch causes the training to be unstable.
The Old Solution: "Rewrite the Recipe" (But Do It Badly)
Researchers realized: "If the recipes are too weird, let's rewrite them to sound more like the AI's natural style before we teach it."
Previous methods tried to do this by giving the AI a fixed template (like a fill-in-the-blank form).
- Analogy: Imagine telling the AI, "Take this recipe and rewrite it using only these three sentence starters."
- The Flaw: This made all the rewritten recipes sound robotic and identical. It was like forcing every dish to look like a plastic model. The AI learned the format but not the flavor, and it still forgot its old skills because the "rewritten" recipes still didn't feel natural.
The New Solution: The "RL Rewriting Agent"
This paper proposes a smarter way. Instead of using a rigid template, they built a specialized AI Editor (the Rewriting Agent).
Think of this agent as a Talent Scout who knows exactly how the main Chef thinks and speaks. Its job is to take the Master Chef's rigid recipes and rewrite them into a style the main Chef loves, while keeping the instructions correct.
Here is how the Agent works, using three simple rules (Rewards):
1. The "Truth" Gate (Task Consistency)
- The Rule: "You must not change the answer."
- The Analogy: If the original recipe says "Add 2 eggs," the rewrite cannot say "Add 3 eggs." If the Agent messes up the math or logic, it gets a zero score and is thrown out. This is a hard gate; no cheating allowed.
2. The "Natural Flow" Score (Distribution Alignment)
- The Rule: "Rewrite it so it sounds like something the Chef would naturally say."
- The Analogy: The Agent checks: "Does this sentence sound like a human chef talking, or does it sound like a robot reading a manual?" It rewards rewrites that flow naturally, just like the Chef's favorite style. This ensures the Chef doesn't get "culture shock" when learning.
3. The "Variety" Bonus (Diversity)
- The Rule: "Don't make every recipe look the same."
- The Analogy: If the Agent rewrites 10 recipes, they shouldn't all start with "First, take the bowl." They should have different structures and phrasing. This prevents the Chef from getting bored or stuck in a rut (a problem called Mode Collapse).
How They Trained the Agent (The "Game")
They didn't just tell the Agent what to do; they let it play a game to learn.
- They used a method called Reinforcement Learning (RL).
- The Agent tried rewriting recipes.
- If the rewrite was Correct (kept the answer right), Natural (sounded like the Chef), and Varied (didn't look robotic), it got a Gold Star (Reward).
- If it failed any of these, it got no points.
- Over time, the Agent learned the perfect balance: "How do I rewrite this so it's correct, sounds natural, and isn't boring?"
The Result: A Happy Chef
When they used this Agent to prepare the training data:
- The Chef learned the new Sichuan Noodles perfectly (High performance on the new task).
- The Chef remembered how to make sandwiches and soups (No catastrophic forgetting).
- The training was smoother and faster because the recipes finally "clicked" with the Chef's brain.
Summary in One Sentence
Instead of forcing a smart AI to learn from rigid, unnatural instructions (which makes it forget everything else), this paper teaches a smart "Editor AI" to rewrite those instructions into a natural, diverse style that the main AI already loves, allowing it to learn new skills without losing its old ones.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.