arXiv (Cornell University) · 2020 · 19 citations · 44 references
Open access
ComputingComputer ScienceComputational LinguisticsKnowledge RepresentationNatural Language ProcessingAbstract Syntax TreesData-flow AnalysisGraph-based LearningSemantic NetworksStatic Code AnalysisText SummarizationAbstract Syntax Tree RepresentationAttention-based Message PassingCode Property GraphsMessage-passing AlgorithmsMessage-passing ModelsProperty Graph ModelingRetrieval-augmented GenerationSource Code Structure
Source code summarization aims to generate natural language summaries from structured code snippets for better understanding code functionalities. Recent works attempt to encode programs into graphs for learning program semantics and yield promising results. However, these methods only use simple code representations (e.g., AST), which limits the capability of learning the rich semantics for complex programs. Furthermore, these models primarily rely on graph-based message passing, which only captures local neighborhood relations. To this end, in this paper, we combine diverse representations of the source code (i.e., AST, CFG and PDG) into a joint code property graph. To better learn semantics from the joint graph, we propose a retrieval-augmented mechanism to augment source code semantics with external knowledge. Furthermore, we propose a novel attention-based dynamic graph to capture global interactions among nodes in the static graph and followed a hybrid message passing GNN to incorporate both static and dynamic graph. To evaluate our proposed approach, we release a new challenging benchmark, crawled from 200+ diversified large-scale open-source C projects. Our method achieves the state-of-the-art performance, improving existing methods by 1.66, 2.38 and 2.22 in terms of BLEU-4, ROUGE-L and METEOR metrics.
44
Deep Residual Learning for Image Recognition
Kaiming He, Xiangyu Zhang, Shaoqing Ren et al. · 2016 · 222.1K citations · Full text
Kishore Papineni, Salim Roukos, Todd J. Ward et al. · 2001 · 21.5K citations · Full text
ROUGE: A Package for Automatic Evaluation of Summaries
Chin-Yew Lin · 2004 · 8.3K citations