HAConvGNN: Hierarchical Attention Based Convolutional Graph Neural Network for Code Documentation Generation in Jupyter Notebooks

Xuye Liu, Dakuo Wang, April Wang, Yufang Hou, Lingfei Wu
3/31/2021
28 citations
cs.SEcs.LG
gnn

Official code: dakuo/HAConvGNN (6 stars, Python, MIT, last commit 2021-09-09).

Abstract

Jupyter notebook allows data scientists to write machine learning code together with its documentation in cells. In this paper, we propose a new task of code documentation generation (CDG) for computational notebooks.

Show full abstract

In contrast to the previous CDG tasks which focus on generating documentation for single code snippets, in a computational notebook, one documentation in a markdown cell often corresponds to multiple code cells, and these code cells have an inherent structure. We proposed a new model (HAConvGNN) that uses a hierarchical attention mechanism to consider the relevant code cells and the relevant code tokens information when generating the documentation. Tested on a new corpus constructed from well-documented Kaggle notebooks, we show that our model outperforms other baseline models.

View on arXivView PDF

Code Implementations(1)

dakuo/HAConvGNNOfficial100%
MIT
62Python, ShellSep 8, 20215 years agoMIT

Similar Papers

Cite this paper

@article{liu2021haconvgnn,
  title  = {HAConvGNN: Hierarchical Attention Based Convolutional Graph Neural Network for Code Documentation Generation in Jupyter Notebooks},
  author = {Xuye Liu and Dakuo Wang and April Wang and Yufang Hou and Lingfei Wu},
  year   = {2021},
  eprint = {2104.01002},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2104.01002}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2104.01002.svg)](https://codeofpaper.com/paper/2104.01002)

Discussion