- Rating
- 2
- Clarity
- 2
- Confidence
- 4
- Originality
- 1
- Quality
- 2
- Significance
- 3
Read review
Summary
The paper studies library-design refactoring: given a set of N related files (a "task"), produce a shared library L of common abstractions and rewrite the files to use it, while preserving correctness (the original unit/integration tests still pass). It makes two moves.
(1) What objective captures a "good" refactoring? It compares compression-style objectives — token count and Minimum Description Length (MDL), the latter defined as the negative log-probability of the library and refactored programs under a reference language model (Qwen-2.5-3B) — against classical software-engineering metrics (Cyclomatic Complexity, Maintainability Index). Via a simulation (running the proposed method under each objective and measuring proxies of library reuse) and a human study (14 participants, 129 pairwise judgments, Bradley–Terry analysis), it argues that compression-based metrics, and MDL in particular, align better with reusable libraries and with human preference than CC/MI.
(2) LIBRARIAN. A method combining clustering (divide-and-conquer over the task's files) with sample-and-rerank (sample K candidate refactorings from a backend LLM/agent, keep the test-passing one that minimizes the MDL loss). LIBRARIAN is compared to REGAL on the Logo and Date program-synthesis benchmarks (improving downstream pass rate, notably ~+20 points on Logo) and applied to a small curated set of real-world HuggingFace Transformers/Diffusers model files (8 tasks total), where it lowers MDL roughly in line with human refactoring and yields more reused library functions than a single-pass coding-agent prompt. A U-statistic argument for the Best@k estimator is given in an appendix. The tasks (CodeContests, Transformers, Diffusers, Logo, Date) are assembled into a benchmark ("MiniCode," named only in the appendices).
Strengths and weaknesses
Strengths
- Timely, well-motivated problem. Framing "refactoring into reusable libraries" as the unit of study — and connecting it to the rise of code agents that solve one-off problems myopically — is genuinely interesting and forward-looking. The work sits at a useful intersection of program synthesis / library learning and practical software engineering.
- The objective-comparison study is the most original part. Asking which objective captures a good refactoring, and pitting compression-style objectives (tokens, MDL) against classical SE metrics (MI, CC), is a clean, novel question. The (admittedly small) finding that classical SE metrics like Maintainability Index align worse with human preference than a compression proxy is interesting and somewhat counter-intuitive.
- Scaling library learning beyond DSLs. Prior library learning (DreamCoder, Stitch/Babble, LILO, Trove, REGAL) is largely confined to λ-calculus / DSLs and small programs. Demonstrating the pipeline on real Python from HuggingFace Transformers/Diffusers is a real step, appropriate for a Concept-and-Feasibility contribution.
- Sensible architecture. Clustering (divide-and-conquer) + sample-and-rerank is a reasonable way to fit large tasks into limited LLM context, and the clustering-coherence analysis (Appendix I) is a nice supporting touch.
- Honesty and some rigor. The cost (~30 min/refactoring) is disclosed, an IRB-approved human study is run, and the Best@k estimator is given a correct U-statistic unbiasedness argument (Appendix G).
Weaknesses
W1 — The headline claim ("MDL captures good refactorings") is not established over the trivial tokens baseline. The novelty hinges on MDL specifically, but: (a) the human study cannot distinguish MDL from tokens (MDL-vs-Tokens preference = 0.56, error bars overlap 0.5 → not significant; only MDL-vs-MI = 0.67 is significant); (b) the in-distribution simulation shows "little difference between MDL and tokens" (the authors' own words); and (c) the entire case for MDL > tokens rests on held-out-source generalization with effect sizes the paper itself calls "small." Since tokens is dramatically simpler and needs no reference LM, the paper needs a powered, direct MDL-vs-tokens comparison to justify its central thesis. As presented, a skeptical reader would adopt tokens. The "Perl golf" corner case and the Bayesian/MAP argument are qualitative.
W2 — Likely reference-LM contamination undermines the real-world MDL claims (not discussed). MDL is −log p_LM(L) − Σ log p_LM(ρ'_n | L) under Qwen-2.5-3B, which was almost certainly trained on the public HuggingFace Transformers/Diffusers source. So "MDL-minimizing" HF refactorings may be regressing toward the LM's memorized canonical HF code. This plausibly explains why LIBRARIAN "matches human coders" on MDL — it may be matching code the LM already memorized. The cross-LM 84.2% agreement does not address contamination, since Llama/DeepSeek/Mistral were likely all trained on HF too. This confound directly threatens the interpretability of the flagship real-world result and is not acknowledged anywhere.
W3 — Real-world evaluation is small, curated, and intrinsic-only. The real-world headline rests on 8 tasks total (Transformers: 15 files / 3 tasks; Diffusers: 17 files / 5 tasks), with Transformer files "manually chose[n]" (Appendix C) → selection bias. Evaluation is intrinsic: MDL reduction and library-reuse counts. But reuse is essentially the optimization target, so "MDL-optimized libraries have higher reuse" is partly circular — the objective rewards compression/reuse and the proxy measures reuse. There is no independent criterion (human judgment, downstream maintainability, functional benefit) showing the HF libraries are actually better rather than merely smaller and test-passing. This contradicts the paper's own Section 6 thesis that size alone is insufficient.
W4 — No ablation attributes the gains. LIBRARIAN bundles clustering, tuple grouping, sample-and-rerank, the MDL rerank, and an incremental variant (Appendix A). For the REGAL comparison (Table 3) the authors "keep their setup the same and only augment training using sample + MDL rerank," so the ~+20-point Logo gain could come from MDL, from sample-and-rerank, from clustering, or simply from added test-time compute (K samples). No ablation isolates these (e.g., sample-and-rerank with token-rerank vs MDL-rerank; with/without clustering). Without attribution, the conceptual claim that MDL is what matters is not supported by the strongest empirical win in the paper.
W5 — Statistics are confusingly reported and partly questionable. Appendix F writes "MDL significantly outperforming MI (p = 0.67, 95% CI [0.56, 0.78])." 0.67 is a Bradley–Terry preference probability, not a p-value; writing "p = 0.67 ... significantly" invites the opposite reading. The "75% consensus-based filtering" discards minority responses on high-consensus comparisons — i.e., it filters data using the very preference being estimated, which can bias the estimate and inflate apparent significance (the unfiltered MDL-vs-MI result being significant is reassuring, but the procedure should be justified, not assumed correct). With 129 judgments from 14 participants (~9 each), within-participant clustering is not modeled (no random effects), so the CIs are likely optimistic.
W6 — "Correct" = existing tests pass, and several claims over-reach. Passing a test suite is not semantic equivalence; a refactoring can change behavior on untested configs / dtypes / devices / numerical edge cases — a real risk in production ML code, acknowledged only in passing. The claim "the first time library learning has been successfully applied to real-world software projects" (Contribution 4) is strong relative to N=8 hand-selected tasks, and sits in tension with the checklist's cautious "we have carefully avoided any claims that we do repository-level refactoring."
W7 — Polish / internal-consistency issues that should not exist in a submission.
- Checklist Q3 (Theory assumptions and proofs): Answer N/A with Justification [TODO] — yet the paper has a proposition + proof (Appendix G), so the answer is both incomplete and arguably wrong. Checklist Q11 (Safeguards): Justification [TODO].
- Appendix C: "with larger K we discover better libraries ??" — broken \ref.
- Footnotes 3 and 5 claim "o4-mini outperformed coding agents such as Codex and ClaudeCode (Appendix K)," but Appendix K (Table 5) contains only {original, sonnet 3.7, sonnet 4, codex-mini} — there is no o4-mini, Claude Code, or Codex row, so the table does not substantiate the claim.
- The benchmark is named "MiniCode" only in the appendices/Table 4, never introduced in the main text, weakening the "benchmark" contribution.
- Figures 2/3/5/7 are dense, multi-panel, and near-illegible (cryptic "+24.0%", "TOKEN→MI", "Above 0: …" annotations with under-explaining captions). Figure 3 carries the central MDL-vs-tokens-generalization argument and is the hardest to read.
Questions
- Reference-LM contamination (most important). Were Qwen-2.5-3B / Llama-3.2-3B / DeepSeek-Coder / Mistral plausibly trained on the public HuggingFace Transformers and Diffusers source? If so, how do you rule out that "MDL-minimizing" HF refactorings are regressing toward the LM's memorized canonical HF code — the most likely explanation for LIBRARIAN "matching human coders" on MDL? A convincing control (e.g., MDL scored by a reference LM demonstrably not trained on these repos, or evaluation on post-training-cutoff / private code) would substantially raise my score.
- MDL vs tokens. Your own human study (0.56, n.s.) and in-distribution simulation cannot separate MDL from the much simpler tokens objective; the case rests on small-effect held-out generalization. Can you provide a powered, direct MDL-vs-tokens comparison with effect sizes and CIs, ideally on held-out HF sources? If MDL cannot be shown to beat tokens, why not adopt tokens (no reference LM, no contamination concern)? Cleanly establishing MDL > tokens would raise my score.
- Attribution / ablation for the REGAL gains. Is the Logo (+~20 pt) / Date improvement due to MDL, sample-and-rerank, clustering, or simply added test-time compute (K samples)? Please ablate — e.g., REGAL + sample-and-rerank with token-rerank vs MDL-rerank, and with vs without clustering. Isolating the source is necessary to credit the conceptual MDL claim (and to fix the related broken "??" reference in Appendix C).
- Statistics. Please (a) clarify the "p = 0.67" notation (this reads as a Bradley–Terry preference probability, not a p-value); (b) justify the 75% consensus filtering — which discards data based on the measured preference — and report the unfiltered estimates and CIs for all three comparisons; and (c) account for within-participant clustering (14 participants, 129 judgments) via random effects.
- Real-world scope, correctness, and consistency. (a) Given "correct" = existing tests pass, how do you address that test suites under-specify semantics (untested configs/dtypes/devices/numerics)? (b) Given N=8 hand-selected tasks, can you temper or better support the "first time library learning successfully applied to real-world software" claim (e.g., more tasks, or random rather than manual file selection)? (c) Please reconcile footnotes 3/5 with Appendix K: Table 5 contains no o4-mini, Claude Code, or Codex row, so it does not support "o4-mini outperformed Codex and ClaudeCode." (d) Please resolve the [TODO] checklist entries (Q3, Q11) and the N/A answer to the theory-proofs item given Appendix G.
Limitations
Partially. The paper has an explicit Limitations section (per-refactoring cost ~30 min; reliance on existing tests; clustering cannot split files; compression may not predict reusability on unseen programs) — credit for being upfront, and the authors should not be penalized for honesty. However, the most consequential limitations are missing and should be added (this pre-empts reviewer concern rather than inviting it): (a) reference-LM contamination of the MDL distribution on public HF code (W2); (b) the small, hand-selected real-world sample and resulting selection bias (W3); (c) sensitivity to the reference LM (the reported 84.2% cross-LM agreement implies ~16% of best-refactoring choices flip with the scorer); (d) tests-pass ≠ semantic equivalence (W6); and (e) the weak/insignificant MDL-vs-tokens separation (W1). The negative-societal-impact discussion (checklist Q10 = No) is acceptable for this work.
Paper formatting concerns
- NeurIPS Paper Checklist contains unfilled template placeholders: Q3 (Theory assumptions/proofs) Justification = [TODO] with Answer N/A despite a proof in Appendix G; Q11 (Safeguards)
Justification = [TODO].
- Broken cross-reference "??" in Appendix C (larger-K ablation sentence).
- Footnotes 3 and 5 cite Appendix K for an o4-mini-vs-coding-agents comparison that Appendix K (Table 5) does not contain (it lists original / sonnet 3.7 / sonnet 4 / codex-mini only).
- Benchmark "MiniCode" is named only in the appendices, not in the main text where it is contributed.
- Anonymity: the appendix discloses IRB review/approval and an author-performed refactoring baseline; code is stated as released "but not yet anonymized" (checklist Q5 = No). At submission, anonymized assets/links are expected.
- Main text appears within page limits; several empirical figures (2/3/5/7) are too dense/small to read at print size.
Meta-review
The reviewers agree that the paper addresses an important and timely problem: enabling code agents to refactor collections of programs into reusable libraries rather than producing isolated one-off solutions. Several reviewers viewed the comparison of different refactoring objectives as the paper's most novel conceptual contribution, and appreciated the attempt to extend library learning beyond toy DSLs to real Python repositories.
However, the reviewers have raised a number of issues that are critical to the paper's central claims: 1. MDL may not be shown to outperform token count. 2. The gains are not properly attributed. 3. Potential reference-model contamination. Some other minor issues include the statistical and reporting issues as well as the “real-world” evidence being too limited and partly circular.
After the rebuttal, the central finding is adjusted from MDL specifically to the broader observation that compression-style objectives may outperform traditional software-engineering metrics, while LIBRARIAN remains a relatively straightforward combination of clustering and sample-and-rerank.