potentialpaper

Refactoring Code Through Library Design

Update NeurIPS 2026 submission dOkgsUfJSn: 6 notes

@openreview[bot] · 2026-11-24 15:53 UTC · 435445296594 ·

Evidence

reviews/openreview/dokgsufjsn/notes/erupwfolqf.json added

+++ b/reviews/openreview/dokgsufjsn/notes/erupwfolqf.json
@@ -0,0 +1,15 @@
+{
+ "schema": "review/1",
+ "id": "eRupWfoLQf",
+ "replyTo": "vFiNDQ6StX",
+ "kind": "comment",
+ "invitation": "Official_Comment",
+ "signature": "Authors",
+ "content": {
+ "comment": "Thank you for your input and support. Below we respond to your question.\n\n> The clustering techniques seems to be an important factor in LIBRARIAN, can authors provide more insights on what other clustering techniques can be used apart from clustering based on summary by an LLM, is the LLM finetuned for providing code summaries especially for transformers and diffusers ?\n\nWe initially tried REGAL-style clustering, which clusters based on the problem solved by each source file, but found it to be more effective to cluster based on a summary of the code itself (L153). We do not fine tune the LLM to produce summaries. Appendix I provides further analysis of the clustering algorithm."
+ },
+ "createdAt": "2026-07-29T19:43:28.864Z",
+ "modifiedAt": "2026-11-19T16:55:37.218Z",
+ "url": "https://openreview.net/forum?id=dOkgsUfJSn&noteId=eRupWfoLQf",
+ "license": "CC-BY-4.0"
+}

reviews/openreview/dokgsufjsn/notes/jpylxzmdlk.json added

+++ b/reviews/openreview/dokgsufjsn/notes/jpylxzmdlk.json
@@ -0,0 +1,15 @@
+{
+ "schema": "review/1",
+ "id": "JpYlXzMDLk",
+ "replyTo": "dZ4kd4FAQI",
+ "kind": "comment",
+ "invitation": "Official_Comment",
+ "signature": "Authors",
+ "content": {
+ "comment": "Thank you for your input and support. Below we respond to your questions.\n\n> I'm very skeptical that code with a comment with have lower MDL than same code without the comment. Would be very interesting to see an example of this.\n\nYou’re right that comments typically increase MDL (and always increase tokens). But here’s one case we constructed where comments overall decrease MDL:\n```\nimport numpy as np\n\n# Avogadro's number\nag = 6.02214076e23\n\n# Hydrogen mass\nhm = 1.008\n```\n(MDL -53.3 with comments vs. -57.8 without comments). We’ll add this example to the revision. But you’re basically right: It took us several tries to construct the above example. A better way of putting it is that MDL penalizes comments *less* than tokens, and occasionally encourages comments.\n\n> 2 of the 3 independent evaluations for refactorings (i.e., used to evaluate the scoring functions) are a priori very related to the scoring functions: code reuse is basically about MDL and token length\n\nJust to clarify: Code reuse is not necessarily about MDL/tokens, because we measure reuse on *unseen* files – i.e., does the new library get reused when refactoring files not originally used to build the library? MDL/tokens are about compressing the training source files, not the unseen source files.\n\n> I think the text around equation (2) is too brief and hard to parse. Maybe expand \"sample K candidates\" to \"sample K candidate refactorings\",\n\nFixed! We’ve revised to say exactly what you suggested."
+ },
+ "createdAt": "2026-07-29T19:36:18.652Z",
+ "modifiedAt": "2026-11-19T16:55:37.324Z",
+ "url": "https://openreview.net/forum?id=dOkgsUfJSn&noteId=JpYlXzMDLk",
+ "license": "CC-BY-4.0"
+}

reviews/openreview/dokgsufjsn/notes/opazjvxhts.json added

+++ b/reviews/openreview/dokgsufjsn/notes/opazjvxhts.json
@@ -0,0 +1,15 @@
+{
+ "schema": "review/1",
+ "id": "oPAZJVxHtS",
+ "replyTo": "JpYlXzMDLk",
+ "kind": "comment",
+ "invitation": "Official_Comment",
+ "signature": "Reviewer ycjB",
+ "content": {
+ "comment": "Thanks for the response and investigating the MDL / comments question. Please see my updated strengths/weaknesses and final justification section."
+ },
+ "createdAt": "2026-08-04T02:15:11.921Z",
+ "modifiedAt": "2026-11-19T16:55:37.211Z",
+ "url": "https://openreview.net/forum?id=dOkgsUfJSn&noteId=oPAZJVxHtS",
+ "license": "CC-BY-4.0"
+}

reviews/openreview/dokgsufjsn/notes/urkpxq0p9d.json added

+++ b/reviews/openreview/dokgsufjsn/notes/urkpxq0p9d.json
@@ -0,0 +1,15 @@
+{
+ "schema": "review/1",
+ "id": "URkpxQ0p9d",
+ "replyTo": "q1RteFeqUa",
+ "kind": "comment",
+ "invitation": "Official_Comment",
+ "signature": "Authors",
+ "content": {
+ "comment": "Thanks for your input. Below is a point by point response, but we feel what is most important is (1) new compute-matched baseline, and (2) revising to better signpost the lack of repo-level refactoring.\n\n> coding-agent baseline with the same number of samples and the same filtering, would make the result much more convincing\n\nWe've improved our Claude Code baseline (L228) by adding sampling and test-based filtering. This compute-matched baseline improves library function count (7 -> 8.8) and total library use (41 calls -> 56.5), but still falls short of LIBRARIAN (15 functions reused across 100.05 calls). See lines 228-243, which will be revised with these new results.\n\n\n> The comparison to REGAL is not fully controlled. LIBRARIAN uses multiple samples and reranking, while the prior method appears to be evaluated under a different sampling budget\n\nWe don’t see how to control for compute against REGAL, which lacks an objective function, leaving it unclear how to deploy extra compute. If the reviewer can suggest a compute-matched REGAL, we’re happy to run it. As explained above, we’re now doing a compute-controlled Claude Code comparison: probably more ecologically relevant than a REGAL comparison anyway.\n\n> How much of the improvement comes from the MDL objective rather than from simply sampling more candidates and filtering by tests?\n\nImprovements in pass rate: We do not claim that LIBRARIAN (or library learning generally) serves to improve pass rate. We think pass rates improve from testcase-filtering: “Pass rate modestly improves as an incidental consequence of sampling and filtering with test cases“ (L291).\n\nImprovements in reuse: The new coding agent baseline shows that simply sampling+filtering does not suffice to maximize library reusability, and the REGAL comparison shows that clustering plays a secondary role to sampling+reranking (Table 3).\n\n> Can the authors report a direct baseline where Claude Code or another coding agent gets the same number of attempts, with the same test filtering, but without the LIBRARIAN clustering and MDL reranking?\n\nYes, see earlier response\n\n> Can the authors provide the unfiltered human-study results, inter-annotator agreement, and the exact statistical test used for each pairwise comparison?\n\nInter-annotator agreement (we report Krippendorff's \\alpha, since each participant judged only a subset of comparisons): 0.16 for MDL vs MI, 0.17 for Tokens vs MI, and −0.02 for MDL vs Tokens. Agreement is slight throughout, as is typical for subjective pairwise comparisons; Bradley-Terry recovers a population-level preference from individually noisy judgments, and the reported intervals reflect that noise. This is consistent with our claims: preference is slightly positive for the two comparisons involving MI, and at chance for MDL vs Tokens, consistent with the human study not separating these two objectives (L252). Our preference for MDL rests instead on the reuse proxies, which favour MDL on holdout HuggingFace sources (Fig. 3) and on CodeContests (Fig. 5). Without consensus filtering, MDL is preferred over MI at 0.63, which remains significant.\n\n\n\n> For the HuggingFace examples, were the generated abstractions reviewed by experienced maintainers, or tested on future edit/reuse tasks? Passing tests is useful, but it does not by itself show maintainability.\n\nYes! We tested on future reuse tasks (L207). Still haven’t tried to PR our refactorings into HuggingFace, but it’s on the docket. They were reviewed by one of the authors who is quite familiar with this kind of code, and found to be very reasonable.\n\n> Does the best@k estimator include invalid candidates, or is it only computed after conditioning on valid candidates?\n\nbest@k is computed after filtering by testcases.\n\n> selected real files than as evidence of repository-scale refactoring\n\nWe certainly don’t mean to claim repo-level refactoring, and we believe the manuscript makes no such claim. It does cite related work in repo-level coding, though, which may be the source of this confusion. We’ve revised L64 to now say: “Our work considers multi-file refactoring, \\emph{not} repo-wide refactors, but recent work has considered repo-level software engineering tasks.” The limitations section now begins with “We do not refactor whole repositories, leaving that to future work.”\n\n> possible circularity in the MDL objective… may reward code that is familiar to the reference model rather than code that is actually easier to maintain or reuse. The cross-model agreement analysis helps, but it still leaves a nontrivial fraction of cases where rankings change.\n\nWe do not argue that MDL (or tokens, or MI) is good because it improves MDL (or tokens, or MI). We study downstream measures of reuse, and human preferences (Fig 2, Fig 3, Fig 5, Fig 6). Circular reasoning would be “objective X is good because optimizing it improves X”. We argue “objective X is good because optimizing it improves downstream metrics A, B, and C.”"
+ },
+ "createdAt": "2026-07-29T19:43:01.681Z",
+ "modifiedAt": "2026-11-19T16:55:37.327Z",
+ "url": "https://openreview.net/forum?id=dOkgsUfJSn&noteId=URkpxQ0p9d",
+ "license": "CC-BY-4.0"
+}

reviews/openreview/dokgsufjsn/notes/vfejy08pru.json added

+++ b/reviews/openreview/dokgsufjsn/notes/vfejy08pru.json
@@ -0,0 +1,15 @@
+{
+ "schema": "review/1",
+ "id": "VfEJY08PRu",
+ "replyTo": "Z4COnrd9Dg",
+ "kind": "comment",
+ "invitation": "Official_Comment",
+ "signature": "Authors",
+ "content": {
+ "comment": "Thanks for summarizing the main points. Please see our individual responses to each reviewer, but to address the headline concerns:\n\n> MDL may not be shown to outperform token count\n\nWe agree! Our point is not to champion MDL, but to study a range of metrics and present a nuanced picture, which is absent from the prior literature, and which multiple reviewers see as (the) main contribution. We show MDL>=Tokens, not MDL>Tokens (and Tokens>MI/CC). The paper states this explicitly (L252), and the abstract advertises the success of “proxies of program size, such as MDL” (we’ll revise to “such as MDL *and token count*”). Nonetheless we find nuanced token<>MDL differences, such as the analyses starting on line 207.\n\n> The gains are not properly attributed\n\nWe’ve revised to include a compute-matched comparison against coding agent (specifically Claude Code), showing that the gains do not derive just from increased test test time compute, but also derive from the objective function and clustering that governs how that compute is used. By comparing to REGAL, our submission showed that most of the gain derives from reranking under the right objectives, not from clustering (Table 3).\n\n> Potential reference-model contamination… partly circular\n\nWe think this objection is probably a confusion. We’re *not* arguing that objective X is good because it maximizes X, which *would* be circular, and would invite contamination concerns whenever X is learned to maximize what we test on. Instead we study objective X (for various X), and measure different downstream metrics (such as library reuse on holdout files)."
+ },
+ "createdAt": "2026-07-29T19:35:05.344Z",
+ "modifiedAt": "2026-11-19T16:55:37.353Z",
+ "url": "https://openreview.net/forum?id=dOkgsUfJSn&noteId=VfEJY08PRu",
+ "license": "CC-BY-4.0"
+}

reviews/openreview/dokgsufjsn/notes/z4conrd9dg.json modified

+++ b/reviews/openreview/dokgsufjsn/notes/z4conrd9dg.json
@@ -5,11 +5,12 @@
"kind": "meta_review",
"invitation": "Meta_Review",
"signature": "Area Chair Hkq4",
"content": {
- "metareview": "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.\n\nHowever, 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.\n******************\nAfter 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."
+ "metareview": "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.\n\nHowever, 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.\n******************\nAfter 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.",
+ "final_justification": "The paper lies right on the borderline of acceptance. I'm leaning towards acceptance, given the support of the reviewers who engaged in the rebutall discussion."
},
"createdAt": "2026-07-23T04:22:52.219Z",
- "modifiedAt": "2026-11-18T15:22:27.186Z",
+ "modifiedAt": "2026-11-19T05:01:30.674Z",
"url": "https://openreview.net/forum?id=dOkgsUfJSn&noteId=Z4COnrd9Dg",
"license": "CC-BY-4.0"
}