paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Cell2Doc: ML Pipeline for Generating Documentation in Computational Notebooks

Cell2Doc:在计算笔记本中生成文档的机器学习流水线
ASE 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)2023匹配度 3/10 · 论文属于机器学习辅助的代码文档生成,与 notebook 开发工具相关,但不涉及用户核心关注的静态分析、Agentic 程序分析、形式化验证、浮点或贝叶斯程序分析。其使用预训练模型生成文档、提供基准数据集的方向与用户画像仅有边缘交集。引用 7 inbox
Tamal Mondal, Scott Barnett, Akash Lal, Jyothi Vedurada
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 Cell2Doc 机器学习流水线与基准数据集,按逻辑上下文为 notebook 代码单元生成文档。

计算笔记本本应结合代码与文档,但现有实践表明开发者常因手工成本而忽略文档。已有自动文档生成方法难以捕获算法细节和子步骤,开发者仍需编辑生成文本。本文提出 Cell2Doc,一种用于 Python 数据科学笔记本代码单元文档生成的机器学习流水线。该方法识别代码单元内不同逻辑上下文,分别生成文档再合并为整个代码单元的文档;它利用预训练语言模型并提升其在该任务上的效率,同时研究合适的输入表示。作者还发布了新的基准数据集及可复用的数据预处理流水线。自动评估表明,最佳输入表示使预训练模型性能平均提升 2.5 倍;人工评估中,Cell2Doc 在正确性、信息量和可读性上相较对应的独立预训练模型提升 1.33 倍。

问题
计算笔记本中的文档常因手工成本被开发者忽略,而现有自动文档生成技术难以捕获算法细节和子步骤,导致生成结果仍需大量人工修改。
方法
Cell2Doc 识别代码单元内的不同逻辑上下文,分别生成文档后合并;它利用预训练语言模型、探索输入表示,并发布新的基准数据集与数据预处理流水线。
评估
通过自动评估比较不同输入表示对预训练模型的提升,并通过人工评估从正确性、信息量和可读性方面对比 Cell2Doc 与独立预训练模型。
原文摘要(Abstract)

Computational notebooks have become the go-to way for solving data-science problems. While they are designed to combine code and documentation, prior work shows that documentation is largely ignored by the developers because of the manual effort. Automated documentation generation can help, but existing techniques fail to capture algorithmic details and developers often end up editing the generated text to provide more explanation and sub-steps. This paper proposes a novel machine-learning pipeline, Cell2Doc, for code cell documentation in Python data science notebooks. Our approach works by identifying different logical contexts within a code cell, generating documentation for them separately, and finally combining them to arrive at the documentation for the entire code cell. Cell2Doc takes advantage of the capabilities of existing pre-trained language models and improves their efficiency for code cell documentation. We also provide a new benchmark dataset for this task, along with a data-preprocessing pipeline that can be used to create new datasets. We also investigate an appropriate input representation for this task. Our automated evaluation suggests that our best input representation improves the pre-trained model's performance by 2.5x on average. Further, Cell2Doc achieves 1.33x improvement during human evaluation in terms of correctness, informativeness, and readability against the corresponding standalone pretrained model.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{MondalBLV23,
  title = {Cell2Doc: ML Pipeline for Generating Documentation in Computational Notebooks},
  author = {Tamal Mondal and Scott Barnett and Akash Lal and Jyothi Vedurada},
  booktitle = {ASE},
  year = {2023},
  doi = {10.1109/ase56229.2023.00200}
}