Full text not available for this paper

COT-PROXY: Cross-Format Transfer for Distilling Long-Horizon Policies

Summary (Overview)

  • Core contribution: The paper demonstrates that a teacher model's long-horizon policy can be distilled into a reasoning student model using only the teacher's actions, without training on the teacher's chain-of-thought (CoT), via a mechanism called cross-format transfer.
  • Key innovation: Training targets with an empty reasoning block followed by actions, combined with a KL regularization term on a replay buffer of the student's own generations, successfully transfers policy while preserving the student's existing capabilities.
  • CoT-proxies: Short summaries of the teacher's reasoning placed after the empty think block provide an additional signal that improves task success without requiring access to the hidden CoT—making the recipe applicable to closed teachers like GPT-5.6 Luna.
  • Empirical results: On AppWorld, Qwen3-4B improves from 7.3% to 34.5% (open teacher) and 48.2% (closed teacher) with CoT-proxy training; on SWE-bench Verified, from 2.7% to 15.1% (open) and 27.8% (closed).
  • Practical significance: The recipe works identically for closed teachers whose reasoning is hidden behind APIs, since it only uses visible outputs and API-returned reasoning summaries.

Introduction and Theoretical Foundation

Background and Motivation

Language models are increasingly deployed as agents that act in environments over many steps (coding agents, personal assistants). The quality of such agents depends on their policy—the action chosen given the task and history. Two main routes exist for obtaining long-horizon policies:

  1. Reinforcement learning in the environment (expensive, especially for smaller models)
  2. Distillation from a stronger teacher via supervised fine-tuning on teacher trajectories

The standard distillation recipe supervises the full trajectory, including the teacher's chain-of-thought (CoT). However, this faces a critical limitation:

"The strongest teachers are closed models behind an API whose reasoning is hidden, since providers such as OpenAI return encrypted reasoning items and at most a summary, and they encrypt the reasoning precisely to prevent this kind of distillation."

Additionally, small models have been found to learn poorly from traces of strong reasoners (Li et al., 2025).

Theoretical Foundation

The paper builds on two key observations:

  1. Cross-format transfer: Prior safety research (Chua et al., 2025) showed that fine-tuning a reasoning model with its CoT disabled on misaligned data produces broad misalignment that persists once CoT is re-enabled at evaluation. The authors ask whether this mechanism can transfer a useful policy.

  2. Execution vs. reasoning failures: Failures of language models on long tasks have been attributed to execution rather than reasoning (Sinha et al., 2026). If execution is what fails, then actions alone may be sufficient to teach.

This motivates the central hypothesis: a long-horizon policy can be distilled from actions alone, with the student's own reasoning (already good on single turns) left intact.

Methodology

Problem Setting

An agent trajectory consists of turns, where each turn has:

  • Hidden reasoning inside a think block (opened by thinking, closed by /thinking)
  • Optional visible prose
  • An action (Python cell or bash command)

Training Targets

Three training target formats are proposed (Figure 1):

TargetFormat
Full-CoTthinking + teacher's thought + /thinking + action
Action-onlythinking /thinking + action
CoT-proxythinking /thinking + summary + summary + /summary + action

Key design choices:

  • The empty think block receives no loss—it conditions supervised tokens without teaching the student to produce an empty block itself.
  • At inference, only the opening token is prefilled; the student generates its own reasoning, which is kept in the history of later turns.

Replay Regularization

To prevent catastrophic forgetting, a KL divergence penalty is applied toward the initial checkpoint on a fixed replay corpus:

L(θ)=−1Nt∑i∈Tlog⁡pθ(yi∣hi)+1Nr∑i∈RKL(pinit(⋅∣hi)∥pθ(⋅∣hi))\mathcal{L}(\theta) = -\frac{1}{N_t} \sum_{i \in T} \log p_\theta(y_i | h_i) + \frac{1}{N_r} \sum_{i \in R} \text{KL}(p_{\text{init}}(\cdot | h_i) \| p_\theta(\cdot | h_i))

where:

  • TT and RR are supervised token positions of teacher and replay samples
  • Nt=∣T∣N_t = |T| and Nr=∣R∣N_r = |R| are token counts
  • hih_i is the context and yiy_i the target token at position ii
  • The KL is taken over the full vocabulary

With LoRA fine-tuning, pinitp_{\text{init}} comes from the same base model with the adapter disabled.

CoT-Proxies

  • Open teacher: Summaries generated offline by the teacher model itself, condensing each turn's reasoning into ≤2 sentences, given only the thought (not the action or observations).
  • Closed teacher: Use the reasoning summaries returned by the API alongside visible outputs, without further processing.

Experimental Setup

  • Environments: AppWorld (168 tasks, 56 scenarios) and SWE-bench Verified (500 tasks)
  • Students: Qwen3-4B-Thinking-2507 and Qwen3-32B (post-trained reasoning models)
  • Teachers: Open: Qwen3.6-27B; Closed: GPT-5.6 Luna (reasoning effort xhigh)
  • Training: LoRA adapters (rank 16, alpha 32), 8 epochs, 17 teacher + 3 replay samples per update (15% replay)

Empirical Validation / Results

Main Results (Open Teacher)

Table 1: Task success with open teacher Qwen3.6-27B

ModelTargetAppWorld TGC (%)SWE-bench Verified (%)
Qwen3.6-27B (teacher)–60.7 ± 1.669.3 ± 0.4
Qwen3-4BInitial7.3 ± 1.92.7 ± 0.6
Qwen3-4BFull-CoT29.2 ± 3.33.9 ± 0.8
Qwen3-4BAction-only17.9 ± 1.65.5 ± 0.8
Qwen3-4BCoT-proxy34.5 ± 3.715.1 ± 1.4
Qwen3-32BInitial11.5 ± 1.55.8 ± 0.2
Qwen3-32BFull-CoT27.8 ± 5.921.1 ± 2.3
Qwen3-32BAction-only25.4 ± 2.714.3 ± 0.8
Qwen3-32BCoT-proxy29.8 ± 6.821.7 ± 0.8

Main Results (Closed Teacher)

Table 2: Task success with closed teacher GPT-5.6 Luna

ModelTargetAppWorld TGC (%)SWE-bench Verified (%)
GPT-5.6 Luna (teacher)–89.3 ± 1.288.2
Qwen3-4BInitial7.3 ± 1.92.7 ± 0.6
Qwen3-4BAction-only35.1 ± 3.918.0
Qwen3-4BCoT-proxy48.2 ± 1.027.8
Qwen3-32BInitial11.5 ± 1.55.8 ± 0.2
Qwen3-32BAction-only44.4 ± 5.027.8
Qwen3-32BCoT-proxy59.1 ± 2.835.2

Ablation Results

Replay regularization (Table 3): Without replay, full-CoT training drops AIME accuracy from 74.7% to 68.9% and raises KL divergence from 0.003 to 0.042 nats/token. Replay restores capability and adds 1–5 points of task success.

Replay domain (Table 4): In-domain replay (student's own AppWorld trajectories) destroys the training effect—action-only drops to 7.3% (initial level). Replay must come from outside the target environment.

Summary placement (Table 5): Placing the summary inside the think block (as short CoT) yields 23.4% vs. 34.5% for CoT-proxy (open teacher) and 33.9% vs. 48.2% (closed teacher). The summary is a poor substitute for reasoning inside the think block but useful outside it.

Summary source (Table 6): A smaller annotator (Qwen3-4B-Instruct) is at least as effective (36.9%) at ~1% of the cost. Post-hoc explanations (without teacher reasoning) recover ~2/3 of the gain (29.0%).

Visible text removal (Table 7): Keeping the teacher's visible text lowers success in every configuration; action-only drops to 4.6% (below initial).

Theoretical and Practical Implications

Cross-Format Transfer Mechanism

The paper demonstrates that policy and reasoning are separable: a student can learn what actions to take from action-only targets while preserving its own reasoning style. This is evidenced by:

  • Students trained on action-only targets keep the initial model's phrasing ("Okay", "Wait") in their think blocks, while full-CoT students adopt the teacher's phrasing ("The user wants") (Table 8).
  • CoT-proxy students never produce summaries at inference—the summary block is conditioned on an empty think block during training, a context that never occurs at inference.

Capability Retention

The KL replay regularization is crucial for continual learning:

  • Without replay, full-CoT training causes significant drift (KL = 42.1 × 10⁻³ nats/token)
  • With replay, KL drops to 2.7 × 10⁻³, preserving single-turn capabilities (AIME, IFEval, MMLU-Pro)

Closed-Teacher Distillation

The recipe's applicability to closed teachers is significant because:

  • It uses only visible outputs and API-returned summaries—no attempt to recover hidden reasoning
  • It makes distillation from proprietary models feasible within their terms of service
  • Results with GPT-5.6 Luna (48.2% on AppWorld) substantially exceed those with the open teacher (34.5%)

Reasoning at Inference is Essential

Additional experiments (Table 13) show that the CoT-proxy student's gain depends on thinking at inference:

  • Thinking enabled: 21.7% on SWE-bench
  • Thinking disabled: 5.1% (near initial model's 5.8%)

Conclusion

Key Takeaways

  1. Actions alone transfer long-horizon policies: Distilling from teacher actions with an empty reasoning block works, with the student's own reasoning carrying out the policy at inference.

  2. CoT-proxies bridge the gap: Short summaries of teacher reasoning placed outside the think block provide a signal that recovers most of the benefit of full-CoT training without reasoning tokens.

  3. Closed teachers are distillable: The same recipe works for GPT-5.6 Luna using only visible outputs and API summaries, achieving 48.2% (Qwen3-4B) and 59.1% (Qwen3-32B) on AppWorld.

  4. Replay regularization preserves capabilities: KL regularization on out-of-domain replay data prevents catastrophic forgetting while allowing policy transfer.

Future Directions

The authors suggest that "learning the policy without imitating the teacher's reasoning offers a practical route for adapting reasoning models to long-horizon tasks while retaining what they already know." Potential extensions include:

  • Scaling to larger students and more complex environments
  • Investigating whether CoT-proxies can be further optimized (e.g., learned rather than summarized)
  • Exploring the limits of cross-format transfer for other capabilities beyond long-horizon tasks

Ethical Considerations

The paper includes an ethics statement noting that closed-teacher experiments use only what the API returns to any user, with no attempt to recover hidden reasoning. However, it cautions that "terms of service of model providers may restrict the use of outputs for training other models, and anyone distilling from a closed model should check the terms that apply."

Related papers