코드 그래프 모델(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
초록
대규모 언어 모델(LLM)의 최근 발전은 함수 수준의 코드 생성에서 유망한 결과를 보여주었지만, 리포지토리 수준의 소프트웨어 엔지니어링 작업은 여전히 도전적인 과제로 남아 있습니다. 현재의 솔루션은 주로 독점적인 LLM 에이전트에 의존하고 있어 예측 불가능성을 초래하고 접근성을 제한하며, 데이터 프라이버시와 모델 커스터마이제이션에 대한 우려를 불러일으키고 있습니다. 본 논문은 오픈소스 LLM이 에이전트 기반 접근법 없이도 리포지토리 수준의 작업을 효과적으로 해결할 수 있는지 조사합니다. 우리는 LLM이 코드베이스 내의 함수와 파일을 의미 정보와 구조적 의존성을 통해 이해할 수 있도록 함으로써 이것이 가능함을 입증합니다. 이를 위해, 우리는 리포지토리 코드 그래프 구조를 LLM의 어텐션 메커니즘에 통합하고, 노드 속성을 LLM의 입력 공간에 매핑하기 위한 특수 어댑터를 사용하는 코드 그래프 모델(CGM)을 소개합니다. 에이전트 없는 그래프 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%.