Lune

ICSE2026Top-tier venue

NB2P: Generating Data Science Pipelines from Computational Notebooks

Haotian Gao, Quang Trung Ta, Tien Tuan Anh Dinh, Nhut-Minh Ho, Zhiyong Huang, Beng Chin Ooi

Abstract

Computational notebooks empower data scientists to explore data, perform analytics, and share findings through data pipelines. Extracting these pipelines facilitates understanding and migrating them to production systems. However, notebook cells executed in arbitrary order complicate data flow between stages. Moreover, data operations may not be cleanly separated, hindering the extraction of cohesive pipeline components. In this paper, we propose NB2P, a novel system that automatically extracts data science pipelines from notebooks. Given a notebook, NB2P performs analysis at the syntax tree level to recover the execution order, then groups the data operations into pipeline stages based on semantics. It uses a tree-based, learned encoding-decoding algorithm that captures the data flow and fine-grained hierarchical information in the notebook. Finally, NB2P assembles the stages and constructs the final pipeline that can be deployed into production systems. We train NB2P on a large notebook corpus from Kaggle and compare it against baselines that use state-of-the-art large language models and other approaches. The experimental results show that NB2P consistently outperforms the baselines while incurring low overhead.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

its abstract · related work

Get the answer

Free to start. No credit card required.

Related papers

  1. HAConvGNN: Hierarchical Attention Based Convolutional Graph Neural Network for Code Documentation Generation in Jupyter NotebooksXuye Liu, Dakuo Wang, April Yi Wang, Yufang Hou et al.EMNLP Findings 2021 · 11 citations
  2. Cell2Doc: ML Pipeline for Generating Documentation in Computational NotebooksTamal Mondal, Scott Barnett, Akash Lal, Jyothi VeduradaASE 2023 · 4 citations
  3. NBSearch: Semantic Search and Visual Exploration of Computational NotebooksXingjun Li, Yuanxin Wang, Hong Wang, Yang Wang et al.CHI 2021 · 22 citations
  4. Telling Stories from Computational Notebooks: AI-Assisted Presentation Slides Creation for Presenting Data Science WorkChengbo Zheng, Dakuo Wang, April Yi Wang, Xiaojuan MaCHI 2022 · 53 citations
  5. Slide4N: Creating Presentation Slides from Computational Notebooks with Human-AI CollaborationFengjie Wang, Xuye Liu, Oujing Liu, Ali Neshati et al.CHI 2023 · 37 citations
Dusk over the sea between two cliffs drawn in fine vertical lines