CodeFusion: A Pre-trained Diffusion Model for Code Generation

要約

コードの最後の行しか変更できない開発者を想像してみてください。関数を正しく作成するには、どれくらいの頻度で関数を最初から書き始める必要があるでしょうか?
自然言語からのコード生成の自己回帰モデルにも同様の制限があります。つまり、以前に生成されたトークンを簡単に再検討することができません。
私たちは、エンコードされた自然言語に基づいて完全なプログラムを繰り返しノイズ除去することでこの制限に対処する、事前トレーニングされた拡散コード生成モデルである CodeFusion を紹介します。
Bash、Python、Microsoft Excel の条件付き書式 (CF) ルールの自然言語からコード生成のタスクに関して CodeFusion を評価します。
実験の結果、CodeFusion (7500 万パラメータ) は、トップ 1 の精度では最先端の自動回帰システム (350M-175B パラメータ) と同等のパフォーマンスを発揮し、トップ 3 およびトップ 5 の精度ではそれらを上回るパフォーマンスを示しています。
多様性と品質のバランス。

要約(オリジナル)

Imagine a developer who can only change their last line of code, how often would they have to start writing a function from scratch before it is correct? Auto-regressive models for code generation from natural language have a similar limitation: they do not easily allow reconsidering earlier tokens generated. We introduce CodeFusion, a pre-trained diffusion code generation model that addresses this limitation by iteratively denoising a complete program conditioned on the encoded natural language. We evaluate CodeFusion on the task of natural language to code generation for Bash, Python, and Microsoft Excel conditional formatting (CF) rules. Experiments show that CodeFusion (75M parameters) performs on par with state-of-the-art auto-regressive systems (350M-175B parameters) in top-1 accuracy and outperforms them in top-3 and top-5 accuracy due to its better balance in diversity versus quality.

arxiv情報

著者 Mukul Singh,José Cambronero,Sumit Gulwani,Vu Le,Carina Negreanu,Gust Verbruggen
発行日 2023-11-01 17:30:47+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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