title: Code Graph Model (CGM): A Graph-Integrated Large Language Model for
    Repository-Level Software Engineering Tasks
summary: 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%.
paper_authors._id: 68369babaffae1c74f432a1e
paper_authors.name: Hongyuan Tao
paper_authors._id: 68369babaffae1c74f432a1f
paper_authors.name: Ying Zhang
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2025-05-28T19:14:20.825Z
paper_authors._id: 6620d5bdcc2bc496fd6c79e6
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/6620d5bdcc2bc496fd6c79e6/-xaFiByQrXdYgpscpUgR2.png
paper_authors.fullname: Ying ZHANG
paper_authors.type: user
paper_authors.user: JJYDXFS
paper_authors._id: 68369babaffae1c74f432a20
paper_authors.name: Zhenhao Tang
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2025-05-28T12:39:47.865Z
paper_authors._id: 67b875489107c46e94ffcc16
paper_authors.avatarUrl: /avatars/3435476b12ec63775e3de4b6bec3bba7.svg
paper_authors.fullname: Zhenhao Tang
paper_authors.type: user
paper_authors.user: Darian616
paper_authors._id: 68369babaffae1c74f432a21
paper_authors.name: Hongen Peng
paper_authors._id: 68369babaffae1c74f432a22
paper_authors.name: Xukun Zhu
paper_authors._id: 68369babaffae1c74f432a23
paper_authors.name: Bingchang Liu
paper_authors._id: 68369babaffae1c74f432a24
paper_authors.name: Yingguang Yang
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2025-05-28T12:40:15.278Z
paper_authors._id: 67ae0b740b0b4c1400f5ce13
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/XO8Sw-nuSy-5s7OR5Z0kl.png
paper_authors.fullname: yingguang
paper_authors.type: user
paper_authors.user: yangyingguang
paper_authors._id: 68369babaffae1c74f432a25
paper_authors.name: Ziyin Zhang
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2025-05-28T08:56:43.238Z
paper_authors._id: 6430bdd8cd31d174a9f900fb
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/Y9SPnRfpKSbYc7MhNdP-H.jpeg
paper_authors.fullname: Ziyin Zhang
paper_authors.type: user
paper_authors.user: Geralt-Targaryen
paper_authors._id: 68369babaffae1c74f432a26
paper_authors.name: Zhaogui Xu
paper_authors._id: 68369babaffae1c74f432a27
paper_authors.name: Haipeng Zhang
paper_authors._id: 68369babaffae1c74f432a28
paper_authors.name: Linchao Zhu
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2025-05-28T12:40:42.330Z
paper_authors._id: 63521e1dfe367c0d9b155007
paper_authors.avatarUrl: /avatars/b22804fc63b507fd60191486b17cdf7c.svg
paper_authors.fullname: Linchao Zhu
paper_authors.type: user
paper_authors.user: ffmpbgrnn
paper_authors._id: 68369babaffae1c74f432a29
paper_authors.name: Rui Wang
paper_authors._id: 68369babaffae1c74f432a2a
paper_authors.name: Hang Yu
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2025-05-28T19:14:18.595Z
paper_authors._id: 6837243353739ee0d588d04c
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/CYU8xxEHxxGkwNVCpua6X.png
paper_authors.fullname: Hang Yu
paper_authors.type: user
paper_authors.user: fhlyhv
paper_authors._id: 68369babaffae1c74f432a2b
paper_authors.name: Jianguo Li
paper_authors._id: 68369babaffae1c74f432a2c
paper_authors.name: Peng Di
paper_title: Code Graph Model (CGM): A Graph-Integrated Large Language Model for
    Repository-Level Software Engineering Tasks
paper_summary: 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%.
paper_ai_summary: Open-source Code Graph Models enhance repository-level code generation tasks by integrating code graph structures into LLMs' attention mechanisms, achieving high performance without agent-based approaches.
paper_ai_keywords: Large Language Models LLMs function-level code generation repository-level software engineering Code Graph Models CGMs attention mechanism SWE-bench Lite benchmark Qwen2.5-72B model graph RAG framework