← Latest papers
💬 NLP

Beyond Rejection Sampling: Trajectory Fusion for Scaling Mathematical Reasoning

This paper introduces TrajFusion, a fine-tuning strategy that enhances mathematical reasoning in large language models by adaptively fusing incorrect trajectories with reflection prompts and correct solutions, thereby modeling trial-and-error learning to outperform standard rejection sampling.

Original authors: Jie Deng, Hanshuang Tong, Jun Li, Shining Liang, Ning Wu, Hongzhi Li, Yutao Xie

Published 2026-02-05
📖 3 min read☕ Coffee break read

Original authors: Jie Deng, Hanshuang Tong, Jun Li, Shining Liang, Ning Wu, Hongzhi Li, Yutao Xie

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 are teaching a student how to solve a very difficult math problem.

The Old Way (Rejection Sampling)
Traditionally, when training AI models to do math, researchers used a method called "Rejection Sampling." Think of this like a strict teacher who only shows the student the perfect, correct solution to a problem.

If the teacher tries to solve the problem ten times and gets it wrong nine times, they throw away those nine attempts. They only keep the one time they got it right. The student sees only the final, perfect answer.

  • The Problem: The student learns what the answer is, but they never learn how to recover when they make a mistake. They don't see the common traps, the wrong turns, or how to fix a logic error. It's like showing a driver only the map of a perfect route, without ever showing them what happens when they take a wrong turn or hit a dead end.

The New Way (TrajFusion)
The paper introduces a new method called TrajFusion. Instead of throwing away the wrong attempts, this method keeps them and weaves them into the lesson.

Imagine the teacher now says to the student:

"Okay, let's try to solve this.

  1. First attempt: I tried this path, but I realized I made a mistake here. (Shows the wrong path).
  2. Reflection: 'Wait, that doesn't seem right. Let's try again.' (This is a 'reflection prompt').
  3. Second attempt: I tried a different path, but I missed a step. (Shows another wrong path).
  4. Reflection: 'Hmm, I'm missing something. Let's think carefully.'
  5. Final attempt: Okay, now I've got it! Here is the correct solution."

How It Works (The "Fusion" Part)
The key innovation is that the AI doesn't just show any wrong answer. It uses a smart filter:

  • If the teacher makes the same mistake 10 times in a row: The system realizes this is a "dead end" or a simple misunderstanding. It might not show this to the student because it's not very helpful.
  • If the teacher makes 10 different kinds of mistakes: The system says, "Wow, this problem is tricky! There are many ways to get it wrong." It then fuses these diverse wrong paths into the training lesson.

This creates a "Trial-and-Error" simulation. The AI learns not just the destination, but the journey of navigating through confusion and correcting itself.

The Results
The researchers tested this on two different AI models (LLaMA3 and DeepSeekMath) across many math benchmarks, from simple school math to tough competition-level problems.

  • Better at Hard Stuff: The new method worked best on the hardest problems (like Olympiad math). These are the problems where getting lost is common, so learning how to find your way back is crucial.
  • Efficient: It didn't need a bigger brain or a new type of computer chip. It just changed what the AI read during training.
  • Scalable: It worked well whether they used a small amount of data or a huge amount. It even worked when they tried to teach the AI to solve very long, complex problems that require remembering a lot of information at once.

In Summary
The paper argues that mistakes are valuable data. By stopping the practice of throwing away incorrect attempts and instead turning them into a structured "try, fail, reflect, try again" lesson, the AI becomes a much better problem-solver. It learns to recognize its own errors and correct them, just like a human does when learning a difficult skill.

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 →