Reproduce “Suggesting Code Edits in Interactive Machine Learning Notebooks Using Large Language Models” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Bihui Jin, Jiayue Wang, Pengyu Nie

This study introduces the first large-scale dataset of real-world code edits in Jupyter notebooks, derived from 792 machine learning projects. It evaluates Large Language Models (LLMs) on predicting these edits, revealing current models struggle with the localized and often complex nature of notebook maintenance tasks.

Key insights

  • Developer edits in Jupyter notebooks are highly localized, with an average of only 166 lines modified per revision, often accompanied by concise commit messages (avg. 5.66 words).
  • Current state-of-the-art LLMs exhibit low accuracy in predicting real-world Jupyter notebook edits, indicating a considerable gap between their capabilities and the demands of ML code maintenance.
  • Supervised fine-tuning significantly improves LLM performance on edit prediction, with a fine-tuned 1.3B model achieving approximately three times higher BLEU scores than its non-fine-tuned counterpart.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.