InCoder: A Generative Model for Code Infilling and Synthesis

要約

【タイトル】InCoder:コードインフィリングおよび合成のための生成モデル

【要約】

– コードは、単一の左から右へのパスで書かれることはめったになく、代わりに繰り返し編集および改良がされる。
– InCoderは、プログラム合成(左から右への生成による)および編集(インフィリングによる)の両方を実行できる単一の統合生成モデルである。
– InCoderは、大規模な許容ライセンスコードのコーパスからコードファイルを生成するためにトレーニングされる。この際、コードの領域をランダムにマスクし、ファイルの末尾に移動させることで、双方向コンテキストによるコードインフィリングが可能となる。
– このモデルは、直接的にゼロショットのコードインフィリングを実行できる最初の生成モデルであり、型推論、コメント生成、変数名の変更などの課題で評価される。
– 双方向コンテキストに基づくことができる能力が、これらのタスクでのパフォーマンスを大幅に向上させることが分かった。また、同じスケールで事前にトレーニングされた左から右へのみのモデルと比較して、標準的なプログラム合成ベンチマークでは同等のパフォーマンスを発揮する。
– InCoderのモデルおよびコードは公開されている。https://sites.google.com/view/incoder-code-models

要約(オリジナル)

Code is seldom written in a single left-to-right pass and is instead repeatedly edited and refined. We introduce InCoder, a unified generative model that can perform program synthesis (via left-to-right generation) as well as editing (via infilling). InCoder is trained to generate code files from a large corpus of permissively licensed code, where regions of code have been randomly masked and moved to the end of each file, allowing code infilling with bidirectional context. Our model is the first generative model that is able to directly perform zero-shot code infilling, which we evaluate on challenging tasks such as type inference, comment generation, and variable re-naming. We find that the ability to condition on bidirectional context substantially improves performance on these tasks, while still performing comparably on standard program synthesis benchmarks in comparison to left-to-right only models pretrained at similar scale. The InCoder models and code are publicly released. https://sites.google.com/view/incoder-code-models

arxiv情報

著者 Daniel Fried,Armen Aghajanyan,Jessy Lin,Sida Wang,Eric Wallace,Freda Shi,Ruiqi Zhong,Wen-tau Yih,Luke Zettlemoyer,Mike Lewis
発行日 2023-04-09 14:31:40+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, OpenAI

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