GN-Transformer: Fusing AST and Source Code information in Graph Networks
As opposed to natural languages, source code understanding is influenced by grammar relations between tokens regardless of their identifier name. Considering graph representation of source code such as Abstract Syntax Tree (AST) and Control Flow Graph (CFG), can capture a token’s grammatical relationships that are not obvious from the source code. Most existing methods are late fusion and underperform when supplementing the source code text with a graph representation. We propose a novel method called GN-Transformer to fuse representations learned from graph and text modalities under the Graph Networks (GN) framework with attention mechanism. Our method learns the embedding on a constructed graph called Syntax-Code Graph (SCG). We perform experiments on the structure of SCG, an ablation study on the model design and the hyper-paramaters to conclude that the performance advantage is from the fusion method and not the specific details of the model. The proposed method achieved state of the art performance in two code summarization datasets and across three metrics.
Code (0)
등록된 구현이 없습니다.
Tasks
Code SummarizationSource Code SummarizationSimilar Papers 제목 키워드 기반
GN-Transformer: Fusing Sequence and Graph Representation for Improved Code Summarization
As opposed to natural languages, source code understanding is influenced by grammatical relationships between tokens regardless of their identifier name. Graph representations of source code such as Abstract Syntax Tree …
Code SummarizationFusing Temporal Graphs into Transformers for Time-Sensitive Question Answering
Answering time-sensitive questions from long documents requires temporal reasoning over the times in questions and documents. An important open question is whether large language models can perform such reasoning solely …
Question AnsweringTemporal Information ExtractionMECT: Multi-Metadata Embedding based Cross-Transformer for Chinese Named Entity Recognition
Recently, word enhancement has become very popular for Chinese Named Entity Recognition (NER), reducing segmentation errors and increasing the semantic and boundary information of Chinese words. However, these methods te…
BenchmarkingChinese Named Entity Recognitionnamed-entity-recognitionNamed Entity Recognition+2Neural Grapheme-to-Phoneme Conversion with Pre-trained Grapheme Models
Neural network models have achieved state-of-the-art performance on grapheme-to-phoneme (G2P) conversion. However, their performance relies on large-scale pronunciation dictionaries, which may not be available for a lot …
Grapheme-to-Phoneme ConversionLanguage ModelingLanguage ModellingCodeSAM: Source Code Representation Learning by Infusing Self-Attention with Multi-Code-View Graphs
Machine Learning (ML) for software engineering (SE) has gained prominence due to its ability to significantly enhance the performance of various SE applications. This progress is largely attributed to the development of …
Clone DetectionCode SearchRepresentation LearningSmall Language Model