paper-with-me

Papers

StructCoder: Structure-Aware Transformer for Code Generation

2022-06-10 · Sindhu Tipirneni, Ming Zhu, Chandan K. Reddy

There has been a recent surge of interest in automating software engineering tasks using deep learning. This paper addresses the problem of code generation, where the goal is to generate target code given source code in a different language or a natural language description. Most state-of-the-art deep learning models for code generation use training strategies primarily designed for natural language. However, understanding and generating code requires a more rigorous comprehension of the code syntax and semantics. With this motivation, we develop an encoder-decoder Transformer model where both the encoder and decoder are explicitly trained to recognize the syntax and data flow in the source and target codes, respectively. We not only make the encoder structure-aware by leveraging the source code's syntax tree and data flow graph, but we also support the decoder in preserving the syntax and data flow of the target code by introducing two novel auxiliary tasks: AST (Abstract Syntax Tree) paths prediction and data flow prediction. To the best of our knowledge, this is the first work to introduce a structure-aware Transformer decoder that models both syntax and data flow to enhance the quality of generated code. The proposed StructCoder model achieves state-of-the-art performance on code translation and text-to-code generation tasks in the CodeXGLUE benchmark, and improves over baselines of similar size on the APPS code generation benchmark. Our code is publicly available at https://github.com/reddy-lab-code-research/StructCoder/.

📄 PDF Abstract BibTeX arXiv:2206.05239

Code (1)

reddy-lab-code-research/structcoder 공식 구현 pytorch

Tasks

Code GenerationCode TranslationDecoderText-to-Code Generation

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
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…
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
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…

Similar Papers 제목 키워드 기반

Untargeted Code Authorship Evasion with Seq2Seq Transformation

2023-11-26 · Soohyeon Choi, RhongHo Jang, DaeHun Nyang, David Mohaisen

Code authorship attribution is the problem of identifying authors of programming language codes through the stylistic features in their codes, a topic that recently witnessed significant interest with outstanding perform…

Authorship AttributionCode TranslationTransfer Learning

InstructCoder: Instruction Tuning Large Language Models for Code Editing

2023-10-31 · Kaixin Li, Qisheng Hu, Xu Zhao, Hui Chen 외

Code editing encompasses a variety of pragmatic tasks that developers deal with daily. Despite its relevance and practical usefulness, automatic code editing remains an underexplored area in the evolution of deep learnin…

AST-T5: Structure-Aware Pretraining for Code Generation and Understanding

2024-01-05 · Linyuan Gong, Mostafa Elhoushi, Alvin Cheung

Large language models (LLMs) have made significant advancements in code-related tasks, yet many LLMs treat code as simple sequences, neglecting its structured nature. We introduce AST-T5, a novel pretraining paradigm tha…

Code GenerationDecoder

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

Graph-Aware Transformer: Is Attention All Graphs Need?

2020-06-09 · Sanghyun Yoo, Young-Seok Kim, Kang Hyun Lee, Kuhwan Jeong 외

Graphs are the natural data structure to represent relational and structural information in many domains. To cover the broad range of graph-data applications including graph classification as well as graph generation, it…

AllDecoderGraph ClassificationGraph Generation