A Transformer-based Approach for Source Code Summarization
Ahmad, Wasi Uddin, Chakraborty, Saikat, Ray, Baishakhi, Chang, Kai-Wei
–arXiv.org Artificial Intelligence
Generating a readable summary that describes the functionality of a program is known as source code summarization. In this task, learning code representation by modeling the pairwise relationship between code tokens to capture their long-range dependencies is crucial. To learn code representation for summarization, we explore the Transformer model that uses a self-attention mechanism and has shown to be effective in capturing long-range dependencies. In this work, we show that despite the approach is simple, it outperforms the state-of-the-art techniques by a significant margin. We perform extensive analysis and ablation studies that reveal several important findings, e.g., the absolute encoding of source code tokens' position hinders, while relative encoding significantly improves the summarization performance. We have made our code publicly available to facilitate future research.
arXiv.org Artificial Intelligence
May-1-2020
- Country:
- Oceania > Australia
- North America
- United States
- Pennsylvania > Philadelphia County
- Philadelphia (0.04)
- New York
- New York County > New York City (0.14)
- Richmond County > New York City (0.04)
- Queens County > New York City (0.04)
- Kings County > New York City (0.04)
- Bronx County > New York City (0.04)
- Minnesota > Hennepin County
- Minneapolis (0.04)
- Michigan > Washtenaw County
- Ann Arbor (0.04)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- California > Los Angeles County
- Los Angeles (0.14)
- Pennsylvania > Philadelphia County
- Canada > British Columbia
- United States
- Europe
- Genre:
- Research Report
- New Finding (0.68)
- Promising Solution (0.66)
- Research Report
- Technology: