論文の概要: Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
- arxiv url: http://arxiv.org/abs/2602.11671v1
- Date: Thu, 12 Feb 2026 07:44:00 GMT
- ステータス: 翻訳完了
- システム内更新日: 2026-02-13 21:07:25.701142
- Title: Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
- Title(参考訳): コードを自然言語として扱わない:リポジトリレベルのコード生成とそれを超える意味
- Authors: Minh Le-Anh, Huyen Nguyen, Khanh An Tran, Nam Le Hai, Linh Ngo Van, Nghi D. Q. Bui, Bach Le,
- Abstract要約: 自然言語ではなく構造化コードとしてコードを扱う,リポジトリレベルのコード生成フレームワークであるHydraを紹介します。
我々はHydraがオープンソースおよびクローズドソースのCodeLLMにまたがって最先端のパフォーマンスを実現することを示す。
- 参考スコア(独自算出の注目度): 13.550121154853715
- License: http://creativecommons.org/licenses/by-sa/4.0/
- Abstract: Large language models for code (CodeLLMs) have demonstrated remarkable success in standalone code completion and generation, sometimes even surpassing human performance, yet their effectiveness diminishes in repository-level settings where cross-file dependencies and structural context are essential. Existing Retrieval-Augmented Generation (RAG) approaches often borrow strategies from NLP, relying on chunking-based indexing and similarity-based retrieval. Chunking results in the loss of coherence between code units and overlooks structural relationships, while similarity-driven methods frequently miss functionally relevant dependencies such as helper functions, classes, or global variables. To address these limitations, we present Hydra, a repository-level code generation framework that treats code as structured code rather than natural language. Our approach introduces (i) a structure-aware indexing strategy that represents repositories as hierarchical trees of functions, classes, and variables, preserving code structure and dependencies, (ii) a lightweight dependency-aware retriever (DAR) that explicitly identifies and retrieves the true dependencies required by a target function, and (iii) a hybrid retrieval mechanism that combines DAR with similarity-based retrieval to provide both essential building blocks and practical usage examples. Extensive experiments on the challenging DevEval and RepoExec benchmarks, both requiring function implementation from real-world repositories with complex large repository context, show that Hydra achieves state-of-the-art performance across open- and closed-source CodeLLMs. Notably, our method establishes a new state of the art in repository-level code generation, surpassing strongest baseline by over 5% in Pass@1 and even enabling smaller models to match or exceed the performance of much larger ones that rely on existing retrievers.
- Abstract(参考訳): コードのための大規模な言語モデル(CodeLLM)は、スタンドアローンのコード補完と生成において顕著な成功を示し、時には人間のパフォーマンスを上回りますが、それらの効果は、ファイル間の依存関係と構造的コンテキストが不可欠であるリポジトリレベルの設定で減少します。
既存のRetrieval-Augmented Generation (RAG) アプローチは、チャンキングベースの索引付けと類似性に基づく検索に頼って、NLPから戦略を借りることが多い。
チャンキングによってコードユニット間のコヒーレンスが失われ、構造的関係が見過ごされる一方、類似性駆動のメソッドはヘルパー関数やクラス、グローバル変数といった機能的に関連する依存関係を見逃してしまうことが多い。
このような制限に対処するため、自然言語ではなく構造化コードとしてコードを扱うリポジトリレベルのコード生成フレームワークであるHydraを紹介します。
私たちのアプローチが紹介する
i) リポジトリを関数、クラス、変数の階層木として表現し、コード構造と依存関係を保存する構造対応のインデックス化戦略。
(ii)ターゲット関数が必要とする真の依存関係を明確に識別し、検索する軽量な依存性対応レトリバー(DAR)
3DARと類似性に基づく検索を組み合わせるハイブリッド検索機構により、本質的なビルディングブロックと実用例の両方を提供する。
DevEvalとRepoExecのベンチマークに関する大規模な実験は、どちらも複雑な大規模なリポジトリコンテキストを持つ現実世界のリポジトリからの関数実装を必要としており、HydraがオープンソースおよびクローズドソースのCodeLLM間で最先端のパフォーマンスを達成することを示している。
特に、我々の手法は、リポジトリレベルのコード生成において、新しい最先端技術を確立し、Pass@1で最強のベースラインを5%以上越え、より小さなモデルでも、既存のレトリバーに依存しているはるかに大きなモデルのパフォーマンスにマッチまたは超えることを可能にする。
関連論文リスト
- AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion [55.21541958868449]
リポジトリレベルのコード補完フレームワークであるAlignCoderを提案する。
我々のフレームワークは、初期クエリとターゲットコードのセマンティックギャップを橋渡しする拡張クエリを生成する。
我々は、拡張クエリにおける推論情報を活用してより正確な検索を行うAlignRetrieverのトレーニングに強化学習を採用する。
論文 参考訳(メタデータ) (2026-01-27T15:23:14Z) - In Line with Context: Repository-Level Code Generation via Context Inlining [11.065371614078723]
本稿では,リポジトリレベルのコード生成のための新しいフレームワークであるInlineCoderを紹介する。
InlineCoderは、未完成の関数をコールグラフにインライン化することで、リポジトリコンテキストの理解を強化する。
論文 参考訳(メタデータ) (2026-01-01T15:56:24Z) - EpiCoder: Encompassing Diversity and Complexity in Code Generation [66.43738008739555]
既存のコード生成方法はシードデータとしてコードスニペットを使用する。
階層的なコード機能を中心に展開する,新しい機能ツリーベースの合成フレームワークを提案する。
我々のフレームワークは、生成されたコードの複雑さを正確に制御し、関数レベルの操作からマルチファイルのシナリオまで幅広い機能を実現する。
論文 参考訳(メタデータ) (2025-01-08T18:58:15Z) - CodeRAG-Bench: Can Retrieval Augment Code Generation? [78.37076502395699]
検索拡張生成を用いたコード生成の系統的,大規模な解析を行う。
まず、コード生成タスクの3つのカテゴリを含む総合的な評価ベンチマークであるCodeRAG-Benchをキュレートする。
CodeRAG-Bench上のトップパフォーマンスモデルについて、1つまたは複数のソースから検索したコンテキストを提供することにより検討する。
論文 参考訳(メタデータ) (2024-06-20T16:59:52Z) - On the Impacts of Contexts on Repository-Level Code Generation [5.641402231731082]
本稿ではレポジトリレベルのコード生成を評価するために設計された新しいベンチマークであるRepoExecを紹介する。
実行可能性、包括的なテストケース生成による機能的正当性、ファイル間のコンテキストの正確な利用という3つの重要な側面に注目します。
論文 参考訳(メタデータ) (2024-06-17T10:45:22Z) - Class-Level Code Generation from Natural Language Using Iterative, Tool-Enhanced Reasoning over Repository [4.767858874370881]
実世界のリポジトリ内でクラスレベルのコードを生成する際に,LLMを厳格に評価するためのベンチマークであるRepoClassBenchを紹介する。
RepoClassBenchには、リポジトリの選択からJava、Python、C#にまたがる"Natural Language to Class Generation"タスクが含まれている。
Retrieve-Repotools-Reflect (RRR)は,レポジトリレベルのコンテキストを反復的にナビゲートし,推論する静的解析ツールを備えた新しいアプローチである。
論文 参考訳(メタデータ) (2024-04-22T03:52:54Z)
関連論文リストは本サイト内にある論文のタイトル・アブストラクトから自動的に作成しています。
指定された論文の情報です。
本サイトの運営者は本サイト(すべての情報・翻訳含む)の品質を保証せず、本サイト(すべての情報・翻訳含む)を使用して発生したあらゆる結果について一切の責任を負いません。