[PDF][PDF] Learning sequential and structural information for source code summarization

YS Choi, JY Bak, CW Na, JH Lee - Findings of the Association for …, 2021 - aclanthology.org
YS Choi, JY Bak, CW Na, JH Lee
Findings of the Association for Computational Linguistics: ACL-IJCNLP …, 2021aclanthology.org
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 graphconvolutioned AST nodes
are processed by the Transformer layers. Since structurallyneighboring nodes will have …
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 graphconvolutioned AST nodes are processed by the Transformer layers. Since structurallyneighboring 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.
aclanthology.org
Showing the best result for this search. See all results