Font Size: a A A

Research On Code Summarization Model Based On Graph Attention Network

Posted on:2022-02-04Degree:MasterType:Thesis
Country:ChinaCandidate:S J ZhangFull Text:PDF
GTID:2518306572496974Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Code summarization is an important part of the software maintenance process,which provides concise explanations for developers.There are often no notes in software development projects.Code summarization can reduce the tedious manual annotations and release labors.Therefore,it is significant to study code summarization to promote the development of related applications.At present,there are still some challenges: 1.The traditional Seq2 Seq model can learn the sequence representation of source code,but it is difficult to learn the structural semantic information.2.In the traditional models,the objective of model is to minimize the cross entropy loss.This does not match the mainstream evaluation standard,which makes the model training be unable to improve the prediction performance.Aiming at these challenges,the automatic generation technology of code summarization is studied.The main work is as follows:1.A code summarization model based on graph attention network is proposed.The model uses the multi-input encoder-decoder structure,and uses the sequence encoder to learn the sequence information of the source code.The semantic information of data flow is added to the AST of code and transformed into graph.The graph encoder based on graph attention network is used to learn the structure information of code graph,which makes full use of the sequence features and structural semantic features.2.The model is further optimized by reinforce learning.To avoid the mismatch between the training objectives and the evaluation criteria,the self-criticism sequence training algorithm is used to optimize the Bleu score of the mainstream evaluation criteria,and the model is further trained to optimize the prediction results of the model.Experimental results show that the code summarization model can understand the features of source code well and improves the performance of summarization.Compared with the model based on graph convolution network,the BLEU-4 and ROUGE-L score are improved by 2.7% and 2.1% respectively.
Keywords/Search Tags:Deep Learning, Reinforcement Learning, Graph Attention Network, Code Graph, Code Summarization
PDF Full Text Request
Related items