paper-with-me

홈 › Papers

CSA-Trans: Code Structure Aware Transformer for AST

2024-04-07 · Saeyoon Oh, Shin Yoo

When applying the Transformer architecture to source code, designing a good self-attention mechanism is critical as it affects how node relationship is extracted from the Abstract Syntax Trees (ASTs) of the source code. We present Code Structure Aware Transformer (CSA-Trans), which uses Code Structure Embedder (CSE) to generate specific PE for each node in AST. CSE generates node Positional Encoding (PE) using disentangled attention. To further extend the self-attention capability, we adopt Stochastic Block Model (SBM) attention. Our evaluation shows that our PE captures the relationships between AST nodes better than other graph-related PE techniques. We also show through quantitative and qualitative analysis that SBM attention is able to generate more node specific attention coefficients. We demonstrate that CSA-Trans outperforms 14 baselines in code summarization tasks for both Python and Java, while being 41.92% faster and 25.31% memory efficient in Java dataset compared to AST-Trans and SG-Trans respectively.

📄 PDF Abstract BibTeX arXiv:2404.05767

Code (1)

saeyoon17/code-structure-aware-transformer 공식 구현 pytorch

Tasks

Code SummarizationStochastic Block Model

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Residual Connection 설명 없음
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Multi-Head Attention 설명 없음
Adam 설명 없음

Similar Papers 제목 키워드 기반

Semantics-aware Attention Improves Neural Machine Translation

2021-08-17 · ACL ARR August 2021 8 · Anonymous

The integration of syntactic structure into Transformer machine translation has shown positive results, but to our knowledge, no work has attempted to do so with semantic structures. In this work we propose two novel par…

DecoderMachine TranslationTranslation

Semantics-aware Attention Improves Neural Machine Translation

2021-10-13 · *SEM (NAACL) 2022 7 · Aviv Slobodkin, Leshem Choshen, Omri Abend

The integration of syntactic structures into Transformer machine translation has shown positive results, but to our knowledge, no work has attempted to do so with semantic structures. In this work we propose two novel pa…

DecoderMachine TranslationTranslation

Retrofitting Structure-aware Transformer Language Model for End Tasks

2020-09-16 · EMNLP 2020 11 · Hao Fei, Yafeng Ren, Donghong Ji

We consider retrofitting structure-aware Transformer-based language model for facilitating end tasks by proposing to exploit syntactic distance to encode both the phrasal constituency and dependency connection into the l…

Language ModelingLanguage ModellingMulti-Task Learning

Exploring Structure-aware Transformer over Interaction Proposals for Human-Object Interaction Detection

2022-06-13 · CVPR 2022 1 · Yong Zhang, Yingwei Pan, Ting Yao, Rui Huang 외

Recent high-performing Human-Object Interaction (HOI) detection techniques have been highly influenced by Transformer-based object detector (i.e., DETR). Nevertheless, most of them directly map parametric interaction que…

Human-Object Interaction DetectionObject

Table Fact Verification with Structure-Aware Transformer

2020-11-01 · EMNLP 2020 11 · Hongzhi Zhang, Yingyao Wang, Sirui Wang, Xuezhi Cao 외

Verifying fact on semi-structured evidence like tables requires the ability to encode structural information and perform symbolic reasoning. Pre-trained language models trained on natural language could not be directly a…

Fact Verification