Many large language models (LLMs) use chain-of-thought (CoT) to solve complex problems, but hide their CoT traces to prevent reasoning capabilities from being distilled. While recent studies have shown that hidden CoTs can be reconstructed, existing methods typically require training a separate attacker for each target LLM. This paper studies model-agnostic CoT reconstruction, aiming to reconstruct hidden CoT traces from arbitrary target LLMs using only input prompts and visible final responses. We propose Final-Output Preference Learning (FOPL), which trains a single reconstruction model that generalizes to unseen LLMs without target-specific adaptation. To achieve this, the reconstruction model must learn which reasoning patterns match a given final response without knowing the target LLM's identity. We address this using preference optimization, training the reconstruction model to prefer native CoTs over synthetic alternatives for the same question and final response. By learning these preferences from LLMs with accessible CoTs, the reconstruction model learns to distinguish reasoning patterns based on visible responses. Experiments show that reconstructed CoTs capture distinct reasoning patterns across LLM families, including a family unseen during training. Moreover, students trained on reconstructed CoTs match or outperform those trained on native CoTs across several reasoning benchmarks.
Figures & tables
Figure 1: Preference-pair construction for FOPL . For each question, multiple source LLMs provide native CoTs and visible final responses. Reconstruction generators then produce synthetic CoTs conditioned on each source LLM’s question and final response. We pair each native CoT (preferred) with synthetic alternatives (rejected) under the same question-response prompt, enabling DPO to train a single reconstruction model to distinguish reasoning patterns across different LLMs.
Native reference
DeepSeek response
Kimi response
GLM response
Qwen response
MiMo response
DeepSeek
57.46
45.85
39.85
40.98
43.48
Kimi
32.41
62.98
35.52
42.46
37.69
GLM
41.23
43.23
57.02
44.60
42.86
Qwen
34.84
37.34
32.41
65.39
33.83
MiMo (OOD)
36.90
43.98
36.31
40.73
60.51
Table 1: Cross-family CoT similarity on MATH-500, judged by Gemini 3.8 Flash. Rows indicate native-reference families; columns indicate the response sources used by FOPL . Entries are tie-aware preference rates (%). Bold diagonal entries aggregate comparisons against all four alternative sources; off-diagonal entries report comparisons against the corresponding column source.
Response source
Student supervision
GSM8K Acc.
MATH-500 Acc.
GPQA Acc.
OpenBookQA Acc.
AdvBench Safety
Avg. Δ vs. Base
–
Base model
27.22
15.00
3.54
0.20
6.92
–
DeepSeek
FOPL (Ours)
57.85
33.20
19.19
50.30
9.07
+23.35
DeepSeek syn
45.94
24.80
15.66
47.30
12.88
+18.74
Kimi syn
33.66
20.80
18.69
34.60
5.58
+12.09
GLM syn
37.07
18.40
18.18
40.30
6.35
+13.48
Native CoT (Ref)
49.28
23.00
16.67
56.90
15.96
+21.79
Table 2: Downstream distillation into Qwen2.5-1.5B-Base. Within each response-source group, the questions, visible final responses, student initialization, and training configuration are fixed; only the intermediate CoT changes. “Syn” denotes a CoT synthesized from the question and visible final response. Each native-CoT row is a reference for the source teacher’s original output preferences. “Avg. Δ ” reports the mean absolute improvement over the base model across the five downstream tasks, in percentage points. Bold and underlining mark the best and second-best completed response-only conditions within each source and metric, respectively; tied second-best results are both underlined. Native-CoT rows are excluded from this ranking. MiMo is excluded from preference training. Scores are percentages (higher is better).
Response source
Reconstructor
GSM8K Acc.
MATH-500 Acc.
GPQA Acc.
OpenBookQA Acc.
DeepSeek
FOPL
57.85
33.20
19.19
50.30
TI (R1)
28.51
17.00
8.59
15.00
Kimi
FOPL
53.30
27.60
17.17
43.00
TI (R1)
38.06
16.40
8.08
19.00
GLM
FOPL
52.62
29.40
18.69
39.20
TI (R1)
33.36
13.40
8.59
9.60
Table 3: Downstream distillation using CoTs reconstructed by FOPL and Trace Inversion (TI). Both methods condition on the same questions and visible final responses within each response-source group. The student is Qwen2.5-1.5B-Base. Scores are percentages, and higher values are better.
Reconstructor
GSM8K
MATH-500
GPQA
OpenBookQA
MBPP
SFT
48.67
19.60
13.13
33.60
29.80
DPO
57.85
33.20
19.19
50.30
32.22
DPO − SFT
+9.18
+13.60
+6.06
+16.70
+2.42
Table 4: Matched SFT and DPO reconstruction policies: downstream student accuracy on five benchmarks (%). Both policies use the same native traces as their positive training examples, while DPO additionally uses the corresponding rejected traces. The last row reports the difference in percentage points.
Native reference
DeepSeek syn
Kimi syn
GLM syn
MiMo syn
DeepSeek
53.83 ( − 3.11)
47.01 (+1.16)
45.01 (+5.16)
46.50 (+3.02)
Kimi
39.32 (+6.91)
61.68 ( − 3.11)
35.38 ( − 0.14)
40.27 (+2.58)
GLM
42.00 (+0.77)
48.49 (+5.26)
54.88 ( − 2.68)
44.88 (+2.02)
MiMo
44.00 (+7.10)
48.62 (+4.64)
45.39 (+9.08)
54.00 ( − 6.93)
Table 5: MATH-500 source matching with the SFT reconstruction policy. Entries are Gemini tie-aware preference rates (%). Parentheses report SFT − DPO differences in percentage points under the same four-source comparison, and bold marks the matching source. Each diagonal aggregates three comparisons, while each off-diagonal entry reports the candidate’s rate against the same-source candidate.
Gemini 3.8 Flash
GPT-5.6-Luna
Judge agreement
Native reference
Matched
Mismatched
Gap
Matched
Mismatched
Gap
DeepSeek
57.46
42.54
14.92
55.22
44.78
10.44
70.93
Kimi
62.98
37.02
25.96
57.77
42.23
15.54
67.50
GLM
57.02
42.98
14.04
54.98
45.02
9.96
69.51
Qwen
65.39
34.61
30.79
56.67
43.33
13.33
69.35
MiMo (OOD)
60.51
39.48
21.03
57.98
42.02
15.95
72.94
Table 6: Robustness of cross-family alignment to the judge model. “Matched” is the preference rate of the reconstruction conditioned on the reference family’s own final response. “Mismatched” averages the preference rates of reconstructions conditioned on the other four response sources, and “Gap” is Matched minus Mismatched. Agreement is the percentage of shared valid comparisons for which Gemini 3.8 Flash and GPT-5.6-Luna select the same underlying candidate after their decisions are mapped back to the original candidate identities. Ties are treated as a separate outcome. MiMo is held out of preference training.
Figure 2: Final-response-only ablation on GSM8K and MATH-500. We compare supervision using the source model’s native CoT, the visible final response alone, and the reasoning trace reconstructed by FOPL . All conditions use the same DeepSeek question–response records and student-training configuration.
SFT data
Training examples
GSM8K Acc.
MATH-500 Acc.
GPQA Acc.
OpenBookQA Acc.
Base model
–
27.22
15.00
3.54
0.20
25%
1,250
51.55
28.40
17.68
29.60
50%
2,500
54.06
27.80
20.20
38.80
100%
5,000
57.85
33.20
19.19
50.30
Table 7: Effect of downstream SFT data scale. All fine-tuned conditions use traces reconstructed by the same fully trained FOPL policy from the DeepSeek response pool and differ only in the number of student-training examples. The base model is included as a reference. Scores are percentages, and higher values are better.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Setting
Reconstruction DPO
Student SFT
Epochs
3
3
Learning rate
10−5
10−5
Schedule
Cosine
Cosine
Warmup ratio
5%
5%
Device batch size
1
1
Gradient accumulation
8
8
Appendix
Table 8: Configured reconstruction-DPO and student-SFT settings. Executed-run overrides should be verified against the final training logs.
Student supervision
GSM8K Acc.
MATH-500 Acc.
Base model
27.22
15.00
Luna final response only
42.82
23.40
FOPL reconstruction
51.75
29.80
Appendix
Table 9: Closed-source teacher transfer from GPT-5.6-Luna to Qwen2.5-1.5B-Base. GPT-5.6-Luna exposes only visible final responses and does not provide native reasoning traces. The two fine-tuned conditions use the same questions, Luna responses, student initialization, and training configuration. Scores are percentages, and higher values are better.
rθ(z;p)=βlogR0(z∣p)Rθ(z∣p)
Appendix
Algorithm 1 FOPL training and downstream supervision construction
Native reference
Judge
DeepSeek response
Kimi response
GLM response
Qwen response
MiMo response
DeepSeek
Gemini
(880/642/73)
(172/205/21)
(147/228/24)
(157/229/13)
(166/218/15)
Luna
(877/711/2)
(183/216/0)
(179/217/2)
(174/224/0)
(175/220/0)
Kimi
Gemini
(129/269/0)
(1002/589/0)
(141/256/0)
(169/229/0)
(150/248/0)
Luna
(164/235/0)
(921/673/2)
(168/229/2)
(170/229/0)
(171/228/0)
GLM
Gemini
(156/226/17)
(167/221/11)
(886/662/47)
(175/218/5)
(164/221/14)
Luna
(177/219/1)
(177/220/0)
(870/712/3)
(172/223/2)
(186/208/0)
Appendix
Table 10: Raw cross-family win/loss/tie counts from Gemini 3.8 Flash and GPT-5.6-Luna. Each entry is (W/L/T) for the column-conditioned reconstruction. Diagonal entries aggregate four pairwise comparisons, while off-diagonal entries correspond to one comparison.
Language model distillation transfers a larger model’s capabilities to smaller or specialized models using outputs, probabilities, or internal representations.
Hidden chain-of-thought (CoT) traces, especially those from frontier proprietary large reasoning models (LRMs), are valuable model assets. Yet whether these hidden CoTs can be directly extracted from black-box models remains largely unexplored. In this work, we systematically study whether hidden CoTs can be extracted near-verbatim from black-box LRMs through API interactions. We identify a previously overlooked reasoning replay surface between tool calls and develop EchoCoT, a multi-step attack that iteratively extracts hidden CoTs using API-returned fidelity signals. We further develop an LLM-based optimization framework that automatically searches for an effective universal injection trajectory across various datasets. We evaluate EchoCoT on three open-source and five frontier proprietary LRMs. On open-source LRMs, EchoCoT achieves up to 66.4% near-verbatim extraction success, with the extracted trace length within 10% of the target and at least 90% of tokens exactly matching the target CoT. The same injection trajectory also generalizes to unseen datasets, achieving up to 80% extraction success under the same criterion. For tested frontier proprietary LRMs, a substantial fraction of extracted CoTs closely align with provider-reported reasoning lengths and available CoT summaries. EchoCoT can also extract very long CoTs: on Gemini-2.5, it extracts 33,463 tokens from a 32,948-token target. These results establish hidden-CoT extraction as a practical security risk and highlight the need to better protect hidden CoT assets.
Large language models often answer complex reasoning questions without revealing intermediate steps, raising whether they reason latently or complete patterns. We propose the Hidden CoT Detection Score (HCDS), a comparative behavioral and mechanistic signal measuring whether neutral-prompt behavior aligns more closely with explicit CoT or explicit no- CoT. Here, hidden CoT operationally denotes this neutral-prompt CoT-like alignment; HCDS does not directly observe or prove an unexposed reasoning trace. On GSM8K, HCDS is significantly positive for both Qwen3-4B variants (Thinking +1.87, p=1.2×10−7; Instruct +1.41, p=1.9×10−4), replicates across a different inference stack and quantization within 0.08 (+1.80 and +1.45), and is not significantly positive in seven of eight length-adjusted calibration-control cells. The unadjusted score produces large positive scores on single-step arithmetic and numeric factual lookup. The variants also respond differently to no-CoT instructions: Instruct complies from the prompt alone, whereas Thinking continues reasoning and requires intervention. These findings show stronger, less prompt-conditional CoT-like behavior in the reasoning-tuned model, consistent with but not proof of latent reasoning. HCDS thus investigates latent reasoning without relying on models' self-reported traces.
Armaan Singh, Ryan Trinh Le, Jasmine Kaur +5
1Stanford University · 2York University · 3Facebook
Distilling large reasoning models is essential for making Long-CoT reasoning practical, as full-scale inference remains computationally prohibitive. Existing curation-based approaches select complete reasoning traces post-hoc, overlooking collaboration among heterogeneous teachers and lacking dynamic exploration, which leads to redundant sampling and missed complementary reasoning. We introduce CoRD, a collaborative multi-teacher decoding framework that performs step-wise reasoning synthesis guided by predictive perplexity-based scoring and beam search. This enables heterogeneous LRMs to jointly construct coherent reasoning trajectories while efficiently preserving diverse, high-potential hypotheses. Experiments show that CoRD produces higher-quality reasoning data and achieves near teacher-level student performance with fewer, structured supervision signals, without substantial efficiency overhead. CoRD further generalizes well to out-of-domain and open-ended settings. The dataset and model are available at https://github.com/DISL-Lab/CoRD.