Suggesting method names based on graph neural network with salient information modelling

被引:1
|
作者
Kuang, Li [1 ]
Ge, Fan [1 ]
Zhang, Lingyan [1 ]
机构
[1] Cent South Univ, Sch Comp Sci & Engn, Changsha, Peoples R China
基金
国家重点研发计划;
关键词
deep learning; method naming; neural networks; program comprehension;
D O I
10.1111/exsy.13030
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Descriptive method names have a great impact on improving program readability and facilitating software maintenance. Recently, due to high similarity between the task of method naming and text summarization, large amount of research based on natural language processing has been conducted to generate method names. However, method names are much shorter compared to long source code sequences. The salient information of the whole code snippet account for an relatively small part. Additionally, unlike natural language, source code has complicated structure information. Thus, modelling the salient information from highly structured input presents a great challenge. To tackle this problem, we propose a graph neural network (GNN)-based model with a novel salient information selection layer. Specifically, to comprehensively encode the tokens of the source code, we employ a GNN-based encoder, which can be directly applied to the code graph to ensure that the syntactic information of code structure and semantic information of code sequence can be modelled sufficiently. To effectively discriminate the salient information, we introduce an information selection layer which contains two parts: a global filter gate used to filter irrelevant information, and a semantic-aware convolutional layer used to focus on the semantic information contained in code sequence. To improve the precision of the copy mechanism when decoding, we introduce a salient feature enhanced attention mechanism to facilitate the accuracy of copying tokens from input. Experimental results on an open source dataset indicate that our proposed model, equipped with the salient information selection layer, can effectively improve method naming performance compared to other state-of-the-art models.
引用
收藏
页数:17
相关论文
共 50 条
  • [1] Environment Information-Based Channel Prediction Method Assisted by Graph Neural Network
    Sun, Yutong
    Zhang, Jianhua
    Zhang, Yuxiang
    Yu, Li
    Wang, Qixing
    Liu, Guangyi
    [J]. CHINA COMMUNICATIONS, 2022, 19 (11) : 1 - 15
  • [2] A graph neural network based efficient firmware information extraction method for IoT devices
    Zhang, Weidong
    Li, Hong
    Wen, Hui
    Zhu, Hongsong
    Sun, Limin
    [J]. 2018 IEEE 37TH INTERNATIONAL PERFORMANCE COMPUTING AND COMMUNICATIONS CONFERENCE (IPCCC), 2018,
  • [3] Environment Information-Based Channel Prediction Method Assisted by Graph Neural Network
    Yutong Sun
    Jianhua Zhang
    Yuxiang Zhang
    Li Yu
    Qixing Wang
    Guangyi Liu
    [J]. China Communications, 2022, 19 (11) : 1 - 15
  • [4] Metaphor Recognition Method based on Graph Neural Network
    Zhou, Chuwei
    Shi, Yunmei
    [J]. INTERNATIONAL JOURNAL OF ADVANCED COMPUTER SCIENCE AND APPLICATIONS, 2023, 14 (01) : 876 - 883
  • [5] A Method for Intelligent Road Network Selection Based on Graph Neural Network
    Guo, Xuan
    Liu, Junnan
    Wu, Fang
    Qian, Haizhong
    [J]. ISPRS INTERNATIONAL JOURNAL OF GEO-INFORMATION, 2023, 12 (08)
  • [6] Graph neural network modelling as a potentially effective method for predicting and analyzing procedures based on patients' diagnoses
    Ochoa, Juan G. Diaz
    Mustafa, Faizan E.
    [J]. ARTIFICIAL INTELLIGENCE IN MEDICINE, 2022, 131
  • [7] Grothendieck Graph Neural Network (GGNN): A Path-Based Framework For Network Modelling
    Langari, Amirreza Shiralinasab
    Yeganeh, Leila
    Nguyen, Kim Khoa
    [J]. IEEE CONFERENCE ON GLOBAL COMMUNICATIONS, GLOBECOM, 2023, : 6548 - 6553
  • [8] Salient Target Detection Method of Video Images Based on Convolution Neural Network
    Yao, Zhuo
    Guo, Li
    [J]. TRAITEMENT DU SIGNAL, 2022, 39 (06) : 2157 - 2163
  • [9] An Academic Text Recommendation Method Based on Graph Neural Network
    Yu, Jie
    Pan, Chenle
    Li, Yaliu
    Wang, Junwei
    [J]. INFORMATION, 2021, 12 (04)
  • [10] Rumor Detection Based on Source Information and Gating Graph Neural Network
    Yang, Yanjie
    Wang, Li
    Wang, Yuhang
    [J]. Jisuanji Yanjiu yu Fazhan/Computer Research and Development, 2021, 58 (07): : 1412 - 1424