コードグラフモデル(CGM):リポジトリレベルのソフトウェアエンジニアリングタスクのためのグラフ統合型大規模言語モデル
Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Tasks
May 22, 2025
著者: Hongyuan Tao, Ying Zhang, Zhenhao Tang, Hongen Peng, Xukun Zhu, Bingchang Liu, Yingguang Yang, Ziyin Zhang, Zhaogui Xu, Haipeng Zhang, Linchao Zhu, Rui Wang, Hang Yu, Jianguo Li, Peng Di
cs.AI
要旨
大規模言語モデル(LLMs)の最近の進展は、関数レベルのコード生成において有望な成果を示しているが、リポジトリレベルのソフトウェアエンジニアリングタスクは依然として課題を残している。現在の解決策は主にプロプライエタリなLLMエージェントに依存しており、これにより予測不可能性が生じ、アクセシビリティが制限されるため、データプライバシーやモデルのカスタマイズに関する懸念が高まっている。本論文では、オープンソースのLLMsがエージェントベースのアプローチを必要とせずに、リポジトリレベルのタスクを効果的に解決できるかどうかを調査する。我々は、LLMsがコードベース内の関数やファイルをその意味情報と構造的依存関係を通じて理解できるようにすることで、これが可能であることを実証する。この目的のために、リポジトリコードグラフ構造をLLMのアテンションメカニズムに統合し、ノード属性をLLMの入力空間にマッピングするための専用アダプターを使用するCode Graph Models(CGMs)を導入する。エージェントレスグラフRAGフレームワークと組み合わせることで、我々のアプローチはオープンソースのQwen2.5-72Bモデルを使用して、SWE-bench Liteベンチマークで43.00%の解決率を達成した。このパフォーマンスは、オープンウェイトモデルの中で1位、オープンソースシステムを使用した手法の中で2位、全体で8位となり、以前の最良のオープンソースモデルベースの手法を12.33%上回った。
English
Recent advances in Large Language Models (LLMs) have shown promise in
function-level code generation, yet repository-level software engineering tasks
remain challenging. Current solutions predominantly rely on proprietary LLM
agents, which introduce unpredictability and limit accessibility, raising
concerns about data privacy and model customization. This paper investigates
whether open-source LLMs can effectively address repository-level tasks without
requiring agent-based approaches. We demonstrate this is possible by enabling
LLMs to comprehend functions and files within codebases through their semantic
information and structural dependencies. To this end, we introduce Code Graph
Models (CGMs), which integrate repository code graph structures into the LLM's
attention mechanism and map node attributes to the LLM's input space using a
specialized adapter. When combined with an agentless graph RAG framework, our
approach achieves a 43.00% resolution rate on the SWE-bench Lite benchmark
using the open-source Qwen2.5-72B model. This performance ranks first among
open weight models, second among methods with open-source systems, and eighth
overall, surpassing the previous best open-source model-based method by 12.33%.Summary
AI-Generated Summary