Pith. sign in

REVIEW 4 major objections 8 minor 1 cited by

Suggesting Code Edits in Interactive Machine Learning Notebooks Using Large Language Models

T0 review · 4 major / 8 minor · reviewed 2026-08-10 · deepseek-v4-flash

Pith's one-line read The paper introduces a new dataset of 48,398 Jupyter notebook edits mined from 20,095 revisions of 792 machine learning repositories, then shows that large language models predict these edits poorly even after fine-tuning.

desk verdict First Jupyter edit dataset, but the diff extraction needs validation before the numbers carry weight. read the letter →

arxiv 2501.09745 v1 pith:ME633UFX submitted 2025-01-16 cs.SE cs.CLcs.LG

classification cs.SEcs.CLcs.LG
keywords JupyternotebookscodeeditpredictionlargelanguagemodelsmachinelearningmaintenancebenchmarkdatasetGitHubrepositoriesfine-tuningmetrics
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

The paper introduces the first large-scale dataset of code edits made by developers to Jupyter notebooks in machine learning repositories, drawn from 20,095 revisions across 792 projects. Using this dataset, it tests whether large language models can predict the edits a developer will make next, given the commit message and the code before the edit. Across cell-level and file-level tasks, all tested models, from 1.3B to 6.7B parameters, with few-shot prompting and with fine-tuning, score low on standard similarity metrics, although fine-tuning roughly doubles or triples BLEU scores. The authors read the low accuracy as evidence that real-world machine-learning notebook maintenance is harder than the generation-style tasks these models are usually benchmarked on.

What carries the argument

The central object is the dataset itself: each instance is a commit that modifies a Jupyter notebook, with the repository, commit hash and message, the code cells before and after, and the cell- and line-level diffs. It is assembled by selecting top-starred repositories tagged with Jupyter and machine-learning topics, cloning them, running git log and git show, and aligning pre- and post-commit cell contents with Python's difflib SequenceMatcher. The evaluation machinery consists of five-shot prompting and fine-tuning (LoRA, PiSSA, FlashAttention-v2) of DeepSeek-Coder models, scored by BLEU, CodeBLEU, EditSim, and ROUGE-L.

What would settle it

Manually inspect a random sample of, say, 200 dataset instances and count how many cell-diff pairs are genuine code edits rather than notebook serialization changes such as output updates, metadata changes, or reordered cells; if a large fraction are artifacts, the conclusion that LLMs are poor at real maintenance edits would not follow from this benchmark.

Watch

Extended reading notes

Core claim

The central claim is that a dataset of 48,398 notebook edits, mined from 20,095 commits in 792 machine learning repositories, provides the first benchmark for Jupyter-specific code-edit prediction, and that the evaluated large language models fail to solve it. Edits are highly localized, averaging about 166 changed lines per revision even though repositories average 8,380 lines, and commit messages are short with a mean of 5.66 words. On the test split, the best few-shot model reaches BLEU 13.30 for cell-level edits and 11.76 for file-level edits; after fine-tuning a 1.3B model reaches BLEU 25.86 and 27.46, still far from practical utility. The paper's conclusion is that contextual information and task-specific fine-tuning improve predictions materially, but real-world ML maintenance remains an open problem.

Load-bearing premise

The pipeline assumes that difflib's alignment of notebook cell contents across consecutive commits faithfully captures the developer's intended edit; if outputs, metadata, or reordered cells are counted as code changes, the ground truth is contaminated.

Editorial extensions

If this is right

  • Large models outperform smaller ones on notebook edit prediction, but none approach usable accuracy, so this dataset can serve as a realistic stress test for code-editing LLMs.
  • Fine-tuning with task-specific data produces the largest gains, multiples of BLEU and ROUGE-L over few-shot baselines, implying that domain-adapted training matters more than model scale in this task.
  • Edits concentrate in small regions despite large notebooks, so models that exploit surrounding context should focus on local cells rather than whole-file rewriting.
  • The dataset's cell- and line-level granularity and commit metadata enable future work on suggestions, bug fixes, and feature additions in machine learning notebooks.
  • Because all models still produce syntax errors after fine-tuning, the task exposes a gap in current LLM code-editing abilities.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • A testable extension is to validate the ground truth by having human annotators label a random sample of aligned cell diffs as genuine code edits versus notebook serialization artifacts, which would quantify how much noise output fields, metadata, or cell reordering introduce.
  • Because EditSim scores are markedly higher than BLEU in the reported results, character-level similarity may overstate success on short cells; future benchmarks could add execution-based validation that runs predicted cells and checks produced outputs.
  • Retrieval-augmented selection of only the edited cell's surrounding cells, together with the commit message, is a natural baseline the reported context-dependence results predict should outperform full-file prompting.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

4 major / 8 minor

Summary. The paper introduces a dataset of 48,398 Jupyter notebook edits mined from 20,095 commits across 792 GitHub repositories tagged with machine-learning and Jupyter-notebook topics. The dataset records cell-level and line-level differences, commit messages, and repository metadata. The authors use the dataset to evaluate DeepSeek-Coder models (1.3B and 6.7B parameters) on predicting the edited code at both cell and file granularity, under few-shot prompting, post-processing, and supervised fine-tuning. The main findings are that edits are localized (claimed average of 166 lines per revision), that providing more context improves file-level predictions, and that all tested models perform poorly, with fine-tuning yielding the largest gains.

Significance. If the dataset genuinely captures developer code edits in Jupyter notebooks, it fills a clear gap: existing notebook datasets focus on code generation or comprehension, not on editing. The paper also provides a reproducible collection pipeline and an open dataset, which is valuable for the SE4AI community. However, the central significance claim rests on the correctness of the diff-extraction process. No manual validation is reported, so the possibility of output-churn or serialization artifacts being counted as code edits is a real threat to every downstream statistic and evaluation. The evaluation itself is standard but lacks error bars or significance testing, and at least one reported comparison is internally inconsistent. With additional validation and corrections, the dataset could be a useful resource; in its current form, the core claim is not yet established.

major comments (4)
  1. [Section II, steps 3-5] The dataset construction extracts diffs by running git show and then applying difflib.SequenceMatcher to 'the content of the code cells' before and after a commit. The paper never states whether non-code JSON fields of the notebook—such as outputs, execution counts, cell metadata, or cell ordering—are stripped before comparison. If they are not stripped, or if SequenceMatcher misaligns cells after insertion, deletion, or reordering, then some of the 48,398 entries may represent output churn or serialization artifacts rather than developer code edits. Because every downstream statistic, including the 166-line average and all BLEU/CodeBLEU/EditSim/RougeL scores, is computed over these entries, this is a load-bearing validity risk. Please specify exactly what git show returns and what is fed to SequenceMatcher, and report a manual validation study on a random sample of edits (e.g., 100-200 entries) with inter-annotator agreement.
  2. [Abstract and Section III] The abstract and introduction state that 'changes average only 166 lines of code in repositories' and that 'the majority of developer edits target specific portions of notebooks, with an average of 166 lines modified per revision.' Table I reports token counts, not line counts, and Table II reports only total LOC for the whole dataset. There is no definition of what constitutes a changed line in this statistic, and no table or computation that yields the number 166. This claim is presented as a key finding (Finding 2) and must be either backed by a matching table entry and a precise definition or removed.
  3. [Section IV-E and Table IV] The text claims that the 6.7B model 'consistently outperforms' the 1.3B model on file-level edits, but Table IV shows a CodeBLEU of 15.39 for the 1.3B model and 15.34 for the 6.7B model, i.e., the smaller model is slightly higher. Similar small-margin comparisons appear elsewhere (e.g., file-level 1.3B BLEU 10.75 vs 6.7B BLEU 11.76). Without significance tests or error bars, such claims are fragile. Please either correct the 'consistently outperforms' wording or provide statistical support for the claimed ordering.
  4. [Section IV-D] The fine-tuning subsection states that 'we fine-tune three DeepSeek-Coder instructed models, each with 1.3 billion parameters' and that results are compared against 'the average results of the three fine-tuned models,' yet Tables III and IV report a single '1.3B-finetune' row. It is also unclear how 'approximate 13K revisions' relates to the 12,874 commits in the training set reported in Table II. Please clarify the experimental protocol: how many models were trained, what hyperparameters were used, how the averages were computed, and what the variance across runs was.
minor comments (8)
  1. [Abstract] There are several typos: 'the using LLMs' should be 'using LLMs', and 'four-folds' should be 'fourfold'.
  2. [Section II and Figure 1] 'Juypter' is misspelled consistently; it should be 'Jupyter'. The text also uses 'Github' and 'GitHub' inconsistently.
  3. [Section II, step 5] The phrase 'only the modification type rather than additions or deletions' is unclear; it seems to mean that only lines whose type is 'replace' are further diffed line-by-line, but this should be stated explicitly.
  4. [Section II, step 6] The filter that excludes commit messages with two or fewer words and removes duplicate entries is not accompanied by any sensitivity analysis. Please report how many entries would remain under different thresholds or whether this threshold was chosen based on qualitative examination.
  5. [Section IV-C] The metric RougeL is sometimes written as 'ROUGEL' or 'RougeL' in the text and tables; please standardize the notation.
  6. [Section IV-E] The statement that low BLEU scores 'both below 19' apply only to the few-shot results, but the fine-tuned file-level BLEU is 27.46; please rephrase to avoid confusion.
  7. [References] Reference [1] lacks author names, and several references are missing publisher or venue details (e.g., [4], [16]). Please ensure all entries are complete.
  8. [General] The paper contains no limitations section. Given that the dataset construction relies on heuristics, an explicit discussion of potential diff-alignment errors, the star-based repository selection, and the commit-message word filter would improve the paper's transparency.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: the dataset is mined from external git history, and the LLM evaluation uses held-out test data with standard external metrics.

full rationale

The paper's derivation chain is empirical rather than analytical: the dataset is constructed by querying GitHub repositories and extracting commit-level diffs from git history, with no parameter fitted to the evaluation outcomes. The evaluation compares LLM predictions against held-out ground-truth edits from the test split, and the fine-tuning and few-shot exemplars are drawn only from the training split, so the reported BLEU, CodeBLEU, EditSim, and RougeL scores are not forced by construction. The only self-citations are to prior work on code metrics and test completion, which are used as standard evaluation references and are not load-bearing for the central claim. The main weakness is a correctness risk, not circularity: Section II steps 3-5 rely on difflib.SequenceMatcher over notebook code-cell contents without reporting manual validation, so some extracted edits could reflect serialization or alignment artifacts rather than genuine developer edits. That concern affects dataset validity but does not create a loop in which the paper's predictions reduce to its inputs. The reader's take is therefore correct: the circularity burden is effectively zero.

Assumptions & free parameters 2 free parameters · 4 assumptions · 0 invented entities

The central claim rests on empirical data collection choices rather than on fitted constants. The only hand-chosen values are dataset filters and sampling limits; no new physical or theoretical entities are introduced.

free parameters (2)
  • commit_message_word_min = 3 (only messages with >2 words kept)
    Dataset filtering criterion in Section II step 6; affects which commits are in the benchmark.
  • repo_rank_limit = 1000
    GitHub Search API query limited to top 1000 starred repos with topics 'jupyter-notebook' and 'machine learning'; determines dataset scope.
assumptions (4)
  • domain assumption Git commit history and git show reliably expose the developer's real code edits to notebook files.
    Section II steps 1-3; no manual verification against the actual editing process.
  • domain assumption difflib SequenceMatcher on serialized notebook cells identifies semantically meaningful cell- and line-level changes.
    Section II steps 4-5; alignment artifacts or notebook metadata changes could be counted as edits.
  • domain assumption BLEU, CodeBLEU, EditSim and ROUGE-L are valid proxies for code-edit quality.
    Section IV-C; standard metrics for code generation but not validated for edit prediction.
  • domain assumption Repositories selected by GitHub stars and topic tags are representative of real-world ML notebook maintenance.
    Section II; popularity-based sampling may not generalize.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Suggesting Code Edits in Interactive Machine Learning Notebooks Using Large Language Models." pith.science (2026). https://pith.science/paper/ME633UFX

@misc{pith2026250109745,
  author       = {Pith},
  title        = {Pith review of: Suggesting Code Edits in Interactive Machine Learning Notebooks Using Large Language Models},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/ME633UFX}},
  note         = {Machine review of arXiv:2501.09745}
}
read the original abstract

Machine learning developers frequently use interactive computational notebooks, such as Jupyter notebooks, to host code for data processing and model training. Jupyter notebooks provide a convenient tool for writing machine learning pipelines and interactively observing outputs, however, maintaining Jupyter notebooks, e.g., to add new features or fix bugs, can be challenging due to the length and complexity of the notebooks. Moreover, there is no existing benchmark related to developer edits on Jupyter notebooks. To address this, we present the first dataset of 48,398 Jupyter notebook edits derived from 20,095 revisions of 792 machine learning repositories on GitHub, and perform the first study of the using LLMs to predict code edits in Jupyter notebooks. Our dataset captures granular details of cell-level and line-level modifications, offering a foundation for understanding real-world maintenance patterns in machine learning workflows. We observed that the edits on Jupyter notebooks are highly localized, with changes averaging only 166 lines of code in repositories. While larger models outperform smaller counterparts in code editing, all models have low accuracy on our dataset even after finetuning, demonstrating the complexity of real-world machine learning maintenance tasks. Our findings emphasize the critical role of contextual information in improving model performance and point toward promising avenues for advancing large language models' capabilities in engineering machine learning code.

Figures

Figures reproduced from arXiv: 2501.09745 by the authors.

Figure 1
Figure 1. An overview of our data collection and processing [PITH_FULL_IMAGE:figures/full_fig_p002_1.png] view at source ↗

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. CRABS: A syntactic-semantic pincer strategy for bounding LLM interpretation of Python notebooks

    cs.CL 2025-07 conditional novelty 7.0 of 10

    CRABS combines AST bounds with an LLM to reconstruct information flow and execution dependency graphs for Python notebooks, reaching 98% F1 on 50 curated Kaggle notebooks.

Reference graph

Works this paper leans on

31 extracted references · 22 canonical work pages · cited by 1 Pith paper

  1. [1]

    Change distilling:tree differencing for fine-grained source code change extraction,

    “Change distilling:tree differencing for fine-grained source code change extraction,” IEEE Transactions on Software Engineering, vol. 33, no. 11, pp. 725–743, 2007

  2. [2]

    Juice: A large scale distantly supervised dataset for open domain context-based code generation,

    R. Agashe, S. Iyer, and L. Zettlemoyer, “Juice: A large scale distantly supervised dataset for open domain context-based code generation,” in Conference on Empirical Methods in Natural Language Processing , 2019

  3. [3]

    Teaching large language models to self-debug,

    X. Chen, M. Lin, N. Sch ¨arli, and D. Zhou, “Teaching large language models to self-debug,” ArXiv, vol. abs/2304.05128, 2023

  4. [4]

    Flashattention-2: Faster attention with better parallelism and work partitioning,

    T. Dao, “Flashattention-2: Faster attention with better parallelism and work partitioning,” 2023

  5. [5]

    Pyevolve: Automating frequent code changes in python ml systems,

    M. Dilhara, D. Dig, and A. Ketkar, “Pyevolve: Automating frequent code changes in python ml systems,” in 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE) , 2023, pp. 995–1007

  6. [6]

    Refactoring operations grounded in manual code changes,

    A. M. Eilertsen, “Refactoring operations grounded in manual code changes,” in Proceedings of the ACM/IEEE 42nd International Confer- ence on Software Engineering: Companion Proceedings , ser. ICSE ’20. New York, NY , USA: Association for Computing Machinery, 2020, p. 182–185

  7. [7]

    Distilkaggle: A distilled dataset of kaggle jupyter notebooks,

    M. M. Ghahfarokhi, A. Asgari, M. Abolnejadian, and A. Heydarnoori, “Distilkaggle: A distilled dataset of kaggle jupyter notebooks,” 2024 IEEE/ACM 21st International Conference on Mining Software Reposi- tories (MSR), pp. 647–651, 2024

  8. [8]

    Rest api endpoints for repositories,

    GitHub, “Rest api endpoints for repositories,” November 2022. [Online]. Available: https://docs.github.com/en/rest/repos?apiVersion=2022-11-28

Show all 31 references
  1. [9]

    Deepseek-coder: When the large language model meets programming – the rise of code intelligence,

    D. Guo, Q. Zhu, D. Yang, Z. Xie, K. Dong, W. Zhang, G. Chen, X. Bi, Y . Wu, Y . Li, F. Luo, Y . Xiong, and W. Liang, “Deepseek-coder: When the large language model meets programming – the rise of code intelligence,” 2024

  2. [10]

    LoRA: Low-rank adaptation of large language models,

    E. J. Hu, Y . Shen, P. Wallis, Z. Allen-Zhu, Y . Li, S. Wang, L. Wang, and W. Chen, “LoRA: Low-rank adaptation of large language models,” in International Conference on Learning Representations , 2022. [Online]. Available: https://openreview.net/forum?id=nZeVKeeFYf9

  3. [11]

    Jupyter notebooks - a publishing format for reproducible computational workflows,

    T. Kluyver, B. Ragan-Kelley, F. P ´erez, B. E. Granger, M. Bussonnier, J. Frederic, K. Kelley, J. B. Hamrick, J. Grout, S. Corlay, P. Ivanov, D. Avila, S. Abdalla, C. Willing, and J. D. Team, “Jupyter notebooks - a publishing format for reproducible computational workflows,” i...

  4. [12]

    Automating code review activities by large-scale pre-training,

    Z. Li, S. Lu, D. Guo, N. Duan, S. Jannu, G. Jenks, D. Majumder, J. Green, A. Svyatkovskiy, S. Fu, and N. Sundaresan, “Automating code review activities by large-scale pre-training,” in Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on ...

  5. [13]

    Automatic evaluation of machine translation quality using longest common subsequence and skip-bigram statistics,

    C.-Y . Lin and F. J. Och, “Automatic evaluation of machine translation quality using longest common subsequence and skip-bigram statistics,” in Annual Meeting of the Association for Computational Linguistics , 2004

  6. [14]

    Orange: a method for evaluating automatic evaluation metrics for machine translation,

    ——, “Orange: a method for evaluating automatic evaluation metrics for machine translation,” in International Conference on Computational Linguistics, 2004

  7. [15]

    Pissa: Principal singular values and singular vectors adaptation of large language models,

    F. Meng, Z. Wang, and M. Zhang, “Pissa: Principal singular values and singular vectors adaptation of large language models,” 2024. [Online]. Available: https://arxiv.org/abs/2404.02948

  8. [16]

    Search microsoft copilot: Your everyday ai companion

    Microsoft, “Search microsoft copilot: Your everyday ai companion.” [Online]. Available: https://copilot.microsoft.com/

  9. [17]

    Learning deep semantics for test completion,

    P. Nie, R. Banerjee, J. J. Li, R. J. Mooney, and M. Gligori ´c, “Learning deep semantics for test completion,” 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE) , pp. 2111–2123, 2023

  10. [18]

    Gpt-4 technical report,

    OpenAI, “Gpt-4 technical report,” 2024. [Online]. Available: https: //arxiv.org/abs/2303.08774

  11. [19]

    Bleu: a method for automatic evaluation of machine translation,

    K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu, “Bleu: a method for automatic evaluation of machine translation,” in Annual Meeting of the Association for Computational Linguistics , 2002

  12. [20]

    Kgtorrent: A dataset of python jupyter notebooks from kaggle,

    L. Quaranta, F. Calefato, and F. Lanubile, “Kgtorrent: A dataset of python jupyter notebooks from kaggle,” 2021 IEEE/ACM 18th Interna- tional Conference on Mining Software Repositories (MSR), pp. 550–554, 2021

  13. [21]

    Codebleu: a method for automatic evaluation of code synthesis,

    S. Ren, D. Guo, S. Lu, L. Zhou, S. Liu, D. Tang, M. Zhou, A. Blanco, and S. Ma, “Codebleu: a method for automatic evaluation of code synthesis,” ArXiv, vol. abs/2009.10297, 2020

  14. [22]

    The programmer’s assistant: Conversational interaction with a large language model for software development,

    S. I. Ross, F. Martinez, S. Houde, M. J. Muller, and J. D. Weisz, “The programmer’s assistant: Conversational interaction with a large language model for software development,” Proceedings of the 28th International Conference on Intelligent User Interfaces , 2023

  15. [23]

    Code llama: Open foundation models for code,

    B. Rozi `ere, J. Gehring, F. Gloeckle, S. Sootla, I. Gat, X. E. Tan, Y . Adi, J. Liu, R. Sauvestre, T. Remez, J. Rapin, A. Kozhevnikov, I. Evtimov, J. Bitton, M. Bhatt, C. C. Ferrer, A. Grattafiori, W. Xiong, A. D ´efossez, J. Copet, F. Azhar, H. Touvron, L. Martin, N. Usunier...

  16. [24]

    Intellicode compose: code generation using transformer,

    A. Svyatkovskiy, S. K. Deng, S. Fu, and N. Sundaresan, “Intellicode compose: code generation using transformer,” Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering , 2020

  17. [25]

    Documentation matters: Human- centered ai system to assist data science code documentation in computa- tional notebooks,

    A. Y . Wang, D. Wang, J. Drozdal, M. J. Muller, S. Park, J. D. Weisz, X. Liu, L. Wu, and C. Dugan, “Documentation matters: Human- centered ai system to assist data science code documentation in computa- tional notebooks,” ACM Transactions on Computer-Human Interaction , vol. 2...

  18. [26]

    Clinicalgpt: Large language models finetuned with diverse medical data and comprehensive evaluation,

    G. Wang, G. Yang, Z. Du, L. Fan, and X. Li, “Clinicalgpt: Large language models finetuned with diverse medical data and comprehensive evaluation,” ArXiv, vol. abs/2306.09968, 2023

  19. [27]

    On-device llms for smes: Challenges and opportunities,

    J. S. G. Yee, P. C. Ng, Z. Wang, I. McLoughlin, A. B. Ng, and S. See, “On-device llms for smes: Challenges and opportunities,” ArXiv, vol. abs/2410.16070, 2024

  20. [28]

    Natural language to code generation in interactive data science notebooks,

    P. Yin, W.-D. Li, K. Xiao, A. Rao, Y . Wen, K. Shi, J. Howland, P. Bailey, M. Catasta, H. Michalewski, O. Polozov, and C. Sutton, “Natural language to code generation in interactive data science notebooks,” in Annual Meeting of the Association for Computational Linguistics , 2...

  21. [29]

    Multilingual code co- evolution using large language models,

    J. Zhang, P. Nie, J. J. Li, and M. Gligori ´c, “Multilingual code co- evolution using large language models,” Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering , 2023

  22. [30]

    Large language model in sd-wan intelligent operations and maintenance,

    Y . Zhang, “Large language model in sd-wan intelligent operations and maintenance,” Research Briefs on Information and Communication Technology Evolution, 2023

  23. [2022]

    1035–1047

    New York, NY , USA: Association for Computing Machinery, 2022, p. 1035–1047

Pith tools

Reviewed August 10, 2026 · model on record in the stance chip above.