Beyond Rejection Sampling: Trajectory Fusion for Scaling Mathematical Reasoning

Jie Deng, Hanshuang Tong, Jun Li, Shining Liang, Ning Wu +2 more
2/4/2026
cs.CL

No confident code implementation found for this paper.

Abstract

Large language models (LLMs) have made impressive strides in mathematical reasoning, often fine-tuned using rejection sampling that retains only correct reasoning trajectories. While effective, this paradigm treats supervision as a binary filter that systematically excludes teacher-generated errors, leaving a gap in how reasoning failures are modeled during training. In this paper, we propose TrajFusion, a fine-tuning strategy that reframes rejection sampling as a structured supervision construction process. Specifically, TrajFusion forms fused trajectories that explicitly model trial-and-error reasoning by interleaving selected incorrect trajectories with reflection prompts and correct trajectories. The length of each fused sample is adaptively controlled based on the frequency and diversity of teacher errors, providing richer supervision for challenging problems while safely reducing to vanilla rejection sampling fine-tuning (RFT) when error signals are uninformative. TrajFusion requires no changes to the architecture or training objective. Extensive experiments across multiple math benchmarks demonstrate that TrajFusion consistently outperforms RFT, particularly on challenging and long-form reasoning problems.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{deng2026beyond,
  title  = {Beyond Rejection Sampling: Trajectory Fusion for Scaling Mathematical Reasoning},
  author = {Jie Deng and Hanshuang Tong and Jun Li and Shining Liang and Ning Wu and Hongzhi Li and Yutao Xie},
  year   = {2026},
  eprint = {2602.04391},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.04391v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.04391.svg)](https://codeofpaper.com/paper/2602.04391)

Discussion