REVIEW 3 major objections 5 minor 8 references
Which Algorithm Specification Formats Help Language Models Implement Machine Learning Algorithms?
T0 review · 3 major / 5 minor · reviewed 2026-07-12 · grok-4.5
Pith's one-line read The written format of an algorithm specification changes first-pass language-model implementation accuracy, but only until authors make the interface, steps, numerical rules, and boundary cases fully explicit.
desk verdict Solid matched experiment on format vs content for LLM algorithm coding; the content-first writing advice holds, while the LaTeX ranking is conditional and the external scope is narrow. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The fixed comparison unit: within each model, task, information setting, prompt instruction, and repeat, only the representation format changes while the target function and hidden tests stay fixed. Format effect is a format's hidden-test fraction minus the seven-format average in that same comparison, with secondary summaries restricted to difference comparisons where at least two formats disagree.
What would settle it
Re-run the same matched seven-format comparison on multi-file system-level tasks with repair allowed from failure logs; if format effects vanish or reverse once models can iterate, the writing recommendation overstates the importance of first-pass surface format.
Extended reading notes
Core claim
In matched comparisons that vary only the written representation of the same algorithm, format affects first-pass hidden-test correctness under core information—LaTeX algorithm-style pseudocode has the largest average format effect, with YAML-like specifications and ordinary prose close behind—while under complete information the strongest model shows zero format differences across all fixed comparisons and the smaller models still differ. Code stubs state the signature but do not by themselves supply the computational rules needed for hidden-test success. Authors should therefore state the interface, computation steps, numerical rules, and boundary-case behavior explicitly instead of relyin
Load-bearing premise
The findings transfer from single-pass generation with no repair on five small function-level machine learning tasks to how authors should write algorithms for real paper-to-code workflows.
Editorial extensions
If this is right
- Authors writing for LLM-assisted implementation should put interface, shapes, axes, numerical rules, tie-breaking, and invalid-input behavior in the paper or supplement rather than leave them implicit.
- Relying on a code stub alone is insufficient: an empty body does not transmit the computation rules that hidden tests check.
- Stronger models can erase format sensitivity once the specification is complete, so complete content matters more than any fixed format ranking for capable models.
- Supplementary material can hold signatures, shapes, examples, and public tests while the main text keeps readable LaTeX algorithm-style pseudocode.
- Paper-to-code evaluations that ignore representation format may conflate missing content with surface-form effects.
Reading between the lines
- Venues that encourage reproducible machine learning could usefully publish lightweight algorithm-spec checklists for reusable functions, independent of which syntax authors prefer.
- If multi-turn repair from failure logs becomes the default workflow, first-pass format effects may shrink and the value of public tests may shift from prompt text to interactive debugging.
- Real PDF extraction and OCR pipelines, which add layout noise beyond the paper's controlled linearization of pseudocode, could reverse the ranking of PDF-like formats under complete information.
- The performance gap between YAML-like and JSON-like field formats, despite similar named fields, suggests training-data familiarity with surface syntax may matter beyond mere field structure.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. This paper studies whether the surface format of an algorithm specification changes first-pass LLM implementation accuracy when the target function and tests are held fixed. It compares seven formats (prose, LaTeX algorithm-style pseudocode, PDF-like extracted pseudocode, Markdown fields, YAML-like and JSON-like specs, and Python code stubs) on five compact ML functions, three models, and four information settings, for 4,020 generations. Evaluation uses public and hidden tests that probe tie-breaking, shapes, numerical rules, return structure, and invalid-input behavior. Under core information, LaTeX pseudocode has the largest average format effect among difference comparisons, with YAML-like specs and prose close behind; under complete information, GPT-5.4 mini shows no format differences while the two smaller models still do. Code stubs do not consistently improve hidden-test correctness. The authors conclude that authors should state interface, steps, numerical rules, and boundary behavior explicitly rather than rely on a particular surface format.
Significance. The problem is timely and well-motivated by paper-to-code and research-reproduction benchmarks. The main methodological contribution is a paired design that isolates representation format while holding model, task, information setting, prompt wrapper, and tests fixed, with a large sample (4,020 implementations), bootstrap intervals, pairwise win shares, prompt-length diagnostics, and failure-category analysis. The findings are carefully conditional rather than a single format ranking, and the content-first writing recommendation is more robust than any claim that one syntax is universally best. If the results hold under broader tasks and models, the paper gives concrete, actionable guidance for how algorithm descriptions should be written when LLM implementation is a use case, which is a useful contribution to empirical software engineering and ML research practice.
major comments (3)
- [Section 4.1, Tables 4–5, Table 3] Section 4.1 and Tables 4–5: the primary format rankings are computed only over “difference comparisons,” which exclude fixed comparisons where all seven formats obtain the same hidden-test fraction. Under complete information this removes all 50 GPT-5.4 mini comparisons (Table 3), so the complete-info ordering is entirely from Gemma 3 4B and Llama 3.2 3B. The paper states this, but the abstract and §4.3 still lead with “LaTeX … largest average format effect” without an equally prominent unconditional mean over all fixed comparisons. Please report unconditional format effects (and CIs) for all 50 comparisons per model/setting alongside the conditional summaries, so readers can see whether the LaTeX/YAML advantages shrink toward zero when zero-difference runs are included.
- [Section 5.2, Abstract, Section 5.3] Section 5.2 and the abstract writing recommendation: the evidence is first-pass, no-repair generation on five function-level tasks. Section 5.3 already notes that full-system reproduction and repair-with-logs are out of scope, but the recommendation is phrased as general author practice for “algorithm specifications” that “may be used as inputs to LLM-based implementation.” Please tighten the claim language so the recommendation is explicitly scoped to first-pass implementation of well-defined functions under the tested information regimes, or add at least one analysis that speaks to transfer (e.g., multi-attempt repair, or a larger multi-function task) if a broader claim is retained.
- [Section 4.3, Table 4, Table 9] Section 4.3 / Table 4: under core information, LaTeX leads by hidden-test fraction and average format effect, but code stub has the highest strict all-hidden-tests-passed rate (0.163 vs 0.102 for LaTeX). The paper notes the discrepancy but still treats hidden-test fraction as the primary score without justifying why partial-test success is the right decision criterion for a writing recommendation. A short sensitivity analysis ranking formats by strict pass rate (and by public-to-hidden gap from Table 9) would show whether the format ordering is metric-dependent in a way that affects the recommendation.
minor comments (5)
- [Figures 1–6] Several figures appear to have corrupted labels (e.g., “fract on,” “algor thm,” “Y AML,” “Markdo-n”) in Figures 1–6. These look like rendering/OCR artifacts and should be regenerated before publication.
- [Section 4.4, Section 5.3] Section 3.2 and §4.4: the PDF-like format is a controlled linearization, not real PDF/OCR extraction. This is stated, but the complete-info result that PDF-like leads among difference comparisons is easy to over-read as advice about paper PDFs. A one-sentence caution in the results paragraph (not only in limitations) would help.
- [Section 4.7] Section 4.7 field-removal: non-monotone effects and the confounded prompt-length change are acknowledged, but the experiment is still listed among the four main settings. Consider moving the strongest interpretation to “sensitivity to prompt composition” in the main text and de-emphasizing field-level causal claims.
- [Section 1.2] Related work is appropriate but brief on structured specification / intermediate representation work outside pure prompt-format studies. A short pointer to prior work on structured task specs for code generation would situate the YAML/JSON conditions more clearly.
- [Section 3.1, Table 1] Table 1 and §3.1: the hidden-test design is a strength; making the test suites or a subset available as supplementary material would improve reproducibility of the evaluation claims.
Circularity Check
Empirical format comparison with held-out tests; no derivation that reduces predictions to inputs by construction.
full rationale
This paper is an empirical comparison of seven algorithm-specification formats for first-pass LLM code generation. It does not claim a first-principles derivation, uniqueness theorem, or fitted-parameter prediction. The main quantities (hidden-test fraction, format effect sc,f − s̄c, pairwise win shares) are measured against hidden tests never shown to the models, with formats varied inside fixed comparisons that hold model, task, information setting, prompt wrapper, and repeat fixed. Related-work citations (PaperBench, ResearchCodeBench, SciReplicate-Bench, HumanEval, etc.) motivate the problem and do not force the format ranking. The authors construct both the canonical task specifications and the hidden tests—an ordinary experimental design choice, not a self-definitional loop that makes the reported format effects true by construction. There is no self-citation load-bearing uniqueness claim, no ansatz smuggled in via prior work by the same authors, and no renaming of a known result presented as a new derivation. The writing recommendation (state interface, steps, numerical rules, and boundary cases explicitly) is an interpretation of the empirical pattern, not a circular reduction. Score 0 is therefore the correct outcome.
Assumptions & free parameters
free parameters (4)
- task suite (5 function-level ML tasks)
- model set (GPT-5.4 mini, Gemma 3 4B, Llama 3.2 3B)
- repeats per cell (10)
- hidden-test suite design
assumptions (4)
- domain assumption Functional correctness on public/hidden unit tests is an adequate proxy for first-pass implementation accuracy of algorithm specs.
- domain assumption Within a fixed comparison, changing only the written representation isolates format effects while holding target function and tests fixed.
- ad hoc to paper The PDF-like format is a useful proxy for extracted paper pseudocode even though it is a controlled linearization, not real PDF/OCR output.
- domain assumption Standard library + NumPy single-function implementations suffice to study algorithm-spec transmission for these ML primitives.
invented entities (3)
-
format effect (sc,f − mean over seven formats in fixed comparison c)
-
difference comparisons filter
-
seven operationalized representation formats
independent evidence
Cite this review
Pith. "Pith review of Which Algorithm Specification Formats Help Language Models Implement Machine Learning Algorithms?." pith.science (2026). https://pith.science/paper/IBCOTPHL
@misc{pith2026260703158,
author = {Pith},
title = {Pith review of: Which Algorithm Specification Formats Help Language Models Implement Machine Learning Algorithms?},
year = {2026},
howpublished = {\url{https://pith.science/paper/IBCOTPHL}},
note = {Machine review of arXiv:2607.03158}
}
read the original abstract
Large language models (LLMs) are increasingly used to implement algorithms from research manuscripts, but papers often leave implementation choices implicit. This study examines how the written format of an algorithm specification affects first-pass LLM implementation accuracy. We compare ordinary prose, LaTeX algorithm-style pseudocode, PDF-like extracted pseudocode, Markdown fields, YAML-like specifications, JSON-like specifications, and Python code stubs across five machine learning tasks, three models, and four experimental settings, yielding 4,020 generated implementations. Hidden tests evaluate details that often determine correctness, including tie-breaking, array shapes, numerical rules, return structures, and invalid-input behavior. Under the core-information setting, LaTeX algorithm-style pseudocode has the largest average format effect, with YAML-like specifications and ordinary prose close behind. Under complete information, GPT-5.4 mini shows no format differences in the matched comparisons, whereas Gemma 3 4B and Llama 3.2 3B still do. Code stubs do not consistently improve correctness despite specifying the function signature. The results support a writing recommendation: authors should state the interface, computation steps, numerical rules, and boundary-case behavior explicitly, instead of relying on a particular surface format to carry those details.
Figures
Figures from the paper (4 more)
Reference graph
Works this paper leans on
-
[1]
Program synthesis with large language models, 2021
Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, and Charles Sutton. Program synthesis with large language models, 2021. a rXiv: 2108.07732
arXiv 2021
-
[2]
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian...
arXiv 2021
-
[3]
Does prompt formatting have any impact on llm performance?, 2024
Jia He, Mukund Rungta, David Koleczek, Arshdeep Sekhon, Franklin X Wang, and Sadid Hasan. Does prompt formatting have any impact on llm performance?, 2024. a rXiv: 2411.10541
arXiv 2024
-
[4]
Truong, Weixin Liang, Fan-Yun Sun, and Nick Haber
Tianyu Hua, Harper Hua, Violet Xiang, Benjamin Klieger, Sang T. Truong, Weixin Liang, Fan-Yun Sun, and Nick Haber. Researchcodebench: Benchmarking LLM s on implementing novel machine learning research code. In Annual Conference on Neural Information Processing Systems Datasets and Benchmarks Track, 2025
2025
-
[5]
SWE -bench: Can language models resolve real-world github issues? In International Conference on Learning Representations (ICLR), 2024
Carlos E Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik R Narasimhan. SWE -bench: Can language models resolve real-world github issues? In International Conference on Learning Representations (ICLR), 2024
2024
-
[6]
From articles to code: on-demand generation of core algorithms from scientific publications
Cameron S Movassaghi, Amanda Momenzadeh, and Jesse G Meyer. From articles to code: on-demand generation of core algorithms from scientific publications. Bioinformatics, 42 0 (1): 0 btag015, 2026
2026
-
[7]
Paperbench: Evaluating AI s ability to replicate AI research
Giulio Starace, Oliver Jaffe, Dane Sherburn, James Aung, Jun Shern Chan, Leon Maksin, Rachel Dias, Evan Mays, Benjamin Kinsella, Wyatt Thompson, Johannes Heidecke, Amelia Glaese, and Tejal Patwardhan. Paperbench: Evaluating AI s ability to replicate AI research. In International Conference on Machine Learning (ICML), 2025
2025
-
[8]
Scireplicate-bench: Benchmarking LLM s in agent-driven algorithmic reproduction from research papers
Yanzheng Xiang, Hanqi Yan, Shuyin Ouyang, Lin Gui, and Yulan He. Scireplicate-bench: Benchmarking LLM s in agent-driven algorithmic reproduction from research papers. In Conference on Language Modeling, 2025
2025
Reviewed July 12, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.