EnCoSum: enhanced semantic features for multi-scale multi-modal source code summarization

被引:0
|
作者
Yuexiu Gao
Hongyu Zhang
Chen Lyu
机构
[1] Shandong Normal University,School of Information Science and Engineering
[2] Chongqing University,undefined
来源
关键词
Code summarization; Abstract syntax trees; Method name sequences; Cross-modal fusion; Deep learning;
D O I
暂无
中图分类号
学科分类号
摘要
Code summarization aims to generate concise natural language descriptions for a piece of code, which can help developers comprehend the source code. Analysis of current work shows that the extraction of syntactic and semantic features of source code is crucial for generating high-quality summaries. To provide a more comprehensive feature representation of source code from different perspectives, we propose an approach named EnCoSum, which enhances semantic features for the multi-scale multi-modal code summarization method. This method complements our previously proposed M2TS approach (multi-scale multi-modal approach based on Transformer for source code summarization), which uses the multi-scale method to capture Abstract Syntax Trees (ASTs) structural information more completely and accurately at multiple local and global levels. In addition, we devise a new cross-modal fusion method to fuse source code and AST features, which can highlight key features in each modality that help generate summaries. To obtain richer semantic information, we improve M2TS. First, we add data flow and control flow to ASTs, and added-edge ASTs, called Enhanced-ASTs (E-ASTs). In addition, we introduce method name sequences extracted in the source code, which exist more knowledge about critical tokens in the corresponding summaries and can help the model generate higher-quality summaries. We conduct extensive experiments on processed Java and Python datasets and evaluate our approach via the four most commonly used machine translation metrics. The experimental results demonstrate that EnCoSum is effective and outperforms current state-of-the-art methods. Further, we perform ablation experiments on each of the model’s key components, and the results show that they all contribute to the performance of EnCoSum.
引用
收藏
相关论文
共 50 条
  • [1] EnCoSum: enhanced semantic features for multi-scale multi-modal source code summarization
    Gao, Yuexiu
    Zhang, Hongyu
    Lyu, Chen
    EMPIRICAL SOFTWARE ENGINEERING, 2023, 28 (05)
  • [2] Multi-modal and multi-scale photo collection summarization
    Xu Shen
    Xinmei Tian
    Multimedia Tools and Applications, 2016, 75 : 2527 - 2541
  • [3] Multi-modal and multi-scale photo collection summarization
    Shen, Xu
    Tian, Xinmei
    MULTIMEDIA TOOLS AND APPLICATIONS, 2016, 75 (05) : 2527 - 2541
  • [4] M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarization
    Gao, Yuexiu
    Lyu, Chen
    30TH IEEE/ACM INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2022), 2022, : 24 - 35
  • [5] M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarization
    Gao, Yuexiu
    Lyu, Chen
    IEEE International Conference on Program Comprehension, 2022, 2022-March : 24 - 35
  • [6] Multi-Modal Code Summarization with Retrieved Summary
    Lin, Lile
    Huang, Zhiqiu
    Yu, Yaoshen
    Liu, Yapeng
    2022 IEEE 22ND INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM 2022), 2022, : 132 - 142
  • [7] Multi-Modal Attention Network Learning for Semantic Source Code Retrieval
    Wan, Yao
    Shu, Jingdong
    Sui, Yulei
    Xu, Guandong
    Zhao, Zhou
    Wu, Jian
    Yu, Philip S.
    34TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2019), 2019, : 13 - 25
  • [8] MMSNet: Multi-modal scene recognition using multi-scale encoded features
    Caglayan, Ali
    Imamoglu, Nevrez
    Nakamura, Ryosuke
    IMAGE AND VISION COMPUTING, 2022, 122
  • [9] Multi-Scale Features Are Effective for Multi-Modal Classification: An Architecture Search Viewpoint
    Fu, Pinhan
    Liang, Xinyan
    Qian, Yuhua
    Guo, Qian
    Zhang, Yayu
    Huang, Qin
    Tang, Ke
    IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, 2025, 35 (02) : 1070 - 1083
  • [10] Multi-modal anchor adaptation learning for multi-modal summarization
    Chen, Zhongfeng
    Lu, Zhenyu
    Rong, Huan
    Zhao, Chuanjun
    Xu, Fan
    NEUROCOMPUTING, 2024, 570