Skip to content

TraceForge: Distilling with One's Own ThinkingTraceForge: Distilling with Your Own Thinking

Hugging Face Daily Papers· arXiv:2610.29680· Yan Wang·Indexed by this site · 2026-10-22· Originally publishedAttacks

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose TraceForge: retain the teacher's answers and generate reasoning traces in the student family's own style; the authors claim that on Qwen3.5-9B-Base, HumanEval+ improves by 3.7 points and MBPP+ by 7.1 points.

Questions
Some frontier models return only answers or brief summaries and no longer provide reasoning traces, closing off the path of distilling their reasoning ability; existing approaches to recovering hidden reasoning violate terms of service, and the authors want to provide a compliant alternative.
Methods
TraceForge keeps the teacher's answers, trains a generator on the student model family's own dialogues to rewrite reasoning traces, then uses a critic that distinguishes real from generated traces for five rounds of adversarial co-training and selection from four candidates, yielding family-native traces.
Experiments and results
Trained on Qwen3.5-9B-Base with 5,000 fixed data points: S2 is 3.7 points higher than S1 on HumanEval+ and 7.1 points higher on MBPP+; on the three knowledge benchmarks the five corpora differ by no more than 1.6 points.
Limitations and future work
The authors state that the S1/S2 and S4/S5 comparisons cannot fully separate family style from other differences in the pipeline; the experiments use only one student, Qwen3.5-9B-Base, 5,000 samples, and one run per cell, and the paper does not report statistical significance tests.
Experimental setupQwen/Qwen3.5-9B-Base · ARC-Easy、ARC-Challenge et al. · pass@1、acc-norm et al.
Evaluated models
Qwen/Qwen3.5-9B-Base
Benchmarks
ARC-EasyARC-ChallengeBoolQHumanEval+MBPP+
Metrics
pass@1acc-normaccuracyauthenticity score
AI summaryTraceForge uses a two-stage training process, first supervised then adversarial, to synthesize reasoning traces in the style of the student model family from teacher answers, without relying on the teacher's hidden reasoning outputs. Independent reviewers scored the authenticity of generated traces at an average of 0.68, versus 0.66 for real traces. Under the same 5,000 problems and teacher answers, the final checkpoint improved HumanEval+ by 3.7 points and MBPP+ by 7.1 points, outperforming Fable 5's own thinking content on coding tasks.

TraceForge uses a two-stage training process, first supervised then adversarial, to synthesize reasoning traces in the style of the student model family from teacher answers, without relying on the teacher's hidden reasoning outputs. Independent reviewers scored the authenticity of generated traces at an average of 0.68, versus 0.66 for real traces. Under the same 5,000 problems and teacher answers, the final checkpoint improved HumanEval+ by 3.7 points and MBPP+ by 7.1 points, outperforming Fable 5's own thinking content on coding tasks.

Related events and news

1 events · 1 news mentions

News that mentions this paper

TraceForge 用学生模型风格重建教师推理轨迹

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The teacher model no longer returns reasoning trajectories; the authors propose a compliant substitute: keep the answers and generate reasoning trajectories in the student family's style for distillation.

    Core question: when frontier models no longer return reasoning traces, how can their reasoning ability be distilled compliantly?

    • Setting and motivation: using strong models to generate data to train weak models is common practice, but some frontier teams return only answers or brief summaries and do not provide the underlying reasoning traces; the authors cite safety and intellectual property as the reasons, and the effect is a moat.
    • Shortcomings of existing approaches: Panfilov et al. [1] recover hidden reasoning traces by replaying encrypted blocks across models; the authors state that this is effective but violates the provider's terms and cannot serve as a long-term product foundation.
    • Core observation and hypothesis: the teacher provides the answer, and the reasoning trace can be rewritten in the style of the student's own model family; the authors conjecture that such family-native traces are easier for the student to learn.
    • Method proposed in the paper: TraceForge—train a generator to reconstruct family reasoning traces from context and answer, then train a critic to distinguish real from generated traces, with the two trained adversarially together; at inference time the critic selects the best among multiple candidates, requiring no labels and not violating terms of service.
    • Positioning: the authors emphasize that distillation is an old and public technique, and that the only important boundary is whether data acquisition is legal; this paper claims to stand on the legal side of that line.
  2. What related research exists?

    Related work falls into five groups: reasoning trace distillation, hidden reasoning recovery and synthesis, teacher-student distribution differences, selection and verification, and adversarial training and reconstruction objectives.

    Learning from reasoning traces

    • Distilling Step-by-Step (2023) trains smaller task models with teacher-generated rationales as an additional training target; Orca (2023) learns from explanation traces generated by large models; DeepSeek-R1 (2025) transfers reasoning ability to smaller models through curated reasoning data.
    • The authors state that these works motivated training on intermediate reasoning, and that this paper's question is source and form: with answers fixed, do traces synthesized in the student family's style teach better than the teacher's original traces.

    Recovering and synthesizing hidden reasoning

    • Panfilov et al. (2026) [1] transfer encrypted blocks across models to recover protected reasoning; the authors state that this violates API terms of sale.
    • Trace Inversion (Zhang et al., 2026) [5] learns to generate reasoning from the input, the answer, and an optional summary; REER (2026) [8] reverse-constructs reasoning from known good solutions. The authors state that Trace Inversion has shown that synthesized traces can exceed answer-only training and, in some settings, exceed original traces, and reported weaker code results associated with style and format mismatch; this paper's difference from it is that the generator is trained on the student family's own traces and uses adversarial feedback from a family-trace critic.

    Teacher-student distribution gap

    • MiniLLM (2023) [9] changes the distillation objective to reverse KL to better handle the student's approximation of the teacher distribution; this paper's intervention is in the training text: keep the strong teacher's answers, synthesize their reasoning in family-native form.

    Selection, verification, and rewriting

    • STaR (2022) [10] keeps successful solutions and uses correct answers to guide rationale generation; process supervision (2023) [11] trains a verifier with step-level correctness labels; self-consistency (2022) [12] aggregates sampled paths by answer agreement. This paper's critic instead distinguishes real family traces from generated traces and does not require step-level correctness labels.

    Adversarial training and reconstruction objectives

    • Self-play fine-tuning (2024) [13] contrasts model outputs with human demonstrations; DPO (2023) [3] learns from preference pairs; instruction backtranslation (2023) [14] reconstructs instructions from responses. This paper's reconstruction target is the reasoning trace conditioned on the dialogue and the answer.

    Baselines and benchmarks: the five corpora for downstream comparison are given in questions 3 and 4 (S1–S5), where S4 uses TraceInversion as the synthesizer baseline; the benchmarks are ARC-Easy, ARC-Challenge, BoolQ, HumanEval+, and MBPP+. Authors' positioning: this paper separates answer source from trace source, and the goal is useful family-native training traces, not verbatim reconstruction of the teacher's hidden reasoning (citing Turpin et al. 2023 [15] on the view that reasoning does not necessarily faithfully reflect computation).

  3. How does the paper address this problem?

    TraceForge: the generator reconstructs family reasoning traces from context and answers, the critic distinguishes real from fake, and after five rounds of adversarial co-training the critic selects one of four.

    Overall approach: TraceForge keeps the teacher's answers, has a generator in the student model family's style write the reasoning traces itself, then refines and filters them through adversarial training with a critic to obtain family-native traces.

    Problem setup and formalization

    • A dialogue is written as a message list: R is the reasoning trace, and S, U, A, T are the system prompt, user turn, answer, and tool calls and responses, respectively (Figure 2).
    • The generator models P(R ∣ S, U, A, T), i.e., the reasoning trace the model would write given the rest of the dialogue.
    • The supervised stage uses only dialogues from the student's own family: 10,000 for the generator and 10,000 real/generated pairs for the critic; these dialogues are collected from Qwen3.8-Max and do not use outputs from Claude or GPT models.

    Supervised training of the generator

    • The generator is a model from the Qwen family, fine-tuned on 10,000 family dialogues to maximize log P(R | S, U, A, T): the reasoning trace is removed from the input and the rest is kept, and the loss falls only on the reasoning trace (blue path in Figure 2).
    • Two design details: the target is always the family's own written traces, and the form is learned from data rather than required by the prompt; the answer is part of the input and never the output, so the model learns derivations that terminate at A rather than restating A.
    • After this stage, an independent reviewer, GPT-6.1-SOL, scores the traces (0–1, the probability that a family model wrote them): real family traces average 0.66, generator traces 0.54; the authors emphasize that this is perceived authenticity, not reasoning accuracy.

    Supervised training of the critic

    • The critic learns to distinguish real traces from generated traces (purple path in Figure 2), with a training set of 10,000 pairs: each real family trace paired with a negative sample produced by the supervised generator.
    • Training stops when the critic's probability for positive samples is at least 0.2 higher than for negative samples, rather than pushing the margin to the maximum.
    • The authors record a failure lesson: they had assumed a smaller model could judge a larger one, but within a few hundred steps the critic fit shortcuts, scoring well on held-out pairs while leaving the generator nothing to learn from; therefore the critic is at least as large as the generator.

    Adversarial co-training and reasoning selection

    • Five rounds of online co-training (bottom arc in Figure 2): each round the generator produces 5,000 traces, which are shown to the critic together with the corresponding real traces; those that fool the critic become critic training data, and those that do not become preference pairs for the generator, optimized with a DPO-style objective [3].
    • At the end of each round, GPT-6.1-SOL rescores on a held-out set; training stops when the average score no longer improves after five rounds, at which point generated traces are 0.68 and real traces 0.66.
    • At inference, the critic selects the best of four candidates, and under the same reviewer and metric the generated traces' score rises to 0.82.

    Downstream student training and evaluation method

    • All students are fine-tuned from Qwen/Qwen3.5-9B-Base, and the only difference is the training data; the 5,000 assistant-turn samples come from TeichAI/Fable-5-Cursor-Traces [4], with context up to 256K tokens.
    • Five corpora: S1 uses Fable 5's original traces and answers; S2 replaces S1's traces with family-native ones, answers unchanged; S3 uses Qwen3.8-Max's own traces and answers; S4 uses GPT-6.1-SOL's answers with TraceInversion synthesized traces; S5 uses GPT-6.1-SOL's answers with family-native traces.
    • Training is teacher-forced SFT, prompt masking, no truncation (each row under 262,144 tokens), full-parameter BF16, AdamW, learning rate 2×10⁻⁵ cosine annealing, 8 H20 GPUs, seed 42.
    • Evaluation: ARC-Easy, ARC-Challenge, and BoolQ test general ability in non-reasoning mode; HumanEval+ and MBPP+ test code ability in reasoning mode.
  4. What experiments did the paper conduct?

    Train one student on each of five corpora: on code benchmarks, family-native trajectories exceed the teacher's original trajectories, with no difference on knowledge benchmarks; training dynamics and degradation phenomena are also reported.

    Experimental setup

    • Models tested: all students are fine-tuned from Qwen/Qwen3.5-9B-Base (pretrained checkpoint); the only variable is the source of traces and answers in the training data.
    • Data: 5,000 assistant-turn samples from TeichAI/Fable-5-Cursor-Traces [4], with context up to 256K tokens; the five corpora S1–S5 share prompts and context (S1/S2 share Fable 5 answers, S4/S5 share GPT-6.1-SOL answers, S3 uses Qwen3.8-Max's own traces and answers).
    • Baselines: S1 (teacher's original traces) is the textbook approach; S3 is direct distillation from the strongest legitimate in-family model; S4 is TraceInversion [5] synthesized traces.
    • Metrics: acc-norm for ARC-Easy and ARC-Challenge, accuracy for BoolQ, pass@1 for HumanEval+ and MBPP+.
    • Review method: trace authenticity is scored 0–1 by GPT-6.1-SOL; downstream benchmark scores are evaluated separately.
    • Sample size and repetitions: 5,000 per corpus; Table 1 notes one run per cell; the S1 evaluation at 1,200 steps was rerun twice to rule out scoring errors.

    Main results

    According to Table 1 (final checkpoint, about 1,600 packed-batch updates):

    Swipe horizontally to read the table

    CorpusARC-EARC-CBoolQHumanEval+MBPP+
    S1: Fable 5 reasoning + answers81.0258.3689.6364.6352.38
    S2: family-native + Fable 5 answers81.1959.7389.3368.2959.52
    S3: Qwen-Max reasoning + answers81.5258.2888.3546.9524.60
    S4: TraceInversion + Sol answers81.4858.5388.993.666.61
    S5: family-native + Sol answers80.9858.1988.6559.1560.05
    • Knowledge benchmarks do not distinguish corpora: on the three knowledge benchmarks any two values differ by no more than 1.6 points, and no setting leads on all three at once; the authors state this matches expectations for tasks that do not examine reasoning traces.
    • S2 exceeds S1: with answers fixed and only the trace source changed, HumanEval+ is 3.7 points higher and MBPP+ is 7.1 points higher; the authors state that S1 rests on the assumption that "the strongest available traces are the best training signal," and that on these two benchmarks this is not the case.
    • S3 is far below expectations: the authors state that they originally expected Qwen-Max to be close to Fable 5, but it actually trails by 18 points on HumanEval+ and 28 points on MBPP+; the authors' interpretation is that teacher capability is necessary but not sufficient.
    • S4 is weakest, S5 overtakes it: the authors state that TraceInversion's traces are obviously synthetic (generic tone, numbered steps the family never writes, often restating the answer rather than deriving it); with the same Sol answers, S5 is 55 and 53 points higher than S4, which the authors consider roughly corresponds to the gap between the two teachers themselves.

    Training dynamics (Table 2, same data as Figure 1)

    • S1 is unstable: HumanEval+ reaches 66.46 at 600 steps, drops to 33.54 at 1,200 steps, and returns to 64.63 at the end; the 1,200-step evaluation was rerun twice with unchanged results. The authors propose one possible explanation: adapting to the teacher's reasoning style temporarily disrupts the student's code behavior.
    • S2 and S5 are more monotonic: S2 rises overall with only a small mid-training dip; S5 rises at every checkpoint on both benchmarks, from 0.61 and 10.32 to 59.15 and 60.05, and its average across the two benchmarks slightly exceeds S1. The authors state that Qwen3.5 mid-training reportedly used a large amount of Claude-family data and very little GPT-family data, so GPT-6.1-SOL's answer style is new to the base model and requires steps to adapt.
    • On MBPP+, S2 leads S1 at every checkpoint (Table 2).

    Degradation phenomenon and "secondhand distillation"

    • S3 and S4 rise then fall: S3 reaches 48.78 on HumanEval+ within 300 steps and never returns to that level; S4 peaks at 21.95 and 42.59 at 900 steps and finally drops to 3.66 and 6.61.
    • Output inspection: the authors observe an increase in death loops and meaningless repetition—sentences recurring with slight variations, or repeatedly re-deriving existing results; the authors state that this degradation accompanies the performance decline and may have contributed to it.
    • The authors' explanation: the authors cite the base model team's statement that distilling again from a distilled model ("secondhand smoke") may cause the student to fall into death loops while thinking, and guess that the fate of S3 and S4 can be explained to some extent by this habit; S1 never showed this pattern, and family-native traces did not produce it at all.

    Other ablations and analyses

    • Authenticity scores (GPT-6.1-SOL, 0–1): supervised generator traces 0.54, 0.68 after five adversarial rounds, real family traces 0.66, 0.82 after the critic selects from four (Sections 2.2, 2.4).
    • Critic size ablation: a critic smaller than the generator fits shortcuts within a few hundred steps and cannot provide a learning signal to the generator; therefore the critic is at least as large as the generator (Section 2.3).
    • Compliant variant: family-native traces are given to Qwen3.8-Max to write the answers and then used for training; the authors state that this variant was run and performs essentially the same as S2, but no numbers are given (Section 4).
  5. What are some points that can be further explored?

    The authors state that the comparison cannot separate family style from other differences in the pipeline; the experiment covers only one student model, 5,000 samples, and one run per cell.

    Limitations noted by the authors and future directions

    • The comparison cannot separate variables (Related Work): the authors state that the S1/S2 and S4/S5 comparisons establish downstream performance differences, but "cannot separate family style from all other differences between the two pipelines."
    • S3 is not an ablation of trace style (Related Work): the authors state that S3 uses Qwen3.8-Max's own answers and traces and is an independent baseline, and "its performance should not be read as an ablation of trace style with answers fixed."
    • The goal is not faithful reconstruction (Related Work): the authors cite the view that reasoning does not necessarily faithfully reflect computation [15] and state that this paper's goal is useful family-native training traces, not verbatim reconstruction of the teacher's hidden reasoning.
    • The mid-training drop in S1 has only a speculative explanation (Section 3.3): the authors state that one possible explanation is that adapting to the teacher's reasoning style temporarily disrupts the student's code behavior, and that no further verification was done.
    • The explanation for S3/S4 degradation is speculative (Section 3.3): the authors state that they guess "secondhand distillation" habits explain the death-loop phenomenon in S3 and S4 to some extent.

    Scope of the experiments

    • The only student model tested is Qwen3.5-9B-Base; the teacher answer sources are Fable 5 and GPT-6.1-SOL, and the in-family teacher is Qwen3.8-Max (Section 3.1).
    • 5,000 samples per corpus; Table 1 notes one run per cell, and the paper does not report statistical significance tests or confidence intervals.
    • There are five benchmarks: ARC-Easy, ARC-Challenge, BoolQ, HumanEval+, and MBPP+; the training data for the generator and critic both come from Qwen3.8-Max dialogues (Section 2.1).
    • The authenticity review model is GPT-6.1-SOL, and the paper does not report the agreement between this score and human judgment.
    • The compliant variant (Qwen3.8-Max writes the answers) was run by the authors and reportedly performs essentially the same as S2, but the paper does not give numerical results for this variant (Section 4).
  6. Summarize the main content of the paper

    TraceForge replaces the teacher's hidden traces with reasoning traces written in the student family's style, which the authors state is compliant and exceeds the teacher's original traces on code benchmarks.

    A distillation methods paper: frontier models no longer return reasoning traces, and the authors propose TraceForge—keep the teacher's answers, and have a generator in the student model family's style write the reasoning traces itself, as compliant distillation data.

    • Problem to solve: some closed-source models return only answers or summaries, and existing approaches to recovering hidden reasoning violate terms of service; the authors want the student to learn the teacher's reasoning ability within legal bounds.
    • Method highlights: the generator learns on 10,000 Qwen3.8-Max dialogues to reconstruct family traces from context and answers; the critic learns on 10,000 pairs to distinguish real from fake; five rounds of online adversarial co-training (DPO-style objective), and at inference the critic selects one of four. Under GPT-6.1-SOL review, generated traces have authenticity 0.68, real traces 0.66, and 0.82 after selection from four.
    • Main results (Qwen3.5-9B-Base, 5,000 data points, Table 1): with Fable 5 answers fixed, family-native traces are 3.7 points higher than the teacher's original traces on HumanEval+ (68.29 vs. 64.63) and 7.1 points higher on MBPP+ (59.52 vs. 52.38), and lead on MBPP+ at every checkpoint.
    • Other results: with the same GPT-6.1-SOL answers, family-native is 55 and 53 points higher than TraceInversion; 21 and 35 points higher than direct distillation from Qwen3.8-Max; on the three knowledge benchmarks the five corpora differ by no more than 1.6 points.
    • The authors' conclusion: the authors state that family-native traces are not merely a legal substitute for real traces, but in comparisons that isolate trace source are even a better teacher; they use the analogy "the best student comes from a teacher who teaches in the way most familiar to the student" and speculate that family style is easier for the student to learn.
Read originalhuggingface.co