CodeMonkeys: Scaling Test-Time Compute for Software Engineering

要約

テスト時間計算のスケーリングは、LLMの能力を向上させる有望な軸である。しかし、テスト時間計算のスケーリングには様々な方法があり、異なるアプローチを効果的に組み合わせることは、依然として活発な研究分野である。ここでは、SWE-benchデータセットから実際のGitHubの問題を解決するという文脈でこの問題を探求する。CodeMonkeysと名付けられた私たちのシステムは、モデルたちがドラフト編集と並行してテストスクリプトを共同で生成し実行することで、コードベースを反復的に編集することを可能にします。私たちは、編集候補のコレクションを生成するために、課題ごとにこのようなマルチターンの軌跡の多くをサンプリングします。このアプローチにより、軌道ごとの反復回数を増やすことで「直列」テスト時間計算を拡張し、問題ごとの軌道数を増やすことで「並列」テスト時間計算を拡張することができる。並列スケーリングにより、複数のダウンストリームサンプルに渡って先行コストを償却することができ、LLMにすべてのファイルを読ませるという単純な方法で、関連するコードベースのコンテキストを特定することができる。編集候補を選択するために、モデル生成テストによる投票と選択に特化した最終的な複数ターンの軌跡を組み合わせている。全体として、CodeMonkeysは約2300米ドルの予算で、SWE-benchで検証された問題の57.4%を解決している。私たちの選択方法は、異なるソースからの候補を組み合わせるために使用することもできます。既存のSWE-bench Verifiedのトップ投稿から編集のアンサンブルを選択すると、66.2%のスコアが得られ、アンサンブルのベストメンバーよりも優れています。私たちはコードとデータを https://scalingintelligence.stanford.edu/pubs/codemonkeys で完全に公開しています。

要約(オリジナル)

Scaling test-time compute is a promising axis for improving LLM capabilities. However, test-time compute can be scaled in a variety of ways, and effectively combining different approaches remains an active area of research. Here, we explore this problem in the context of solving real-world GitHub issues from the SWE-bench dataset. Our system, named CodeMonkeys, allows models to iteratively edit a codebase by jointly generating and running a testing script alongside their draft edit. We sample many of these multi-turn trajectories for every issue to generate a collection of candidate edits. This approach lets us scale ‘serial’ test-time compute by increasing the number of iterations per trajectory and ‘parallel’ test-time compute by increasing the number of trajectories per problem. With parallel scaling, we can amortize up-front costs across multiple downstream samples, allowing us to identify relevant codebase context using the simple method of letting an LLM read every file. In order to select between candidate edits, we combine voting using model-generated tests with a final multi-turn trajectory dedicated to selection. Overall, CodeMonkeys resolves 57.4% of issues from SWE-bench Verified using a budget of approximately 2300 USD. Our selection method can also be used to combine candidates from different sources. Selecting over an ensemble of edits from existing top SWE-bench Verified submissions obtains a score of 66.2% and outperforms the best member of the ensemble on its own. We fully release our code and data at https://scalingintelligence.stanford.edu/pubs/codemonkeys.

arxiv情報

著者 Ryan Ehrlich,Bradley Brown,Jordan Juravsky,Ronald Clark,Christopher Ré,Azalia Mirhoseini
発行日 2025-02-03 18:57:05+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.LG パーマリンク