Self-Infilling Code Generation
CoRR(2023)
摘要
This work introduces a general code generation framework that incorporates
infilling operations into auto-regressive decoding. Our approach capitalizes on
the observation that recent code language models with infilling capabilities
can perform \emph{self-infilling}: whereas infilling operations aim to fill in
the middle based on a predefined prefix and suffix, self-infilling sequentially
generates both such surrounding context and the infilled content. We utilize
this feature to develop an infilling-augmented decoding process that
facilitates non-monotonic generation. This approach allows for postponing the
generation of uncertain code snippets until a definitive suffix is established,
leading to improved control over the generation sequence. In addition, it
facilitates a looping mechanism, which can iteratively update and synchronize
each piece of generation in a cyclic manner. Extensive experiments are
conducted to demonstrate that our proposed decoding process is effective in
enhancing regularity and quality across several code generation benchmarks.
更多查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要