Exploring the Robustness of Large Language Models for Solving Programming Problems

要約

最近、ソース コードに大規模言語モデル (LLM) を使用することが注目を集めています。
Codex や ChatGPT などの Transformer ベースのモデルなどの LLM は、幅広いプログラミング問題を解決する能力が高いことが示されています。
ただし、LLM がどの程度問題の説明を理解し、それに応じてプログラムを生成するか、あるいは表面的な手がかりに基づいてトレーニング データ内の最も関連性の高い問題からソース コードを取得するだけかはまだわかっていません。
この研究課題を探求するために、入門的なプログラミング問題におけるコード生成タスクに取り組むことができる、いくつかの人気のある LLM、CodeGen および GPT-3.5 シリーズ モデルの堅牢性を理解するための実験を実施します。
私たちの実験結果は、CodeGen と Codex は問題の説明の表面的な変更に敏感であり、コード生成のパフォーマンスに大きな影響を与えることを示しています。
さらに、ランダム化された変数は解決率を大幅に低下させるため、Codex が変数名に依存していることがわかります。
ただし、InstructGPT や ChatGPT などの最先端 (SOTA) モデルは、表面的な変更に対してより高い堅牢性を示し、プログラミングの問題を解決する優れた能力を備えています。
これは、LLM に与えられるプロンプトへのわずかな変更がコード生成のパフォーマンスに大きな影響を与える可能性があり、SOTA モデルが摂動に対してより堅牢になる一方で、高品質のコード生成にはプロンプトの注意深いフォーマットが不可欠であるという事実を強調しています。

要約(オリジナル)

Using large language models (LLMs) for source code has recently gained attention. LLMs, such as Transformer-based models like Codex and ChatGPT, have been shown to be highly capable of solving a wide range of programming problems. However, the extent to which LLMs understand problem descriptions and generate programs accordingly or just retrieve source code from the most relevant problem in training data based on superficial cues has not been discovered yet. To explore this research question, we conduct experiments to understand the robustness of several popular LLMs, CodeGen and GPT-3.5 series models, capable of tackling code generation tasks in introductory programming problems. Our experimental results show that CodeGen and Codex are sensitive to the superficial modifications of problem descriptions and significantly impact code generation performance. Furthermore, we observe that Codex relies on variable names, as randomized variables decrease the solved rate significantly. However, the state-of-the-art (SOTA) models, such as InstructGPT and ChatGPT, show higher robustness to superficial modifications and have an outstanding capability for solving programming problems. This highlights the fact that slight modifications to the prompts given to the LLMs can greatly affect code generation performance, and careful formatting of prompts is essential for high-quality code generation, while the SOTA models are becoming more robust to perturbations.

arxiv情報

著者 Atsushi Shirafuji,Yutaka Watanobe,Takumi Ito,Makoto Morishita,Yuki Nakamura,Yusuke Oda,Jun Suzuki
発行日 2023-06-26 10:48:50+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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