An Extensive Study of the Structure Features in Transformer-based Code Semantic Summarization
Transformers are now widely utilized in code intelligence tasks. To better fit highly structured source code, various structure information is passed into Transformer, such as positional encoding and abstract syntax tree (AST) based structures. However, it is still not clear how these structural features affect code intelligence tasks, such as code summarization. Addressing this problem is of vital importance for designing Transformer-based code models. Existing works are keen to introduce various structural information into Transformers while lacking persuasive analysis to reveal their contributions and interaction effects. In this paper, we conduct an empirical study of frequently-used code structure features for code representation, including two types of position encoding features and AST-based structure features. We propose a couple of probing tasks to detect how these structure features perform in Transformer and conduct comprehensive ablation studies to investigate how these structural features affect code semantic summarization tasks. To further validate the effectiveness of code structure features in code summarization tasks, we assess Transformer models equipped with these code structure features on a structural dependent summarization dataset. Our experimental results reveal several findings that may inspire future study: (1) there is a conflict between the influence of the absolute positional embeddings and relative positional embeddings in Transformer; (2) AST-based code structure features and relative position encoding features show a strong correlation and much contribution overlap for code semantic summarization tasks indeed exists between them; (3) Transformer models still have space for further improvement in explicitly understanding code structure information.
Mon 15 MayDisplayed time zone: Hobart change
15:45 - 17:15 | Code Summarization and VisualizationReplications and Negative Results (RENE) / Discussion / Research at Meeting Room 106 Chair(s): Banani Roy University of Saskatchewan, Akhila Sri Manasa Venigalla IIT Tirupati | ||
15:45 9mFull-paper | An Extensive Study of the Structure Features in Transformer-based Code Semantic Summarization Research Kang Yang , Xinjun Mao National University of Defense Technology, Shangwen Wang National University of Defense Technology, Yihao Qin National University of Defense Technology, Yao Lu National University of Defense Technology, Tanghaoran Zhang , Kamal Al-Sabahi University Of Technology and Applied Sciences-ibra Pre-print | ||
15:54 9mFull-paper | Label Smoothing Improves Neural Source Code Summarization Research Sakib Haque University of Notre Dame, Aakash Bansal University of Notre Dame, Collin McMillan University of Notre Dame Pre-print | ||
16:03 9mFull-paper | Interpretation-based Code Summarization Research Mingyang Geng National University of Defense Technology, Shangwen Wang National University of Defense Technology, Dezun Dong NUDT, Haotian Wang National University of Defense Technolog, Shaomeng Cao Peng Cheng Laboratory, Kechi Zhang Peking University, China, Zhi Jin Peking University Pre-print | ||
16:12 9mFull-paper | Naturalness in Source Code Summarization. How Significant is it? Replications and Negative Results (RENE) | ||
16:21 9mFull-paper | Comparing 2D and Augmented Reality Visualizations for Microservice System Understandability: A Controlled Experiment Research Amr Elsayed Baylor University, Tomas Cerny Baylor University, Davide Taibi Tampere University , Sira Vegas Universidad Politecnica de Madrid DOI Pre-print | ||
16:30 9mFull-paper | ChameleonIDE: Untangling Type Errors Through Interactive Visualization and Exploration Research Shuai Fu Monash University, Tim Dwyer Monash University, Peter J. Stuckey Monash University, Jackson Wain Monash University, Jesse Linossier Monash University Pre-print | ||
16:39 36mPanel | Discussion 4 Discussion |