Self-Infilling Code Generation

要約

この研究では、自己回帰デコーディングに埋め込み操作を組み込む一般的なフレームワークである自己埋め込みコード生成を導入します。
私たちのアプローチは、最近の埋め込み可能なコード言語モデルが自己埋め込みできるという観察を利用しています。埋め込み操作は事前定義されたプレフィックスとサフィックスに基づいて中間を埋めることを目的としていますが、自己埋め込みはそのような周囲のコンテキストと埋め込まれたコンテンツの両方を順次生成します。
この機能を利用して、従来のデコードに新しい中断およびループ メカニズムを導入し、非単調なプロセスに進化させます。
中断により、最終的なサフィックスが確立されるまで特定のコードの生成を延期でき、出力の制御が強化されます。
一方、自己埋め込みと左から右へのデコードの相補的な性質を利用するループ メカニズムは、生成の各部分を繰り返し更新し、周期的に同期することができます。
私たちが提案するデコードプロセスが、いくつかのコード生成ベンチマークにわたって規則性と品質の両方を向上させるのに効果的であることを実証するために、広範な実験が行われました。

要約(オリジナル)

This work introduces self-infilling code generation, a general framework that incorporates infilling operations into auto-regressive decoding. Our approach capitalizes on the observation that recent infilling-capable code language models can self-infill: 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 capability to introduce novel interruption and looping mechanisms in conventional decoding, evolving it into a non-monotonic process. Interruptions allow for postponing the generation of specific code until a definitive suffix is established, enhancing control over the output. Meanwhile, the looping mechanism, which leverages the complementary nature of self-infilling and left-to-right decoding, can iteratively update and synchronize each piece of generation cyclically. Extensive experiments are conducted to demonstrate that our proposed decoding process is effective in enhancing both regularity and quality across several code generation benchmarks.

arxiv情報

著者 Lin Zheng,Jianbo Yuan,Zhi Zhang,Hongxia Yang,Lingpeng Kong
発行日 2024-01-30 16:19:48+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG, cs.PL パーマリンク