mlsanityData to 7 Oct 2026

A Multi-Modal Transformer-based Code Summarization Approach for Smart Contracts

arXiv 2103.07164 ↗First posted 12 Mar 2021cs.SEcited by 16

Not on the map. Why?

Abstract (arXiv)

Code comment has been an important part of computer programs, greatly facilitating the understanding and maintenance of source code. However, high-quality code comments are often unavailable in smart contracts, the increasingly popular programs that run on the blockchain. In this paper, we propose a Multi-Modal Transformer-based (MMTrans) code summarization approach for smart contracts. Specifically, the MMTrans learns the representation of source code from the two heterogeneous modalities of the Abstract Syntax Tree (AST), i.e., Structure-based Traversal (SBT) sequences and graphs. The SBT sequence provides the global semantic information of AST, while the graph convolution focuses on the local details. The MMTrans uses two encoders to extract both global and local semantic information from the two modalities respectively, and then uses a joint decoder to generate code comments. Both the encoders and the decoder employ the multi-head attention structure of the Transformer to enhance the ability to capture the long-range dependencies between code tokens. We build a dataset with over 300K <method, comment> pairs of smart contracts, and evaluate the MMTrans on it. The experimental results demonstrate that the MMTrans outperforms the state-of-the-art baselines in terms of four evaluation metrics by a substantial margin, and can generate higher quality comments.

Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). First posted on arXiv 12 Mar 2021.

Builds on

No reference list yet.

Built on by

Cited by year

Citing papers per year: 2021: 2; 2022: 3; 2023: 5; 2024: 5; 2025: 1.

16 papers.

Sort:

  1. 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
  2. 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
  3. 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 23
  4. 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
  5. 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
  6. 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14
  7. 2024ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Searchcited by 12
  8. 2023Automating Code-Related Tasks Through Transformers: The Impact of Pre-trainingcited by 8
  9. 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
  10. 2021Improving Stack Overflow question title generation with copying enhanced CodeBERT model and bi-modal informationcited by 5
  11. 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
  12. 2024The Role of Transformer Models in Advancing Blockchain Technology: A Systematic Surveycited by 3
4 more
  1. 2022Diverse Title Generation for Stack Overflow Posts with Multiple Sampling Enhanced Transformercited by 2
  2. 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Codecited by 1
  3. 2024Analysing the Behaviour of Tree-Based Neural Networks in Regression Taskscited by 0
  4. 2025evalSmarT: An LLM-Based Framework for Evaluating Smart Contract Generated Commentscited by 0