arXiv(opens in a new tab)cs.CVSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.31234

WeaveAgent: A Two-Stage Tool-Routing Agent for Ultra-High-Resolution Remote Sensing Imagery

Zhongyu Pang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Problem. Ultra-high-resolution (UHR) remote sensing with vague user intents poses two bottlenecks: visual tokens are expensive, and tool calling must be format-reliable (pretrained models emit zero tool calls zero-shot). Method. WeaveAgent, a two-stage tool-routing agent, decouples routing decisions from visual perception. Stage A is routing-first: emission is trained, not elicited. Stage B executes conditionally: intrinsic queries enter visual answering (full-scene thumbnail; the WeaveEarth-style evidence board as an optional fixed-budget, ≈5k-token compression interface with a reported 1.31× detail ceiling and negative paired deltas); extrinsic queries execute T_call on the original full-resolution imagery, answering from tool observations in a second, observation-masked round (two-turn trajectories). Training: alignment SFT, then GRPO under the routing-first reward RWA2R_{WA2}. Results. Alignment SFT lifts extrinsic routing from 0% to 80.75% (323/400); GRPO suppresses 9 intrinsic mis-emissions while tool selection is unchanged. The trained 2B system does not beat the zero-shot 8B baseline overall (0.263 vs. 0.250) — a diagnostic, not leaderboard, contribution. Oracle attribution separates the two ingredients of the repair: loading the observation into context already lifts extrinsic answer accuracy from 0.025 to 0.425 under marker-free cross-mode returns, and the two-turn SFT stage adds a further significant +9.3 points to 0.518 (0.965 under training-distribution returns; all oracle/annotation-grounded) at a small routing cost. A ±-image ablation shows emission suppression is visually grounded, and a query-register matrix shows LLM-rewritten queries cost the trained checkpoints 2–11 points. Scope. All training and evaluation use the 5,000 / 3,273 / 1,000-record VagueUHR corpus (600 intrinsic + 400 tool-requiring; the 5,000-record base seeds the synthesis pipeline and is not itself used for optimization). Single-pass evidence construction runs at 7.31 s per image on an RTX 4090 — faster than reported multi-round search (cross-hardware reference). Code, data, and all evaluation protocols will be released.

1 Introduction

Ultra-high-resolution (UHR) remote sensing (RS) images — sub-meter scenes that routinely exceed 4,000–10,000 pixels per side — stress vision-language models (VLMs) in a specific way: resizing the scene to the model's native input discards exactly the dense small objects that make UHR imagery informative, while pushing the original resolution through the visual encoder makes the token cost grow out of control (the images evaluated in this work measure 6,044 px per side at the median and 27,328 px at the maximum; Figure 1 shows both difficulties on one real record). On top of the visual difficulty, RS queries are frequently vague in the sense of RemoteAgent [2]: “count the berthed vessels”, “outline the burned area” — requests that require precise measurement no single

"hey, what is the activity of the top-most plane?" (target = 0.14% of image)

Figure

two-stage tool routing for vague UHR intents

Figure

answers on tool-bearing rows: 0.025 → 0.518 → 0.965 (single-turn / cross-mode / upper bound)

Figure 1: The problem and the answer at a glance. Left: a real test record — a vague query about a target that covers 0.14% of a 5,000×5,0005,000 \times 5,000-px image (magnified inset); no thumbnail a VLM accepts resolves it. Right: WeaveAgent routes the query first (Stage A, a routing-first decision stage) and executes conditionally (Stage B): direct visual answering, or a T_call that is answered from its observation in a second round. Headline numbers: extrinsic routing 0% → 80.75% after alignment training; answers on tool-bearing rows 0.025→0.425→0.518→0.9650.025 \rightarrow 0.425 \rightarrow 0.518 \rightarrow 0.965 across the loading and repair stages (Section 5.7).

forward pass can deliver, but rather the invocation of expert tools (detectors, segmenters, counters) on the right image region.

The two bottlenecks point to two capabilities of a different nature. Perception is expensive: every visual token costs, and should be spent only after the decision “what needs to be seen” has been made. Decision is cheap: the information needed to judge “does this query need a tool, and which one” lives almost entirely in the query text and the tool catalog. This is not speculation but a literature-backed design basis: Toolformer [3] showed that a language model can learn when to call, what to call, and with which arguments from purely textual self-supervision, and RouteLLM [4] showed that a router looking only at the query text can halve cost without quality loss and generalizes across models. When these findings are transported to UHR remote sensing, the natural architecture is to decouple routing decisions from visual perception: a text-first decision stage decides before any visual token is spent on answering; visual tokens enter the context only afterwards, on the path the decision selects. Our own ±\pm-image ablation then shows the strong form of this design basis is only partially attained: the trained router’s emission suppression is visually grounded (Section 5.6) — a boundary we measure and report rather than assume away.

The WeaveAgent two-stage architecture. Stage A (Section 3.2) is a routing-first decision stage: its decision interface is built around the query q and the tool catalog C (a text-first decision interface), delegates intrinsic queries to answering, and for extrinsic queries selects a tool and emits T_call(e_k, p). Stage B (Section 3.3–Section 3.4) executes conditionally: the intrinsic path feeds the visual input (full-scene thumbnail, optionally the evidence board) to the model to generate the answer; the extrinsic path executes the T_call — tools always operate on the original full-resolution imagery — backfills the tool observation (boxes, masks, counts) into the context, and generates the final answer in a second round (two-turn trajectories with observation masking [25]). Decoupling yields three direct benefits: (i) the decision stage is a single cheap text-first step (Section 5.6 quantifies how far a fully text-only router remains from the trained policy); (ii) the T_call output is a purely textual decision that alignment training can make reliably parseable; and (iii) the tool path suffers no visual-compression loss, because tools see the original image.

Repositioning the evidence board. We adopt the WeaveEarth [1] structured evidence pipeline (GCC scoring, MSES compression, TPEB/SEM assembly) as an optional compression interface of the Stage-B intrinsic path, and recalibrate its position honestly: it is not an accuracy booster — on three static VQA benchmarks its paired deltas against the 2048-px thumbnail baseline are -1.0 (LRS-VQA), -3.4 (MME-RS) and -2.9 (XLRS) points, and its components show no positive contribution in ablations (Section 5.3); it is a fixed-budget compressed visual interface — any UHR image is compressed into two structured views of ≈5k tokens with constant token cost regardless of source size, trading a 1.31× detail ceiling (Section 6.3) for determinism and local-structure preservation on fine-grained task types. We report all of its properties under this “compression interface, not booster” positioning.

Training recipe: alignment SFT → RWA2R_{WA2} GRPO, a positive gain per component. Tool routing does not appear for free: the zero-shot model emits zero T_call calls, and GRPO from the base model cannot explore the behavior spontaneously (85–90% of rollout groups have zero reward variance). Our recipe has two steps. Alignment SFT seeds the emission behavior with prompts and image formats strictly identical to evaluation, lifting extrinsic routing from 0% to 80.75% (323/400, tool selection 0.905). GRPO with the routing-first reward RWA2R_{WA2} then stabilizes on top: suppressing 9 intrinsic mis-emissions (classification 0.435 → 0.460, reasoning 0.435 → 0.450) while extrinsic tool selection is unchanged (323/400), with healthy training dynamics (zero-variance groups an order of magnitude below the unaligned arms, sequence lengths stable at 165–180 tokens). Under this recipe a third gap surfaced and was addressed: with routing at 80.75%, extrinsic answer accuracy stayed near zero — an observation→answer conversion gap. An oracle attribution study (Section 5.7) localizes the break to the conversion of marker-free tool text (argument values are ≈96% correct while final answers score 0.045), and extrinsic answer accuracy rises from 0.025 to 0.425 by loading the observation alone, and to 0.518 with the two-turn SFT stage (McNemar p=3.8×10−5p = 3.8 \times 10^{-5}), under marker-free cross-mode returns (0.965 under training-distribution returns), at a small routing cost. Query wording is not a hidden confound: on 992 paired records the zero-shot floor is robust to LLM-rewritten natural phrasing (+3.1 points, McNemar p=0.043p = 0.043; Section 5.5), and the trained checkpoints degrade gracefully but measurably on the rewritten register (Section 5.5).

References (37)