Learning Sequential and Structural Information for Source Code Summarization

33Citations
Citations of this article
62Readers
Mendeley users who have this article in their library.

Abstract

We propose a model that learns both the sequential and the structural features of code for source code summarization. We adopt the abstract syntax tree (AST) and graph convolution to model the structural information and the Transformer to model the sequential information. We convert code snippets into ASTs and apply graph convolution to obtain structurally-encoded node representations. Then, the sequences of the graph-convolutioned AST nodes are processed by the Transformer layers. Since structurally-neighboring nodes will have similar representations in graph-convolutioned trees, the Transformer layers can effectively capture not only the sequential information but also the structural information such as sentences or blocks of source code. We show that our model outperforms the state-of-the-art for source code summarization by experiments and human evaluations.

Cite

CITATION STYLE

APA

Choi, Y. S., Bak, J. Y., Na, C. W., & Lee, J. H. (2021). Learning Sequential and Structural Information for Source Code Summarization. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021 (pp. 2842–2851). Association for Computational Linguistics (ACL). https://doi.org/10.18653/v1/2021.findings-acl.251

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free