← Latest papers
🤖 machine learning

RAFT: Data Refinement and Adaptive Distillation for Domain Fine-Tuning with Alleviated Forgetting

RAFT is a two-stage framework that mitigates catastrophic forgetting during domain-specific fine-tuning by refining training data through model-compatible rewriting and employing answer-conditioned on-policy distillation to preserve the model's original general capabilities while improving in-domain performance.

Original authors: Yuduo Li, Xiaofeng Shi, Qian Kou, Longbin Yu, Hua Zhou

Published 2026-06-02
📖 5 min read🧠 Deep dive

Original authors: Yuduo Li, Xiaofeng Shi, Qian Kou, Longbin Yu, Hua Zhou

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

Imagine you have a brilliant, well-read librarian (the AI model) who knows a little bit about everything: history, cooking, coding, and poetry. This librarian is great at answering general questions.

Now, imagine you want to train this librarian to become an expert specifically in Law. You give them a stack of law textbooks and say, "Learn this!"

The Problem: The "Specialist Trap"
If you just force the librarian to memorize these law books (a process the paper calls Standard SFT), they become a great lawyer. But there's a catch: they start forgetting how to be a good general librarian. They might forget how to write a poem, how to follow simple instructions, or how to chat about the weather. They become so focused on the new rules that they lose their original personality and broad knowledge. This is called "Catastrophic Forgetting."

The paper argues this happens for two main reasons:

  1. The "Style Clash": The law textbooks are written in a stiff, formal style that doesn't match how the librarian usually talks. Forcing them to speak like a textbook makes them awkward and breaks their natural flow.
  2. The "One-Way Street": The training only looks at the "correct" answers in the books. It doesn't care if the librarian gets confused when they try to answer a question on their own. It's like a teacher only grading a student on a multiple-choice test but never watching how they think through a problem.

The Solution: RAFT (The "Refined & Adaptive" Coach)
The authors propose a new method called RAFT. Think of RAFT as a two-step coaching program designed to teach the librarian law without making them forget how to be a human.

Step 1: The "Translator" (Data Refinement)

Before the librarian even starts studying, RAFT acts as a translator.

  • The Issue: The law books are too stiff.
  • The Fix: The librarian is asked to rewrite the law answers in their own natural voice, while keeping the facts correct.
  • The Filter: A smart editor checks: "Did the librarian change the meaning while changing the style?" If the answer is still accurate, the rewritten version is kept. If it's nonsense, the original is kept.
  • The Fusion: Finally, a super-smart "fusion model" (like a senior editor) combines the original law answer and the librarian's rewritten version into one perfect, high-quality answer that is both factually correct and easy for the librarian to understand.

Analogy: Instead of forcing the librarian to read a dry legal contract, you give them a "cheat sheet" written in plain English that still contains all the legal facts.

Step 2: The "Shadow Coach" (Adaptive Distillation)

Now, the librarian starts studying using these new, friendly cheat sheets. But here is the magic part:

  • The Scenario: The librarian tries to answer a question on their own (generating a "trajectory" or a path of thoughts).
  • The Coach: The original librarian (the one who knows everything about the world, not just law) watches this process.
  • The Secret Weapon: The Coach is given the "perfect cheat sheet" (from Step 1) as a reference. When the student-librarian gets stuck or goes off-track, the Coach says, "Hey, based on the facts we know, here is a better way to phrase that," but they do it gently.
  • The Balance: The Coach doesn't just say "Wrong." They use a special technique (called Top-K Temperature) to suggest a few good options rather than forcing one single answer. This keeps the student creative and diverse, not robotic.
  • The Auto-Pilot: The system automatically adjusts how much it listens to the "Law" vs. how much it listens to the "General Knowledge" coach. If the student is getting too focused on law and forgetting general skills, the coach automatically turns up the volume on general knowledge.

Analogy: Imagine a student learning to drive a race car (Law). A standard teacher just yells, "Turn left at the red light!" (forcing a specific move). RAFT is like a driving instructor who sits in the passenger seat, holding the map (the refined data), and gently guiding the student: "You're turning too fast, remember to check your mirrors (general skills) while you turn."

The Results

The paper tested this on three different types of "librarians" (AI models) across five different topics (Law, Science, Culture, etc.).

  • Better at the Job: The RAFT-trained librarians became 23% better at answering law questions than those trained the old way.
  • Didn't Forget the Rest: Crucially, they didn't lose their general skills. On tests for general reasoning and following instructions, they recovered 18% and 10% of the skills that were usually lost.

In Summary:
RAFT is a training method that first translates difficult new information into a language the AI already understands, and then uses a smart, adaptive coach to guide the AI's learning process. This ensures the AI becomes a specialist without forgetting how to be a generalist. It's about teaching someone a new trade without making them forget how to be a person.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →