[論文レビュー] Big Code != Big Vocabulary: Open-Vocabulary Models for Source Code
本論文はソースコード言語モデルの語彙設計を分析し、BPEを用いたオープンボキャブラリNLMを導入し、大規模コーパスにスケールさせ、Java・C・Pythonで従来モデルを上回る性能を示す。
Statistical language modeling techniques have successfully been applied to large source code corpora, yielding a variety of new software development tools, such as tools for code suggestion, improving readability, and API migration. A major issue with these techniques is that code introduces new vocabulary at a far higher rate than natural language, as new identifier names proliferate. Both large vocabularies and out-of-vocabulary issues severely affect Neural Language Models (NLMs) of source code, degrading their performance and rendering them unable to scale. In this paper, we address this issue by: 1) studying how various modelling choices impact the resulting vocabulary on a large-scale corpus of 13,362 projects; 2) presenting an open vocabulary source code NLM that can scale to such a corpus, 100 times larger than in previous work; and 3) showing that such models outperform the state of the art on three distinct code corpora (Java, C, Python). To our knowledge, these are the largest NLMs for code that have been reported. All datasets, code, and trained models used in this work are publicly available.
研究の動機と目的
- 語彙設計の選択がコード言語モデルにおける語彙サイズとOOV率に与える影響を調査する。
- サブワード単位を用いたソースコード向けの大規模なオープンボキャブラリニューラル言語モデルを開発・評価する。
- 複数のプログラミング言語でオープンボキャブラリモデルが最新モデルを上回ることを示す。
- コード補完や buggy code ハイライトなどの下流タスクへのオープンボキャブラリーモデルの影響を評価する。)
- method:
- method
- text
提案手法
- ソースコードに対する語彙設計の選択肢(コメント、文字列、空白、フィルタリング、トークン分割)を体系的に評価する。
- Byte-Pair Encodingを用いてサブワード単位を生成するオープンボキャブラリNLMを提案する。
- Java、C、Pythonを跨ぐ最大13,362プロジェクトでGRUベースのRNN言語モデルを訓練する。
- コード補完におけるオープンボキャブラリNLMの性能をn-gramLMおよびクローズドボキャブラリNLMと比較する。
- 言語モデルの改善が buggy code ハイライトのような下流タスクへ転移することを評価する。
- データセット、コード、および訓練済みモデルを公開する。
実験結果
リサーチクエスチョン
- RQ1ソースコード言語モデルにおける語彙設計の選択肢は語彙サイズおよびOOV率にどのような影響を与えるか?
- RQ2サブワード単位を用いたオープンボキャブラリーモデルは大規模なコードコーパスと多様な言語へ拡張可能か?
- RQ3Java、C、Pythonにおけるコード補完性能はベースラインと比較してオープンボキャブラリモデルで改善されるか?
- RQ4言語モデルの改善はバグ検出/ハンティングなどの下流のSEタスクの改善に繋がるか?
主な発見
- 語彙設計の選択は語彙サイズとOOV率に大きく影響し、実験を通じて顕著な効果が見られる。
- 単純な規約分割を超えたサブワードベースのアプローチが、語彙を効果的に管理するために必要である。
- Byte-Pair Encoding (BPE)は真のオープンボキャブラリを可能にし、予測力を保ちながらOOV問題を低減する。
- オープンボキャブラリNLMは複数言語にわたるコード補完で、n-gramLMおよびクローズドボキャブラリNLMの両方を上回る。
- オープンボキャブラリモデルは buggy code のハイライトでも優れた性能を示し、下流のSEタスクへの転移を示唆する。
- この手法は数千プロジェクトでの訓練へスケールし、当時報告されたコード用ニューラルモデルの中で最大規模である。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。