# GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization

GraphScent: 제한된 컨텍스트를 위한 코드 로컬라이제이션의 방향성 관련도 신호 보정

Ramesh Arvind Naagarajan · arXiv · 2026년 11월 12일

- **연구 문제** 정적 그래프 중심성은 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 (…](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-e66e09c23c50cc774c57d1b45eada3c9.png?thumb=512)

**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).

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/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…](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-a8c899e9a9d4656e54858f7ca202e5da.png?thumb=512)

**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.

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/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,…](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-b5bae4612df73e5348517a3b7cdbca4f.png?thumb=512)

**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.

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/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) o…](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-445a73973c3e845ce005bb4afc243b5f.png?thumb=512)

**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.

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

## 마스킹과 어휘·길이 통제

parent와 called\_by의 신호가 대상 코드 누출이나 어휘 겹침 때문인지 확인하기 위해 저자들은 여러 통제를 두었습니다. parent\_gold\_masked는 gold 자식 메서드의 모든 줄을 생략 표시로 바꾸었고, 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 brack…](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-8c54bc9d7e86475ff5bab82bd1f65f04.png?thumb=512)

**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).

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/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](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-d83f3b57b65f2e795f586134c89adf20.png?thumb=512)

**Table 7** : Panel-by-panel zero-leakage masked- parent controls and BM25-stratified span-disjoint called\_bycontrols acrossE4B,12B, and31B.

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 원문 그림 인용 · 원본 PDF 15쪽에서 그림 영역을 추출했습니다.

## 보정된 방향성 전파와 탐색 절차

GraphScent는 학습 없는 탐색 컨트롤러로, 세 단계로 작동합니다. 먼저 정규화된 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) an…](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-c9410db0824e3c78f3046927c3af55d2.png?thumb=512)

**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.

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/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…](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-242269ab3febf589e56374a96df35198.png?thumb=512)

**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.

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/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 ju…](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-ef45ebb32e6fd7b36c9c32436ca36aa5.png?thumb=512)

**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.

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/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](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-d9d99e2221019d2c41af171ec7badf9b.png?thumb=512)

**Table 8** : Complete live T= 0 localization results across all methods and single-component ablations onpooled\_211atB= 24andB= 15.

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/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-sid…](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-4e815924cc3d90ffc78ccb3fc0c7aa33.png?thumb=512)

**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.

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ramesh Arvind Naagarajan · GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.

## 사후 편집 점검의 회수율

AST Ripple은 편집 초안의 수정된 함수와 클래스 시그니처를 그래프에 질의해 수정되지 않은 직접 호출자와 override를 찾는 보조 도구입니다. 31B의 두 실행에서 미해결 multi-file 과제 중 누락된 reference-patch 파일을 찾은 비율은 11/22, 즉 50.0%였습니다. E4B에서는 21/71, 즉 29.6%였습니다. 이 수치는 누락된 참조 파일을 회수한 비율이며, 테스트 스위트를 통과해 해결했다는 증거가 아닙니다. 저자들은 이 점을 closed-loop 테스트 개선이 향후 과제라고 밝힙니다.

## 시간 분리와 적용 범위

이 연구의 실험은 Python 저장소 211개 과제, 86개 저장소에 한정되며 Gemma 4의 E4B, 12B, 31B 세 규모에서만 측정했습니다. post2025\_98은 public\_113과 저장소가 겹치지 않지만, 시간 분리만으로 pre-training 비노출을 보장할 수 없다고 저자들이 밝힙니다. 또한 LoRA fine-tuning 실험에서는 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](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756/figures/figure-5df19b771652ac2876fde9e9a78a72f2.png?thumb=512)

**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.

[원문](https://arxiv.org/abs/2611.17527v1) · [CC BY 4.0](https://creativecommons.org/licenses/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](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2611.17527v1) · [원문 PDF ↗](https://arxiv.org/pdf/2611.17527v1)

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}
}
```

## 이 논문의 용어

- [BM25](https://refivu.com/terms/64437f95755a-bm25)
- [Personalized PageRank](https://refivu.com/terms/b8c03b235684-personalized-pagerank)
- [Gemma 4](https://refivu.com/terms/936d4cfcc6b1-gemma-4)

## 다른 논문 해설

- [Superfluid: Local AI Server for Distributed LLM Inference](https://refivu.com/papers/8e6a37d1-98da-443c-a248-1340a46ef81c-superfluid-local-ai-server-for-distributed-llm-inference.md)
- [V-JEPA-LM: Video-Language Models That Read Dynamics Beyond Static, Text-Aligned Representations](https://refivu.com/papers/c436a528-5f97-4e2f-810b-9095107f034a-v-jepa-lm-video-language-models-that-read.md)
- [Certified Improvements to Best-Known Thomson-Problem Configurations with a Search Pipeline Built with Large Language Model Agents](https://refivu.com/papers/b18a5aa7-16d6-47d1-bbee-295dfbb69469-certified-improvements-to-best-known-thomson-problem.md)
- [Learning When Diffusion Language Models Should Regenerate](https://refivu.com/papers/a1c3cee4-780d-4f0c-9468-c116bf020727-learning-when-diffusion-language-models-should-regenerate.md)
- [Goal Encoding in LLMs](https://refivu.com/papers/02b8f035-6b62-4c26-ac75-c1976f3e607f-goal-encoding-in-llms.md)
- [Ballad: Bandit-Based LLM Routing for Automated Heuristic Discovery](https://refivu.com/papers/8235a1af-2f08-4cce-82f5-6886ad0fb161-ballad-bandit-based-llm-routing-for-automated-heuristic.md)
- [Racing the Clock: Teaching VLNs Budget-Conditioned Object Search](https://refivu.com/papers/992ab776-37be-4bb3-8f02-ac11228a0178-racing-the-clock-teaching-vlns-budget-conditioned-object.md)
- [Classification with Large-Step Gradient Descent: Unifying Self-Stabilization and Convergence Rates](https://refivu.com/papers/ba201378-eebf-47b4-b223-b9daff3608d3-classification-with-large-step-gradient-descent-unifying.md)
- [Interpreting Coding Agents Through Their Behavioral Trajectories](https://refivu.com/papers/22b87664-6445-414a-bf3d-56309053aa3e-interpreting-coding-agents-through-their-behavioral.md)
- [ParseBench-2: Severity-Aware Evaluation of Document Parsing](https://refivu.com/papers/6a634f4a-4067-4371-aad1-d4d152a8567d-parsebench-2-severity-aware-evaluation-of-document-parsing.md)
- [Delayed Effects of Temporary Weight Decay in Muon Pretraining](https://refivu.com/papers/c8f38eb0-af09-4136-b73f-cd4f12a55a5f-delayed-effects-of-temporary-weight-decay-in-muon.md)
- [Unfinished-Bench: Measuring Rule Violations by Persistent Agents in Realistic Work Environments](https://refivu.com/papers/7d1ec24e-9676-4b02-9f95-5b4b4a0829fc-unfinished-bench-measuring-rule-violations-by-persistent.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/f485b130-6849-48e3-832f-e8d259afa756-graphscent-calibrating-directional-relevance-signals-for)
