Improved Code Summarization via a Graph Neural Network
By Alexander LeClair, Sakib Haque, Lingfei Wu, Collin McMillan. IEEE International Conference on Program Comprehension, 2020
335 citations recorded by the source corpus.
Automatic source code summarization is the task of generating natural language descriptions for source code. Automatic code summarization is a rapidly expanding research area, especially as the community has taken greater advantage of advances in neural network and AI technologies. In general, source code summarization techniques use the source code as input and outputs a natural language description. Yet a strong consensus is developing that using structural information as input leads to improved performance. The first approaches to use structural information flattened the AST into a sequence. Recently, more complex approaches based on random AST paths or graph neural networks have improved on the models using flattened ASTs. However, the literature still does not describe the using a graph neural network together with source code sequence as separate inputs to a model. Therefore, in this paper, we present an approach that uses a graph-based neural architecture that better matches the default structure of the AST to generate these summaries. We evaluate our technique using a data set of 2.1 million Java method-comment pairs and show improvement over four baseline techniques, two from the software engineering literature, and two from machine learning literature.
Subfields: Artificial Intelligence, Information Systems
View Paper: https://www.semanticscholar.org/paper/c345b74be9f98cca9592cc376465118df5c9f2da
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Prem Devanbu
- Yoshua Bengio
- Toufique Ahmed
- Baishakhi Ray
- Saikat Chakraborty
- Daniel Tarlow
- Wasi Uddin Ahmad
- Kai-Wei Chang
In Information Systems
- Prem Devanbu
- Baishakhi Ray
- Vincent J. Hellendoorn
- Saikat Chakraborty
- Daniel Tarlow
- Toufique Ahmed
- Pierre-Antoine Manzagol
- Petros Maniatis
Citations in the corpus
- A Transformer-based Approach for Source Code Summarization (2020, methodology): “Recent works in code summarization utilize structural information of a program in the form of Abstract Syntax Tree (AST) that can be encoded using tree structure encoders such as Tree-LSTM (Shido et al., 2019), Tree-Transformer (Harer et al., 2019), and Graph Neural Network (LeClair et al., 2020).”
- PLUR: A Unifying, Graph-Based View of Program Learning, Understanding, and Repair (2021, methodology): “We compare against the proposed method from the code2seq paper, which is the strongest method in the paper. funcom [LeClair et al., 2020] The task is to predict the method docstring given the method body.”
- Multilingual training for Software Engineering (2021, background): “…an active research area, including many projects such as CodeNN [30], DeepCom [26], Astattgru[40], CodeBERT [18], Rencos [74],SecNN [42],PLBART [1], CoTexT[54], ProphetNet-X [55], NCS [2], Code2seq[7], Re 2 Com [71], and many more [19, 24, 25, 27, 28, 38, 39, 41, 49, 50, 66, 67, 69, 70, 72, 73].”
- HELoC: Hierarchical Contrastive Learning of Source Code Representation (2022, background): “…years, many deep learning based approaches to software engineering tasks, such as code retrieval [1, 2], code clone detection [3–6], code comment generation [7–9], software defect prediction [10–12], and code summarization [13–16], have emerged to improve software development and maintenance.”
- CodeScope: An Execution-based Multilingual Multitask Multidimensional Benchmark for Evaluating LLMs on Code Understanding and Generation (2023, positive): “It is worth noting that WizardCoder and Code LLaMA show competitive performance compared to GPT series models in code optimization, indicating their cognizance of memory usage and time efficiency during code execution.”