SFTCS: Multiform Semantic Fusion Based on Transformer for Code Summarization

Automatic code summarization aims to create co-herent natural language descriptions for code snippets. Recent studies indicate that integrating additional code representation structures improve the quality of generated summaries beyond token sequence-based approaches. Current technical research mainly concentrates on the graph structure information of code snippets. However, using a graph method makes it challenging to extract meaningful semantic information from the code snippets. To address the issue, we investigate how to learn more about code semantics and information from the perspective of code text feature representation. Consequently, we propose a novel model named SFTCS. SFTCS employs a conjoint feature fusion strategy, focusing on two types of information in code snippets: code token sequence features and FGT features based on Abstract Syntax Trees (AST) sequence and graph sequence. An N-adjacency ma-trix based on AST features is constructed, and the corresponding feature for AST block are optimized through a graph-based structure. Subsequently, a FGC decoder processes the two types of features. With the aid of an attention mechanism for feature enhancement, the SFTCS model ultimately predicts the results concretely. Evaluations on two publicly available Java datasets validate the effectiveness of SFTCS, showing its superiority over six advanced code summarization models. Ablation studies further elucidate the contributions of each component within the SFTCS model.

Authors

Institutions

Publication Details

Published
2024-08-16
DOI
https://doi.org/10.1109/icste63875.2024.00028
Citations
1
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
0.35
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

SFTCS: Multiform Semantic Fusion Based on Transformer for Code Summarization

Rongzhi Qi, Longhao Ao, Jun Yang
1 citations
Natural Language Processing Techniques
0.35
article

SFTCS: Multiform Semantic Fusion Based on Transformer for Code Summarization

Rongzhi Qi, Longhao Ao, Jun Yang
article en
1 citations

Abstract

Automatic code summarization aims to create co-herent natural language descriptions for code snippets. Recent studies indicate that integrating additional code representation structures improve the quality of generated summaries beyond token sequence-based approaches. Current technical research mainly concentrates on the graph structure information of code snippets. However, using a graph method makes it challenging to extract meaningful semantic information from the code snippets. To address the issue, we investigate how to learn more about code semantics and information from the perspective of code text feature representation. Consequently, we propose a novel model named SFTCS. SFTCS employs a conjoint feature fusion strategy, focusing on two types of information in code snippets: code token sequence features and FGT features based on Abstract Syntax Trees (AST) sequence and graph sequence. An N-adjacency ma-trix based on AST features is constructed, and the corresponding feature for AST block are optimized through a graph-based structure. Subsequently, a FGC decoder processes the two types of features. With the aid of an attention mechanism for feature enhancement, the SFTCS model ultimately predicts the results concretely. Evaluations on two publicly available Java datasets validate the effectiveness of SFTCS, showing its superiority over six advanced code summarization models. Ablation studies further elucidate the contributions of each component within the SFTCS model.

Hohai University (CN)
Openalex Percentile: Top 30%
Natural Language Processing Techniques
0.35
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.