arrow
Return

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
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

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.
Keywords:
Code generation
Transition system
Bidirectional decoder
Neural network
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
errShare
errSave
Steer Your Model: Secure Code Generation With Contrastive Decoding
err2026-01-05
err0
PREAI
errLi Huang; Meng Yan; Tao Yin; Weifeng Sun; Zhongxin Liu; Hongyu Zhang; David Lo
errShare
errSave
Error-Aware SCFlip Decoding of Polar Codes
err2020-01-01
err6
errOAAI
errYang, Daeyeol; Yang, Kyeongcheol
errShare
errSave
Advanced Adaptive Decoder Using Fulcrum Network Codes
err2019-01-01
err8
errOAAI
errVu Nguyen; Cabrera, Juan A.; You, Dongho; Salah, Hani; Nguyen, Giang T.; Fitzek, Frank H. P.
errShare
errSave
On Design and Efficient Decoding of Sparse Random Linear Network Codes
err2017-01-01
err10
errOAAI
errLi, Ye; Chan, Wai-Yip; Blostein, Steven D.
errShare
errSave
Decoding surface code with a distributed neural network-based decoder
err2020-03-13
err19
errOAAI
errVarsamopoulos, Savvas; Bertels, Koen; Almudever, Carmen G.
errShare
errSave
Quaternary Neural Belief Propagation Decoding of Quantum LDPC Codes With Overcomplete Check Matrices
err2025-01-01
err0
errOAAI
errMiao, Sisi; Schnerring, Alexander; Li, Haizheng; Schmalen, Laurent
errShare
errSave
A fast computing decoder for polar codes with a neural network
err2023-12-01
err1
errOAAI
errZhou, Lingxi; Chan, Satya; Zhang, Meixiang; Kim, Sooyoung
errShare
errSave

Journal

Journal of Systems and Software cover
Journal of Systems and Software
IF:
4.1
Papers:
5.5K
Citations:
1.0W

Organization

U
University of Greenwich
Scholars:
150
Papers: 99
Citations: 2.3K
Cited Papers

Cited Papers

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
errShare
errSave
errShare
errSave
An AST Structure Enhanced Decoder for Code Generation
err2022-01-01
err7
PREAI
errJiang, Hui; Song, Linfeng; Ge, Yubin; Meng, Fandong; Yao, Junfeng; Su, Jinsong
errShare
errSave
Efficient transformer with code token learner for code clone detection
err2023-03-01
err14
PREAI
errZhang, Aiping; Fang, Liming; Ge, Chunpeng; Li, Piji; Liu, Zhe
errShare
errSave
Synchronous bidirectional inference for neural sequence generation
err2020-04-01
err22
errOAAI
errZhang, Jiajun; Zhou, Long; Zhao, Yang; Zong, Chengqing
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
no more