Improving Automatic Source Code Summarization via Deep Reinforcement Learning
文献类型:会议论文
作者 | Yao Wan; Zhou Zhao; Min Yang; Guandong Xu; Haochao Ying; Jian Wu; Philip S. Yu |
出版日期 | 2018 |
会议日期 | 2018 |
会议地点 | 法国蒙彼利埃 |
英文摘要 | Code summarization provides a high level natural language de- scription of the function performed by code, as it can benefit the software maintenance, code categorization and retrieval. To the best of our knowledge, most state-of-the-art approaches follow an encoder-decoder framework which encodes the code into a hidden space and then decode it into natural language space, suffering from two major drawbacks: a) their encoders only consider the sequential content of code, ignoring the tree structure which is also critical for the task of code summarization; b) their decoders are typically trained to predict the next word by maximizing the likelihood of next ground-truth word with previous ground-truth word given. However, it is expected to generate the entire sequence from scratch at test time. This discrepancy can cause an exposure bias issue, making the learnt decoder suboptimal. In this paper, we incorporate an abstract syntax tree structure as well as sequential content of code snippets into a deep reinforcement learning frame- work (i.e., actor-critic network). The actor network provides the confidence of predicting the next word according to current state. On the other hand, the critic network evaluates the reward value of all possible extensions of the current state and can provide global and lookahead guidance for explorations. We employ an advantage reward composed of BLEU metric to train both networks. Compre- hensive experiments on a real-world dataset show the effectiveness of our proposed model when compared with the state-of-the-art methods. |
语种 | 英语 |
源URL | [http://ir.siat.ac.cn:8080/handle/172644/14104] ![]() |
专题 | 深圳先进技术研究院_数字所 |
推荐引用方式 GB/T 7714 | Yao Wan,Zhou Zhao,Min Yang,et al. Improving Automatic Source Code Summarization via Deep Reinforcement Learning[C]. 见:. 法国蒙彼利埃. 2018. |
入库方式: OAI收割
来源:深圳先进技术研究院
浏览0
下载0
收藏0
其他版本
除非特别说明,本系统中所有内容都受版权保护,并保留所有权利。