Manuscript Offprint
arXiv:2610.33958How Do Small Coding Agents Use Code Graphs and Embeddings?
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
Coding agents are given embedding search and code-graph tools on the premise that a repository’s structure is something the model lacks and the tool supplies. We test that premise on SWE-bench Verified with small open-weight models. First, we label all 500 tasks with a deterministic hop depth: the shortest code-graph path from code the issue mentions to code the gold patch changes (186/128/78/76 tasks at hop 0/1/2/3+). With repository, tool-set and patch-size controls, each extra hop multiplies the odds of correct function-level localization by 0.47–0.55 for Qwen3–4B, Qwen3–8B, Gemma 4 E4B and Qwen3–32B, and by 0.50–0.67 at each of six Qwen3 sizes from 0.6B to 32B. Second, we ablate a localization agent’s tool set (grep only; +embedding search; +graph tools; all) on a depth-balanced 160-task split and on all 500 tasks for ten models (79k episodes). Structured tools double grep-only accuracy for Qwen3–8B and Gemma 4 E4B; their gain peaks at 17–21 points at 1.7–4B and falls to 4–5 points at 32B (odds ratio 0.77–0.82 per doubling of parameters). From 8B up, about half of that gain is the form of the submission rather than finding the target; the fall from 14B to 32B is a fall in tool uptake at equal grep-only accuracy; and the same 4B size gains or does not gain from a tool depending on the checkpoint. Traces show the graph tools’ gain is name lookup at hop 0 and one expansion at hop 1: agents chain expansions in 12–14% of episodes and never flatten the depth gradient. A fixed repair model resolves 6–13 of 160 tasks from these localizations (oracle 26). Third, linear probes find direct call edges decodable under a within-anchor, degree-stratified protocol (AUC 0.74), but below a lexical baseline (0.99), with two-hop edges at 0.57. Small agents carry a one-hop, largely lexical picture of their repository, in weights and in use. We release the labels, scripts, logs and traces.
1 INTRODUCTION
Resolving a GitHub issue in a large repository starts with finding the code that has to change. Agentic systems for this localization step increasingly ship with structured tools: dense retrievers over function bodies, and query interfaces over a static code graph whose nodes are files, classes and functions and whose edges record containment, imports, calls and inheritance (Chen et al., 2025a; Yu et al., 2025; Jiang et al., 2025; Yang et al., 2025). The working assumption behind these tools is simple. An issue names some code; the fix lives some distance away along the dependency structure; a plain text search cannot bridge that distance, so the agent needs either a semantic index (to jump directly to code that means the right thing) or a graph (to walk to it). LocAgent (Chen et al., 2025a) made the assumption measurable by scoring SWE-bench tasks by the hop distance between the functions an issue mentions and the functions the patch edits, and reported that graph-guided agents degrade least as that distance grows. CodeAnchor (Lin et al., 2026) observed that SWE-bench Lite and Verified contain mostly one- and two-hop faults, and argued that evaluating structure-aware agents properly “requires a benchmark that sorts tasks by structural depth”.
This paper takes that argument seriously and asks three questions that the existing literature leaves open, using small open-weight models where the behaviour is cheap to measure many times over and where tool support plausibly matters most.
Part 1. Is structural depth a usable difficulty axis? We compute, for every SWE-bench Verified task, a deterministic hop depth on a LocAgent-style graph built at the task's base commit (Section 3). Unlike LocAgent's measurement, which extracted mentions with GPT-4o, ours uses only regular expressions and the Python ast module, so it can be re-run, audited and varied. We ask how the 500 tasks are distributed over depth, whether depth predicts whether an agent localizes the fix after controlling for repository, tool set, number of gold functions and patch size (DEPTHGEE), how sensitive the label is to the two measurement choices that matter—how calls are resolved and how mentions are extracted (LABELVAR)—and we release the labelled split.
Part 2. What do grep, embedding search and graph tools each contribute? On a 160-task subset balanced over depth we run a localization-only agent whose arms differ only in their tool set: G (grep, read_file, list_dir), E (G + embedding search over function and class texts), T (G + a name lookup and a one- or two-hop neighbourhood query over the graph) and ET (all tools) (Section 4). We measure accuracy by depth, run-to-run variance under sampling, which tool first exposes the gold code and whether exposure converts into a correct submission, sensitivity to retrieval quality, the effect of forcing the structured tool to be used, the effect of a larger step and context budget, and—because localization is only useful if it leads to a fix—how many issues one fixed repair model resolves when given each arm's localizations (Section 5). We then rerun the four arms on all 500 tasks across a model-size curve: six Qwen3 sizes from 0.6B to 32B with five decodings each, an FP8 precision control, and three Gemma 4 sizes (Section 5.4).
Part 3. Does the model represent the repository’s graph internally? The “Thousand-Graph Hypothesis” (Ding, 2026) proposes that an entity-only index suffices because self-attention materialises whatever relation a task needs; a recent probe shows that the runtime tool-call dependency structure of an agent is linearly decodable from Qwen3-32B residual streams (Sun & Kazakov, 2026). Neither probes the repository’s own call and inheritance graph. We do, with linear probes on definition-level activations, first in static file contexts (GLOBALPROBE, ANCHORPROBE) and then inside real agent conversations (CONVPROBE). The design is driven by a negative result we obtained early on: a global pair probe reaches AUC 0.75–0.80 for call edges, but so does a probe that sees only one of the two definitions, and so does the in-file in-degree of the callee. Linked and unlinked pairs differ in properties of a single node. We therefore introduce a within-anchor ranking protocol with an in-degree-binned stratification that a node-level shortcut cannot pass, with bootstrap intervals over anchors and a lexical name-match baseline (Section 6).
Findings. The answers are consistent across two model families and six sizes, and point in one direction.
• Hop depth is a strong, controlled predictor of failure. Each extra hop multiplies the odds of correct function-level localization by 0.47 (Qwen3-4B, three runs), 0.47 (Qwen3-8B), 0.54 (Gemma 4 E4B, three runs) and 0.55 (Qwen3-32B, all 500 tasks), with all ; across the scale curve the per-hop odds ratio is 0.50–0.67 at every size and barely changes with size. The label barely moves under alternative call resolution ( ). It is, however, sensitive to mention extraction: a strict extractor that counts only back-ticked code and traceback frames leaves 311 of 500 tasks without a mention.
• For Qwen3-8B and Gemma 4 E4B, grep alone is a weak baseline (12.8% and 9.6% function Acc@10) that any structured tool roughly doubles. For Qwen3-4B the embedding tool adds nothing (-1.1 points) and the graph tools add +8.1 points ([3.0, 13.5]). In every model, the graph-tool advantage is largest at hop 0, where the issue names the target and find_entity resolves the name directly, and at hop 1, where one graph_neighbors expansion reaches it; at hop 2+ the gain shrinks or vanishes, and in a GEE interaction model the depth slope of T is never significantly flatter than that of G (it is steeper in the Qwen models) while E has the flattest slope. Small graph-tool agents do not walk the graph; they look names up and expand once. Over the scale curve, the structured tools' gain over grep rises from 7–9 points at 0.6B to 17–21 at 1.7–4B and falls to 4–5 at 32B (odds ratio 0.77–0.82 per doubling of parameters); from 8B up about half of that gain is the form of the submission (exact ids) rather than discovery; the fall from 14B to 32B happens at equal grep-only accuracy and is a fall in tool uptake (find_entity called in 96% of episodes at 14B, 45% at 32B), not an FP8 artifact; and the same 4B size gains +17.6 points from embedding search under one checkpoint and nothing under another.
• Grep-only Qwen3-8B collapses into search loops (10 grep calls per episode, 40% of episodes hit the step cap, 41% never submit); a 50-step, 40k-token budget does not rescue it. Graph tools also change the form of what the agent submits: 85% of its top-5 function strings are exact entity ids, against 47% with grep only, which matters downstream.
• Downstream, the localizations of G/E/T/ET lead a fixed Qwen3-8B repair prompt to 6/13/12/13 resolved tasks of 160 (oracle locations: 26). Resolution is almost entirely conditional on correct localization (24–27% versus 1–2%).
• Inside the model, direct call edges are linearly decodable within anchor and in-degree bin (AUC 0.74 and 0.68 on the two held-out folds for Qwen3-4B; 0.73 and 0.66 for Qwen3-8B) and remain so inside agent conversations (0.61–0.66) including for edges no tool printed (0.59–0.60); but a one-line lexical baseline reaches 0.99, two-hop edges with the lexical cue removed reach only 0.57, and inheritance is not decodable beyond one-sided information. What is in the weights is a shallow, mostly lexical picture of direct dependencies.
Contributions. (i) A deterministic, released hop-depth labelling of SWE-bench Verified with a validated difficulty analysis and a robustness study of the label itself (Section 3). (ii) A controlled, depth-stratified tool ablation with trace-level mechanism analysis, variance, forced-use, budget, retrieval-quality and downstream-repair experiments, and a full-benchmark scale curve over ten models (six Qwen3 sizes from 0.6B to 32B with five decodings each, an FP8 control and three Gemma 4 sizes; 79k episodes) with a canonical rescoring that separates discovery from the form of the submission (Section 5). (iii) A within-anchor, degree-stratified probing protocol for relational structure, with the negative control that motivates it, applied both to static code and to activations taken inside agent conversations (Section 6). (iv) A synthesis: with small models, the benefit of “structure” tools is exact-name resolution plus one hop, which is also the extent of the structure the models appear to carry internally, and which shrinks with scale as the models stop calling the tools; deeper tasks are failed by every arm at every size (Section 7).
All numbers in this paper are computed from the episode logs, traces, probe scores and harness reports described in the reproducibility statement; the depth labels, source code, raw result files and analysis scripts are public (see the reproducibility statement).
Embeddings that know about structure. SpIDER (Chaudhari et al., 2025) adds graph-neighbourhood information to dense retrieval for issue localization; Meta-RAG (Tawosi et al., 2025) retrieves over LLM summaries of code; ProjAgent (Chen et al., 2026) retrieves by procedural similarity for repository-level generation; CORE-Bench (Zhang et al., 2026a) and Agent Retrieval Bench (Qin & Xie, 2026) evaluate repository retrieval for agents; Oskooei et al. (2026) compare a vector index with grep-style agentic search for repository QA. Our embedding arm uses a standard instruction-tuned embedder (Qwen3-Embedding-0.6B) over function and class texts without structural augmentation, which is the configuration whose contribution we want to isolate; the WEAKEMB experiment (Section 5.6) swaps in a weak static embedder to measure how much of the arm's effect is retrieval quality.
How structure is shown to the agent. RepoNav (Chai et al., 2026) reorganises flat snippet retrieval into a file-centred scaffold and finds that the organisation of structure helps beyond its volume (File-Only 32.6% → Inline 47.0% → Tree 52.1% function Acc@5). CodeAnchor (Lin et al., 2026) and LARGER (Hu et al., 2026) inject structure into grep results instead of adding tools. Rendering the repository as an image also helps (Ma et al., 2026); incremental code indexes can silently serve wrong graphs (Yu et al., 2026); context files did not measurably move correctness in a two-agent ablation (Khatri, 2026); ontology-grounded project memory exposes design rationale as a knowledge graph (Adam, 2026). DeepRepoQA (Peng et al., 2026) and agentic code reasoning with semi-formal certificates (Ugare & Chandra, 2026) target understanding rather than localization. Our T arm presents structure in the plainest way (one line per edge, truncated at 50 lines), and our trace analysis (Section 5.5) shows which of those lines the agent actually acts on.
Do models represent the graph internally? The Thousand-Graph Hypothesis (Ding, 2026) proposes that an entity-only index suffices because self-attention materialises task-specific relations; its two-layer index reaches 95.6% on SWE-bench Verified with DeepSeek-V4-Flash, but the author notes this “does not directly verify the latent graph realized inside the model”. Sun & Kazakov (2026) decode an agent’s runtime tool-call dependency graph from Qwen3-32B residual streams above random-label and positional controls, and are careful that their “claims concern representation, not behavioural control”. Neither probes the repository’s call or import graph. Our probes do, and the protocol we arrive at—within-anchor ranking with degree stratification, a permuted-label control and a lexical baseline—is a direct response to the node-level confounds we document in Section 6.2. The general concern that pair probes can be solved by single-item features is the relational analogue of the selectivity argument of Hewitt & Liang (2019).
Controlled difficulty. CABRA (Balepur et al., 2026) builds synthetic tasks as call-graph transformations and finds that agents stay near-perfect as task size grows because they offload to tools such as grep, and that tool-call counts predict SWE-bench Verified accuracy better than lines edited. CodeAnchor (Lin et al., 2026) observes that SWE-bench Lite and Verified mostly contain one-and two-hop faults. Our depth labels quantify that observation on Verified (67% of tasks with a mention are at hop 0 or 1) and supply the sorted benchmark CodeAnchor asks for. Graph retrieval for repository-level code generation is adjacent but not our topic (Li et al., 2025; Wang et al., 2025b; Liu et al., 2026; Le-Anh et al., 2026; Li et al., 2026; Bai et al., 2026).
3 PART 1: HOP DEPTH AS A DIFFICULTY AXIS
3.1 CODE GRAPH
For each SWE-bench Verified (Jimenez et al., 2024; OpenAI, 2024) instance i we check out the repository at its base_commit and parse every .py file with the Python ast module (files that fail to parse contribute a file node only). The result is an undirected, typed multigraph
following LocAgent (Chen et al., 2025a). A function or class node is identified by its path and qualified name, path/to/mod.py:Class.method; its span is the line range of the definition including decorators. Edges are produced as follows.
• CONTAIN: file → top-level definition, class → member, for definitions nested in if/try/with/for/while blocks as well.
• IMPORT: file → file for every import m or from m import x, resolving relative imports from the importing module's package; a dotted module is shortened to its longest prefix that is a file in the snapshot, and self-imports are dropped.
• INVOKE: function → definition for every ast.Call whose callee is a bare name or an attribute. Resolution is by name with a fixed preference order: a self.x() / cls.x() call prefers methods of the enclosing class; otherwise definitions in the same file; otherwise definitions in the module that from-imported the name; otherwise every definition of that name in the repository, provided there are at most of them (ambiguous names are dropped).
• INHERIT: class → class for each base expressed as a name or attribute, resolved the same way and kept only if the target is a class.
Snapshots are large: a mean of 26,242 nodes and 232,915 edges (median 34,919 and 183,269; maximum 45,677 and 1,024,494). Name-based resolution is deliberately cheap; its consequences are measured in Section 3.5.
3.2 TARGETS, MENTIONS AND DEPTH
Definition 1 (Targets). Let be the gold patch. For each removed line at old-side line number in file , and for each added line at the old-side position before it, the target is the innermost definition with and (the file node if the line is at module level). is the set of all such targets.
Definition 2 (Mentions). Let be the issue text. A mention is a token produced by one of six regular-expression patterns: back-ticked spans, identifiers immediately followed by (, traceback frames File "...py", line n, in f, dotted names, snake_case names and CamelCase names; every token is further split into identifier-like pieces. A token ending in .py maps to every file whose path equals or ends with it; any other token of length maps to every definition with that short name, unless more than definitions share it, in which case it is treated as too generic and discarded. is the set of mentions, each a set of nodes .
Definition 3 (Hop depth). Let be the undirected shortest-path length in over a chosen edge-type subset. The depth of a task is
computed by a breadth-first search from . The bucket is hop0/hop1/hop2/hop3+ for hop_i = 0, 1, 2, 3; no_mention if or ; unreachable if no mention is connected to any target. For comparison we also compute LocAgent's with the per-mention minimum distance, and the mean per-mention distance.
Hop 0 means the issue names a definition the patch changes (every hop-0 task has at least one mentioned target, and no task in a deeper bucket does). Hop 1 means the nearest mentioned definition is one containment, import, call or inheritance edge away: a method of a mentioned class, a function in a mentioned file, a callee of a mentioned function. Depth is computed from the issue text and the gold patch, so it must never be shown to a system under evaluation; it is a property of the task, not of any agent's path.
3.3 DISTRIBUTION OF DEPTH ON SWE-BENCH VERIFIED
Fig. 1a gives the distribution: 186 tasks at hop 0 (37.2%), 128 at hop 1 (25.6%), 78 at hop 2 (15.6%), 76 at hop 3+ (15.2%), 31 without a usable mention (6.2%) and one unreachable. Two thirds of the tasks with a mention (314/469) are therefore within one edge of something the issue names, which quantifies CodeAnchor's observation that the benchmark “mostly contains 1–2 hop faults” (Lin et al., 2026). The distribution differs by repository (Table 11, appendix): Django, which contributes 231 tasks, is 87/64/29/38 over the four buckets, while Sphinx is skewed deep (2/5/11/17) and scikit-learn shallow (20/9/3/0).
Fig. 1b shows what each edge type contributes. With CONTAIN edges only, 128 of the 469 tasks are unreachable (the mention and the target are in different files); adding INVOKE edges connects all but 5, adding IMPORT all but 12, adding INHERIT all but 64; all four together leave one. The mean depth under all edges is 1.17 (median 1); under containment plus calls 1.18; plus imports 1.57; plus
(a) Hop-depth buckets (n = 500)
(b) Bucket by edge set (469 tasks with a mention)

hop bucket
Figure 1: Hop depth on SWE-bench Verified. (a) Default label (all four edge types). (b) The same 469 tasks with a mention and a target, re-labelled with containment edges only and with containment plus one other edge type; grey segments are tasks whose mentions are disconnected from the targets under that edge set. Calls are the edge type that connects most tasks; imports and inheritance alone leave 12 and 64 tasks unreachable respectively.
inheritance 1.64. Along the default label, the mean number of targets falls with depth (2.34, 2.44, 1.73, 1.57 at hop 0–3+) and so does the number of mentions (8.56, 6.48, 7.15, 3.67): deep tasks are typically single-function fixes described by issues that name little code. LocAgent's averages 0.49, 0.35, 0.27 and 0.21 over the buckets.
3.4 DOES DEPTH PREDICT LOCALIZATION FAILURE? (DEPTHGEE)
We fit a population-averaged logistic model on the episodes of the agent experiments of Section 5. For episode of task with tool set , outcome is function Acc@10 (Section 4.4), and
where , is a treatment coding of the arm with as reference, codes the repository with repositories contributing fewer than 40 episodes pooled into “other”, is the number of function-level gold targets and the number of changed lines in the gold patch. The model is estimated by generalised estimating equations (Liang & Zeger, 1986) as implemented in statsmodels (Seabold & Perktold, 2010) (binomial family, exchangeable working correlation) with episodes clustered by task, so that repeated runs of the same task and the four arms on the same task do not count as independent. We report , the multiplicative change in the odds of success per additional hop, with a robust 95% interval, with and without the control block. Tasks a label variant places in no_mention or unreachable are dropped from that fit.
Table 1 shows that depth is a strong predictor. Under the default label with controls, each additional hop multiplies the odds of correct function-level localization by 0.472 [0.345, 0.644] for Qwen3-4B, 0.468 [0.334, 0.655] for Qwen3-8B, 0.544 [0.387, 0.766] for Gemma 4 E4B and 0.552 [0.453, 0.671] for Qwen3-32B on all 500 tasks. Adding the controls makes the estimate stronger, not weaker, in every model, so depth is not a proxy for repository, patch size or number of targets. The control coefficients themselves are small and not significant (OR per gold function 0.44–0.72, per log patch line 0.58–1.01, all p > 0.07 except patch size for the 32B model, 0.67, p = 0.022), and the arm coefficients reproduce the ablation results of Section 5 (for Qwen3-8B: E 2.83, T 2.40, ET 3.43 relative to G, all p < 10 ). The appendix (Table 12) reports an interaction model, hop × arm, which we use in Section 5.1 to ask whether any tool set flattens the depth gradient. The scale curve of Section 5.4 extends the estimate to six Qwen3 sizes on all 500 tasks: with the arm as a control, the odds ratio per hop is 0.50–0.67 at every size from 0.6B to 32B, all p < 10 (Table 18).
3.5 SENSITIVITY OF THE LABEL TO MEASUREMENT CHOICES (LABELVAR)
The two choices most likely to move a label are how a call is resolved and what counts as a mention. We recompute every label under three variants and refit Eq. (3) for each (Table 1, lower rows of each block):
• strict_resolve: ; a call or base resolves by repository-wide name only if the name is unique (same-file and same-class resolution still apply).
Table 1: DEPTHGEE / LABELVAR: odds ratio per additional hop for function Acc@10, from the GEE model of Eq. (3), for the default label and three measurement variants. “plain” includes only hop and arm; “controls” adds repository, number of gold functions and log patch size. Qwen3-4B and Gemma 4 E4B pool three runs (temperature 0 and two seeds at 0.7) on the 160-task subset; Qwen3-8B uses one temperature-0 run on the subset; Qwen3-32B uses one temperature-0 run on all 500 tasks (457 bucketed tasks with function-level gold); the “(500)” rows refit the Qwen3-4B and Qwen3-8B greedy runs on the same 500 tasks (Section 5.3). is the number of episodes, the number of tasks.
| Model | Label variant | plain | controls | ||||
|---|---|---|---|---|---|---|---|
| OR [95% CI] | p | OR [95% CI] | p | ||||
| Qwen3-4B | default | 1872 | 156 | 0.523 [0.401, 0.682] | 0.472 [0.345, 0.644] | ||
| strict_resolve | 1872 | 156 | 0.537 [0.414, 0.696] | 0.474 [0.353, 0.636] | |||
| loose_resolve | 1872 | 156 | 0.518 [0.393, 0.682] | 0.467 [0.338, 0.645] | |||
| strict_mentions | 612 | 51 | 0.657 [0.428, 1.008] | 0.054 | 0.553 [0.344, 0.888] | 0.014 | |
| Qwen3-8B | default | 624 | 156 | 0.547 [0.403, 0.744] | 0.468 [0.334, 0.655] | ||
| strict_resolve | 624 | 156 | 0.546 [0.408, 0.732] | 0.464 [0.338, 0.636] | |||
| loose_resolve | 624 | 156 | 0.549 [0.400, 0.753] | 0.470 [0.333, 0.663] | |||
| strict_mentions | 204 | 51 | 0.565 [0.351, 0.910] | 0.019 | 0.419 [0.218, 0.803] | 0.0088 | |
| Gemma 4 E4B | default | 1872 | 156 | 0.571 [0.430, 0.758] | 0.544 [0.387, 0.766] | ||
| strict_resolve | 1872 | 156 | 0.558 [0.427, 0.729] | 0.529 [0.385, 0.729] | |||
| loose_resolve | 1872 | 156 | 0.579 [0.433, 0.774] | 0.551 [0.388, 0.783] | |||
| strict_mentions | 612 | 51 | 0.767 [0.500, 1.176] | 0.22 | 0.681 [0.444, 1.044] | 0.078 | |
| Qwen3-4B (500) | default | 1828 | 457 | 0.537 [0.459, 0.628] | 0.469 [0.393, 0.561] | ||
| strict_mentions | 740 | 185 | 0.714 [0.582, 0.875] | 0.0012 | 0.666 [0.538, 0.824] | ||
| Qwen3-8B (500) | default | 1828 | 457 | 0.535 [0.448, 0.639] | 0.478 [0.396, 0.578] | ||
| strict_mentions | 740 | 185 | 0.659 [0.527, 0.825] | 0.654 [0.513, 0.833] | |||
| Qwen3-32B | default | 1828 | 457 | 0.593 [0.500, 0.704] | 0.552 [0.453, 0.671] | ||
| strict_resolve | 1828 | 457 | 0.587 [0.498, 0.692] | 0.541 [0.449, 0.653] | |||
| loose_resolve | 1828 | 457 | 0.592 [0.496, 0.706] | 0.549 [0.449, 0.673] | |||
| strict_mentions | 740 | 185 | 0.784 [0.627, 0.980] | 0.033 | 0.817 [0.632, 1.056] | 0.12 | |
-
loose_resolve: .
-
strict_mentions: only back-ticked spans and traceback frames count as mentions, and .
Call resolution barely matters. Strict resolution keeps the bucket of 97.4% of the 500 tasks (Cohen's ; over the 468 bucketed tasks, 97.2%, ) and moves 34 tasks deeper and none shallower, as it must since it only removes edges; loose resolution keeps 98.6% ( ) and moves 11 tasks shallower. The odds ratios change by at most 0.02 in any model. Mention extraction matters. The strict extractor leaves 311 tasks without any mention: most issues describe their problem with prose identifiers (“the Model.save method”, “QuerySet.values_list”) rather than back-ticks or tracebacks. Where it keeps a mention, it agrees with the default bucket on 65.2% of tasks ( ) and is never shallower (71 tasks move deeper, because a dropped mention can only lengthen the minimum path). On the 51 evaluated tasks that keep a mention, the controlled odds ratios are 0.55, 0.42 and 0.68 (the last, for Gemma, not significant at n = 612 episodes), and 0.82 for Qwen3-32B on the 185 tasks that keep a mention (p = 0.12). The default extractor is therefore the one we release and use throughout, and the labels should be read as optimistic: an ambiguous name counts its closest definition and dynamic dispatch is invisible, so the true distance is at least the labelled one.
3.6 RELEASE
The depth-labelled split (swebench-verified-hop-depth , also included with this submission as ancillary files) contains one row per task with the default bucket and hop, the hop under each edge set, LocAgent's , graph sizes, and the three variant labels, together with the labelling scripts (hop_depth.py, c3_robustness.py), the analysis script (c2_depth_model.py), the refit output and a dataset card with the caveats above. Section A lists the per-repository distribution.
https://github.com/SauravBellam/swebench-verified-hop-depth
4 PART 2: TOOL ABLATION—SETUP
4.1 TASK AND EVALUATION SUBSET
The agent solves localization only: it reads the issue and must call submit once with a ranked list of up to ten locations, each path.py:QualifiedName or path.py for module-level code. No patch is written. We draw a fixed, seeded subset of 160 tasks, 40 from each of the four hop buckets, from the 468 bucketed tasks; 156 of them have at least one function-level gold target (the other four are module-level patches and are scored on file accuracy only). The subset spans eleven repositories (Django 80, SymPy 23, Sphinx 17, Matplotlib 13, scikit-learn 7, xarray 6, Astropy 5, pytest 4, Requests 3, seaborn 1, pylint 1) and has a mean of 1.89 function-level gold targets per task (median 1, maximum 15). The budget experiment (BUDGET) uses 20 tasks per bucket (80 tasks, 78 with function gold) drawn from the same seed.
4.2 TOOLS AND ARMS
Every arm has the three text tools; the structured arms add one or two more. Tool outputs are lists of lines; each line carries the set of graph nodes it exhibits, which is what makes the trace analysis of Section 5.5 exact.
• grep(pattern, path_prefix): regular-expression search over all .py files, up to 40 path:line: text matches; a line exhibits the innermost definition containing it.
• read_file(path, start, end): numbered lines, at most 120 per call; each line exhibits its innermost definition.
• list_dir(path): up to 100 children of a directory; exhibits nothing.
• semantic_search(query) (arms E, ET): the ten function or class nodes whose text is closest to the query under Qwen3-Embedding-0.6B (Zhang et al., 2025) (last-token pooling, L2-normalised, index text = node id plus the first 40 lines of the definition; query prefixed with the retrieval instruction “Given a description of a software issue, retrieve the code that is relevant”). Each hit is one line, id signature, and exhibits that node.
• find_entity(name) (arms T, ET): up to 20 nodes whose qualified name equals, ends with .name, or whose short name equals the query; one line per hit with its signature.
• graph_neighbors(entity, hops) (arms T, ET): breadth-first expansion of the graph of Section 3.1 from a node id (or a unique suffix of one) for one or two hops, in both directions, one line per edge of the form [hop h] u -calls-> v signature, truncated at 50 lines (in practice the 4,000-character observation budget of Section 4.3 binds first). Relations are rendered as contains / calls / imports / inherits and their inverses.
• submit (locations): ends the episode.
Arms: ; ; ; . The system prompt and tool schemas are reproduced in Section F.
4.3 HARNESS
Models (Qwen Team, 2025) are served with vLLM (Kwon et al., 2023) through the OpenAI chat-completions interface with native tool calling (hermes parser for Qwen, gemma4 parser for Gemma). Unless stated, decoding is greedy (temperature 0), the step cap is 30 tool calls, and the context window is 32k tokens. Qwen3-8B and Gemma are run with thinking disabled. Two harness rules were found necessary in a pilot and are used in every reported run:
-
Forced tool call after a bare turn. If a turn contains no tool call, the harness replies “Use a tool, or call submit with your ranked locations” and sets tool_choice=required for the next turn. Without this, greedy decoding frequently repeats the same tool-less message until the step cap; the first full run without the rule (ABL-4B-PREFIX) is reported in Table 14 for completeness and is otherwise not used.
-
Observation budget. Tool output is truncated at 4,000 characters. A node counts as revealed only if it is on a line the model actually received; truncated lines reveal nothing.
Every step is logged with the tool, its arguments, the output as shown, the revealed nodes, the revealed gold nodes, token counts and wall-clock time, and the complete message list is saved as a trace. Invalid JSON arguments are replaced by an error observation; an exception from the server (context overflow, timeout) ends the episode. Options used by individual experiments: -temperature/-seed (SEEDS), -force-first (FORCETOOL), -max-steps (BUDGET), -embedder potion (WEAKEMB).
4.4 METRICS
Let be the submitted list, its function-level entries (those containing “:”) in order, the function-level gold targets and the set of gold files. A submitted string matches a gold if , or one is a qualified-name prefix of the other (so submitting a class counts for a method of it and vice versa). Then
where is the set of nodes revealed at step and files( ) the deduplicated file prefixes of . We also record the first step at which a gold node is revealed, the submit rate, the number of steps and total tokens. function Acc@10 is the primary metric: it requires every gold function to be in the top ten, which is the quantity a repair stage needs.
4.5 EXPERIMENTS
Table 2 lists the runs and the identifiers used for them in the rest of the paper. The primary comparison is one greedy run of all four arms on the 160 tasks for Qwen3-4B-Instruct-2507 (ABL-4B), Qwen3-8B (ABL-8B), and Gemma 4 E4B-it (ABL-GEMMA). The Gemma runs cover all 500 tasks and are reported on the 160-task subset unless stated. ABL-32B runs the four arms with Qwen3-32B (the official FP8 checkpoint, non-thinking) on all 500 tasks, and ABL-4B-500 and ABL-8B-500 complete the Qwen3-4B and Qwen3-8B greedy runs on the 340 tasks outside the subset, so that the three Qwen sizes can be compared on the full benchmark. SEEDS adds two runs at temperature 0.7 with seeds 1 and 2 for Qwen3-4B, Qwen3-8B and Gemma 4 E4B, so that every comparison for those three models can be made on three runs. TRACES is a trace analysis of those runs. WEAKEMB replaces the embedder in arm E with a weak static model (model2vec potion-base-8M (Tulkens & van Dongen, 2024), mean of static token vectors, 256-d, no instruction prefix) for Qwen3-8B. FORCETOOL forces the first tool call of arm E to be semantic_search and the first two calls of arm T to be find_entity then graph_neighbors, with a 256-token cap and one retry on the forced call. BUDGET raises the step cap to 50 and the context window to 40,960 tokens for arms G and ET of Qwen3-8B on 80 tasks. REPAIR feeds each ABL-8B episode's localizations to a repair model and scores the patches with the official SWE-bench harness (Section 5.9). SCALECURVE reruns the four arms on all 500 tasks for six Qwen3 sizes (0.6B–32B, greedy and four seeds at T=0.7), Qwen3-14B-FP8 (greedy and two seeds) and Gemma 4 E2B, E4B and 12B, on a newer build of the same harness (Section 5.4).
4.6 STATISTICS
Within a run, arms are compared on the same tasks with an exact McNemar test on per-task function Acc@10 (the binomial test on the discordant pairs). Across the three Qwen runs we average each task's outcome over runs and report the mean and a 95% percentile bootstrap interval over tasks (5,000 resamples) for each arm and for each paired difference. The depth analysis uses the GEE model of Eq. (3). We do not correct for multiple comparisons; the number of tests is modest and we report all of them.
Table 2: Agent runs and their identifiers. All runs use the 160-task depth-balanced subset unless noted; “4 arms” is G, E, T, ET. The L4 is a GCP g2-standard-16 VM; the A100s (40 or 80 GB) are Colab instances.
| ID | Model | Setting | Hardware |
|---|---|---|---|
| ABL-4B | Qwen3-4B-Instruct-2507 | tool ablation: 4 arms, | L4 |
| ABL-8B | Qwen3-8B (non-thinking) | tool ablation: 4 arms, | A100 |
| ABL-GEMMA | Gemma 4 E4B-it | tool ablation: 4 arms,, gemma4 tool parser; all 500 tasks | A100 |
| ABL-32B | Qwen3-32B (FP8, non-thinking) | tool ablation: 4 arms,; all 500 tasks | A100 80GB |
| ABL-4B-500, ABL-8B-500 | Qwen3-4B, Qwen3-8B | 4 arms,, the 340 tasks outside the subset (with ABL-4B/ABL-8B: all 500) | A100 80GB |
| SEEDS | Qwen3-4B, Qwen3-8B, Gemma 4 E4B | run-to-run variance:4 arms,, seeds 1 and 2 (Gemma: all 500 tasks) | L4 / A100 |
| TRACES | — | trace analysis of ABL-4B, ABL-8B, SEEDS | CPU |
| WEAKEMB | Qwen3-8B | retrieval quality:arm E with potion-base-8M instead of Qwen3-Embedding-0.6B | A100 |
| FORCETOOL | Qwen3-4B, Qwen3-8B | forced use: arms E,T; first call(s) forced to the structured tool | L4 / A100 |
| BUDGET | Qwen3-8B | step/context budget:arms G, ET; 80 tasks; 50 steps; 40,960-token context | A100 |
| REPAIR | Qwen3-8B (repair) | downstream repair:top-5 locations of each ABL-8B episode; official harness | A100 + L4 |
| SCALECURVE | Qwen3 0.6B–32B, Gemma 4 | scale curve: 4 arms,all 500 tasks; six Qwen3 sizes (0.6B, 1.7B, 4B hybrid, 8B, 14B, 32B-FP8) at and seeds 1–4;Qwen3-14B-FP8 and Gemma 4 E2B/E4B at and seeds 1–2; Gemma 4 12B at only (partial) | A100 80GB |
5 PART 2: TOOL ABLATION—RESULTS
5.1 WHAT EACH TOOL SET CONTRIBUTES (ABL-4B, ABL-8B, ABL-GEMMA)
Table 3 gives the primary greedy runs and Table 4 the three-run estimates. Three patterns hold.
Table 3: Tool ablation, primary greedy runs (160 tasks; function Acc@10 and recall over the 156 tasks with function-level gold). Steps and submit rate are per episode. The last columns give exact McNemar -values against G (discordant counts in parentheses, arm-only wins / G-only wins) on function Acc@10.
| Model | Arm | function Acc@10 | func. recall@10 | file Acc@5 | steps | submit | vs. G (wins) |
|---|---|---|---|---|---|---|---|
| Qwen3-4B (ABL-4B) | G | 24.4 | 28.1 | 53.1 | 7.8 | 0.975 | — |
| E | 23.1 | 27.6 | 56.2 | 8.8 | 0.956 | ||
| T | 30.8 | 35.2 | 56.9 | 8.5 | 0.994 | ||
| ET | 29.5 | 33.2 | 56.2 | 8.9 | 0.988 | ||
| Qwen3-8B (ABL-8B) | G | 12.8 | 14.6 | 33.1 | 16.6 | 0.619 | — |
| E | 26.3 | 29.5 | 51.2 | 11.9 | 0.819 | ||
| T | 23.7 | 27.1 | 43.1 | 13.7 | 0.781 | ||
| ET | 29.5 | 34.1 | 53.1 | 11.5 | 0.850 | ||
| Gemma 4 E4B | G | 9.6 | 11.4 | 53.8 | 7.4 | 0.969 | — |
| E | 21.8 | 25.1 | 60.0 | 6.4 | 0.975 | ||
| T | 21.8 | 24.1 | 53.1 | 8.5 | 0.963 | ||
| ET | 23.7 | 27.0 | 59.4 | 7.5 | 0.963 | ||
| Qwen3-32B (ABL-32B, subset) | G | 26.9 | 31.1 | 59.4 | 5.7 | 0.988 | — |
| E | 32.1 | 36.6 | 65.6 | 5.5 | 0.981 | ||
| T | 28.2 | 33.1 | 65.0 | 7.4 | 0.975 | ||
| ET | 28.8 | 33.5 | 61.9 | 6.6 | 0.975 |
Table 4: Three-run estimates (greedy run plus two seeds at ; Gemma's runs restricted to the subset). Each task's function Acc@10 is averaged over runs; entries are means over 156 tasks with 95% percentile-bootstrap intervals over tasks. Differences are paired.
| Arm | Qwen3-4B | Qwen3-8B | Gemma 4 E4B | |||
|---|---|---|---|---|---|---|
| mean | 95% CI | mean | 95% CI | mean | 95% CI | |
| G | 22.6 | [16.7, 28.8] | 13.0 | [8.5, 17.9] | 13.5 | [9.6, 17.7] |
| E | 21.6 | [16.2, 27.4] | 24.6 | [18.6, 30.6] | 25.2 | [19.7, 31.2] |
| T | 30.8 | [24.1, 37.6] | 24.1 | [17.9, 30.3] | 22.4 | [16.9, 28.2] |
| ET | 28.0 | [22.0, 34.2] | 26.5 | [20.5, 32.9] | 27.1 | [21.4, 33.1] |
| E-G | -1.1 | [-4.9, +2.6] | +11.5 | [+7.1, +16.2] | +11.8 | [+7.5, +16.5] |
| T-G | +8.1 | [+3.0, +13.5] | +11.1 | [+6.8, +15.8] | +9.0 | [+4.7, +13.5] |
| ET-G | +5.3 | [+0.0, +10.5] | +13.5 | [+8.5, +18.6] | +13.7 | [+9.0, +18.6] |
| T-E | +9.2 | [+3.8, +15.0] | -0.4 | [-4.7, +3.8] | -2.8 | [-7.3, +1.7] |
| ET-E | +6.4 | [+1.3, +11.5] | +1.9 | [-2.4, +6.4] | +1.9 | [-2.6, +6.2] |
| ET-T | -2.8 | [-6.8, +1.1] | +2.4 | [-0.9, +6.0] | +4.7 | [+0.4, +9.2] |
Grep alone is a weak baseline for the 8B and Gemma models, and any structured tool roughly doubles it. Qwen3-8B with G reaches 12.8% function Acc@10 (13.0% over three runs); E, T and ET reach 26.3, 23.7 and 29.5% (24.6, 24.1, 26.5% over three runs), all differences from G significant at in the greedy run and with bootstrap intervals that exclude zero by a wide margin. Gemma 4 E4B behaves the same way ( in the greedy run; over three runs). File-level accuracy tells the same story for Qwen3-8B ( ) but not for Gemma 4 E4B, whose file Acc@5 is already 53.8% with grep and does not change significantly: for Gemma the tools improve the function the agent names inside a file it already found.
For Qwen3-4B only the graph tools help. G is much stronger for the 4B model (24.4%) than for the 8B model, and embedding search adds nothing: -1.1 points over three runs, [-4.9, +2.6]. The graph tools add +8.1 points [+3.0, +13.5] (significant at in each of the two sampled runs and p = 0.099 in the greedy run), and giving the 4B model all tools is slightly worse than the graph tools alone (-2.8, [-6.8, +1.3]). Section 5.5 shows why: the 4B model calls semantic_search in only 43% of E episodes and 14% of ET episodes.
Combining tools helps the 8B and Gemma models modestly. For Qwen3-8B, ET beats T in the greedy run (p = 0.049, 13/4) and by +2.4 [-0.9, +6.0] over three runs; ET versus E is +1.9 [-2.4, +6.4]. For Gemma 4 E4B the greedy run has the three structured arms within 2 points of one

Figure 2: function Acc@10 by hop bucket and tool set. All panels pool three runs (one greedy, two sampled). Each bucket has 40 tasks (38–40 with function-level gold). The advantage of the graph tools (T) over G is largest at hop 0 (16–22 points) and shrinks to 2 points by hop 3+ for the Qwen models (7 for Gemma, whose G arm falls to 2.6%); the embedding arm (E) has the flattest slope.
another, but over three runs ET leads T by +4.7 [+0.4, +9.2] and E by +1.9 [-2.6, +6.2]. The two tools reveal gold code through different routes (Section 5.5) and their union is larger than either.
Accuracy by depth. Fig. 2 breaks the three-run estimates down by bucket (per-run numbers are in Table 13). Every arm of every model falls with depth, from 28–58% at hop 0 to 3–19% at hop 3+. The shape of the fall differs by tool. For Qwen3-4B, T leads at hop 0 by 18 points (58.3 vs 40.0%) and by 10 at hop 2, but by 2 at hop 3+ (11.4 vs 9.6%). For Qwen3-8B, T leads G by 22 points at hop 0 and by 2 at hop 3+ (7.0 vs 5.3%), while E leads by 16 at hop 0 and still by 9 at hop 3+ (14.0%). For Gemma 4 E4B, G falls to 2.6% at hop 3+ while E and ET keep 14.0 and 19.3%.
The GEE interaction model (Table 12) makes this precise. Fitting Eq. (3) separately per arm, the odds ratio per hop is 0.47 (G), 0.59 (E), 0.34 (T) and 0.52 (ET) for Qwen3-4B; 0.41, 0.55, 0.35 and 0.43 for Qwen3-8B over three runs; 0.39, 0.57, 0.45 and 0.48 for Gemma 4 E4B over three runs. In the joint model, the hop × E interaction is 1.24 (p = 0.048) for Qwen3-4B and 1.30 (p = 0.098) for Gemma 4 E4B, i.e. E degrades less steeply than G; the hop × T interaction is 0.84, 0.89 and 1.01 (all p > 0.3), i.e. the graph arm's slope is not distinguishable from grep's and, in the Qwen models, is point-estimated as steeper. This is unlike the pattern LocAgent reports for its graph agent with larger models (Chen et al., 2025a); with 4–8B models the benefit of graph tools is a shallow-depth benefit, and Sections 5.3 and 5.4 show that the benefit itself shrinks with scale. Section 5.5 shows the mechanism.
5.2 RUN-TO-RUN VARIANCE (SEEDS)
Table 5 lists function Acc@10 per run. The arm ordering is stable: in all three Qwen3-4B runs T is best (30.8, 30.8, 30.8%) and E is within 2 points of G (above it once); in all three Qwen3-8B runs G is far below the others (12.8, 12.2, 14.1%) and the three structured arms are within 5 points of one another with no consistent winner (the greedy run favours ET, seed 1 favours ET, seed 2 favours E); in all three Gemma runs G is far below the others (9.6, 14.7, 16.0%) and ET is best or tied for best. The between-run standard deviation of an arm's mean is 0–3.4 points, which is why single-run comparisons among the structured arms of the 8B model should not be over-read, and why we report three-run intervals.
5.3 SCALE AND THE FULL BENCHMARK (ABL-32B, ABL-4B-500, ABL-8B-500)
Three further runs ask whether the picture changes with scale and with the full task set. ABL-32B runs the four arms with Qwen3-32B on all 500 tasks, and ABL-4B-500 and ABL-8B-500 complete the Qwen3-4B and Qwen3-8B greedy runs on the 340 tasks outside the subset; with Gemma 4 E4B's greedy run, which also covers all 500 tasks, Table 6 compares four models on the whole benchmark (485 tasks with function-level gold). The full set is easier than the depth-balanced subset, since 186 of its tasks are at hop 0.
Table 5: SEEDS: function Acc@10 (%) per run on the 160-task subset. The greedy run is ABL-4B/ABL-8B/ABL-GEMMA; the others sample at with the given seed. SD is the between-run standard deviation of the arm mean.
| Run | Qwen3-4B | Qwen3-8B | Gemma 4 E4B | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G | E | T | ET | G | E | T | ET | G | E | T | ET | |
| greedy | 24.4 | 23.1 | 30.8 | 29.5 | 12.8 | 26.3 | 23.7 | 29.5 | 9.6 | 21.8 | 21.8 | 23.7 |
| T=0.7, seed 1 | 23.7 | 19.9 | 30.8 | 29.5 | 12.2 | 21.8 | 23.7 | 26.3 | 14.7 | 28.2 | 21.2 | 29.5 |
| T=0.7, seed 2 | 19.9 | 21.8 | 30.8 | 25.0 | 14.1 | 25.6 | 25.0 | 23.7 | 16.0 | 25.6 | 24.4 | 28.2 |
| SD | 2.4 | 1.6 | 0.0 | 2.6 | 1.0 | 2.4 | 0.7 | 2.9 | 3.4 | 3.2 | 1.7 | 3.0 |
Table 6: All 500 tasks: function Acc@10 overall and by bucket, file Acc@5, steps and submit rate, one greedy run per model; McNemar versus G over the 485 tasks with function-level gold (wins/losses).
| Model | Arm | overall | function Acc@10 by bucket | steps | submit | vs. G | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| function Acc@10 | file Acc@5 | hop 0 | hop 1 | hop 2 | hop 3+ | |||||
| Qwen3-4B | G | 26.8 | 61.2 | 36.8 | 33.3 | 13.2 | 6.8 | 7.6 | 0.982 | — |
| E | 29.1 | 63.0 | 38.4 | 34.1 | 10.5 | 20.5 | 8.0 | 0.970 | p = 0.24 (41/30) | |
| T | 37.1 | 65.4 | 53.5 | 39.8 | 19.7 | 15.1 | 8.4 | 0.994 | p = 5.6×10-7(75/25) | |
| ET | 36.5 | 64.8 | 53.0 | 40.7 | 21.1 | 11.0 | 8.8 | 0.988 | p = 2.5×10-6(73/26) | |
| Qwen3-8B | G | 16.7 | 41.8 | 24.3 | 25.2 | 3.9 | 2.7 | 15.8 | 0.638 | — |
| E | 30.3 | 55.2 | 41.6 | 33.3 | 17.1 | 13.7 | 12.3 | 0.794 | p = 2.1×10-12(80/14) | |
| T | 27.4 | 48.4 | 45.4 | 26.0 | 13.2 | 6.8 | 14.4 | 0.748 | p = 9.4×10-8(74/22) | |
| ET | 33.2 | 58.6 | 48.6 | 34.1 | 21.1 | 13.7 | 11.5 | 0.854 | p = 1.0×10-15(94/14) | |
| Gemma 4 E4B | G | 16.7 | 64.2 | 23.8 | 19.5 | 7.9 | 1.4 | 7.1 | 0.984 | — |
| E | 28.5 | 66.4 | 34.1 | 36.6 | 14.5 | 16.4 | 6.3 | 0.984 | p = 6.9×10-9(78/21) | |
| T | 26.8 | 64.0 | 37.8 | 32.5 | 11.8 | 8.2 | 8.4 | 0.972 | p = 6.4×10-7(73/24) | |
| ET | 29.7 | 65.8 | 41.6 | 33.3 | 11.8 | 13.7 | 7.3 | 0.976 | p = 6.4×10-10(85/22) | |
| Qwen3-32B | G | 32.0 | 68.4 | 42.2 | 41.5 | 11.8 | 16.4 | 5.2 | 0.988 | — |
| E | 35.7 | 71.6 | 44.3 | 43.1 | 19.7 | 21.9 | 5.2 | 0.988 | p = 0.027 (39/21) | |
| T | 34.0 | 70.4 | 46.5 | 40.7 | 17.1 | 15.1 | 7.3 | 0.970 | p = 0.27 (38/28) | |
| ET | 35.9 | 70.2 | 49.2 | 44.7 | 10.5 | 19.2 | 6.3 | 0.984 | p = 0.027 (43/24) | |
The structured tools' gain shrinks from 10–17 points at 4–8B to 2–4 points at 32B. On the full benchmark, Qwen3-4B goes from 26.8% with grep alone to 37.1 / 36.5% with the graph tools (T/ET, ) and, as on the subset, gains nothing from embedding search alone (29.1%, p = 0.24); Qwen3-8B goes from 16.7% to 30.3 / 27.4 / 33.2% with E/T/ET, and Gemma 4 E4B from 16.7 to 28.5 / 26.8 / 29.7%, every difference from G significant at . Qwen3-32B goes from 32.0 to 35.7 / 34.0 / 35.9%: E and ET add 3.7–3.9 points (p = 0.027 each) and T adds 2.0 (p = 0.27). A joint model over the three Qwen sizes on the same 500 tasks makes the trend a test: the arm × log(size) interaction is 0.76 [0.66, 0.86] for T and 0.78 [0.68, 0.89] for ET (both ), i.e. each doubling of parameters removes about a fifth of the graph tools' odds advantage, while the hop × log(size) interaction is 1.05 [0.97, 1.14] (p = 0.20): the depth gradient does not change with scale. The 32B model with grep alone (32.0%) matches the 8B model with every tool (33.2%), and its file-level accuracy with grep alone (68.4%) exceeds the 8B model's best (58.6%). On the 160-task subset the picture is the same with wider intervals: 26.9 → 32.1 / 28.2 / 28.8% (Table 3; E versus G p = 0.12).
The larger model does not use the structured tools more; it uses them less. Qwen3-32B calls find_entity in 39% of its T episodes and 44% of its ET episodes, graph_neighbors in 31% and 15%, and semantic_search in 34% of E and 8% of ET episodes, against 94%, 86% and 85% for Qwen3-8B and 98%, 87% and 40% for Qwen3-4B on the same 500 tasks (Table 8). It never requests a two-hop neighbourhood (0 of 263 graph_neighbors calls ask for hops=2) and chains expansions in 0.7% of T/ET episodes. What it does instead is use grep and read_file well: 1.8 grep and 2.4 read_file calls per G episode, 5.2 steps, 98.8% submission, 1% at the cap, and a grep-only discovery rate of 66% with 45% conversion, against 55% and 30% for the 8B model on the same tasks. The gain that the structured tools provide at 4–8B—exact-name resolution and one expansion—is something the 32B model largely obtains from the plain file tools by itself, so the tools have less to add; Section 5.4 refines this with a 14B model whose grep arm is as accurate as the 32B model's but which still calls the tools and still gains from them. In arm T at hop 0,
Table 7: SCALECURVE: function Acc@10 (%) on all 500 tasks by model size and tool set. Left block: strict function Acc@10, the per-task mean over the seeds (four for the Qwen3 sizes, two for Qwen3-14B-FP8 and Gemma), on the 485 tasks with function-level gold, with the paired arm-G difference and its bootstrap interval; every Qwen difference has Holm-adjusted . Right block: the same under canonical rescoring (not available for Gemma E2B/E4B, whose notebook kept only the last model's rescoring). Gemma 4 12B is one greedy run on the 307 tasks it completed; the run is degenerate (Section E) and is listed for completeness only.
| Model | seeds | strict function Acc@10 | canonical ids | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| G | E | T | ET | E-G | T-G | ET-G | G | ET | ET-G | ||
| Qwen3-0.6B | 4 | 0.2 | 9.4 | 7.0 | 8.0 | +9.2 [7.6, 11.0] | +6.8 [5.2, 8.4] | +7.8 [6.4, 9.3] | 1.9 | 9.5 | +7.6 [6.1, 9.1] |
| Qwen3-1.7B | 4 | 0.9 | 22.4 | 12.3 | 19.0 | +21.5 [18.5, 24.6] | +11.4 [9.4, 13.6] | +18.1 [15.7, 20.7] | 11.2 | 24.5 | +13.3 [10.7, 16.0] |
| Qwen3-4B (hybrid) | 4 | 10.1 | 27.7 | 27.1 | 29.5 | +17.6 [14.6, 20.7] | +17.0 [14.0, 20.0] | +19.4 [16.4, 22.6] | 17.7 | 33.5 | +15.7 [12.9, 18.6] |
| Qwen3-8B | 4 | 17.1 | 30.4 | 30.2 | 32.1 | +13.3 [10.4, 16.3] | +13.0 [10.2, 16.1] | +15.0 [12.2, 17.9] | 25.7 | 34.3 | +8.7 [5.9, 11.4] |
| Qwen3-14B | 4 | 32.1 | 44.0 | 41.4 | 46.0 | +11.9 [8.7, 15.2] | +9.3 [6.5, 12.2] | +13.9 [11.0, 17.0] | 42.1 | 48.9 | +6.9 [4.4, 9.4] |
| Qwen3-32B (FP8) | 4 | 32.1 | 35.8 | 37.1 | 36.5 | +3.8 [1.7, 5.9] | +5.1 [2.9, 7.3] | +4.4 [2.3, 6.7] | 42.2 | 44.4 | +2.2 [0.2, 4.3] |
| Qwen3-14B-FP8 | 2 | 31.4 | 44.1 | 40.8 | 45.5 | +12.7 [9.1, 16.3] | +9.4 [6.4, 12.4] | +14.0 [10.7, 17.4] | 40.8 | 48.0 | +7.2 [4.4, 10.0] |
| Gemma 4 E2B | 2 | 4.3 | 26.0 | 24.8 | 33.0 | +21.6 [18.4, 25.1] | +20.5 [17.1, 24.0] | +28.7 [24.9, 32.6] | — | — | — |
| Gemma 4 E4B | 2 | 18.0 | 28.2 | 29.1 | 32.4 | +10.2 [7.5, 12.9] | +11.0 [8.2, 13.8] | +14.3 [11.4, 17.2] | — | — | — |
| Gemma 4 12B (greedy, 307 tasks) | 0 | 17.3 | 18.6 | 19.3 | 18.3 | — | — | — | 28.5 | 25.1 | — |
find_entity is the first tool to reveal the gold in of 32B episodes against for 8B; grep is first in (Table 15).
Depth remains the dominant difficulty axis at 32B. With controls, each hop multiplies the 32B model's odds of correct localization by 0.552 [0.453, 0.671] (; 457 tasks, 1,828 episodes), against 0.469 [0.393, 0.561] for Qwen3-4B and 0.478 [0.396, 0.578] for Qwen3-8B on the same 500 tasks (Table 1). Per arm the 32B odds ratios are 0.56 (G), 0.62 (E), 0.52 (T) and 0.49 (ET), and no interaction with depth is significant (all ). The shape of the fall changes: the 32B G arm is flat across hop 0 and hop 1 (42.2 and 41.5%) and halves at hop 2 (11.8%), so what a larger model gains is the one-edge step that the graph tool gives the small models, not the deeper ones. These runs are single greedy runs (the 32B model served from its FP8 checkpoint), so the arm-versus-arm differences at 32B should be read with the -point resolution of one run on 485 tasks; Section 5.4 reruns them with four sampled decodings each and an FP8 control.
5.4 A MODEL-SIZE SCALE CURVE FROM 0.6B TO 32B (SCALECURVE)
The runs of Section 5.3 compare three sizes with one greedy run each. SCALECURVE turns that comparison into a curve. It reruns the four arms on all 500 tasks for six Qwen3 sizes—0.6B, 1.7B, 4B, 8B, 14B and 32B (the FP8 checkpoint), all hybrid checkpoints with thinking disabled—each decoded greedily and at with seeds 1–4; for Qwen3-14B-FP8 (greedy and seeds 1–2) as a precision control for the 32B result; and for Gemma 4 E2B and E4B (greedy and seeds 1–2) and Gemma 4 12B (greedy only; the serving session ended after 307 tasks). The tools, limits, prompts and metrics are those of Section 4; the harness build is newer (vLLM 0.32.0, the path-fixed agent of Section G) and every run of a model was served in one session. In total 79,228 episodes. Two things differ from the primary runs and matter for reading the results. First, the 4B model here is Qwen/Qwen3-4B (hybrid), not Qwen3-4B-Instruct-2507; we return to the difference below. Second, alongside the strict function Acc@10 of Section 4.4 we report a canonical rescoring that the Colab notebooks computed with the graph cache mounted: each submitted string is repaired to a node id when the repair is unambiguous (a line number maps to the innermost definition containing it, :: to ., a trailing argument list is dropped, and a bare short name is accepted when exactly one definition in the named file carries it), and the repaired list is scored as before. The difference between the two scores isolates the form effect of Section 5.5. The planned statistic is, per model and arm, the per-task mean over the seeds of the arm-G difference, with a percentile bootstrap over the 485 tasks with function-level gold, a sign-flip -value, and a Holm correction over the 18 Qwen size×arm tests; the greedy runs are reported alongside. The greedy runs reproduce Section 5.3 on the newer stack: Qwen3-8B 16.9 / 30.3 / 29.1 / 32.8% against 16.7 / 30.3 / 27.4 / 33.2% (G/E/T/ET), Qwen3-32B 31.3 / 35.3 / 34.4 / 35.1 against 32.0 / 35.7 / 34.0 / 35.9, Gemma 4 E4B 18.8 / 25.4 / 29.9 / 34.4 against 16.7 / 28.5 / 26.8 / 29.7. Table 7 and Fig. 3 give the results; per-bucket accuracy and tool use for every size are in Tables 18 and 19.
The tools' gain over grep rises from 0.6B to 1.7–4B and then falls monotonically to 32B. Under strict scoring the best structured arm adds 9 points at 0.6B (where G is at 0.2% and the best arm at 9.4%), 21 at 1.7B, 19 at 4B, 15 at 8B, 14 at 14B and 5 at 32B (Table 7); all 18 Qwen
(a) accuracy, seeds pooled

(b) gain, strict scoring
(c) gain, canonical ids
(d) structured-tool use
Qwen3 parameters
Qwen3 parameters
Figure 3: SCALECURVE over the six Qwen3 sizes (T=0.7 seeds pooled, all 500 tasks). (a) Strict function Acc@10 per arm. (b) Gain of each structured arm over G with 95% bootstrap intervals over tasks; the gain peaks at 1.7–4B and falls to 4–5 points at 32B. (c) The same gain under canonical rescoring: from 8B up, about half of the strict gain is the form of the submission. (d) Fraction of episodes in which the agent calls the structured tool at all: find_entity survives to 14B, graph_neighbors is largely abandoned after 8B, and at 32B every structured tool is called in under half of the episodes.
differences are positive with Holm-adjusted . A GEE model over the Qwen seeds, clustered by task, puts the trend at an odds ratio of 0.77 [0.75, 0.79] per doubling for E, 0.82 [0.80, 0.84] for T and 0.80 [0.78, 0.82] for ET (all ): each doubling of parameters removes about a fifth of the structured tools' odds advantage, which is the estimate of Section 5.3 (0.76–0.78) on six sizes and five decodings instead of three sizes and one. Adding hop as a control moves the estimates to 0.75 / 0.81 / 0.78.
From 8B up, about half of the strict gain is the form of the submission. Canonical rescoring raises the G arm far more than the structured arms: G goes from 17.1 to 25.7% at 8B, 32.1 to 42.1% at 14B and 32.1 to 42.2% at 32B, while ET moves by 2–3 points. The structured arms' gain over G therefore shrinks from +15.0 to +8.7 (8B), +13.9 to +6.9 (14B) and +4.4 to +2.2 (32B), Fig. 3c. A larger model with grep alone increasingly finds the target but names it in a form the strict matcher rejects (a line number, a :: path, a bare short name), which is the form effect of Section 5.5 measured across scale: the tools hand the model exact ids, and from 8B up that is about half of what they add. Below 8B the two scores agree more closely (+19.4 versus +15.7 at 4B; +7.8 versus +7.6 at 0.6B) because the small models' G arm does not find the target in any form.
The fall from 14B to 32B is a fall in tool uptake, not a rise in grep competence. Section 5.3 read the small 32B gain as the larger model obtaining from grep what the tools give the small ones. The curve refines that reading. Qwen3-14B's G arm is exactly as accurate as Qwen3-32B's (32.1 versus 32.1% strict, 42.1 versus 42.2% canonical), yet the 14B model still gains 9–14 points (4–7 canonical) from the tools and the 32B model 4–5 (2). What differs is whether the tools are called: the 14B model calls find_entity in 96% of its T episodes and semantic_search in 95% of its E episodes; the 32B model in 45% and 44% (Fig. 3d). The FP8 control rules out precision as the cause: Qwen3-14B-FP8 matches Qwen3-14B arm by arm on the shared seeds (differences of −1.6 [-3.5, +0.4], +0.1, −0.7 and +0.4 points for G/E/T/ET, all ) and gains as much from the tools (9–14 points). The uptake curve also shows which tool survives scale: graph_neighbors is called in 88% of T episodes at 8B but 13% at 14B and 35% at 32B, while find_entity is called in 80–98% of T episodes from 0.6B to 14B and only drops at 32B. Name lookup is the part of the graph tool that a larger model keeps using; neighbourhood expansion is the part it abandons first, and at 32B 1 of 1,498 graph_neighbors calls asks for two hops (8,424 of 9,653 at 8B). In absolute terms Qwen3-14B is the strongest model in the sweep (46.0% with ET; 48.9% canonical) and the non-thinking Qwen3-32B is not better than it at this task in this harness (36.5%; 44.4% canonical), so the 32B point of Section 5.3 should be read as a point about that checkpoint's agentic behaviour rather than as the asymptote of the curve.
The depth gradient is present at every size and no arm flattens it. With the arm as a control, each hop multiplies the odds of correct localization by 0.67 [0.58, 0.78] at 0.6B, 0.58 at 1.7B, 0.57 at 4B, 0.53 at 8B, 0.50 at 14B and 0.60 [0.52, 0.71] at 32B, every (Table 18). In the joint model the hop interaction is 0.97 [0.95, 1.00] ( ): the gradient steepens very slightly with size, as the larger models' gains concentrate at hop 0 and hop 1. The hop interaction is never significantly below 1 at any size (0.83 at 8B, ; 0.86 at 14B, , i.e.
Table 8: TRACES: episode outcomes and tool use, pooled over three runs per model (156 tasks with function gold per run). saw is the fraction of episodes in which some gold function was revealed; conv. is Pr(correct | saw); cap is the fraction that hit the 30-step cap. Right block: calls per episode (ss = semantic_search, fe = find_entity, gn = graph_neighbors) and the fraction of episodes with at least one call to the structured tool.
| Model | arm | acc | saw | conv. | submit | cap | steps | calls / episode | eps. using | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| grep | read_file | ss | fe | gn | ss | fe/gn | ||||||||
| Qwen3-4B | G | .226 | .562 | .380 | .983 | .017 | 8.0 | 3.8 | 1.9 | — | — | — | — | — |
| E | .216 | .588 | .338 | .951 | .045 | 8.8 | 3.2 | 2.6 | 0.59 | — | — | .43 | — | |
| T | .308 | .660 | .456 | .989 | .004 | 8.6 | 2.6 | 1.3 | — | 1.54 | 1.37 | — | .98/.90 | |
| ET | .280 | .658 | .416 | .974 | .024 | 9.2 | 2.6 | 1.6 | 0.23 | 1.73 | 1.18 | .14 | .98/.87 | |
| Qwen3-8B | G | .130 | .481 | .271 | .596 | .402 | 17.1 | 10.0 | 3.6 | — | — | — | — | — |
| E | .246 | .596 | .401 | .784 | .207 | 12.9 | 7.3 | 2.8 | 1.38 | — | — | .85 | — | |
| T | .241 | .626 | .386 | .761 | .226 | 14.1 | 4.9 | 2.8 | — | 1.69 | 2.74 | — | .94/.86 | |
| ET | .265 | .654 | .399 | .821 | .165 | 12.2 | 5.9 | 2.0 | 0.53 | 0.89 | 1.51 | .52 | .72/.78 | |
| Gemma 4 E4B | G | .135 | .526 | .211 | .981 | .019 | 7.5 | 1.8 | 2.2 | — | — | — | — | — |
| E | .252 | .641 | .353 | .972 | .028 | 6.9 | 1.2 | 2.5 | 0.79 | — | — | .76 | — | |
| T | .224 | .620 | .352 | .970 | .030 | 8.9 | 1.5 | 2.1 | — | 1.07 | 0.98 | — | .78/.74 | |
| ET | .271 | .686 | .386 | .972 | .028 | 7.7 | 1.0 | 2.3 | 0.71 | 0.34 | 1.12 | .69 | .29/.74 | |
steeper than G; 0.92 at 32B, ); the hop E interaction is above 1 at 4B (1.71, ) and 32B (1.16, ). The pattern of Section 5.1—the graph arm's slope is no flatter than grep's and the embedding arm's is the flattest—holds over the whole curve.
What the small models do with the tools. At 0.6B every arm is near the floor; the tools raise discovery (a gold function on screen) from 5% of G episodes to 42% of ET episodes but conversion stays at 16%, and the T arm issues 7.0 find_entity calls per episode and submits in only 52%. At 1.7B and at the hybrid 4B the G arm is the grep loop of Section 5.5: 9.5 and 14.2 grep calls per episode, 13% and 33% of episodes at the step cap, 76% and 57% submitting; the embedding arm ends the loop (6.1 steps and 95% submission at 4B) and that behavioural change, not only the retrieval, is part of its gain. The Gemma family has the same shape as Qwen: E2B gains 21–29 points from a G arm at 4.3%, E4B 10–14 from one at 18.0%. Gemma 4 12B's greedy run is degenerate (51% of episodes at the step cap, 45% submitting, 15.5 read_file calls and 18k tokens per episode) and every arm scores 17–19% on the 307 tasks it completed; we draw nothing from it (Section E).
The checkpoint matters as much as the size. On the same 500 tasks with the same harness, Qwen3-4B-Instruct-2507 reaches 26.8% with grep alone and gains nothing from embedding search (Table 6); the hybrid Qwen3-4B reaches 9.1% and gains +17.6 points from it. The Instruct checkpoint's post-training makes it a competent grep agent (7.6 steps, 98% submission) that a semantic index does not help; the hybrid checkpoint is a looping grep agent that any structured tool rescues. Which tools help is a property of how a checkpoint behaves as an agent, not of its parameter count, which is the strongest form of the per-model validation point of Section 7. Finally, the planned non-inferiority test—can a 4B model with all tools match the 32B model with grep alone?—comes out just short: hybrid Qwen3-4B ET is -2.5 points [-5.6, +0.8] from Qwen3-32B G on the shared seeds, and its one-sided 95% lower bound (-5.2) misses the 5-point margin; T alone is -5.0 [-8.1, -1.8]. Tools let a 4B model get within a few points of a 32B model's grep arm, not past it.
5.5 TRACE ANALYSIS: DISCOVERY, CONVERSION AND WHICH TOOL FINDS THE GOLD (TRACES)
Because every tool line is annotated with the nodes it exhibits, we can split each episode into discovery (was a gold function ever on the screen?) and conversion (given that it was, did the agent submit it?). Table 8 reports both, with the tool usage that produced them.
Structured tools raise discovery by 3–17 points and, except for Qwen3-4B's E arm, conversion by 4–18 points. For Qwen3-8B, the gold is revealed in 48% of G episodes and 60–65% of E/T/ET episodes, and conversion rises from 27% to 39–40%. For Qwen3-4B, T raises discovery from 56 to 66% and conversion from 38 to 46%, whereas E raises discovery slightly (59%) but lowers conversion

Figure 4: Which tool first shows the gold, by depth (Qwen3-8B, three runs pooled; the 4B and Gemma panels are in Table 15). In arm T, find_entity is the first tool to reveal the gold in 46% of hop-0 episodes and graph_neighbors in 49% of hop-1 episodes; at hop 2+ the graph tools rarely reach it and most episodes never see the gold at all. In arm E, semantic_search accounts for 13–28% of first reveals at every depth.
(34%): the 4B model is distracted by the extra results it does not act on. For Gemma 4 E4B both move, discovery from 53 to 62–69% and conversion from 21 to 35–39%: with grep alone Gemma often finds the right file but names the wrong function.
Grep-only Qwen3-8B collapses into search loops. Its G episodes average 10.0 grep calls (the most frequent transition in the trace is grep→grep, 8.5 times per episode), 40% hit the 30-step cap, 41% never submit, and in 10% of episodes the gold was on screen but the agent never submitted anything. The structured tools cut the step count from 17.2 to 12.2–14.1 and the non-submission rate by half. The budget experiment (Section 5.8) shows that this is not a budget artifact.
The graph tools find the gold by name lookup at hop 0 and by one expansion at hop 1. Fig. 4 shows, for each bucket, which tool first put a gold function on the screen. In arm T of Qwen3-8B, find_entity is the first revealing tool in 46% of hop-0 episodes (53% for Qwen3-4B): the issue names the target, and a name lookup returns it. At hop 1, graph_neighbors is first in 49% (40% for 4B): the target is one contains/calls/inherits line away from a named entity. At hop 2, graph_neighbors is first in only 17%, at hop 3+ in 16%, and 50–70% of episodes never see the gold. Over all steps rather than the first, graph_neighbors shows the gold at some point in 65% of hop-1 T episodes but 25% of hop-2 and hop-3+ episodes. A two-hop neighbourhood of a mentioned node contains hop-2 targets by construction, and the agents do ask for two hops (hops=2 in 57% of Qwen3-4B's and 95% of Qwen3-8B's graph_neighbors calls), but the output is cut by the 4,000-character observation budget in 64% and 72% of calls respectively (a median of 23–24 edge lines is shown, so the 50-line cap never binds), and the agents almost never chain: in the greedy runs only 12% (4B) and 14% (8B) of T/ET episodes contain a graph_neighbors call whose entity was returned by the previous graph_neighbors call, and 42% of Qwen3-8B's later graph_neighbors calls re-expand the entity it just expanded. The graph tool is used as a lookup, not as a walk. In arm E, semantic_search is the first revealing tool in 13–28% of episodes at every depth for Qwen3-8B and 24–42% for Gemma, which is why its depth slope is flattest: semantic similarity between the issue and the target function does not depend on their graph distance.
Graph tools also change the form of the submission. Of the top-5 function strings submitted by Qwen3-8B, 85% (T) and 84% (ET) are exact node ids of the snapshot, against 74% (E) and 47% (G): with grep alone the model has to assemble a qualified name from file paths and def lines and often gets the class prefix wrong, whereas find_entity and graph_neighbors hand it ids verbatim. The prefix-matching in Section 4.4 forgives some of this at scoring time; the repair stage of Section 5.9 does not.
5.6 Does the embedding arm depend on retrieval quality? (WEAKEMB)
Replacing Qwen3-Embedding-0.6B with the static potion-base-8M embedder lowers Qwen3-8B's E arm from 26.3 to 21.2% function Acc@10 (paired: 12 tasks lost, 4 gained, p = 0.077) and file Acc@5 from 51.2 to 47.5% (p = 0.39). The agent calls semantic_search equally often (1.06 vs 1.00 calls per episode), but the fraction of those calls that reveal a gold function halves (54/170 = 32% vs 25/160 = 16%), and semantic_search is the first revealing tool in 11 rather than 31 episodes.

| G | E | T | ET | oracle | |
|---|---|---|---|---|---|
| prompts (valid ids) | 47 | 100 | 89 | 113 | 156 |
| non-empty patches | 41 | 73 | 65 | 87 | 121 |
| resolved | 6 | 13 | 12 | 13 | 26 |
| resolved | loc. correct | 5/20 | 11/41 | 10/37 | 11/46 | — |
| resolved | loc. wrong | 1/136 | 2/115 | 2/119 | 2/110 | — |
Figure 5: REPAIR: downstream repair with a fixed Qwen3-8B repair prompt on the 160 tasks, scored with the official harness. Left: patches and resolved tasks per arm. Right: counts; “loc. correct” is function Acc@10= 1 in the ABL-8B episode.
Half of the E arm's advantage over G thus comes from the quality of the retriever and half from having any dense retriever that occasionally lands on the right function and from the behavioural change it induces (fewer grep loops: 12.3 steps versus 16.6 for G).
5.7 FORCING THE STRUCTURED TOOL (FORCETOOL)
If the structured tools help only when the agent chooses to call them, forcing the call might help more. It does not. Forcing semantic_search as the first call leaves Qwen3-8B's E arm at exactly 26.3% (11 tasks gained, 11 lost) and moves Qwen3-4B's from 23.1 to 27.6% (p = 0.23). Forcing find_entity then graph_neighbors as the first two calls moves T from 23.7 to 21.8% for Qwen3-8B (p = 0.61) and from 30.8 to 29.5% for Qwen3-4B (p = 0.80). The first 4B run of this experiment had a harness bug—under constrained decoding at temperature 0 the forced find_entity call sometimes generated an unbounded argument string, so 42% of T episodes never submitted (19.2%); the rerun caps the forced call at 256 tokens with one retry and is the number reported. The conclusion is that voluntary use is not the bottleneck: the 8B model already calls semantic_search in 85% of its E episodes and find_entity in 94% of its T episodes, and the information the tool returns on the first call is what it is.
5.8 IS THE GREP-ONLY COLLAPSE A BUDGET ARTIFACT? (BUDGET)
On 80 tasks (78 with function gold), raising the cap from 30 to 50 steps and the context from 32k to 40,960 tokens does not help Qwen3-8B's G arm: function Acc@10 at 50 steps against at 30 steps on the same tasks (2 tasks lost, 0 gained), with mean steps rising from 16.1 to 21.6 and of episodes still hitting the larger cap. ET likewise moves from 38.5 to (5 lost, 1 gained, ). More budget gives the looping agent more loop.
5.9 DOWNSTREAM REPAIR (REPAIR)
Localization is only useful if a repair stage can use it. For each task and arm of ABL-8B we take the top-5 submitted strings that are exact function or class ids of the snapshot, show their source (up to 150 lines each) together with the issue to Qwen3-8B (greedy, non-thinking) with a SEARCH/REPLACE edit-block prompt (Section F), apply each block only if its SEARCH text occurs exactly once in the file, convert the result to a unified diff, and score it with the official SWE-bench harness 4.1.0 (Docker, prebuilt instance images). An oracle arm shows the gold functions instead. Episodes that submitted no valid function id get no prompt and count as unresolved, so the arms are compared on all 160 tasks.
Fig. 5 summarises the result. The arms resolve 6 (G), 13 (E), 12 (T) and 13 (ET) of 160 tasks; oracle locations resolve 26. Against G, the gains are 8/1, 7/1 and 9/2 discordant tasks (p = 0.039, 0.070, 0.065); the three structured arms are indistinguishable from one another; and ET is well short of the oracle (15 oracle-only tasks versus 2, p = 0.0023). Resolution is almost entirely conditional on correct localization: among tasks the arm localized correctly, 24–27% are resolved; among the others, 1–2%. Resolved tasks are spread over all four buckets (for ET: 6/2/3/2 at hop 0/1/2/3+; oracle: 5/8/7/6). Two further observations connect this to the trace analysis. First, the number of prompts—episodes whose submission contains at least one valid id—is 47 for G against 89–113 for the structured arms, which is the “form” effect of Section 5.5 turned into a repair-stage loss. Second, the repair model is itself weak (26/156 with gold locations), so this experiment bounds what localization can contribute for a small repair model rather than measuring the ceiling of the pipeline.
6 PART 3: DOES THE MODEL REPRESENT THE REPOSITORY GRAPH?
The tool ablation says what an agent can extract from structure that is handed to it. We now ask whether the structure is already in the model's activations, which is what the Thousand-Graph Hypothesis (Ding, 2026) asserts, and the kind of question tool-call-graph probing (Sun & Kazakov, 2026) answers for a different graph. We probe for three relations between definitions a and b that both appear in the context: CALL (a calls b directly), CALL2 (a reaches b in exactly two call hops and b's short name does not occur in a's source, so that the lexical cue is removed) and INHERIT (a's class inherits from b). Negatives are pairs with no call or inheritance path of length in either direction; pairs where one definition contains the other are excluded.
6.1 REPRESENTATIONS
A context is tokenised and run through the model in a single causal forward pass. Each definition in the context is represented by the residual-stream vector at its last token, at layer : in a causal model the name token precedes the body, so only the end of the span has read what the definition calls. For a pair the probe sees
and the one-sided controls see or alone; the interaction-only probe sees . Features are standardised with training-set statistics, and a linear logistic probe is trained by Adam (learning rate , weight decay , 300 full-batch steps) on the class-weighted cross-entropy with positive weight . We probe every fourth layer plus the last (Qwen3-4B and Qwen3-8B both have 36 layers; layer 0 is the token embedding). Folds are repository-held-out: train on the eleven non-Django repositories and test on Django, and the reverse.
6.2 A GLOBAL PAIR PROBE, AND WHY IT IS NOT ENOUGH (GLOBALPROBE)
Contexts. For each of the 468 bucketed tasks we take the first gold-patched file at the base commit (one context per distinct file; 468 contexts, mean 4,668 tokens, truncated at 6,000), with a mean of 34.2 definitions each. Labels come from the whole-repository graph of Section 3.1, not just the file. This yields 13,255 CALL, 6,405 CALL2 and 998 INHERIT positives; negatives are sampled at three per positive.
Result. The pair probe decodes CALL edges at AUC 0.785 (Django fold) and 0.747 (others) at layer 24 for Qwen3-4B, and 0.768/0.726 for Qwen3-8B, against 0.49–0.53 for a probe trained on permuted labels and 0.52–0.54 at layer 0 (Table 16, appendix). CALL2 reaches 0.70/0.67 and INHERIT 0.77/0.80 at later layers. Taken alone these numbers would support a strong reading. The controls do not. A probe that sees only reaches 0.71/0.66 on CALL and beats the pair probe on CALL2 (0.70/0.69 vs 0.70/0.67) and on INHERIT (0.79/0.80 vs 0.77/0.81); a probe that sees only reaches 0.61/0.61 on CALL and 0.75/0.76 on INHERIT. A non-neural baseline, the in-file in-degree of b, scores 0.85/0.85 on CALL and 0.74/0.76 on CALL2, and whether b's name occurs in a's text scores 0.97 on CALL. Positive and negative pairs differ in properties of a single definition: callers are long, callees are popular, base classes are base-class-like. A global AUC therefore says little about whether the model represents the relation.
6.3 WITHIN-ANCHOR RANKING WITH DEGREE STRATIFICATION (ANCHORPROBE)
To remove node-level shortcuts we score each pair only against other pairs sharing the same anchor. For every anchor a that has at least one positive partner, the candidate set is its positives and up to 15 of its negatives from the same context. Let A be the set of groups, each with positives and
Table 9: ANCHORPROBE: within-anchor AUC at layer 24, strict grouping (anchor in-degree bin of ), with 95% anchor-bootstrap intervals for Qwen3-4B. A relational representation shows as pair/interaction AUC above -only, the permuted control and the in-degree baseline. The lexical baseline is ; it is 0.5 for CALL2 by construction. Qwen3-8B point estimates from the same protocol are given in the last two columns (pair / -only).
| Task | Test fold | Qwen3-4B | Qwen3-8B | ||||||
|---|---|---|---|---|---|---|---|---|---|
| pair | interaction | b-only | permuted | in-degree | lexical | pair | b-only | ||
| CALL | Django | 0.740 [.724, .756] | 0.731 [.715, .746] | 0.510 [.493, .527] | 0.502 [.484, .520] | 0.534 | 0.993 | 0.733 | 0.533 |
| others | 0.683 [.665, .700] | 0.669 [.651, .686] | 0.530 [.511, .550] | 0.497 [.479, .516] | 0.513 | 0.987 | 0.661 | 0.523 | |
| CALL2 | Django | 0.569 [.548, .590] | 0.532 [.512, .552] | 0.520 [.497, .542] | 0.476 [.458, .493] | 0.501 | 0.500 | 0.606 | 0.608 |
| others | 0.573 [.552, .593] | 0.555 [.534, .577] | 0.559 [.536, .581] | 0.509 [.489, .529] | 0.500 | 0.500 | 0.552 | 0.562 | |
| INHERIT | Django | 0.619 [.593, .647] | 0.569 [.544, .597] | 0.688 [.663, .715] | 0.462 [.436, .487] | 0.500 | 0.927 | 0.655 | 0.667 |
| others | 0.629 [.588, .672] | 0.501 [.461, .546] | 0.674 [.633, .714] | 0.471 [.432, .511] | 0.500 | 0.893 | 0.655 | 0.725 | |

Figure 6: ANCHORPROBE across layers (strict grouping, mean of the two folds). Direct CALL edges are decodable from the middle layers on, peaking at layer 24, with the interaction term carrying almost all of the signal and the b-only probe at chance; CALL2 is barely above b-only; for INHERIT the b-only probe is at or above the pair probe. The degenerate Qwen3-8B layer-32 fit (AUC exactly 0.5 for every pair probe, a numerical failure of the standardised logistic fit at that layer) is omitted.
negatives , and let be a score. The metric is the pooled within-group AUC,
the probability that a random positive outranks a random negative of the same anchor. Any feature of alone is constant within a group and cannot help. Under the strict grouping, the group is the anchor crossed with the in-degree bin of (bins 0, 1, 2, 3–4, 5+), so that the popularity of the candidate is held fixed as well; the in-degree baseline then scores 0.50–0.53 by construction. Controls are: the -only probe (any remaining node-level signal about ), the interaction-only probe, a pair probe trained on labels permuted within each training group, the in-degree baseline, token distance, same-class membership, and the lexical baseline . Per-pair test scores are saved at layers 24 and 36, and 95% intervals are obtained by bootstrapping anchors (2,000 resamples; the numerator and denominator of Eq. (8) are resampled jointly).
Table 9 and Fig. 6 give the result, which is sharply task-dependent.
Direct call edges are linearly represented. Within anchor and in-degree bin, the pair probe ranks a function's true callees above its non-callees with AUC 0.740 [0.724, 0.756] (Django held out) and 0.683 [0.665, 0.700] (others held out) for Qwen3-4B, and 0.733/0.661 for Qwen3-8B, while the b-only probe is at 0.51–0.53, the permuted control at 0.50 and in-degree at 0.51–0.53. The interaction-
Table 10: CONVPROBE: within-anchor AUC inside agent conversations (Qwen3-4B, layer 24, strict grouping), with anchor-bootstrap intervals, for subsets of the test pairs. unstated pairs are those for which no graph tool printed the edge. Strict groups cannot be formed for the stated subset (almost all stated pairs are positives), so that row reports the plain within-anchor grouping.
| Task | Subset (fold) | n | pos | pair | b-only | permuted | in-degree |
|---|---|---|---|---|---|---|---|
| CALL | all (Django) | 4860 | 500 | 0.605 [.513, .690] | 0.511 [.423, .594] | 0.458 [.365, .554] | 0.521 |
| all (others) | 5728 | 578 | 0.655 [.590, .717] | 0.520 [.447, .595] | 0.516 [.455, .578] | 0.580 | |
| unstated (Django) | 4565 | 246 | 0.590 [.474, .697] | 0.479 [.370, .580] | 0.486 [.374, .596] | 0.503 | |
| unstated (others) | 5399 | 294 | 0.599 [.515, .686] | 0.483 [.390, .584] | 0.529 [.446, .613] | 0.541 | |
| arm G (Django) | 238 | 33 | 0.778 [.500, 1.00] | 0.556 [.125, .889] | 0.333 [.000, .667] | 0.500 | |
| arm G (others) | 396 | 64 | 0.706 [.467, .900] | 0.588 [.312, .840] | 0.588 [.294, .833] | 0.529 | |
| stated (Django)* | 295 | 254 | 0.850 [.646, 1.00] | 0.900 [.739, 1.00] | 0.500 [.314, .660] | 0.875 | |
| stated (others)* | 329 | 284 | 0.744 [.576, .893] | 0.846 [.703, .959] | 0.410 [.244, .595] | 1.000 | |
| CALL2 | all (Django) | 2218 | 298 | 0.747 [.691, .802] | 0.781 [.728, .831] | 0.448 [.391, .509] | 0.500 |
| all (others) | 3429 | 503 | 0.645 [.583, .701] | 0.647 [.587, .703] | 0.461 [.403, .519] | 0.501 |
*plain within-anchor grouping.
only probe is almost as good (0.731/0.669), so the signal is a bilinear compatibility between caller and callee rather than anything additive. It emerges in the middle of the network (0.54–0.56 at layers 4–8, 0.62–0.74 at layers 16–24) and decays towards the output (0.57–0.59 at layer 36). The relation survives the controls that defeated the global probe, and it transfers across repositories.
But it is weaker than a one-line lexical baseline. Whether 's name appears in 's source text scores 0.993/0.987 on the same groups. The model's representation of "a calls " is a degraded copy of information that is literally in the text of ; nothing in this experiment distinguishes a learned relational code from a smeared-out lexical match.
Two-hop edges with the lexical cue removed are barely decodable. For CALL2, where 's name does not occur in 's text, the pair probe scores 0.569/0.573 and the -only probe 0.520/0.559; the pair--only margin is 0.05 on the Django fold and 0.01 on the other, with overlapping intervals on the latter. For Qwen3-8B the pair probe does not beat -only at all (0.606 vs 0.608, 0.552 vs 0.562). What two-hop signal exists is at most a few points above what the callee alone predicts.
Inheritance is not decodable beyond one-sided information. The pair probe (0.619/0.629) is below the -only probe (0.688/0.674) in both folds and both models, and the interaction-only probe is at 0.50 on the others fold: base classes are recognisable as base classes, but which class inherits from which is not read out by a linear probe, even though the base name is in the class line and the lexical baseline scores 0.89–0.93.
6.4 THE SAME PROBES INSIDE AGENT CONVERSATIONS (CONVPROBE)
A static file is not what an agent sees. We repeat the within-anchor protocol on activations taken inside real conversations: the 159 greedy Qwen3-4B episodes of arms G (50) and T (109) from ABL-4B in which at least four probe-able entities appear. Each conversation is rendered exactly as the model saw it (chat template plus the arm's tool schemas; mean 5,178 tokens, maximum 31,578, cap 32,768) and run through the model once; a definition is probe-able if its name is unique in the snapshot and its def/class line appears in the conversation, and it is represented at the last token of its last occurrence. Pairs are labelled from the repository graph as before (CALL: 1,078 positives, 9,510 negatives; CALL2: 801 and 4,846) and additionally tagged as stated if some graph_neighbors output line contains both ids, i.e. a tool printed that exact edge. Arm T contributes most pairs (17.9 probe-able entities per conversation against 7.8 for G), since its tools print definition lines.
Table 10 shows that the static picture carries over, somewhat attenuated. Within anchor and in-degree bin, direct CALL edges are decodable at 0.605 [0.513, 0.690] and 0.655 [0.590, 0.717] against 0.51–0.52 for b-only and 0.46–0.52 for the permuted control. The intervals are wide because a conversation exposes far fewer definitions than a file (fewer and smaller groups), but they exclude the controls on the “others” fold and nearly do on Django. The restriction to unstated pairs—edges no tool ever printed—gives 0.590/0.599 against 0.48 for b-only: the model’s ranking of callees does not depend on a graph_neighbors line having asserted the edge, which is consistent with the static result that the representation tracks the text of the caller, since a read_file or grep hit on the caller’s body is what usually brings both definitions into context. On the stated pairs the b-only probe scores as high as the pair probe (0.90/0.85), because a stated callee is simply a callee that appeared in a graph_neighbors line, which is a property of b in that conversation. For CALL2, the pair probe is again no better than b-only (0.747 vs 0.781; 0.645 vs 0.647).
In-conversation, as in static code, the model carries a linearly readable but shallow and largely lexical representation of direct dependencies, and no linearly readable representation of two-hop dependencies beyond what the callee alone predicts. The 32k-token conversation that a T episode produces does not leave behind a decodable graph; it leaves behind the same direct-call signal, weaker.
7 DISCUSSION
One picture from three parts. The three parts of the study were designed independently but say the same thing. The hardest third of SWE-bench Verified—hop 2 and hop 3+, 154 tasks—is hard for every arm of every model at every size from 0.6B to 32B, and the tools that are supposed to address exactly this difficulty do not. The graph tools' contribution is concentrated where the issue names the target (hop 0, where find_entity is a direct lookup) or its immediate neighbour (hop 1, where one graph_neighbors expansion suffices); past that, agents rarely chain expansions (12–14% of episodes) and the arm's depth slope is at least as steep as grep's. The embedding tool's contribution is flatter in depth because semantic similarity does not care about graph distance, but it is small in absolute terms (13–28% of first reveals) and depends on retrieval quality. Inside the model, the only relation that is linearly readable beyond node-level confounds is the direct call edge, and even that is a weaker signal than a substring test on the caller's source. Two-hop structure is essentially absent from the activations, is rarely assembled from the tools, and is where the tasks are failed. Small coding agents operate with a one-hop picture of the repository, in weights and in use. The scale curve adds a fourth strand: what the tools add is largest for the models that cannot grep competently (1.7–4B), shrinks by about a fifth of the odds advantage per doubling, is half submission form from 8B up, and disappears at 32B because the model stops calling the tools, with neighbourhood expansion abandoned before name lookup. The structure that is extracted is the one-hop part, and it is extracted less as the model grows.
On the contrast with LocAgent. LocAgent (Chen et al., 2025a) reports that graph-guided agents degrade least with depth. Our graph arm degrades at least as steeply as grep alone. The difference is not the graph (ours follows LocAgent's construction) and is unlikely to be the measurement (our hop label is deterministic and robust to resolution). The plausible differences are model scale and agent design: LocAgent's results use larger models and a tool that returns compressed subgraphs with relation-aware summaries, whereas our T arm hands a 4–8B model raw edge lines truncated at 50 and leaves the chaining to it. Scale alone does not close the gap in our harness: at none of six sizes from 0.6B to 32B is the graph arm's depth slope flatter than the grep arm's (Section 5.4), and the larger models simply call the graph tools less. FORCETOOL rules out "the agent does not call the tool" as the explanation, and BUDGET rules out budget. What is left is the model's ability to use a neighbourhood listing to decide what to expand next, which is a reasoning step that, by the probe results, has no linear support in the model's representation of the code. We think this is the right reading, but it is an inference, and a direct test—presenting multi-hop paths explicitly, or training the agent to chain expansions—is future work.
What the probes do and do not show. Our protocol is deliberately conservative. The within-anchor, degree-binned AUC removes every node-level shortcut we could name, and the lexical baseline calibrates what “decodable” means against a trivial alternative. A linear probe is also a lower bound: a nonlinear readout, an attention-pattern analysis, or a causal intervention could find two-hop structure a linear probe cannot. The claim we make is correspondingly narrow: linearly, at the definition’s last token, the repository’s call graph beyond one hop is not represented in these models, and the one-hop part that is represented is not more than lexical. The agreement between the static probe and the in-conversation probe, including on edges the tools never printed, adds confidence that this is a property of the model and not of the context format. We also want to be explicit about the negative finding behind the design: the global pair-probe AUC of 0.75–0.80 that we obtained first, and that a less careful study would have reported, is matched by one-sided probes and by a degree baseline. We recommend the within-anchor protocol, with a stratification on the confound that matters for the relation (here, in-degree), for any relational probe.
Implications for tool design. Three practical suggestions follow. (i) For small models, exact-name resolution is the single most valuable thing a structured tool provides, both for discovery at hop 0 and for the form of the submission; it is cheap and should be present even when a full graph is not. (ii) Since agents expand once and stop, a tool that returns the two-hop closure in a compact, ranked form, or that proposes the next expansion, is more likely to help at hop 2+ than a tool that returns raw one-hop edges. (iii) Embedding search and graph tools reveal the gold through different routes and combine additively for the 8B model and only marginally for Gemma; for Qwen3-4B-Instruct-2507 the embedding tool is dead weight and ET is slightly worse than T, while for the hybrid Qwen3-4B checkpoint of the same size it is worth +17.6 points. Tool sets should be validated per checkpoint rather than inherited from a larger model or from another checkpoint of the same size. (iv) Beyond about 8B, a strict scorer credits the tools for the form of the submission as much as for discovery; a localization stage that canonicalises names (line numbers, :: paths, short names) recovers about half of the tools' measured gain without any tool.
Implications for benchmarks. Hop depth is a cheap, released, validated axis along which to report results. Aggregate function Acc@10 on SWE-bench Verified mixes 37% of tasks where the answer is named in the issue with 15% where it is three or more edges away; a method that improves the former and not the latter will look good on the aggregate and has not addressed structure. We suggest reporting the hop-3+ bucket separately, and we note that the strict-mention variant, though it discards too many tasks to be the default, is a useful conservative check on any claim about deep tasks.
Limitations. The primary models are small (4–8B) and the mechanism experiments (TRACES, BUDGET, FORCETOOL, REPAIR, the probes) are on the 4–8B models only. The scale curve covers 0.6B–32B with five decodings per size, but its largest model is the non-thinking Qwen3-32B served from an FP8 checkpoint, which is not stronger than Qwen3-14B at this task; the curve should not be read as an asymptote, and whether a model that calls the tools and is strong at grep would show a different curve is open. The Gemma family contributes two usable sizes (E2B, E4B); the 12B run was partial and degenerate. Canonical rescoring is available for the Qwen sizes only, and the scale curve's 4B model is a different checkpoint from the primary 4B runs, which we treat as a finding about checkpoints rather than a confound, but which means the curve has no point for the Instruct checkpoint at 4B. The evaluation subset is 160 tasks, which limits the resolution of arm-versus-arm comparisons among the structured tools to about ±5 points even with three runs; Django supplies half of the subset. The hop label is optimistic (name-based resolution, static only) and sensitive to mention extraction; depth is a shortest path, not an agent's path. The label and the T arm's tools are built from the same graph, so the hop-0/hop-1 advantage of T is in part an advantage on the label's own terms: a target the label calls "one edge away" is one that graph_neighbors can print, and a resolution rule that drops an ambiguous call drops it for both. The E and G arms do not share this coupling, which makes the E results the cleaner test of the depth axis. The localization-only formulation removes the interaction between exploration and editing that a full agent has, and the REPAIR model is itself weak, so REPAIR bounds rather than measures the value of localization. The probes use one representation (last-token residual stream) and one family of readouts (linear); the in-conversation probe has wide intervals and is on the 4B model only. The embedding arm uses one strong and one weak embedder, not a sweep. Finally, the study was conducted on one benchmark in one language; Python's dynamic dispatch is invisible to our graph, which both understates true depth and overstates what a static graph tool could ever return.
8 CONCLUSION
We labelled SWE-bench Verified with a deterministic code-graph hop depth, showed that each hop roughly halves the odds of correct function-level localization for four models from 4B to 32B after controls and at every one of six sizes from 0.6B to 32B, and released the labels. We ablated the tool set of a localization agent and found that structured tools roughly double grep-only accuracy for Qwen3-8B and Gemma 4 E4B, that only graph tools help Qwen3-4B, that over a scale curve from 0.6B to 32B the tools' gain peaks at 17–21 points at 1.7–4B and falls to 4–5 at 32B as the model stops calling them (with about half of the gain from 8B up being the form of the submission), that the same size gains or does not gain from a tool depending on the checkpoint, and that the graph tools' benefit is exact-name lookup at hop 0 and one expansion at hop 1—they do not flatten the depth gradient, and forcing their use, enlarging the budget or sampling does not change that. A fixed repair model turns those localizations into 6–13 resolved tasks of 160 against 26 with oracle locations, almost all of them on correctly localized tasks. Linear probes, once stratified to remove node-level confounds, find a direct-call representation in the middle layers that transfers across repositories and survives inside agent conversations, but that is weaker than a substring test and does not extend to two hops or to inheritance. The multi-hop structure that the deepest third of the benchmark requires is neither in these models' weights nor, in practice, extracted from the tools we gave them. Closing that gap—by tools that return and rank multi-hop closures, by training agents to chain expansions, or by models that represent more than one hop—is the open problem this study isolates.
REPRODUCIBILITY AND DATA RELEASE
Everything behind this paper is public. The depth-labelled split (labels for all 500 tasks under every variant, a dataset card, the labelling scripts and the DEPTHGEE/LABELVAR refit output) is at https://github.com/SauravBellam/swebench-verified-hop-depth (CC BY 4.0) and is also included as ancillary files of this arXiv submission (anc/). The complete package—the agent and probe source code, every raw result file (episode logs, conversation traces, per-pair probe scores and SWE-bench harness reports; about 60 MB for the primary runs and 140 MB for the SCALECURVE runs under results/scale_curve/, with the exact notebooks, environment records and serving commands that produced them), and the analysis scripts that regenerate every table and figure from them (analysis/scale_curve.py for Section 5.4)—is at https://github.com/SauravBellam/small-agents-code-graphs (Apache 2.0).
REFERENCES
James Adam. Ontology-grounded project memory for coding agents. arXiv:2608.13662; NeSy 2026 (PMLR), 2026.
Yuyang Bai, Yu Wang, and Yu Zhang. Knowledge graphs as files: An agent harness where tool creation and tool use co-evolve. arXiv:2610.18616, 2026.
Nishant Balepur, Kiran Tomlinson, and Tobias Schnabel. Code understanding is a bottleneck for coding agents. arXiv:2610.10610, 2026.
Hongzheng Chai, Jiakun Li, Hongyue Yu, and Yuan Yuan. RepoNav: From snippet retrieval to file-centered repository navigation for code agents. arXiv:2609.08355, 2026.
Shravan Chaudhari, Rahul Thomas Jacob, Jiajun Cao, Shihab Rashid, Mononito Goswami, and Christian Bock. SpIDER: Spatially informed dense embedding retrieval for software issue localization. arXiv:2512.16956, 2025.
Qihong Chen, Aaron Imani, and Iftekhar Ahmed. ProjAgent: Procedural similarity retrieval for repository-level code generation. arXiv:2606.11864, 2026.
Zhaoling Chen, Xiangru Tang, Gangda Deng, Fang Wu, Jialong Wu, Zhiwei Jiang, Viktor Prasanna, Arman Cohan, and Xingyao Wang. LocAgent: Graph-guided LLM agents for code localization. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (ACL), 2025a. arXiv:2503.09089.
Zimin Chen, Yue Pan, Siyu Lu, Jiayi Xu, Claire Le Goues, Martin Monperrus, and He Ye. Prometheus: Unified knowledge graphs for issue resolution in multilingual codebases. arXiv:2507.19942, 2025b.
Fei Ding. The thousand-graph hypothesis: A testable hypothesis of task-conditioned relation materialization in repository-level code reasoning. arXiv:2608.26602; ICLR 2027, 2026.
Akeela Darryl Fattha, Kia Ying Chua, Lingxiao Jiang, and Laura Wynter. Exploration structure in LLM agents for multi-file change localization. arXiv:2606.11976, 2026.
Jiawei He, Weisong Sun, Mengyu Shi, Jie Jia, Tong Bian, Xikai Yang, and Dong Sun. DeepDiscovery: A location-inference framework for task-level repository understanding. arXiv:2606.22906, 2026.
John Hewitt and Percy Liang. Designing and interpreting probes with control tasks. In Proceedings of EMNLP-IJCNLP, 2019.
Yuntong Hu, Tongli Su, Liang Zhao, Bowen Zhu, and Hasibul Haque. LARGER: Lexically anchored repository graph exploration and retrieval. arXiv:2605.16352, 2026.
Zhonghao Jiang, Xiaoxue Ren, Meng Yan, Wei Jiang, Yong Li, and Zhongxin Liu. Issue localization via LLM-Driven iterative code graph searching. arXiv:2503.22424, 2025.
Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik Narasimhan. SWE-bench: Can language models resolve real-world GitHub issues? In International Conference on Learning Representations (ICLR), 2024.
Prakhar Khatri. Do context files help coding agents? a two-agent ablation study on real repositories. arXiv:2607.27250, 2026.
Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with PagedAttention. In Proceedings of the 29th Symposium on Operating Systems Principles (SOSP), 2023.
Minh Le-Anh, Nam Le Hai, Quyen Tran, Anh Nguyen Hoang, Linh Ngo Van, Bach Le, and Nghi D. Q. Bui. Beyond repository boundaries: Cross-repository graph retrieval for code generation. arXiv:2609.09987, 2026.
Jia Li, Xianjie Shi, Kechi Zhang, Ge Li, Zhi Jin, Lei Li, Huangzhao Zhang, Jia Li, Fang Liu, Yuwei Zhang, Zhengwei Tao, Yihong Dong, Yuqi Zhu, and Chongyang Tao. GraphCodeAgent: Dual graph-guided LLM agent for retrieval-augmented repo-level code generation. arXiv:2504.10046, 2025.
Xutian Li, Bo Xiong, Yifeng Zhu, Kunze Li, Xianlin Zhao, Runbang Yan, Yanzhen Zou, Lu Zhang, and Bing Xie. Feature-guided dynamic code graph construction and retrieval for repository-level code generation. arXiv:2609.26480, 2026.
Kung-Yee Liang and Scott L. Zeger. Longitudinal data analysis using generalized linear models. Biometrika, 73(1):13–22, 1986.
Zhihao Lin, Mingyi Zhou, Yizhuo Yang, and Li Li. How much static structure do code agents need? a study of deterministic anchoring. arXiv:2606.26979; ISSTA 2026, 2026.
Zhongxin Liu, Zhonghao Jiang, Zhifan Ye, Haoye Wang, Jiakun Liu, and Xiaoxue Ren. Effective and efficient context retrieval via partial dependency graph for repository-level code generation. arXiv:2608.01927, 2026.
Dongjian Ma, Silin Chen, Yufei Yang, Yuling Shi, Yanfu Yan, and Xiaodong Gu. LLM agents can see code repositories. arXiv:2606.14061, 2026.
Zexiong Ma, Chao Peng, Qunhong Zeng, Pengfei Gao, Yanzhen Zou, and Bing Xie. Tool-integrated reinforcement learning for repo deep search. arXiv:2508.03012, 2025.
OpenAI. Introducing SWE-bench Verified. https://openai.com/index/introducing-swe-bench-verified/, 2024.
Amirkia Rafiei Oskooei, Bora Ilci, Alperen Kayim, Mehmet Egemen Uzun, Berat Can, Kaan Emre Kara, Ozan Orhan, and Mehmet S. Aktas. Deep agentic search for repository-level code question answering: An empirical study. arXiv:2608.01507, 2026.
Weihan Peng, Yuling Shi, Yingwei Ma, Longfei Yun, Beijun Shen, and Xiaodong Gu. DeepRepoQA: Code repository question answering with deep agent exploration. arXiv:2608.24221, 2026.
Bowen Qin and Yi Xie. Agent retrieval bench: Evaluating repository context retrieval for coding agents. arXiv:2607.24882, 2026.
Qwen Team. Qwen3 technical report. arXiv:2505.09388, 2025.
Skipper Seabold and Josef Perktold. statsmodels: Econometric and statistical modeling with Python. In Proceedings of the 9th Python in Science Conference, 2010.
Tianda Sun and Dimitar Kazakov. Tool-call dependency structure is linearly decodable in LLM agent residual streams. arXiv:2605.25310, 2026.
Vali Tawosi, Salwa Alamir, Xiaomo Liu, and Manuela Veloso. Meta-RAG on large codebases using code summarization. arXiv:2508.02611, 2025.
Stephan Tulkens and Thomas van Dongen. Model2Vec: Fast state-of-the-art static embeddings. https://github.com/MinishLab/model2vec, 2024.
Shubham Ugare and Satish Chandra. Agentic code reasoning. arXiv:2603.01896, 2026.
Indira Vats, Sanjukta De, Subhayan Roy, Saurabh Bodhe, Lejin Varghese, Max Kiehn, Yonas Bedasso, and Marsha Chechik. Multi-CoLoR: Context-aware localization and reasoning across multi-language codebases. arXiv:2602.19407, 2026.
Boshi Wang, Weijian Xu, Yunsheng Li, Mei Gao, Yujia Xie, Huan Sun, and Dongdong Chen. Improving code localization with repository memory. arXiv:2510.01003, 2025a.
Xingliang Wang, Baoyi Wang, Haoran Xu, Chen Zhi, Junxiao Han, Xinkui Zhao, Jianwei Yin, and Shuiguang Deng. GRACE: Graph-guided repository-aware code completion through hierarchical code fusion. arXiv:2509.05980, 2025b.
Ying Wang, Wenjun Mao, Chong Wang, Zhenhao Zhou, Yicheng Zhou, Wenyun Zhao, Yiling Lou, and Xin Peng. Extracting conceptual knowledge to locate software issues. arXiv:2509.21427, 2025c.
Chunqiu Steven Xia, Yinlin Deng, Soren Dunn, and Lingming Zhang. Agentless: Demystifying LLM-based software engineering agents. arXiv:2407.01489, 2024.
Boyang Yang, Jiadong Ren, Shunfu Jin, Yang Liu, Feng Liu, Bach Le, and Haoye Tian. Enhancing repository-level software repair via repository-aware knowledge graphs. arXiv:2503.21710, 2025.
Zhongming Yu, Hejia Zhang, Yujie Zhao, Hanxian Huang, Matrix Yao, Ke Ding, and Jishen Zhao. OrcaLoca: An LLM agent framework for software issue localization. arXiv:2502.00350, 2025.
Zhongming Yu, Hengjia Yu, Boqin Yuan, Shuting Zhao, Yizhao Chen, Aryan Dokania, Mihir Jagtap, Jiayu Chang, Yitong Ma, Yash Jayswal, Wentao Ni, Hejia Zhang, Zhaoling Chen, Gangda Deng, and Jishen Zhao. CodeNib: A multi-view data system for serving repository context to coding agents. arXiv:2607.25431, 2026.
Fuwei Zhang, Yanzhao Zhang, Mingxin Li, Dingkun Long, Lexiang Hu, Pengjun Xie, Zhao Zhang, and Fuzhen Zhuang. CORE-Bench: A comprehensive benchmark for code retrieval in the era of agentic coding. arXiv:2607.08691, 2026a.
Shaoqiu Zhang, Yuhang Wang, Jialiang Liang, Yuling Shi, Wenhao Zeng, Maoquan Wang, Shilin He, Ningyuan Xu, Siyu Ye, Kai Cai, and Xiaodong Gu. SWE-Explore: Benchmarking how coding agents explore repositories. arXiv:2606.07297, 2026b.
Yanzhao Zhang, Mingxin Li, Dingkun Long, Xin Zhang, Huan Lin, Baosong Yang, Pengjun Xie, An Yang, Dayiheng Liu, Junyang Lin, Fei Huang, and Jingren Zhou. Qwen3 Embedding: Advancing text embedding and reranking through foundation models. arXiv:2506.05176, 2025.
A HOP DEPTH: ADDITIONAL DETAIL
Table 11: Hop-depth buckets by repository (default label, all 500 SWE-bench Verified tasks).
| Repository | hop 0 | hop 1 | hop 2 | hop 3+ | no mention | unreachable | total |
|---|---|---|---|---|---|---|---|
| django/django | 87 | 64 | 29 | 38 | 13 | 0 | 231 |
| sympy/sympy | 28 | 25 | 14 | 5 | 3 | 0 | 75 |
| sphinx-doc/sphinx | 2 | 5 | 11 | 17 | 9 | 0 | 44 |
| matplotlib/matplotlib | 14 | 8 | 8 | 4 | 0 | 0 | 34 |
| scikit-learn/scikit-learn | 20 | 9 | 3 | 0 | 0 | 0 | 32 |
| astropy/astropy | 10 | 6 | 5 | 1 | 0 | 0 | 22 |
| pydata/xarray | 13 | 5 | 3 | 1 | 0 | 0 | 22 |
| pytest-dev/pytest | 7 | 4 | 2 | 5 | 1 | 0 | 19 |
| pylint-dev/pylint | 2 | 1 | 0 | 2 | 4 | 1 | 10 |
| psf/requests | 2 | 1 | 2 | 2 | 1 | 0 | 8 |
| mwaskom/seaborn | 1 | 0 | 1 | 0 | 0 | 0 | 2 |
| pallets/flask | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| all | 186 | 128 | 78 | 76 | 31 | 1 | 500 |
Worked example. The labeller’s self-test illustrates the definition. In a four-file package where c.py:Child(Base) defines go() which calls self.run(), a.py:Base.run calls helper() imported from b.py, and b.py:helper calls b.py:deep, a patch to deep with the issue “Calling Child.go() returns the wrong value” has mention {Child} (go is too short to count) and depth 4: Child Child.go Base.run helper deep, bucket hop 3+; under containment edges only it is unreachable. The issue “deep is broken” has depth 0.
Mention patterns. The six regular expressions are, in order:
([^\n]{2,80}) back-ticked span
\b([A-Za-z_][\w.])\s(identifier before a parenthesis
File "[^"]?([\w/]+.py)", line \d+, in (\w+) traceback frame
\b([A-Za-z_]\w (?:.[A-Za-z_]\w*)+) \b dotted name
\b([a-z]+__[a-z_0-9]+)\b snake_case
\b([A-Z][a-z0-9]+[A-Z]\w*)\b CamelCase
Every captured group is further split into identifier-like pieces ([A-Za-z_][\w/].py or [A-Za-z_]\w). The strict variant keeps only the first and third patterns.
B GEE MODELS: ARM EFFECTS, INTERACTIONS AND PER-ARM SLOPES
Table 12: Additional GEE estimates (default label, with controls). Top: arm effects from Eq. (3). Middle: the interaction model ; the interaction OR multiplies the per-hop OR of G to give that arm’s per-hop OR. Bottom: per-hop OR from separate fits on each arm’s episodes. “Qwen3-8B (3)” pools the greedy run and the two sampled runs.
| Term | Qwen3-4B (3 runs) | Qwen3-8B (greedy) | Qwen3-8B (3) | Gemma 4 E4B (3) | Qwen3-32B (500) | |
|---|---|---|---|---|---|---|
| Arm effect (OR) | E vs G | 0.93 [0.72, 1.20] | 2.83 [1.74, 4.61] | 2.61 [1.78, 3.81] | 2.48 [1.78, 3.45] | 1.21 [1.01, 1.44] |
| T vs G | 1.68 [1.20, 2.37] | 2.40 [1.46, 3.94] | 2.53 [1.72, 3.71] | 2.06 [1.48, 2.88] | 1.13 [0.94, 1.36] | |
| ET vs G | 1.42 [1.00, 2.02] | 3.43 [2.00, 5.89] | 2.96 [1.98, 4.45] | 2.80 [1.98, 3.95] | 1.24 [1.03, 1.49] | |
| per gold function | 0.49 [0.23, 1.07] | 0.72 [0.38, 1.38] | 0.71 [0.34, 1.47] | 0.44 [0.15, 1.25] | 0.67 [0.39, 1.15] | |
| per log patch line | 0.86 [0.51, 1.47] | 0.58 [0.31, 1.06] | 0.59 [0.31, 1.10] | 1.01 [0.53, 1.94] | 0.67 [0.47, 0.94] | |
| Interaction (OR) | hop (arm G) | 0.46 [0.31, 0.69] | 0.46 [0.26, 0.82] | 0.46 [0.27, 0.76] | 0.45 [0.30, 0.67] | 0.55 [0.44, 0.70] |
| hop×E | 1.24 [1.00, 1.54], p=.048 | 1.05 [0.62, 1.77] | 1.22 [0.79, 1.87] | 1.30 [0.95, 1.77], p=.098 | 1.13 [0.95, 1.36] | |
| hop×T | 0.84 [0.59, 1.20] | 0.93 [0.54, 1.58] | 0.89 [0.59, 1.36] | 1.01 [0.74, 1.38] | 0.94 [0.78, 1.15] | |
| hop×ET | 1.08 [0.79, 1.49] | 1.07 [0.61, 1.88] | 1.01 [0.63, 1.63] | 1.12 [0.77, 1.61] | 0.91 [0.75, 1.10] | |
| Per-arm hop OR | G | 0.47 [0.31, 0.70] | 0.43 [0.24, 0.74] | 0.41 [0.23, 0.71] | 0.39 [0.27, 0.55] | 0.56 [0.44, 0.71] |
| E | 0.60 [0.43, 0.85] | 0.45 [0.29, 0.69] | 0.55 [0.38, 0.78] | 0.57 [0.42, 0.78] | 0.62 [0.50, 0.77] | |
| T | 0.34 [0.22, 0.53] | 0.36 [0.22, 0.60] | 0.35 [0.22, 0.55] | 0.45 [0.31, 0.65] | 0.52 [0.41, 0.67] | |
| ET | 0.52 [0.36, 0.73] | 0.49 [0.32, 0.75] | 0.43 [0.29, 0.63] | 0.48 [0.33, 0.68] | 0.49 [0.39, 0.62] | |
C AGENT RESULTS: PER-RUN AND PER-BUCKET DETAIL
Table 13: function Acc@10 (%) by hop bucket for every run. 40 tasks per bucket (38–40 with function-level gold). BUDGET is on 20 tasks per bucket.
| Model | Run | G | E | T | ET | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 2 | 3+ | 0 | 1 | 2 | 3+ | 0 | 1 | 2 | 3+ | 0 | 1 | 2 | 3+ | ||
| Qwen3-4B | ABL-4B | 45.0 | 26.3 | 15.0 | 10.5 | 40.0 | 18.4 | 15.0 | 18.4 | 55.0 | 31.6 | 22.5 | 13.2 | 47.5 | 28.9 | 27.5 | 13.2 |
| SEEDS s1 | 37.5 | 31.6 | 15.0 | 10.5 | 30.0 | 15.8 | 22.5 | 10.5 | 62.5 | 23.7 | 25.0 | 10.5 | 50.0 | 23.7 | 27.5 | 15.8 | |
| SEEDS s2 | 37.5 | 21.1 | 12.5 | 7.9 | 40.0 | 18.4 | 20.0 | 7.9 | 57.5 | 28.9 | 25.0 | 10.5 | 45.0 | 23.7 | 20.0 | 10.5 | |
| FORCETOOL | — | — | — | — | 60.0 | 18.4 | 22.5 | 7.9 | 52.5 | 23.7 | 22.5 | 18.4 | — | — | — | — | |
| Qwen3-8B | ABL-8B | 25.0 | 15.8 | 5.0 | 5.3 | 47.5 | 23.7 | 20.0 | 13.2 | 47.5 | 18.4 | 20.0 | 7.9 | 55.0 | 18.4 | 27.5 | 15.8 |
| SEEDS s1 | 25.0 | 15.8 | 2.5 | 5.3 | 37.5 | 21.1 | 17.5 | 10.5 | 52.5 | 21.1 | 12.5 | 7.9 | 50.0 | 21.1 | 20.0 | 13.2 | |
| SEEDS s2 | 32.5 | 13.2 | 5.0 | 5.3 | 45.0 | 21.1 | 17.5 | 18.4 | 47.5 | 26.3 | 20.0 | 5.3 | 52.5 | 21.1 | 12.5 | 7.9 | |
| FORCETOOL | — | — | — | — | 52.5 | 13.2 | 22.5 | 15.8 | 47.5 | 21.1 | 15.0 | 2.6 | — | — | — | — | |
| WEAKEMB | — | — | — | — | 47.5 | 15.8 | 12.5 | 7.9 | — | — | — | — | — | — | — | — | |
| BUDGET | 15.0 | 21.1 | 10.0 | 5.3 | — | — | — | — | — | — | — | — | 55.0 | 31.6 | 30.0 | 15.8 | |
| Gemma 4 E4B | ABL-GEMMA | 20.0 | 10.5 | 7.5 | 0.0 | 25.0 | 31.6 | 15.0 | 15.8 | 40.0 | 23.7 | 12.5 | 10.5 | 47.5 | 21.1 | 12.5 | 13.2 |
| SEEDS s1 | 27.5 | 13.2 | 10.0 | 7.9 | 45.0 | 34.2 | 17.5 | 15.8 | 42.5 | 23.7 | 10.0 | 7.9 | 52.5 | 34.2 | 12.5 | 18.4 | |
| SEEDS s2 | 37.5 | 18.4 | 7.5 | 0.0 | 42.5 | 34.2 | 15.0 | 10.5 | 50.0 | 23.7 | 12.5 | 10.5 | 57.5 | 18.4 | 10.0 | 26.3 | |
| Qwen3-32B | ABL-32B, subset | 40.0 | 36.8 | 15.0 | 15.8 | 50.0 | 34.2 | 20.0 | 23.7 | 45.0 | 31.6 | 20.0 | 15.8 | 45.0 | 36.8 | 12.5 | 21.1 |
Table 14: Pre-fix run (ABL-4B-PREFIX, Qwen3-4B). The first full run, before the forced-tool-call rule of Section 4.3; 10 episodes errored and 148 tasks have all four arms. Reported for completeness only; the absolute level and the arm differences are both confounded by episodes that spent their budget repeating a tool-less message.
| Arm | function Acc@10 | func. recall@10 | file Acc@5 | steps | submit | n |
|---|---|---|---|---|---|---|
| G | 17.5 | 20.8 | 38.0 | 11.8 | 0.797 | 158 |
| E | 20.0 | 23.4 | 43.4 | 13.7 | 0.736 | 159 |
| T | 19.6 | 21.7 | 38.2 | 15.4 | 0.637 | 157 |
| ET | 22.4 | 26.6 | 40.4 | 14.8 | 0.692 | 156 |
Table 15: First tool to reveal a gold function, by bucket (fraction of episodes; “none” = gold never revealed). Qwen panels pool three runs. Abbreviations: fe = find_entity, gn = graph_neighbors, ss = semantic_search, rf = read_file.
| Model | bucket | arm T | arm ET | arm E | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| grep | rf | fe | gn | none | grep | rf | fe | gn | ss | none | grep | rf | ss | none | ||
| Qwen3-4B | hop 0 | .28 | .01 | .53 | .07 | .12 | .32 | .03 | .53 | .03 | .01 | .09 | .78 | .07 | .03 | .13 |
| hop 1 | .29 | .07 | .04 | .40 | .20 | .22 | .08 | .06 | .40 | .01 | .23 | .30 | .20 | .07 | .43 | |
| hop 2 | .35 | .03 | .04 | .17 | .41 | .29 | .07 | .03 | .14 | .02 | .46 | .30 | .07 | .13 | .49 | |
| hop 3+ | .17 | .04 | .00 | .16 | .64 | .17 | .03 | .03 | .15 | .04 | .60 | .17 | .09 | .13 | .60 | |
| Qwen3-8B | hop 0 | .32 | .03 | .46 | .12 | .08 | .42 | .03 | .25 | .03 | .17 | .10 | .59 | .03 | .20 | .17 |
| hop 1 | .25 | .02 | .02 | .49 | .22 | .26 | .10 | .03 | .27 | .08 | .25 | .40 | .16 | .15 | .30 | |
| hop 2 | .18 | .09 | .05 | .17 | .50 | .15 | .09 | .04 | .17 | .11 | .44 | .16 | .09 | .28 | .47 | |
| hop 3+ | .12 | .01 | .01 | .16 | .70 | .07 | .04 | .00 | .17 | .13 | .60 | .13 | .05 | .13 | .68 | |
| Gemma 4 E4B | hop 0 | .42 | .12 | .28 | .08 | .10 | .35 | .16 | .07 | .04 | .35 | .03 | .38 | .16 | .42 | .04 |
| hop 1 | .15 | .07 | .03 | .43 | .33 | .19 | .12 | .00 | .21 | .22 | .25 | .21 | .15 | .29 | .35 | |
| hop 2 | .33 | .12 | .01 | .06 | .48 | .12 | .12 | .00 | .08 | .23 | .45 | .15 | .10 | .24 | .51 | |
| hop 3+ | .23 | .10 | .00 | .05 | .62 | .14 | .04 | .00 | .06 | .23 | .53 | .14 | .06 | .25 | .54 | |
| Qwen3-32B (500) | hop 0 | .63 | .06 | .18 | .03 | .10 | .49 | .10 | .29 | .01 | .01 | .10 | .67 | .09 | .09 | .16 |
| hop 1 | .37 | .27 | .03 | .13 | .20 | .31 | .28 | .06 | .08 | .02 | .25 | .33 | .26 | .09 | .32 | |
| hop 2 | .32 | .20 | .00 | .05 | .43 | .29 | .14 | .01 | .01 | .00 | .54 | .18 | .17 | .07 | .58 | |
| hop 3+ | .30 | .11 | .03 | .01 | .55 | .19 | .15 | .00 | .00 | .06 | .60 | .11 | .14 | .07 | .69 | |
Transitions. The most frequent tool-to-tool transitions per episode in the pooled traces are: Qwen3-4B G: grep→grep 2.03, grep→read_file 1.24, read_file→grep 0.63; Qwen3-4B T: grep→grep 0.96, start→find_entity 0.82, find_entity→graph_neighbors 0.75, graph_neighbors→grep 0.55; Qwen3-8B G: grep→grep 8.53, read_file→read_file 2.88, list_dir→list_dir 2.32; Qwen3-8B T: grep→grep 3.41, read_file→read_file 1.94, graph_neighbors→graph_neighbors 1.44, find_entity→graph_neighbors 0.99; Qwen3-8B E: grep→grep 5.68, grep→semantic_search 0.55, semantic_search→grep 0.55. The median step at which the gold is first revealed is 1 for every Qwen arm (0–2 for Gemma 4 E4B), so when an agent finds the gold it usually finds it immediately; the failures are episodes that never do, or that see it and submit something else.
D PROBES: ADDITIONAL TABLES
Table 16: GLOBALPROBE: global pair-probe AUC at layer 24 with one-sided probes and non-neural baselines on the test fold. “best” gives the best layer for the pair probe and its AUC. Positives/negatives per test fold: CALL 7,918/36,291 (Django) and 5,337/25,523 (others); CALL2 3,526/33,985 and 2,879/23,993; INHERIT 690/36,291 and 308/25,523. For CALL2 both the lexical cue and the name baseline are removed by construction.
| Model | Task / fold | pair | permuted | a-only | b-only | name | -distance | same class | in-degree(b) | out-degree(a) | best |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Qwen3-4B | CALL / Django | .785 | .520 | .709 | .613 | .968 | .609 | .561 | .847 | .893 | L24 .785 |
| CALL / others | .747 | .487 | .656 | .608 | .970 | .604 | .538 | .852 | .860 | L24 .747 | |
| CALL2 / Django | .700 | .514 | .695 | .591 | .500 | .507 | .542 | .744 | .832 | L24 .700 | |
| CALL2 / others | .672 | .509 | .687 | .614 | .500 | .477 | .512 | .763 | .797 | L24 .672 | |
| INHERIT / Django | .711 | .499 | .743 | .708 | .968 | .677 | .392 | .292 | .306 | L36 .774 | |
| INHERIT / others | .708 | .477 | .772 | .688 | .970 | .687 | .368 | .301 | .283 | L28 .805 | |
| Qwen3-8B | CALL / Django | .768 | .497 | .690 | .603 | .968 | .609 | .561 | .847 | .893 | L24 .768 |
| CALL / others | .726 | .525 | .667 | .602 | .970 | .604 | .538 | .852 | .860 | L24 .726 | |
| CALL2 / Django | .654 | .541 | .670 | .619 | .500 | .507 | .542 | .744 | .832 | L20 .673 | |
| CALL2 / others | .661 | .497 | .697 | .616 | .500 | .477 | .512 | .763 | .797 | L24 .661 | |
| INHERIT / Django | .699 | .501 | .753 | .727 | .968 | .677 | .392 | .292 | .306 | L24 .699 | |
| INHERIT / others | .703 | .427 | .785 | .724 | .970 | .687 | .368 | .301 | .283 | L28 .761 |
Table 17: ANCHORPROBE under the plain within-anchor grouping (anchor only, no in-degree stratification), Qwen3-4B, layer 24, with anchor-bootstrap intervals. Compared with Table 9, the b-only probe and the in-degree baseline recover a large part of their score, which is exactly the node-level signal the strict grouping removes. Anchors with a positive: 2,937 / 2,650 (CALL), 1,478 / 1,342 (CALL2), 631 / 299 (INHERIT).
| Task | Test fold | pair | interaction | b-only | permuted | in-degree | lexical |
|---|---|---|---|---|---|---|---|
| CALL | Django | 0.742 [.732, .753] | 0.727 [.716, .737] | 0.622 [.614, .631] | 0.523 [.514, .532] | 0.892 [.885, .899] | 0.991 |
| others | 0.705 [.693, .717] | 0.672 [.660, .685] | 0.617 [.606, .627] | 0.498 [.488, .508] | 0.889 [.881, .897] | 0.985 | |
| CALL2 | Django | 0.595 [.583, .608] | 0.567 [.554, .579] | 0.595 [.582, .608] | 0.500 [.487, .513] | 0.790 [.776, .805] | 0.500 |
| others | 0.612 [.600, .624] | 0.554 [.540, .568] | 0.626 [.612, .641] | 0.519 [.506, .532] | 0.789 [.778, .801] | 0.500 | |
| INHERIT | Django | 0.628 [.605, .651] | 0.572 [.548, .596] | 0.681 [.659, .704] | 0.484 [.462, .506] | 0.301 [.291, .313] | 0.891 |
| others | 0.607 [.569, .644] | 0.490 [.452, .530] | 0.660 [.624, .697] | 0.455 [.419, .490] | 0.325 [.305, .344] | 0.862 |
Layer 36. At the final layer the CALL signal has decayed: strict within-anchor pair AUC 0.591 [0.570, 0.610] (Django) and 0.574 [0.555, 0.594] (others) for Qwen3-4B, with b-only at 0.51 and the control at 0.49–0.50. The relation is a mid-network property, consistent with the layer profile of Fig. 6.
CONVPROBE across layers. For CALL under the strict grouping (all pairs), the in-conversation pair probe is at 0.54/0.47 at layer 0, 0.56/0.52 at layer 8, 0.54/0.59 at layer 16, 0.61/0.66 at layer 24, 0.66/0.61 at layer 32 and 0.60/0.62 at layer 36 (Django/others), with the b-only probe between 0.44 and 0.56 throughout. The plain (non-strict) within-anchor pair AUC peaks at 0.81/0.83 at layer 24, against 0.80/0.79 for b-only and 0.97/0.95 for in-degree, which repeats the static lesson that the unstratified metric is dominated by node-level signal.
E SCALECURVE: ADDITIONAL TABLES
Table 18 gives strict function Acc@10 by hop bucket for every model and arm of SCALECURVE with the per-size depth gradient, and Table 19 the episode outcomes, costs and tool-call counts behind Fig. 3d.
Gemma 4 12B. The serving session ended during the greedy run after 307 tasks (1,228 episodes; 120/82/45/45/15 tasks at hop 0/1/2/3+/no-mention, all four arms for each). Unlike every other model in the sweep the 12B agent loops on read_file (15.5–16.9 calls per episode, 18–20k tokens), hits the 30-step cap in 51–57% of episodes and submits in 39–45%, so every arm scores 17–19% (strict) with the gold on screen in 88% of episodes and a conversion rate of 20–22%. Whether this is a property of the checkpoint, of the gemma4 tool-call parser in vLLM 0.32.0, or of the session is not something the partial run can settle; we report it and draw no conclusion from it.
Replication of the primary runs. Three models were run both in the primary experiments (Section 5.3; vLLM 0.19.1) and in SCALECURVE (vLLM 0.32.0, path-fixed harness). Greedy strict function Acc@10 on all 500 tasks, primary versus SCALECURVE: Qwen3-8B 16.7/30.3/27.4/33.2 versus 16.9/30.3/29.1/32.8; Qwen3-32B-FP8 32.0/35.7/34.0/35.9 versus 31.3/35.3/34.4/35.1; Gemma 4 E4B 16.7/28.5/26.8/29.7 versus 18.8/25.4/29.9/34.4 (G/E/T/ET). The Qwen runs agree within 2 points per arm; the Gemma E4B structured arms differ by 3–5 points between stacks, which is within the between-seed spread of that model (Table 5) but should be kept in mind when the two Gemma E4B numbers are compared.
Missing traces. In six runs the per-episode results file is complete but the full message-trace file stopped early (Qwen3-4B seed 2: 1,240 of 2,000 traces; Qwen3-8B seed 1: 1,732; Qwen3-14B seeds 1 and 2: 1,168 and 300; Qwen3-32B seed 2: 1,864; Qwen3-14B-FP8 seed 1: 1,832; Gemma E4B seed 1: 228); the Drive mount stopped accepting writes to the trace file while the results file kept growing. Every metric in this section comes from the results file (which records each step's tool, arguments, revealed nodes and token counts), so none is affected.
Table 18: SCALECURVE: strict function Acc@10 (%) by hop bucket, model and arm ( seeds pooled; Gemma 4 12B greedy). The last column is the per-hop odds ratio from a GEE fit clustered by task on that model's seed episodes (Qwen3 sizes only), with its 95% interval.
| Model | arm | hop 0 | hop 1 | hop 2 | hop 3+ | OR per hop |
|---|---|---|---|---|---|---|
| Qwen3-0.6B | G | 0.4 | 0.2 | 0.0 | 0.0 | 0.67 [0.57, 0.78] |
| E | 9.9 | 13.0 | 7.6 | 4.5 | ||
| T | 11.2 | 9.3 | 1.6 | 0.3 | ||
| Qwen3-1.7B | ET | 10.8 | 8.5 | 4.6 | 2.7 | |
| G | 1.8 | 0.6 | 0.3 | 0.0 | 0.58 [0.49, 0.69] | |
| E | 30.3 | 22.6 | 14.5 | 11.0 | ||
| T | 21.9 | 13.0 | 1.6 | 1.7 | ||
| Qwen3-4B (hybrid) | ET | 28.6 | 19.3 | 7.9 | 7.2 | |
| G | 18.8 | 9.3 | 1.6 | 1.4 | 0.57 [0.47, 0.68] | |
| E | 37.8 | 29.5 | 16.4 | 14.0 | ||
| T | 45.5 | 28.9 | 8.6 | 3.1 | ||
| Qwen3-8B | ET | 41.4 | 35.8 | 10.9 | 14.7 | |
| G | 25.1 | 24.2 | 5.6 | 2.7 | 0.53 [0.43, 0.64] | |
| E | 44.1 | 30.9 | 15.8 | 15.8 | ||
| T | 49.2 | 30.1 | 12.8 | 7.5 | ||
| Qwen3-14B | ET | 47.4 | 35.8 | 13.8 | 12.7 | |
| G | 47.7 | 38.4 | 12.8 | 8.6 | 0.50 [0.42, 0.60] | |
| E | 64.7 | 43.9 | 21.7 | 21.9 | ||
| T | 61.9 | 47.6 | 19.7 | 8.2 | ||
| Qwen3-32B (FP8) | ET | 63.9 | 50.0 | 22.0 | 24.0 | |
| G | 42.8 | 38.4 | 15.8 | 14.4 | 0.60 [0.52, 0.70] | |
| E | 45.4 | 40.7 | 20.4 | 24.0 | ||
| T | 51.9 | 42.1 | 17.8 | 16.8 | ||
| ET | 48.0 | 43.7 | 15.8 | 21.9 | ||
| Qwen3-14B-FP8 | G | 47.0 | 40.2 | 9.9 | 6.2 | |
| E | 63.2 | 45.9 | 21.7 | 25.3 | ||
| T | 61.4 | 46.7 | 16.4 | 12.3 | ||
| ET | 64.3 | 47.6 | 24.3 | 23.3 | ||
| Gemma 4 E2B | G | 7.3 | 4.1 | 3.3 | 0.0 | |
| E | 38.6 | 24.0 | 14.5 | 13.0 | ||
| T | 41.1 | 27.2 | 6.6 | 3.4 | ||
| ET | 51.1 | 33.7 | 11.8 | 11.6 | ||
| Gemma 4 E4B | G | 24.9 | 24.0 | 5.9 | 5.5 | |
| E | 37.8 | 30.5 | 19.1 | 15.1 | ||
| T | 41.4 | 36.2 | 11.8 | 8.9 | ||
| ET | 43.0 | 39.0 | 17.8 | 15.8 | ||
| Gemma 4 12B (greedy) | G | 21.0 | 17.7 | 11.6 | 9.5 | |
| E | 21.0 | 21.5 | 11.6 | 14.3 | ||
| T | 21.8 | 25.3 | 7.0 | 9.5 | ||
| ET | 22.7 | 19.0 | 9.3 | 11.9 |
Table 19: SCALECURVE: episode outcomes and tool use per model and arm, all decodings pooled. saw is the fraction of episodes in which a gold function was revealed, conv. is Pr(correct | saw), cap the fraction at the 30-step cap; calls per episode for grep, read_file, semantic_search (ss), find_entity (fe) and graph_neighbors (gn); “use” is the fraction of episodes with at least one call to the structured tool (ss for E; fe/gn for T and ET); “2-hop” is the fraction of graph_neighbors calls that ask for hops=2.
| Model | arm | acc | saw | conv. | submit | cap | steps | grep | read_file | ss | fe | gn | use | 2-hop |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Qwen3-0.6B | G | 0.2 | 0.05 | 0.03 | 0.64 | 0.07 | 7.9 | 1.5 | 0.7 | — | — | — | — | — |
| E | 9.4 | 0.40 | 0.20 | 0.72 | 0.13 | 10.4 | 1.1 | 2.5 | 2.93 | — | — | .87 | — | |
| T | 7.0 | 0.21 | 0.23 | 0.52 | 0.22 | 13.8 | 1.7 | 0.2 | — | 7.00 | 0.11 | .98/.08 | .32 | |
| ET | 8.0 | 0.42 | 0.16 | 0.71 | 0.16 | 12.3 | 1.1 | 1.3 | 4.44 | 1.48 | 0.44 | .68/.42 | .20 | |
| Qwen3-1.7B | G | 0.9 | 0.28 | 0.02 | 0.76 | 0.13 | 13.8 | 9.5 | 0.5 | — | — | — | — | — |
| E | 22.4 | 0.46 | 0.45 | 0.97 | 0.02 | 7.2 | 3.8 | 0.2 | 1.01 | — | — | .84 | — | |
| T | 12.3 | 0.45 | 0.25 | 0.73 | 0.23 | 17.6 | 6.7 | 0.6 | — | 4.80 | 1.98 | .98/.48 | .12 | |
| ET | 19.0 | 0.50 | 0.35 | 0.91 | 0.08 | 12.2 | 4.7 | 0.3 | 0.81 | 2.27 | 1.41 | .93/.47 | .11 | |
| Qwen3-4B (hybrid) | G | 10.1 | 0.37 | 0.24 | 0.57 | 0.33 | 16.1 | 14.2 | 0.3 | — | — | — | — | — |
| E | 27.7 | 0.55 | 0.45 | 0.95 | 0.03 | 6.1 | 4.1 | 0.1 | 0.78 | — | — | .74 | — | |
| T | 27.1 | 0.56 | 0.47 | 0.77 | 0.19 | 12.1 | 8.3 | 0.4 | — | 1.13 | 0.96 | .80/.60 | .16 | |
| ET | 29.5 | 0.63 | 0.46 | 0.91 | 0.08 | 8.7 | 5.2 | 0.2 | 0.54 | 0.72 | 0.86 | .58/.63 | .47 | |
| Qwen3-8B | G | 17.1 | 0.57 | 0.30 | 0.67 | 0.33 | 15.3 | 8.6 | 3.0 | — | — | — | — | — |
| E | 30.4 | 0.68 | 0.44 | 0.84 | 0.16 | 11.6 | 5.1 | 3.1 | 1.47 | — | — | .88 | — | |
| T | 30.2 | 0.68 | 0.44 | 0.79 | 0.20 | 13.5 | 4.7 | 2.9 | — | 1.64 | 2.41 | .94/.88 | .85 | |
| ET | 32.1 | 0.71 | 0.46 | 0.86 | 0.14 | 11.6 | 5.3 | 1.9 | 0.61 | 0.87 | 1.46 | .71/.79 | .91 | |
| Qwen3-14B | G | 32.1 | 0.69 | 0.44 | 0.96 | 0.01 | 8.2 | 4.6 | 2.3 | — | — | — | — | — |
| E | 44.0 | 0.73 | 0.59 | 0.99 | 0.00 | 6.8 | 2.9 | 1.9 | 0.99 | — | — | .95 | — | |
| T | 41.4 | 0.76 | 0.54 | 0.96 | 0.02 | 10.1 | 4.9 | 2.2 | — | 1.48 | 0.20 | .96/.13 | .60 | |
| ET | 46.0 | 0.76 | 0.59 | 0.99 | 0.00 | 8.5 | 3.3 | 1.9 | 0.68 | 1.22 | 0.29 | .90/.24 | .77 | |
| Qwen3-32B (FP8) | G | 32.1 | 0.66 | 0.45 | 0.98 | 0.01 | 5.2 | 1.8 | 2.4 | — | — | — | — | — |
| E | 35.8 | 0.66 | 0.50 | 0.99 | 0.00 | 5.0 | 1.1 | 2.5 | 0.44 | — | — | .44 | — | |
| T | 37.1 | 0.73 | 0.48 | 0.97 | 0.02 | 7.0 | 2.3 | 2.8 | — | 0.53 | 0.42 | .45/.35 | .00 | |
| ET | 36.5 | 0.70 | 0.47 | 0.98 | 0.01 | 6.0 | 1.5 | 2.6 | 0.12 | 0.53 | 0.18 | .47/.17 | .00 | |
| Qwen3-14B-FP8 | G | 31.4 | 0.69 | 0.45 | 0.95 | 0.01 | 8.5 | 4.6 | 2.5 | — | — | — | — | — |
| E | 44.1 | 0.73 | 0.58 | 0.99 | 0.00 | 6.9 | 2.9 | 2.0 | 0.99 | — | — | .95 | — | |
| T | 40.8 | 0.76 | 0.53 | 0.96 | 0.02 | 10.4 | 5.1 | 2.4 | — | 1.37 | 0.28 | .94/.18 | .52 | |
| ET | 45.5 | 0.77 | 0.58 | 0.98 | 0.00 | 8.7 | 3.5 | 2.0 | 0.68 | 1.13 | 0.29 | .88/.24 | .81 | |
| Gemma 4 E2B | G | 4.3 | 0.48 | 0.07 | 0.96 | 0.04 | 8.7 | 3.0 | 2.6 | — | — | — | — | — |
| E | 26.0 | 0.63 | 0.38 | 0.96 | 0.03 | 6.1 | 0.9 | 2.7 | 1.08 | — | — | .99 | — | |
| T | 24.8 | 0.62 | 0.38 | 0.96 | 0.04 | 9.2 | 1.5 | 2.4 | — | 1.57 | 1.72 | .99/.88 | .08 | |
| ET | 33.0 | 0.70 | 0.44 | 0.97 | 0.03 | 7.4 | 0.5 | 1.9 | 0.88 | 1.19 | 1.65 | .90/.90 | .05 | |
| Gemma 4 E4B | G | 18.0 | 0.63 | 0.26 | 1.00 | 0.00 | 6.8 | 2.0 | 2.2 | — | — | — | — | — |
| E | 28.2 | 0.70 | 0.36 | 1.00 | 0.00 | 6.1 | 1.4 | 2.3 | 0.77 | — | — | .75 | — | |
| T | 29.1 | 0.71 | 0.40 | 1.00 | 0.00 | 8.1 | 1.8 | 2.1 | — | 0.85 | 0.92 | .69/.69 | .04 | |
| ET | 32.4 | 0.74 | 0.43 | 1.00 | 0.00 | 7.0 | 1.2 | 2.2 | 0.72 | 0.22 | 1.00 | .20/.69 | .04 | |
| Gemma 4 12B (greedy) | G | 17.3 | 0.88 | 0.20 | 0.45 | 0.51 | 21.7 | 3.6 | 15.5 | — | — | — | — | — |
| E | 18.6 | 0.89 | 0.21 | 0.43 | 0.54 | 22.1 | 3.4 | 16.2 | 0.03 | — | — | .02 | — | |
| T | 19.3 | 0.89 | 0.21 | 0.40 | 0.57 | 23.0 | 4.6 | 15.7 | — | 0.22 | 0.06 | .20/.06 | .00 | |
| ET | 18.3 | 0.89 | 0.20 | 0.39 | 0.56 | 23.3 | 3.9 | 16.9 | 0.02 | 0.20 | 0.01 | .18/.01 | .00 |
F PROMPTS AND TOOL SCHEMAS
Localization agent system prompt.
You are a code localization agent. Given a GitHub issue and a Python repository, find the functions, methods or classes that must be edited to resolve the issue. Explore with the tools, then call submit once with a ranked list of locations, most likely first, each as 'path/to/file.py:QualifiedName' (e.g. 'pkg/mod.py:Class.method'), or 'path/to/file.py' for module-level code. Do not write a patch.
The user turn is Issue:\n followed by the first 6,000 characters of the problem statement. After a turn without a tool call the harness appends the user message Use a tool, or call submit with your ranked locations. and requires a tool call on the next turn.
Tool descriptions (as given in the JSON schemas).
-
grep: "Regex search over the repository's .py files. Returns up to 40 'path:line: text' matches." Parameters pattern (required), path_prefix.
-
read_file: "Read lines of a file with line numbers (max 120 lines)." Parameters path (required), start, end.
-
list_dir: "List the files and subdirectories under a directory (" = repository root)." Parameter path.
-
semantic_search: "Embedding search: the 10 functions/classes whose code is most similar in meaning to a natural-language or code query." Parameter query (required).
-
find_entity: "Find functions/classes by name. Returns entity ids 'path:QualifiedName' with signatures." Parameter name (required).
• graph_neighbors: “Code-graph neighbours of an entity id or file path: what it contains, calls, imports, inherits, and what calls/imports/inherits/contains it. hops = 1 or 2.” Parameters entity (required), hops.
• submit: “Submit the final ranked list of locations and stop.” Parameter locations (array of strings, required).
REPAIR system prompt.
You are fixing a bug in a Python repository. You are given the issue and the code of the functions that are most likely involved. Change only that code. Answer with one or more edit blocks and nothing else, each exactly:
<<<<<< SEARCH path/to/file.py <exact lines copied from the code shown>
<replacement lines> >>>>>>> REPLACE The SEARCH lines must match the file exactly, including indentation.The user turn contains the issue (first 6,000 characters) and, for each of up to five locations, a header ## path (lines s-e): QualifiedName followed by the first 150 lines of the definition in a code fence. Every arm's completion contained at least one well-formed edit block in 98–100% of prompts (mean 1.1 blocks); a block is applied only if its SEARCH text occurs exactly once in the file, and the result is diffed against the base commit with difflib.
G COMPUTE AND SOFTWARE
The hop-depth labelling, ABL-4B, ABL-4B-PREFIX, the Qwen3-4B halves of SEEDS and FORCETOOL, the static probes (GLOBALPROBE, ANCHORPROBE) and the REPAIR harness scoring ran on a GCP g2-standard-16 VM with one NVIDIA L4; ABL-8B, ABL-GEMMA, the Qwen3-8B halves of SEEDS and FORCETOOL, BUDGET, WEAKEMB, the 8B probes, REPAIR generation and CONVPROBE ran on Colab A100 40GB instances; ABL-32B, ABL-8B-500 and the Gemma 4 E4B seeds of SEEDS ran on Colab A100 80GB instances (the 32B model from Qwen/Qwen3-32B-FP8); the GEE fits, label variants, trace analysis, conversation rendering and the repair prompts and patches ran on CPU. Serving used vLLM (0.19.1) with -max-model-len 32768 (40960 for BUDGET) and the hermes or gemma4 tool-call parser; probes used transformers in bfloat16 with SDPA attention; the SWE-bench harness was version 4.1.0 with prebuilt instance images, 6 workers and an 1,800 s per-instance timeout. Embeddings were cached by text hash across base commits. A REPAIR scoring attempt that hit Docker image-name conflicts for part of the G arm was re-run for the affected instances; no instance errored in the final reports. Checkpoints: Qwen/Qwen3-4B-Instruct-2507, Qwen/Qwen3-8B, Qwen/Qwen3-32B-FP8, Qwen/Qwen3-Embedding-0.6B, minishlab/potion-base-8M, google/gemma-4-E4B-it. SCALECURVE ran on Colab A100-SXM4-80GB instances with vLLM 0.32.0, transformers 5.19.0 and torch 2.13.0, one serving session per model with every arm and decoding of that model in the session, the same 30-step and 32k-token limits, and a build of the agent that differs from scripts/loc_agent.py only in output ordering and resume handling (the harness and graph builder used are stored with the results, with md5s, and each session's env_*.json records the pip freeze, GPU, model revisions and the exact vllm serve commands). Checkpoints: Qwen/Qwen3-0.6B, Qwen3-1.7B, Qwen3-4B, Qwen3-8B, Qwen3-14B, Qwen3-14B-FP8, Qwen3-32B-FP8, google/gemma-4-E2B-it, gemma-4-E4B-it, gemma-4-12B-it.