ICSME-2021 Ensemble Models for Neural Source Code Summarization of Subroutines
Paper: Ensemble Models for Neural Source Code Summarization of Subroutines
EnsMdl: Better results by ensembling diverse models
Abstract
- Models may share similar architectures yet contribute differently to prediction quality.
- The authors study the orthogonal properties of various code summarization methods through model ensembling.
Introduction
- Different information sources, once modeled with encoders, can provide orthogonal gains for prediction.
Background & Related Work
-
Code summarization feature extraction
1.1 Text-based: treat code as a sequence and feed it directly to the model
1.2 Flat structure: flatten the AST and use it as input
1.3 Context-based: API usage, project context, and similar signals
1.4 GNN-based: construct a graph from the AST
-
Ensemble models
Ensembling has achieved strong results in machine translation, stock market forecasting, and other domains.
Prior work shows that simple ensembles of non-AST and AST-based models already perform well, indicating room for more sophisticated ensemble methods.
Simple Ensembles
-
Ensemble procedure: stacking and bagging

-
Baseline models: Seq2Seq, Transformer, Seq2Seq-AST-Flat, Seq2Seq-AST-GNN, Seq2Seq-AST-FC, Seq2Seq-AST-Flat-FC
Results

<HR align=left color=#987cb9 SIZE=1>