SCLA: Automated Smart Contract Summarization via LLMs and Semantic Augmentation
<|reference_start|>SCLA: Automated Smart Contract Summarization via LLMs and Semantic Augmentation: In the rapidly evolving world of blockchain systems, the efficient development and maintenance of smart contracts has become a critical task. Smart contract code summarization can significantly facilitate the maintenance of smart contracts and mitigate their vulnerabilities. Large Language Models (LLMs), such as GPT-4o and Gemini-1.5-Pro, possess the capability to generate code summarizations from code examples embedded in prompts. However, the performance of LLMs in code summarization remains suboptimal compared to fine-tuning-based models (e.g., CodeT5+, CodeBERT). Therefore, we propose SCLA, a framework leveraging LLMs and semantic augmentation to improve code summarization performance. SCLA constructs the smart contract's Abstract Syntax Tree (AST) to extract latent semantics, thereby forming a semantically augmented prompt. For evaluation, we utilize a large-scale dataset comprising 40,000 real-world contracts. Experimental results demonstrate that SCLA, with its enhanced prompt, significantly improves the quality of code summarizations. SCLA surpasses other state-of-the-art models (e.g., CodeBERT, CodeT5, and CodeT5+), achieving 37.53% BLEU-4, 52.54% METEOR, 56.97% ROUGE-L, and 63.44% BLEURT, respectively.<|reference_end|>
@article{mao2024scla:,
    title={SCLA: Automated Smart Contract Summarization via LLMs and Semantic
  Augmentation},
    author={Yingjie Mao, Xiaoqi Li, Wenkai Li, Xin Wang, Lei Xie},
    journal={arXiv preprint arXiv:2402.04863},
    year={2024},
    archivePrefix={arXiv},
    eprint={2402.04863},
    primaryClass={cs.SE}
}