arrow
Return

An AST Structure Enhanced Decoder for Code Generation

delete2022-01-01
delete7
PRE
AI
H
Hui Jiang
L
Linfeng Song
Y
Yubin Ge
F
Fandong Meng
姚俊峰 cover
姚俊峰 (Junfeng Yao)
J
Jinsong Su *
DOI:10.1109/TASLP.2021.3138717delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Currently, the most dominant neural code generation modelsare often equipped with a tree-structured LSTM decoder, which outputs a sequence of actions to construct an Abstract Syntax Tree (AST) via pre-order traversal. However, such a decoder has two obvious drawbacks. First, except for the parent action, other faraway and important history actions rarely contribute to the current decision. Second, it also neglects future actions, which may be crucial for the prediction of the current action. To deal with these issues, in this paper, we propose a novel AST structure enhanced decoder for code generation, which significantly extends the decoder with respect to the above two aspects. First, we introduce an AST information enhanced attention mechanism to fully exploit history actions, of which impacts are further distinguished according to their syntactic distances, action types and relative positions; Second, we jointly model the predictions of current action and its important future action via multi-task learning, where the learned hidden state of the latter can be further leveraged to improve the former. Experimental results on commonly-used datasets demonstrate the effectiveness of our proposed decoder.(1)
Keywords:
Codes
Decoding
Syntactics
Predictive models
History
Grammar
Speech processing
Code generation
abstract syntax tree
attention mechanism
future action prediction

Journal

I
IEEE-ACM Transactions on Audio Speech and Language Processing
IF:
5.1
Papers:
2.6K
Citations:
1.1W

Organization

U
University of Illinois Urbana-Champaign
Scholars:
2.4W
Papers: 2.0W
Citations: 35
University of Illinois System cover
University of Illinois System
Scholars:
6.8W
Papers: 6.2W
Citations: 644
X
xiamen university
Scholars:
5.8W
Papers: 3.8W
Citations: 67
researcher View more organizations