ChatPaper.aiChatPaper

GitChameleon: コード生成モデルのバージョン切り替え機能の暴露

GitChameleon: Unmasking the Version-Switching Capabilities of Code Generation Models

November 5, 2024
著者: Nizar Islah, Justine Gehring, Diganta Misra, Eilif Muller, Irina Rish, Terry Yue Zhuo, Massimo Caccia
cs.AI

要旨

ソフトウェアライブラリの急速な進化は、コード生成モデルにとって重要な課題を提起しています。これらのモデルは、頻繁なバージョン更新に適応しつつ、以前のバージョンとの互換性を維持する必要があります。既存のコード補完ベンチマークは、この動的な側面をしばしば見落としており、それを考慮するものは、実行ベースの評価を行わずに静的なコード予測タスクに依存しているため、モデルの実用性に関する限定的な視点しか提供していません。このギャップを埋めるために、116のPythonコード補完問題からなる新しい、手動で作成されたデータセットである\GitChameleon{}を導入します。各問題は特定のライブラリバージョンに依存し、実行可能なユニットテストが付属しています。このデータセットは、現代の大規模言語モデル(LLMs)が、構文的に正確でありながら実行時にも機能的に正確なバージョン固有のコードを生成する能力を厳密に評価することを目的としています。私たちの包括的な評価によると、最先端のLLMsはこのタスクに苦戦しており、例えば、GPT-4oは、エラーフィードバックが提供された場合でも、わずか39.9%(43.7%)のパス率しか達成していません。これは、問題の複雑さと現行モデルの制約を浮き彫りにしています。コードライブラリの動的性質を強調する実行ベースのベンチマークを提供することで、\GitChameleon{}は、より適応性が高く信頼性のあるコード生成モデルの開発を推進するための重要なツールとなります。さらなるバージョン条件付きコード生成の探索を支援するために、当該コードリポジトリをhttps://github.com/NizarIslah/GitChameleonで一般に公開しています。
English
The rapid evolution of software libraries presents a significant challenge for code generation models, which must adapt to frequent version updates while maintaining compatibility with previous versions. Existing code completion benchmarks often overlook this dynamic aspect, and the one that does consider it relies on static code prediction tasks without execution-based evaluation, offering a limited perspective on a model's practical usability. To address this gap, we introduce \GitChameleon{}, a novel, manually curated dataset comprising 116 Python code completion problems, each conditioned on specific library versions and accompanied by executable unit tests. is designed to rigorously assess the ability of modern large language models (LLMs) to generate version-specific code that is not only syntactically correct but also functionally accurate upon execution. Our comprehensive evaluations reveal that state-of-the-art LLMs struggle with this task; for instance, GPT-4o achieves a pass@10 of only 39.9\% (43.7\% when provided with error feedback), highlighting the complexity of the problem and the limitations of current models. By providing an execution-based benchmark that emphasizes the dynamic nature of code libraries, serves as a critical tool to advance the development of more adaptable and reliable code generation models. For facilitation for further exploration of version-conditioned code generation, we make our code repository publicly accessible at https://github.com/NizarIslah/GitChameleon.

Summary

AI-Generated Summary

PDF222November 12, 2024