Project-Level Encoding for Neural Source Code Summarization of Subroutines

Aakash Bansal, Sakib Haque, Collin McMillan
3/22/2021
cs.SEcs.LG

Official code: aakashba/projcon (8 stars, Python, last commit 2022-05-09).

Abstract

Source code summarization of a subroutine is the task of writing a short, natural language description of that subroutine. The description usually serves in documentation aimed at programmers, where even brief phrase (e.g. "compresses data to a zip file") can help readers rapidly comprehend what a subroutine does without resorting to reading the code itself.

Show full abstract

Techniques based on neural networks (and encoder-decoder model designs in particular) have established themselves as the state-of-the-art. Yet a problem widely recognized with these models is that they assume the information needed to create a summary is present within the code being summarized itself - an assumption which is at odds with program comprehension literature. Thus a current research frontier lies in the question of encoding source code context into neural models of summarization. In this paper, we present a project-level encoder to improve models of code summarization. By project-level, we mean that we create a vectorized representation of selected code files in a software project, and use that representation to augment the encoder of state-of-the-art neural code summarization techniques. We demonstrate how our encoder improves several existing models, and provide guidelines for maximizing improvement while controlling time and resource costs in model size.

View on arXivView PDF

Code Implementations(1)

aakashba/projconOfficial100%
81PythonJan 30, 20214 years ago

Similar Papers

Cite this paper

@article{bansal2021projectlevel,
  title  = {Project-Level Encoding for Neural Source Code Summarization of Subroutines},
  author = {Aakash Bansal and Sakib Haque and Collin McMillan},
  year   = {2021},
  eprint = {2103.11599},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2103.11599}
}

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/2103.11599.svg)](https://codeofpaper.com/paper/2103.11599)

Discussion