RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completion

要約

コード大規模言語モデル (CodeLLM) は、コード補完タスクにおいて優れた熟練度を示しています。
ただし、関連ファイルやクラス階層の複雑さなど、プロジェクト リポジトリの広範なコンテキストを完全に理解することができないことが多く、その結果、完成度が低くなる可能性があります。
これらの制限を克服するために、リポジトリ レベルのコード補完に関連する複雑な課題に対処するために設計された多面的なフレームワークである \tool を紹介します。
RepoHYPER の中心となるのは、コード リポジトリの膨大なコンテキストをカプセル化する新しいセマンティック グラフ構造である {\em Repo-level Semantic Graph} (RSG) です。
さらに、RepoHyper は、RSG に適用されるグラフ拡張やリンク予測アルゴリズムなどの Expand and Refine 取得メソッドを活用し、関連するコード スニペットの効果的な取得と優先順位付けを可能にします。
私たちの評価では、\tool がリポジトリ レベルのコード補完において既存の手法を大幅に上回っており、いくつかの強力なベースラインと比較した場合、さまざまなデータセットにわたって精度が向上していることが示されています。
RepoHYPER の実装は https://github.com/FSoft-AI4Code/RepoHyper にあります。

要約(オリジナル)

Code Large Language Models (CodeLLMs) have demonstrated impressive proficiency in code completion tasks. However, they often fall short of fully understanding the extensive context of a project repository, such as the intricacies of relevant files and class hierarchies, which can result in less precise completions. To overcome these limitations, we present \tool, a multifaceted framework designed to address the complex challenges associated with repository-level code completion. Central to RepoHYPER is the {\em Repo-level Semantic Graph} (RSG), a novel semantic graph structure that encapsulates the vast context of code repositories. Furthermore, RepoHyper leverages Expand and Refine retrieval method, including a graph expansion and a link prediction algorithm applied to the RSG, enabling the effective retrieval and prioritization of relevant code snippets. Our evaluations show that \tool markedly outperforms existing techniques in repository-level code completion, showcasing enhanced accuracy across various datasets when compared to several strong baselines. Our implementation of RepoHYPER can be found at https://github.com/FSoft-AI4Code/RepoHyper.

arxiv情報

著者 Huy N. Phan,Hoang N. Phan,Tien N. Nguyen,Nghi D. Q. Bui
発行日 2024-08-14 16:15:31+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.SE パーマリンク