Proceedings of the 44th International Conference on Software Engineering · 2022 · 58 citations · 28 references
ComputingComputer ScienceComputational LinguisticsNatural Language ProcessingSyntaxAbstract Syntax TreesDependency ParsingNatural Language UnderstandingSyntactic AnalysisSyntax AnalysisText SummarizationAbstract Syntax Tree AnalysisAbstract Syntax Tree RepresentationEncoder-decoder ArchitecturesSource Code AnalysisSource CodesSummarization DatasetsTree Grammars
Code summarization aims to generate brief natural language descriptions for source codes. The state-of-the-art approaches follow a transformer-based encoder-decoder architecture. As the source code is highly structured and follows strict grammars, its Abstract Syntax Tree (AST) is widely used for encoding structural information. However, ASTs are much longer than the corresponding source code. Existing approaches ignore the size constraint and simply feed the whole linearized AST into the encoders. We argue that such a simple process makes it difficult to extract the truly useful dependency relations from the overlong input sequence. It also incurs significant computational overhead since each node needs to apply self-attention to all other nodes in the AST. To encode the AST more effectively and efficiently, we propose AST-Trans in this paper which exploits two types of node relationships in the AST: ancestor-descendant and sibling relationships. It applies the tree-structured attention to dynamically allocate weights for relevant nodes and exclude irrelevant nodes based on these two relationships. We further propose an efficient implementation to support fast parallel computation for tree-structure attention. On the two code summarization datasets, experimental results show that AST-Trans significantly outperforms the state-of-the-arts while being times more efficient than standard transformers1.
28
Rethinking the Inception Architecture for Computer Vision
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe et al. · 2016 · 30.9K citations
Recursive distributed representations
Jordan Pollack · Artificial Intelligence · 1990 · 873 citations
Summarizing Source Code using a Neural Attention Model
Srinivasan Iyer, Ioannis Konstas, Alvin Cheung et al. · 2016 · 725 citations · Full text