arrow
返回

Context-aware code generation with synchronous bidirectional decoder

delete2024-08-01
delete1
PRE
AI
X
Xiangyu Zhang
周
周余 (Yu Zhou) *
G
Guang Yang
T
Tingting Han
T
Taolue Chen
DOI:10.1016/j.jss.2024.112066delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Code generation aims to map natural language descriptions to code snippets. Recent approaches using sequence -to -tree models have shown promising results. However, they generally adopt an autoregressive way to predict the next token based on previous ones and do not consider potential future tokens. To address this issue, we propose Contextor, a novel context -sensitive model employing a bidirectional decoder to generate tokens in two different orders synchronously and interactively. Specifically, we employ two decoders to generate two sequences of different traversals and share their context knowledge via the attention mechanism. As a result, our model can synthesize both previous and future information simultaneously. To alleviate the information leakage problem caused by the teacher -forcing training strategy and bidirectional decoding, we propose an adapted scheduled sampling technique to prevent the decoders from contacting the actual label. Furthermore, Contextor also features a bidirectional beam search algorithm to better interact with both decoders. Experimental results demonstrate that our approach outperforms the state-of-the-art baselines.
Keyword:
Code generation
Transition system
Bidirectional decoder
Neural network

期刊

Journal of Systems and Software 封面图
Journal of Systems and Software
IF:
4.1
论文数:
5.5K
被引数:
8.4K

机构

U
University of Greenwich
学者数:
2.9K
论文数: 3.2K
被引数: 4.3K
引用论文

引用论文

Exploiting reverse target-side contexts for neural machine translation via asynchronous bidirectional decoding
err2019-12-01
err27
errOAAI
errSu, Jinsong; Zhang, Xiangwen; Lin, Qian; Qin, Yue; Yao, Junfeng; Liu, Yang
err分享
err收藏
Synchronous bidirectional inference for neural sequence generation
err2020-04-01
err22
errOAAI
errZhang, Jiajun; Zhou, Long; Zhao, Yang; Zong, Chengqing
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
没有更多内容