論文解説
GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization
GraphScent:有界コンテキストのためのコードローカライゼーションにおける方向性関連度信号の補正
- 課題 静的グラフ中心性はBM25より低く、リポジトリの構造だけではローカライゼーションが不十分です。
- 手法 呼び出し方向ごとのLLM関連度信号を補正した対数尤度比を用います。正の関係だけをたどって伝播させる、学習を伴わない探索です。
- 結果 BM25-Hardで31BモデルのLW@1は、GraphScentが23.4%、Flat BM25が12.8%でした。
静的グラフ中心性の限界
修正対象ではないコード要素をローカルLLMで判定したとき、どの構造関係が近くの修正対象に対する診断信号になるかが、この研究の出発点です。既存のリポジトリ探索研究では、方向性のあるコードグラフやPersonalized PageRankが使われています。しかしこの論文は、まず静的グラフ中心性だけではBM25より低いMRRになることを確認しました。公開ベンチマークの呼び出しグラフでは、100.0%の非自己エッジが逆方向にも保存されており、呼び出し方向が失われていました。また、27.3%の候補エンティティは次数が0でした。そこで研究は、リアルタイムで作成するTyped-ASTマルチグラフとLLMによる判定を組み合わせる方向へ問いを移します。

Figure 1 :Structural graph audit and multi-file co-edit gap. (a)Audit of the supplied Oct 13 bench- mark call graphs against our runtime Typed-AST multigraph (n= 113 public tasks), together with static BM25 and Personalized PageRank (PPR) MRR.(b)Single-trajectory 31B issue-resolution drop from 1-file (39.1%) to 3+-file patches (9.4%), alongside post-edit AST Ripple missed reference-file recall (50.0%on31B) and zero-shot ripple-judgeAUROC(65.9%on12B).
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの4ページ目から図の部分を抽出しています。
Table 2 : Static retrieval controls (zero LLM calls) on Typed-AST multigraphs across public_113, post2025_98, and pooled_211. Even on fully connected directed Typed-AST graphs, static undirected and directed Personalized PageRank (PPR) fail to improve upon plain lexical BM25.
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの5ページ目から図の部分を抽出しています。方向別関連度信号の非対称性
この論文では、未編集の近傍rについて、LLMが付けた関連度スコアSが語彙的なfar distractorより高くなる確率を、Scent(r)と定義しています。Scent(r)はMann–Whitney確率(AUROC)であり、同点は半分として計算されます。0.50は語彙類似度以上の判別がないことを、0.50を超える値は修正対象の方向への正の近接信号を意味します。pooled_211では、parentがE4B、12B、31Bでそれぞれ0.643、0.713、0.719を示し、called_byは0.600、0.641、0.623を示しました。一方callsは0.477、0.483、0.487で、偶然に近い値でした。
著者らは、これは呼び出し側の上位エントリポイントが欠陥のあるルーチンを委譲しているためだと解釈しています。

Table 3 : Multi-scale T= 0 directional relevance scent (AUROC vs. 1,266 hard BM25 far distractors; 1,000-resample task-cluster bootstrap 95% CIs on pooled_211, plus panel split). Non-AST channels (knear_qwen,cochange,knear_comp256) are measured onpublic_113.
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの6ページ目から図の部分を抽出しています。
Figure 2 :Directional relevance asymmetry across model scales and disjoint repository panels. Point estimates and 95% task-cluster bootstrap CIs for Scent(r) on(a) public_113 (4 repositories) and(b)temporally held-out post2025_98 (82 repositories). Enclosing scopes ( parent) and up- stream callers (called_by) consistently exceed the 0.50 distractor baseline and τ= 0.55 gate across E4B,12B, and31B, whereas downstream callees (calls) remain near0.48–0.51.
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの6ページ目から図の部分を抽出しています。マスキングと語彙・長さの統制
parentとcalled_byの信号が、対象コードの漏えいや語彙の重なりによるものかを確認するため、著者らはいくつかの統制を設けました。parent_gold_maskedでは、正解の子メソッドの全行を省略表示に置き換えました。parent_header_docでは、メソッド本体を取り除きました。この場合でも、parentのScentはE4Bで0.654、12Bで0.700または0.716、31Bで0.700または0.728の程度を保ちました。called_byとcallsの比較では、spanが重ならないノードだけを残したとき、E4Bで0.630、12Bで0.652、31Bで0.629のAUROCを示しました。
長さとBM25を統制したOLSでも、callerの傾きは正でした。

Table 4 : Zero-leakage parent controls and span-disjoint, lexical, and length controls for called_by vs.callsonpooled_211(95%task-cluster bootstrap CIs in brackets).
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの7ページ目から図の部分を抽出しています。
Table 7 : Panel-by-panel zero-leakage masked- parent controls and BM25-stratified span-disjoint called_bycontrols acrossE4B,12B, and31B.
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの15ページ目から図の部分を抽出しています。補正された方向性伝播と探索手順
GraphScentは学習を伴わない探索コントローラで、3段階で動作します。まず、正規化したBM25スコアにスケールαを掛けて、各候補の初期対数信念b0(v)を置きます。次に、リポジトリ外の較正データにラプラス平滑化された順序尤度を当てはめ、関係ごとの対数尤度比ℓr(s)を得ます。正のscent関係の集合R+は、Scent_cal(r)≥0.55となる関係として定めます。実際にはparentとcalled_byが選ばれ、callsは除外されます。探索中はUCBでノードu_tを選び、Gemma 4プローブを状態を持たずに実行します。そのスコアs_tに応じて、自分自身とR+関係の近傍に対数尤度比を加算します。

Figure 3 :System architecture of GraphScent and AST Ripple.Stage 0 parses repository Python files into a directed Typed-AST multigraph (median 0.17s on CPU) and initializes lexical BM25 log-beliefs. Offline out-of-repository calibration fits ordinal log-likelihood ratios ℓr(s) and gates propagation to R+ ={r: Scent cal(r)≥0.55} (parent→child , caller→callee ). Stage 1 executes B= 24 stateless T= 0 folded-view probes (<21.5GiB single-GPU VRAM), Stage 2 resolves discrete score ties via a single top-6 listwise commitment call, and Stage 3 runs post-edit AST Ripple(∼160tokens) to surface unedited callers and overrides.
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの8ページ目から図の部分を抽出しています。
Table 6 : Fitted Laplace-smoothed log-likelihood ratios ℓr(s) for s∈ {0,1,2,3} on public_113 (used zero-shot on post2025_98) and empirical far-distractor score distributions across Gemma 4 scales.
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの15ページ目から図の部分を抽出しています。BM25-Hard探索結果
B=24の予算で、31BモデルのBM25-Hard部分集合(n=94)では、GraphScentがLW@1 23.4%を記録し、Flat BM25は12.8%でした。全211課題では、差が+1.9から+2.4ppへと小さくなりました。同じ31Bの条件では、Fixed-DirのBM25-Hard LW@1は20.2%で、GraphScentとの差は+3.2ppであり、信頼区間が0を含みます。E4Bでは、較正なしのFixed-DirのFound@24は66.8%でしたが、GraphScentは70.6%でした。

Figure 4 :Phase diagram and live T= 0 localization results. (a) 5,760-run linear-diffusion phase diagram showing ∆Found@24 (percentage points) across direct judge AUROC(goldvs.far) and neighbor edge scent, overlaid with empirical Gemma 4 operating points.(b)Overall Commit@1 across all 211 tasks (B= 24 ).(c) BM25-Hard (rank>10 , n= 94 ) Commit@1 comparing Flat BM25,Undir-AST,Fixed-Dir, andGraphScent.
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの9ページ目から図の部分を抽出しています。
Table 8 : Complete live T= 0 localization results across all methods and single-component ablations onpooled_211atB= 24andB= 15.
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの16ページ目から図の部分を抽出しています。
Table 9 : Key paired bootstrap comparisons ( 2,000 resamples) for GraphScent at B= 24 on pooled_211, reporting exact task-level Wins / Losses / Ties and two-sided bootstrap p-values.
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの16ページ目から図の部分を抽出しています。事後編集チェックの回収率
AST Rippleは、編集ドラフトで修正された関数とクラスのシグネチャをグラフに問い合わせ、修正されていない直接の呼び出し元とoverrideを見つける補助ツールです。31Bの2回の実行では、未解決のmulti-file課題のうち、欠けていたreference-patchファイルを見つけた割合は11/22、すなわち50.0%でした。E4Bでは21/71、すなわち29.6%でした。この数値は欠けていた参照ファイルを回収した割合であり、テストスイートを通過して解決したことの証拠ではありません。著者らは、closed-loopのテスト改善は今後の課題だと述べています。
時間分離と適用範囲
この研究の実験は、Pythonリポジトリの211課題、86リポジトリに限られ、Gemma 4のE4B、12B、31Bの3規模でのみ測定しました。post2025_98はpublic_113とリポジトリが重なりませんが、時間分離だけでは事前学習での未露出を保証できないと著者らは述べています。また、LoRAファインチューニングの実験では、1-hop構造近傍のScentが0.570から0.536に下がりました。これは、コミットのパッチに基づく二値の拒否学習が、未編集の呼び出し元のスコアを抑制したという観察です。

Table 11 : Controlled comparison on 1,540public_113 nodes across frozen Gemma 4 31B (thinking=off),thinking=on, and rank-16 commit-patch LoRA fine-tuning.
出典 · CC BY 4.0 · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 論文の図を引用 · 元のPDFの17ページ目から図の部分を抽出しています。論文情報
- 著者
- Ramesh Arvind Naagarajan
- 学会・ジャーナル
- arXiv · プレプリント
- 公開日
- 2026年11月12日
- 登録日
- 2026年11月16日
- 更新日
- 2026年11月12日
- バージョン
- v1
- arXiv
- 2611.17527
- カテゴリ
- cs.SE · cs.AI
- ライセンス
- CC BY 4.0
- 掲載内容
- 論文情報・解説・論文の図
この解説は、Refivuの韓国語解説をAIで翻訳したものです。不正確な翻訳や誤りが含まれる可能性があります。論文と図の利用条件は各出典に従います。
アブストラクト
Running open-weight language models locally on a single consumer GPU requires replacing expanding multi-turn exploration histories with short, stateless code inspections. Stateless repository localization, however, hinges on a foundational question: when a frozen language model evaluates an unedited code entity from a compact view, which structural relationships make its relevance judgment informative about a nearby repair target? Studying Gemma 4 models across 211 real-world Python issues in 86 repositories, we uncover a systematic directional relevance asymmetry: zero-temperature relevance scores on enclosing scopes and upstream callers consistently separate true structural neighbors from hard lexical distractors, whereas scores on downstream callees, peer methods, historical co-change partners, and dense node embeddings remain near chance. Zero-leakage masked-scope probes and regressions controlling for lexical similarity and snippet length confirm that this asymmetry reflects functional role (callers expose symptom entrypoints delegating to defective routines, while downstream helpers appear benign alone) rather than target leakage or surface overlap. Guided by this finding, we introduce GraphScent, a training-free search controller that propagates out-of-repository, relation-conditioned log-likelihood ratios over runtime Typed-AST multigraphs before resolving ties via a single listwise comparison, alongside AST Ripple, a lightweight post-edit check for missed co-edits. Likelihood calibration prevents overconfident smaller models from chasing false-positive callers while lifting exact localization on lexically hard targets from 12.8 to 23.4 percent at 31B within a single-GPU budget.
この論文を引用
Ramesh Arvind Naagarajan (2026). GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization. arXiv:2611.17527v1. https://arxiv.org/abs/2611.17527v1
BibTeX
@misc{naagarajan2026graphscent,
title = {{GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization}},
author = {Ramesh Arvind Naagarajan},
year = {2026},
eprint = {2611.17527},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.17527v1}
}