English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

CoT-Factory: Synthesizing the Missing Chain-of-Thought in Agent Trajectories [arXiv:2611.37703]

Forum topic · 小凯 · 2026-11-30

Summary

CoT-Factory (arXiv:2611.37703) is a method for reverse-synthesizing the missing chain-of-thought (CoT) reasoning in silent agent trajectories—action logs that contain no explanation of why each action was taken. The paper tackles three obstacles: quadratic compute cost of encoding long histories (solved by Tree-SFT, a shared-prefix trunk-leaf training scheme achieving an 11.51x token compression and cutting training from 471 to 86 GPU hours); lack of ground-truth reasoning for supervision (solved by 'inverted' self-consistent teacher pairs rather than fragile forward rejection sampling); and reasoning-action decoupling in very long contexts (solved by Classifier-Free Guidance, raising Pass@1 from 69.5% to 89.4%). A structured quality-control pipeline decomposes candidate reasoning into problem/plan units and verifies each against recorded history, filtering fluent-but-wrong reasoning that simple likelihood filtering accepts. Training Qwen3.5-4B/9B students on synthesized CoT recovers roughly 68% of the gains from real CoT supervision, matching or exceeding the real-CoT ceiling on some benchmarks, while competing synthesis methods (Trace Inversion, RLT, VR) recover 0% under equal GPU budgets. The paper also highlights sampling temperature's role in preserving reasoning diversity and warns of Goodhart-style metric gaming.

CoT-Factory: Giving Agents the Unspoken "Why" — Reverse Reasoning from Black-Box Trajectories

*Source: zhichai.net forum post discussing arXiv:2611.37703 (Tsinghua Shenzhen International Graduate School + JD). The original post uses an extended analogy to airplane black-box investigation; key technical claims are summarized below.*

The Problem: Data Is Silent

Long-horizon agents (terminal commands, web browsing, code editing over dozens of steps) are trained on trajectories of <thought → action → observation> loops. But most available trajectories lack the "thought": either the frontier model's internal reasoning was withheld (safety/commercial reasons), or human demonstration data (Mind2Web, Android in the Wild, OctoPack) never contained reasoning at all.

The cost of this silence is measurable: stripping CoT and supervising actions only drops Qwen3.5-4B from 18.35% to 3.33% on Terminal-Bench 2.1—worse than no training at all, because the student learns action surface forms without the reasoning that justifies them.

Key Points

1. Tree-SFT: shared-prefix training (11.51x compression)

  • Naive per-step encoding of a 60-step trajectory re-encodes the same prefix dozens of times: 4.576B tokens per epoch, 471 GPU-hours over 3 epochs.
  • Tree-SFT encodes the full history once as a trunk, attaches action-reasoning pairs at leaf branches, with position encodings continuing from branch depth. Gradients from all leaves are scatter-added back to trunk KV-cache positions, recurrent state snapshots, and convolutional contexts—exactly equivalent to independent-unfolding gradients, not an approximation.
  • Result: 397.7M tokens per epoch (11.51x compression), 85.89 GPU-hours. Compression grows with trajectory length: 4.65x for <20-step trajectories, 13.77x for 60+ steps.
  • 2. Inverted teacher pairs instead of rejection sampling

  • Forward rejection sampling (keep teacher reasoning only if the teacher re-generates the recorded action) fails: Pass@1 is only 40.74%, costs 1,243 GPU-hours, and 26.27% of steps remain unsolved after 8 tries—the action space is too large for exact reproduction.
  • CoT-Factory instead lets the teacher (DeepSeek-V4.1-Flash) freely generate its own coherent reasoning-action pair (r̃, ã) given history h, filters format errors/truncation/protocol leaks, then inverts the pair: learn r̃ conditioned on (h, ã). The requirement is internal consistency, not fidelity to the record—like training a crash investigator to demonstrate how a competent pilot would think, not to replicate one specific pilot.
  • A synthesis model (Qwen3.5-4B) is first trained on 70,724 valid steps from 1,341 CoT-annotated trajectories (TerminalHorizon-3k), then used to annotate silent trajectories. Inference completion is step-parallel: no environment rollback, no sequential dependency.
  • 3. Classifier-Free Guidance to fight dilution

  • With histories up to 262,144 tokens, the conditioning action is a tiny signal; Pass@1 falls from 85.4% (short contexts) to 63.3% (64K–128K).
  • Training randomly drops the action condition (dropout ρ); sampling extrapolates log-probs: ℓ_cfg = ℓ_u + w(ℓ_c − ℓ_u), with w = 2.
  • Result: Pass@1 69.54% → 89.36%, Pass@8 99.84%; long-context gap closed (+23.9 points on 64K–128K). Total synthesis cost drops to 623 GPU-hours because saved retries outweigh CFG decode overhead (vs 1,391 for RLT).
  • 4. Structured QC: "correct" beats "plausible"

  • Likelihood filtering admits fluent-but-wrong reasoning (a wrong candidate can have lower action NLL than the true one). Free-form LLM judging was inconsistent—worse than no QC.
  • Structured QC uses an extractor to decompose reasoning into units 𝐒 = {(zⱼ, cⱼ, bⱼ)} tagged as "problem" or "plan", then verifies each unit against recorded history (is the diagnosis evidenced? are planned outcomes mistaken for observations? arithmetic correct?), plus a semantic matcher M(h,r,a).
  • Ablation (TB-subset, avg@3): SFT-10K 23.3% → SFT-70K 31.3% → Normal QC 30.6% (no gain) → Structured QC 37.3% → +CFG 38.0%.
  • 5. Results: ~68% of real-CoT gains recovered

  • Qwen3.5-4B: Terminal-Bench 2.1 18.35% → 26.96% avg@3 (+8.61), pass@3 40.44%, essentially matching the real-CoT upper bound (28.46% / 40.44%). 9B gains +8.61 avg@3. Average recovery across 8 metrics: 68.12% (4B), 64.24% (9B).
  • On VITA-Cross, synthetic CoT (19.00%) exceeds real CoT (18.50%)—likely because structured QC makes the synthesized material cleaner and more consistent. AutomationBench 27.23% vs 19.71% baseline; Deep Planning 23.96% vs 21.25%.
  • All baselines fail under equal GPU budgets: Trace Inversion, RLT, VR recover 0%; mask-CoT 12.59%.
  • 6. Temperature and diversity

  • Greedy decoding (T=0): QC Pass@8 67.3%, downstream avg@3 18.7%. T=0.3: 99.5% / 31.3%. T=1.0: 99.8% / 38.0%. Multiple valid reasoning paths exist per state; low temperature collapses diversity and starves the student of supervision variety.
  • RLT's abnormally low training loss (0.95, below real data) with terrible downstream performance illustrates the trap: loss too low can mean your synthetic data has degenerated into a repeater.
  • 7. Caveats

  • GAIA regressed at both scales: synthesized data's interaction conventions (from TerminalHorizon) conflicted with GAIA's answer-submission format—a hidden-curriculum distribution bias.
  • The post's epistemological takeaway: the three failed baselines all optimized "does this reasoning make the action look likely"—a Goodhart violation. Selection criteria should test factual consistency with evidence ("is it right?"), not plausibility ("does it look right?").
  • Tree-SFT's trunk-leaf paradigm applies to any long-context, multi-supervision-point setting: process reward models, multi-turn fine-tuning, segmented document understanding.
  • Reference

  • Zhu, T., Liu, Y., Liu, X., Bai, S., Tian, S.-Y., Wang, Y., Tian, J., Sun, Y., Simiu, G., Tang, Y. "CoT-Factory: Synthesizing the Missing Reasoning in Agent Trajectories." arXiv:2611.37703, 2026.
  • Ho, J., Salimans, T. "Classifier-Free Diffusion Guidance." arXiv:2207.12598, 2022.
  • Cetin, E., Zhao, T., Tang, Y. "RLT: Reinforcement Learning Teachers of Test Time Scaling." arXiv:2506.08388, 2025.
*Note: the original post's headline figures (model names like Qwen3.5-4B, Terminal-Bench 2.1) are reproduced as cited in the source discussion.*

Tags

#cot-factory#agent-trajectories#chain-of-thought#synthetic-data#classifier-free-guidance#tree-sft#llm-training#arxiv-2611-37703

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178637537