LARGER injects call-graph neighbors into grep and lifts LocBench Acc@5 from 74.1 to 87.0

LARGER: Lexically Anchored Repository Graph Exploration and Retrieval

Yuntong Hu, Tongli Su, Liang Zhao, Bowen Zhu, Hasibul Haque

cs.IR, cs.AI, cs.LG

2026-05-08

LARGER appends call-graph neighbors to grep hits instead of adding a graph tool. LocBench file Acc@5 rises from Codex 74.1% to 87.0%, with wall-clock time roughly halved.

What problem this solves

Repo-level agents have to localize first. CLI tools such as Claude Code and Codex grep, which is fast and blind to imports, call chains, type hierarchies, and code-test links. Graph agents such as LocAgent add new graph actions, which raises recall and splits the loop into "query the graph, then search text." The question here is whether structural neighbors can ride along without a new tool or a graph database.

The paper calls this lexically anchored structural localization: the agent's own grep is the anchor, and the graph writes a confidence-filtered local neighborhood back into that same search output.

Method

The repo is a heterogeneous graph of directories, files, classes, and functions, with contains, imports, invokes, and cross-artifact links (source-to-test, source-to-docs). Edges carry provenance confidence; community detection supplies a subsystem prior. The graph lives in a sidecar and is lazily aligned on commit diffs, re-parsing only changed files.

At each step the policy still issues an ordinary search. Hits align to nodes and become the active set. For each anchor, the K-hop neighborhood is filtered by confidence θ and the top-k neighbors are appended as a fixed grep block (related files, cluster, callers/callees, flow). Defaults are k=10 and θ=0.5. Graph text is generated from the index, not rewritten by an LLM.

Two conservative claims follow. Under a shared policy, graph-augmented context is a superset of lexical context, so recall cannot fall. Extra tokens per step are bounded by mk nodes, and fewer steps can dominate total cost.

Results

In-house methods use GPT-5.2; Claude Code uses Opus-4.6, so absolute scores are not comparable. LocBench has 560 issues; MuLocBench has 1,100 multi-file issues. Acc@k requires every gold file in the top-k.

MethodLocBench Acc@5MuLocBench Acc@5
BM2549.324.5
LocAgent65.325.7
Codex74.150.0
Claude Code75.254.9
LARGER Fixed87.055.7
LARGER Tuned89.160.0

Fixed versus Codex: LocBench Acc@5 +12.9, Recall@5 90.1 vs 82.8. MuLocBench Acc@5 +5.7, Acc@1 -0.6 (27.4 vs 28.0). Claude Code still leads MuLocBench Acc@1 at 29.2. Tuned is a per-repo hyperparameter oracle and should be read as a ceiling.

Matched on/off ablations raise Recall@5 and cut wall-clock time. Versus Codex, MuLocBench goes from 139.9 s / 521.8K tokens to 99.9 s / 353K; LocBench Acc@5 74.1 to 87.0, time 129.2 s to 60.0 s. Graph baselines CoSIL and LocAgent both trail the strongest non-graph agents. The authors' reading: graph evidence helps only inside the existing search channel.

On SWE-Atlas, Codebase QA is 32.25 vs Codex 29.83 vs Claude 31.20; Test Writing 37.78 vs 32.22 vs 36.67. Those are rubric scores, not accuracy. MuLocBench Acc@5 drops from 55.7 to 48.2 without graph expansion (-13.5%), to 53.1 without confidence, 53.4 without communities, and 46.8 with all graph modules removed.

Why it matters

Structural signal can be a comment on grep rather than a new action. For teams already on Claude Code or Codex, this is the smallest hook: build a sidecar once, leave the tool set alone. A dozen Acc@5 points on LocBench and about half the wall-clock time suggest that fewer detours beat extra neighbors.

Do not ship the Tuned number. Fixed is the reproducible operating point. The MuLocBench Acc@1 miss versus Claude Code is real: the gain is filling a short candidate list, not winning rank one every time.

Limitations

There is no standalone Limitations section. The visible bounds: MuLocBench Acc@1 still trails; Tuned is a per-repo oracle; SWE-Atlas uses rubric LLM judges, a different scale from localization Acc; graph quality tracks multi-language AST, edge confidence, and communities, and a bad parse writes junk into grep; in-house runs share GPT-5.2 and cannot be compared absolutely with Opus-4.6 Claude Code; the recall argument assumes a relevant node sits within K hops of a lexical anchor above θ, so a wrong anchor gets no help.

Terms

Source

What people are saying

Related papers

All paper explainers