Abstract: The reported target-order effect is numerically supported by the main benchmark table and five-seed appendix. No demonstrated core defect is established in the inspected material. The released trainer permits order-dependent truncation of code targets, but the unavailable paired dataset prevents determining whether this affected the experiments. The outcome is Needs Evidence for that exposure question and the broader mechanistic interpretation, while the checked table arithmetic and response-masking logic are consistent.

Author: AI-assisted technical review

Title: Technical Review of
CoT Order in Code Generation

# Identity and scope

This report reviews Ren-Biao Liu, Anqi Li, Chaoding Yang, Hui Sun, and Ming Li, Revisiting Chain-of-Thought in Code Generation: Do Language Models Need to Learn Reasoning before Coding?, ICML 2025, PMLR 267, 0252 / I25-43621, OpenReview `wSZeQoJ1Vk` [paper]. The source is the staged 18-page publisher proceedings PDF. Page numbers are one-based PDF pages, identical to printed numbers. The review covered the substantive main text, Appendices A–H, reported comparisons, and pinned source excerpts for tokenization, response masking, and training settings. The independent check visually checked Table 1 and Appendix G in the original PDF. Plots were assessed from their descriptions and surrounding arguments; their full underlying data and all plot images were not inspected. This is a claim-focused consistency review, not a training or benchmark reproduction.

# The actual comparison and its supporting evidence

For an instruction \(x\), explanation \(r\), and code \(c\), Section 4.3, p. 4, compares response sequences \(r+c\) and \(c+r\). These are joint teacher-forced supervised-training objectives with different autoregressive order, not two sequential optimization stages. The released `finetune.py`, lines 27–50, masks instruction labels and trains on all retained response labels. Its final prefix slice matches the stated 4096-token maximum in Section 5. The principal `sft.sh` specifies three epochs, peak learning rate \(10^{-5}\), cosine decay, warmup 0.1, and microbatch four. The inspected objective and principal configuration thus agree with the declared setup. For Table 1, p. 4, independent arithmetic gives \[\begin{aligned}
\overline p_{\rm follow}&=(67.07+59.75+74.33+60.58)/4=65.4325,\\
\overline p_{\rm precede}&=(71.95+67.68+80.69+67.20)/4=71.88.\end{aligned}\] Using the displayed averages, \((71.88-65.43)/65.43=0.098579\), consistent with the reported 9.86% relative improvement. This is not a 9.86 percentage-point improvement. Appendix G, p. 17, provides five separate training seeds. Their code-first minus explanation-first differences are \[(6.61,\;4.64,\;5.79,\;4.76,\;5.12),
\qquad \overline\Delta=5.384.\] Every difference is positive. The independent script recomputes the row sample standard deviations and paired descriptive statistic from these printed numbers. This checks the reported separation under the paired-seed interpretation; it does not reconstruct individual benchmark outcomes or identify the authors’ exact test variant. The reference-solution conditioning concern is partly addressed within the paper: Section 5.4 and Table 5 use SelfCodeAlign instructions without a reference solution and retain the direction of the result, 67.35 versus 61.74. Alternative teacher, data-source, model-size, and hyperparameter comparisons provide further counterevidence to a single-configuration explanation.

# Unresolved exposure and interpretation

## Order-dependent truncation: Needs Evidence

The actual released trainer right-truncates the combined instruction and response. Let the limit be \(M\), the already-templated instruction length be \(I<M\), code length \(C\), and explanation length \(R\). With \(B=M-I\) available response positions, and component lengths defined to include their delimiters, the code counts retained by simple prefix truncation are \[\begin{aligned}
 C_{\rm retained,precede}&=\min(C,B),\\
 C_{\rm retained,follow}&=\min(C,\max(0,B-R)).\end{aligned}\] For \(M=4096\), \(I=1000\), \(R=2500\), and \(C=1000\), these are 1000 and 596 code tokens. These positive integer lengths satisfy the available-budget conditions; the example establishes a property of the slicing rule, not the occurrence of such a record in the dataset. The pinned README, line 30, states that the synthetic dataset is not released. The available material does not give a paired retained-token audit or a historical run-to-revision mapping. Consequently the exposure difference is not an established confound of the reported results and does not support Major or Minor impact. If all templated examples fit within \(M\), it disappears. This is explicit counterevidence to inferring a defect from the code alone. Resolution requires paired tokenized records or aggregate length/retention counts, fixed tokenizer versions, and confirmation of the historical preprocessing revision. If appreciable differential code loss occurred, a matched-code-exposure or no-truncation comparison would test its materiality. No such experiment was run here.

## Mechanism and generality: scope clarification

The experiments support a target-order effect for the evaluated SFT recipes. They do not uniquely identify the proposed explanation that code itself is the reasoning process or that overthinking causes the difference. A later explanation can affect shared weights through training loss, but cannot supply earlier code tokens with future, instance-specific text during causal generation. Conditional perplexity, scalar KL divergence from a base model, attention maps, and gradient norms in Section 6.1 are informative diagnostics. Similar scalar KL values do not prove equivalent memorization or identical training fit, and these diagnostics alone do not identify a unique causal mechanism. The paper does not state a formal theorem proving that implication, so this report does not manufacture a false-theorem finding. A universal claim that explanation-first never helps also exceeds the actual tables. For example, Table 2 gives explanation-first 20.69 versus code-only 20.47 for one LiveCodeBench slice; Table 11 gives explanation-first Pass@1 of 70.9 versus code-first 69.8 in the different EvalPerf setup. These observations bound the wording without defeating the main EvalPlus ordering result.

# Conclusion and separate states

Dimension | State

Inspection outcome | Needs Evidence for actual token exposure and mechanism; no demonstrated core defect.

Checked evidence | Main relative-gain arithmetic, repeated-seed separation, response masking, principal training settings.

Repair verification | No correction proposed; conditional retention calculation verified.

Scientific adjudication | Pending; human reviews empty.

Author adoption | Not requested.

Remaining work | Historical paired preprocessing/evaluation records and a targeted exposure audit.

The current source snapshot is not asserted to be the historical experimental revision. No later proceedings correction or comprehensive erratum search was inspected. The empirical measurements remain the authors’ reported results, not newly reproduced measurements.

9 R.-B. Liu et al., Revisiting Chain-of-Thought in Code Generation: Do Language Models Need to Learn Reasoning before Coding?, ICML, PMLR 267 (2025), publisher PDF, 18 pp. https://proceedings.mlr.press/v267/liu25ah.html. R.-B. Liu et al., OpenSyntheticCC, pinned commit `7a154938ba7da316159ac4ec981017fbf65868df`, README, `finetune.py`, tokenizer and training scripts. https://github.com/richardodliu/OpenSyntheticCC.

# Conclusion and verification state

Scientific adjudication remains pending and human reviews are empty. The assessment, reviewer repair checks, and author adoption are distinct.

Assessment | Repair verification | Author adoption | Remaining work

Needs Evidence | No repair certified | Not applicable | Actual truncation counts and matched historical data

# Scope and limitations

The staged manifest and 35 source-record hashes were checked from actual bytes. Complete source/archive mappings remain unchanged. `calc.py` independently recomputes the displayed means, sample deviations, and prefix-retention example; `calc.json` records the output. The illustrative truncation parameters are reviewer-constructed, not observations. No author program, training job, model API, code-generation output, or benchmark test was executed. No dataset or model weights were downloaded. Independent benchmark leakage checks, generated-test validity, exact checkpoint selection, raw plot data, and historical evaluation records were not verified. Separate OpenReview attachments were unavailable; the embedded appendices were inspected.
