Ocassionally Secure: A Comparative Analysis of Code Generation Assistants

要約

$ $Large Language Model (LLM) はさまざまなアプリケーションでますます利用されており、その代表的な例がコード生成です。
これまでの研究では、LLM には安全なコードと安全でないコードの両方を生成する機能があることが示されていますが、文献では、どのような要素が安全なコードと効果的なコードの生成に役立つのかが考慮されていません。
したがって、このホワイトペーパーでは、LLM を現実世界のシナリオで効果的かつ安全に導入して高品質のコードを生成できる条件とコンテキストを特定して理解することに焦点を当てます。
私たちは、ChatGPT を使用した GPT-3.5 と GPT-4、Google の Bard および Gemini という 4 つの高度な LLM の比較分析を実施しました。9 つの個別のタスクを使用して、各モデルのコード生成機能を評価しました。
私たちは、仕事として日常的なタスクに LLM を採用している実際の開発者の典型的な使用例を表すために、調査を文脈化しました。
さらに、開発者ペルソナの 2 つの異なるバージョンを使用することで表現されるセキュリティ意識にも重点を置いています。
合計 61 のコード出力を収集し、機能、セキュリティ、パフォーマンス、複雑さ、信頼性などのいくつかの側面にわたって分析しました。
これらの洞察は、モデルの機能と限界を理解し、自動コード生成の分野で将来の開発と実用的なアプリケーションを導くために重要です。

要約(オリジナル)

$ $Large Language Models (LLMs) are being increasingly utilized in various applications, with code generations being a notable example. While previous research has shown that LLMs have the capability to generate both secure and insecure code, the literature does not take into account what factors help generate secure and effective code. Therefore in this paper we focus on identifying and understanding the conditions and contexts in which LLMs can be effectively and safely deployed in real-world scenarios to generate quality code. We conducted a comparative analysis of four advanced LLMs–GPT-3.5 and GPT-4 using ChatGPT and Bard and Gemini from Google–using 9 separate tasks to assess each model’s code generation capabilities. We contextualized our study to represent the typical use cases of a real-life developer employing LLMs for everyday tasks as work. Additionally, we place an emphasis on security awareness which is represented through the use of two distinct versions of our developer persona. In total, we collected 61 code outputs and analyzed them across several aspects: functionality, security, performance, complexity, and reliability. These insights are crucial for understanding the models’ capabilities and limitations, guiding future development and practical applications in the field of automated code generation.

arxiv情報

著者 Ran Elgedawy,John Sadik,Senjuti Dutta,Anuj Gautam,Konstantinos Georgiou,Farzin Gholamrezae,Fujiao Ji,Kyungchan Lim,Qian Liu,Scott Ruoti
発行日 2024-02-01 15:49:47+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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