GraphPLBART: Code Summarization Based on Graph Embedding and Pre-Trained Model

Jie Li, Lixuan Li, Hao Zhu, Xiaofang Zhang · Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering · 2023

Code summarization is a task that aims at automatically producing descriptions of source code.Recently many deep-learning-based approaches have been proposed to generate accurate code summaries, among which pre-trained models for programming languages have achieved promising results.It is well-known that source code written in programming languages is highly structured and unambiguous.Though previous work pre-trained the model with well-design tasks to learn universal representation from a large scale of data, they haven't considered structure information during the fine-tuning stage.To make full use of both the pre-trained programming language model and the structure information of source code, we utilize Flow-Augmented Abstract Syntax Tree (FA-AST) of source code for structure information and propose GraphPLBART -Graphaugmented Programming Language and Bi-directional Auto-Regressive Transformer, which can effectively introduce structure information to a well pre-trained model through a cross attention layer.Experimental results show that our approach outperforms the baseline models in some metrics.

Read the paper · More papers on PaperTik