SELGPLSIApr 26, 2022

GypSum: Learning Hybrid Representations for Code Summarization

arXiv:2204.12916v133 citationsh-index: 43
Originality Incremental advance
AI Analysis

This addresses the challenge of code summarization for software developers, but it is incremental as it builds on existing encoder-decoder frameworks with specific enhancements.

The authors tackled the problem of generating fluent and accurate summaries for code snippets by proposing GypSum, a model that learns hybrid representations using graph attention networks and a pre-trained language model, achieving superior performance over existing models.

Code summarization with deep learning has been widely studied in recent years. Current deep learning models for code summarization generally follow the principle in neural machine translation and adopt the encoder-decoder framework, where the encoder learns the semantic representations from source code and the decoder transforms the learnt representations into human-readable text that describes the functionality of code snippets. Despite they achieve the new state-of-the-art performance, we notice that current models often either generate less fluent summaries, or fail to capture the core functionality, since they usually focus on a single type of code representations. As such we propose GypSum, a new deep learning model that learns hybrid representations using graph attention neural networks and a pre-trained programming and natural language model. We introduce particular edges related to the control flow of a code snippet into the abstract syntax tree for graph construction, and design two encoders to learn from the graph and the token sequence of source code, respectively. We modify the encoder-decoder sublayer in the Transformer's decoder to fuse the representations and propose a dual-copy mechanism to facilitate summary generation. Experimental results demonstrate the superior performance of GypSum over existing code summarization models.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes