M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarization
Not on the map. Why?
Abstract (arXiv)
Source code summarization aims to generate natural language descriptions of code snippets. Many existing studies learn the syntactic and semantic knowledge of code snippets from their token sequences and Abstract Syntax Trees (ASTs). They use the learned code representations as input to code summarization models, which can accordingly generate summaries describing source code. Traditional models traverse ASTs as sequences or split ASTs into paths as input. However, the former loses the structural properties of ASTs, and the latter destroys the overall structure of ASTs. Therefore, comprehensively capturing the structural features of ASTs in learning code representations for source code summarization remains a challenging problem to be solved. In this paper, we propose M2TS, a Multi-scale Multi-modal approach based on Transformer for source code Summarization. M2TS uses a multi-scale AST feature extraction method, which can extract the structures of ASTs more completely and accurately at multiple local and global levels. To complement missing semantic information in ASTs, we also obtain code token features, and further combine them with the extracted AST features using a cross modality fusion method that not only fuses the syntactic and contextual semantic information of source code, but also highlights the key features of each modality. We conduct experiments on two Java and one Python datasets, and the experimental results demonstrate that M2TS outperforms current state-of-the-art methods. We release our code at https://github.com/TranSMS/M2TS.
Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Builds on 25 of its 59 references that are in the map. First posted on arXiv 18 Mar 2022.
Builds on
25 of 59 references.
References · 25
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,282
- 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
- 2014CIDEr: Consensus-based Image Description Evaluationcited by 2,027
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2021M2TR: Multi-modal Multi-scale Transformers for Deepfake Detectioncited by 114
- 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 99
- 2020Improved Code Summarization via a Graph Neural Networkcited by 79
- 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 76
13 more
- 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
- 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
- 2017A parallel corpus of Python functions and documentation strings for automated code documentation and code generationcited by 56
- 2019Recommendations for Datasets for Source Code Summarizationcited by 46
- 2018Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networkscited by 36
- 2019Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 36
- 2021Code Structure Guided Transformer for Source Code Summarizationcited by 29
- 2019Automatic Source Code Summarization with Extended Tree-LSTMcited by 28
- 2021CoCoSum: Contextual Code Summarization with Multi-Relational Graph Neural Networkcited by 22
- 2021A Multi-Modal Transformer-based Code Summarization Approach for Smart Contractscited by 16
- 2019Multi-Scale Self-Attention for Text Classificationcited by 15
- 2020Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 10
- 2021Exploiting Method Names to Improve Code Summarization: A Deliberation Multi-Task Learning Approachcited by 5
Built on by
Citing papers per year: 2022: 1; 2023: 5; 2024: 5; 2025: 2; 2026: 1.
14 papers.
Sort:
- 2025CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generationcited by 55
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
- 2023SALLM: Security Assessment of Generated Codecited by 35
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
- 2023FRANC: A Lightweight Framework for High-Quality Code Generationcited by 14
- 2024A Large-Scale Exploit Instrumentation Study of AI/ML Supply Chain Attacks in Hugging Face Modelscited by 12
- 2024The Fault in our Stars: Quality Assessment of Code Generation Benchmarkscited by 9
- 2024Can Developers Prompt? A Controlled Experiment for Code Documentation Generationcited by 7
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
- 2024The Role of Transformer Models in Advancing Blockchain Technology: A Systematic Surveycited by 3
- 2026Revisiting the Role of Natural Language Code Comments in Code Translation23 Jan 2026
- 2025Assessing the Software Security Comprehension of Large Language Models24 Dec 2025
- 2025CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generation14 Jan 2025
- 2024A Large-Scale Exploit Instrumentation Study of AI/ML Supply Chain Attacks in Hugging Face Models6 Oct 2024
- 2024The Role of Transformer Models in Advancing Blockchain Technology: A Systematic Survey2 Sep 2024
- 2024Can Developers Prompt? A Controlled Experiment for Code Documentation Generation1 Aug 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024The Fault in our Stars: Quality Assessment of Code Generation Benchmarks15 Apr 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023SALLM: Security Assessment of Generated Code1 Nov 2023
- 2023FRANC: A Lightweight Framework for High-Quality Code Generation17 Jul 2023
2 more
- 2025CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generationcited by 55
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
- 2023SALLM: Security Assessment of Generated Codecited by 35
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
- 2023FRANC: A Lightweight Framework for High-Quality Code Generationcited by 14
- 2024A Large-Scale Exploit Instrumentation Study of AI/ML Supply Chain Attacks in Hugging Face Modelscited by 12
- 2024The Fault in our Stars: Quality Assessment of Code Generation Benchmarkscited by 9
- 2024Can Developers Prompt? A Controlled Experiment for Code Documentation Generationcited by 7
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
- 2024The Role of Transformer Models in Advancing Blockchain Technology: A Systematic Surveycited by 3
12 most cited of 14 All 14 (JSON)
- 2026Revisiting the Role of Natural Language Code Comments in Code Translation23 Jan 2026
- 2025Assessing the Software Security Comprehension of Large Language Models24 Dec 2025
- 2025CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generation14 Jan 2025
- 2024A Large-Scale Exploit Instrumentation Study of AI/ML Supply Chain Attacks in Hugging Face Models6 Oct 2024
- 2024The Role of Transformer Models in Advancing Blockchain Technology: A Systematic Survey2 Sep 2024
- 2024Can Developers Prompt? A Controlled Experiment for Code Documentation Generation1 Aug 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024The Fault in our Stars: Quality Assessment of Code Generation Benchmarks15 Apr 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023SALLM: Security Assessment of Generated Code1 Nov 2023
- 2023FRANC: A Lightweight Framework for High-Quality Code Generation17 Jul 2023
12 newest of 14 All 14 (JSON)