跳到主要导航 跳到搜索 跳到主要内容

GypSum: Learning Hybrid Representations for Code Summarization

科研成果: 书/报告/会议事项章节会议稿件同行评审

摘要

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.

源语言英语
主期刊名Proceedings - 30th IEEE/ACM International Conference on Program Comprehension, ICPC 2022
出版商IEEE Computer Society
12-23
页数12
ISBN(电子版)9781450392983
DOI
出版状态已出版 - 20 10月 2022
活动30th IEEE/ACM International Conference on Program Comprehension, ICPC 2022 - Virtual, Online, 美国
期限: 16 5月 202217 5月 2022

出版系列

姓名IEEE International Conference on Program Comprehension
2022-March
ISSN(印刷版)2643-7147
ISSN(电子版)2643-7171

会议

会议30th IEEE/ACM International Conference on Program Comprehension, ICPC 2022
国家/地区美国
Virtual, Online
时期16/05/2217/05/22

指纹

探究 'GypSum: Learning Hybrid Representations for Code Summarization' 的科研主题。它们共同构成独一无二的指纹。

引用此