Full text not available for this paper

Summary (Overview)

  • Component routing framework: The paper introduces a method that decomposes GUI agent trajectories into four distinct components—locators (G), procedures (P), state facts (F), and lessons (L)—and routes each to either the model's context (prompt) or weights (fine-tuning) based on two measurable properties: recurrence (rr) and state-conditionality (κ\kappa).

  • Key empirical finding: Locators (+4.9 points) and lessons (+1.5) perform better in the weights, while procedures (−4.2) and state facts (−4.1) perform better in the context—a consistent pattern across three backbone families (GUI-Owl-8B, Qwen3-VL-8B, ScaleCUA-7B) and two environments (MobileGym, AndroidWorld).

  • Predictive rule: A linear decision rule in (r,κ)(r, \kappa) recovers the correct destination for 24 of 24 held-out backbone cells, and routing by this rule beats every whole-trajectory baseline, exceeding the better single destination by +3.5 points on average.

  • Mechanistic insights: Training on a component makes its notes redundant in context (readout drops from ~42% to ~16% for high-recurrence components); context gains scale with the information gap between producer and consumer, while weights gains are eroded by the policy gap.

  • Producer–consumer analysis: Notes (context route) transfer effectively across producers regardless of identity, while fine-tuning (weights route) only helps when producer and consumer are the same model, with most of its gain attributable to practice on the consumer's own trajectories.


Introduction and Theoretical Foundation

Background and Motivation

Self-improving GUI agents (agents that operate phones and desktops) generate trajectories during task execution, which can be reused to improve future performance through two primary mechanisms:

  1. Fine-tuning (weights route): Distilling successful trajectories into model parameters
  2. Retrieval (context route): Storing trajectories in an external library retrieved into the prompt

Previous comparisons of these two destinations have reached contradictory conclusions—some studies find internalization (weights) superior, others find prompt-side updates superior. The authors attribute this disagreement to the unit of experience: treating whole trajectories as indivisible units bundles items with fundamentally different properties, making conclusions dependent on the composition of the trajectory mix.

Core Research Question

Which components of an agent's own experience belong in its context and which in its weights, and does the answer survive training and a change of backbone?

Theoretical Framework

The paper defines two pool-level properties measurable before any training:

Recurrence (rr): How often a component's key appears in unrelated tasks—measuring cross-task transferability:

r(d)≜1∣Pd∣∑p∈Pd1∣Np∣∑q∈Np1[k(d)∈Kq]r(d) \triangleq \frac{1}{|P_d|} \sum_{p \in P_d} \frac{1}{|N_p|} \sum_{q \in N_p} \mathbb{1}[k(d) \in K_q]

State-conditionality (κ\kappa): How much a component's usefulness depends on the current state matching its source state. The proxy uses state signatures with Jaccard similarity tiers (exact: J(x,y)≥0.9J(x,y) \geq 0.9; relaxed: 0.5≤J(x,y)<0.90.5 \leq J(x,y) < 0.9):

κ0(d)≜1−aR(d)aE(d)\kappa_0(d) \triangleq 1 - \frac{a_R(d)}{a_E(d)}

where aτ(d)a_\tau(d) measures payload agreement (position within 0.5% of screen diagonal, or target identity) across state-matching occurrence pairs at tier τ\tau.


Methodology

Problem Formulation

An agent with policy π\pi runs tasks and keeps all trajectories (successful or not), forming experience pool EE. An extractor maps EE to four item sets DcD_c for c∈{G,P,F,L}c \in \{G, P, F, L\}. The route gain measures the difference between destinations:

Δ(c)≜U(Wc)−U(Cc)=1∣T∣∑x∈T[u(x;Wc)−u(x;Cc)]\Delta(c) \triangleq U(W_c) - U(C_c) = \frac{1}{|T|} \sum_{x \in T} \left[ u(x; W_c) - u(x; C_c) \right]

where Δ(c)>0\Delta(c) > 0 indicates the weights destination is superior.

Component Definitions

ComponentKeyNote (context)Sample (weights)
Locator (G)App, role, element nameElement positionScreenshot → click pair
Procedure (P)Three consecutive targetsSubgoal sequenceNext-action prediction with subgoal thought
State fact (F)App, target, predicatePrecondition for actionAction prediction with predicate thought
Lesson (L)App, state, failed targetCorrective guidancePreference pair (failed vs. succeeded)

Two Destinations

  • Context route (CcC_c): Items indexed by application and key; at each step, top-5 items ranked by state-similarity are appended to the prompt as notes (exact matches first)
  • Weights route (WcW_c): Fine-tuning via LoRA—supervised fine-tuning for G, P, F; direct preference optimization for L; all trained arms reach ≥0.90 token accuracy on held-in development split

Routing Rule

A linear score in the two properties, fitted with one backbone family held out:

sθ(c)≜αr(c)−βκ0(c)−γs_\theta(c) \triangleq \alpha r(c) - \beta \kappa_0(c) - \gamma

The held-out rule recovers the sign of Δ(c)\Delta(c) with α∈[9.01,9.32]\alpha \in [9.01, 9.32], β∈[4.86,5.28]\beta \in [4.86, 5.28], γ∈[0.70,0.94]\gamma \in [0.70, 0.94]. A cell routes to weights if sf(c)>0s_f(c) > 0, else to context.

Evaluation Setup

  • MobileGym: Simulated phone, 20 apps, 416 task templates (160 train/256 test); 122 training templates form the pool; 1,106 paired held-out instances per seed
  • AndroidWorld: 116 tasks on 20 real apps; 12 apps provide experience, 8 held out; 232 paired instances per seed
  • Three seeds control pool sampling, training, and instance sampling; paired bootstrap over instances (10,000 resamples, 95% intervals)

Empirical Validation / Results

Observation 1: Components Split by Destination

The route gain pattern is consistent across backbones and environments:

ComponentWeights gainContext gainRoute gain Δ\Delta
Locators (G)+6.7+1.8+4.9 (weights)
Procedures (P)+1.0+5.2−4.2 (context)
State facts (F)~+0.8~+4.9−4.1 (context)
Lessons (L)~+2.5~+1.0+1.5 (weights, weak)

Observation 2: Producer–Consumer Asymmetry

  • Context route: Notes help every consumer regardless of producer; larger producers help more (8B consumer gains +3.6 from own procedures, +4.8 from 32B's, +2.2 from 4B's)
  • Weights route: Fine-tuning only helps with the same model as producer; other-family procedures change the 8B consumer by −7.5 points
  • Most weights gain on own procedures is practice (+0.6 from own successes alone vs. +0.9 with all samples)

Observation 3: Readout After Training

The readout probe replays decision steps with/without retrieved notes:

  • Before training: notes change actions in 42% of probed steps
  • After training on same items: rate falls to 16% (locators), 15% (lessons), but only 22% (procedures)
  • After-to-before ratio falls with recurrence (Spearman −0.92); splitting items by recurrence thirds shows ratio falling from 0.73 to 0.11 (locators) and 0.63 to 0.11 (lessons)

Interventions

InterventionComponentEffect on route gain
Items copied ×8 (increase dose/recurrence)Procedures−4.2 → −0.8
Items copied ×8State facts+3.6 (reaches context on Qwen3-VL)
State condition removed (task-text retrieval)ProceduresContext gain drops 3.9 points
State condition removedState factsContext gain drops 3.4 points
Random notes from other apps—−1.6 points (control)

Routing Against Alternatives

ArmMobileGym (avg)AndroidWorld (avg)Δ vs. routing
Base agent19.121.8↑ 14.1
Self-retry (3 attempts)23.925.3↑ 9.3
Whole-trajectory SFT19.822.2↑ 13.4
Whole-trajectory retrieval18.021.0↑ 15.2
All → weights28.028.9↑ 5.2
All → context28.530.2↑ 4.7
Routing (ours)33.233.0—
Reverse assignment24.326.3↑ 8.9

Routing exceeds the better single destination by +4.4 points on MobileGym and +3.2 to +5.0 on AndroidWorld per backbone.

The Three Gaps

Information gap: gI(p,q,ϕ)≜σϕ(p)[1−σϕ(q)]\text{Information gap: } g_I(p,q,\phi) \triangleq \sigma_\phi(p)[1 - \sigma_\phi(q)] Policy gap: gP(p,q)≜1∣X(p,q)∣∑x∈X(p,q)1[aq(x)≠ap(x)]\text{Policy gap: } g_P(p,q) \triangleq \frac{1}{|X(p,q)|} \sum_{x \in X(p,q)} \mathbb{1}[a_q(x) \neq a_p(x)] Producer ability: gA(p)≜U0(p)\text{Producer ability: } g_A(p) \triangleq U_0(p)
  • Context gain rises with information gap: +0.2 (lowest sixth) → +11.3 (highest sixth), Spearman 0.65
  • Weights gain falls with policy gap: +4.0 (lowest sixth) → −5.7 (highest sixth), Spearman −0.52
  • Information and policy gaps vary almost independently (Spearman −0.13)

Theoretical and Practical Implications

Theoretical Implications

  1. Unit of experience matters: The disagreement between prior studies comparing fine-tuning vs. retrieval stems from treating trajectories as indivisible bundles. Component-level analysis resolves the contradiction—different components have genuinely different optimal destinations.

  2. Predictable routing: Two simple, pre-training-measurable properties (recurrence, state-conditionality) predict the optimal destination, suggesting a principled theory of experience reuse in agents: recurring, state-independent knowledge belongs in parameters; rare, state-dependent knowledge belongs in context.

  3. Mechanistic account of redundancy: The readout drop after training quantifies how weights absorb recurring knowledge, making context notes redundant—a measurable complementarity between the two memory systems.

  4. Producer–consumer theory: The information/policy gap decomposition explains when transfer works: context route pays for information the consumer lacks; weights route pays only for policy agreement (same model) and mostly for practice.

Practical Implications

  • Architecture guidance: GUI agents should maintain dual memory systems—parameter-embedded knowledge for locators and lessons, external note libraries for procedures and state facts
  • Transfer protocols: Note libraries survive consumer upgrades and cross-producer transfer; weights must be rebuilt from the consumer's own trajectories
  • Cost efficiency: Routing avoids the expense of fine-tuning on components that gain more from context (procedures, state facts) while capturing weights gains where they exist

Conclusion

Component routing demonstrates that not all experience belongs in the weights. By splitting trajectories into four components and routing each by two pre-measurable properties (recurrence rr and state-conditionality κ\kappa), the framework achieves consistent gains over whole-trajectory baselines and single-destination approaches across three backbone families and two environments.

Key takeaways:

  1. One experience pool has two destinations: locators and lessons in weights; procedures and state facts in context
  2. A simple rule in (r,κ)(r, \kappa) recovers destinations for held-out backbones (24/24 cells) and survives interventions
  3. Training makes notes redundant proportionally to recurrence; context gains track information gaps; weights gains suffer from policy gaps

Future directions include: applying component routing to other agent domains (web, robotics), dynamic routing where components migrate between destinations over the agent's lifetime, and extending the property-based framework beyond the two measured dimensions to capture additional aspects of experience value.


"Weights guide me to Search cities. On the preview, context says: tap Add. Same experience, two destinations. Right place, right time." — Illustrative example of component routing in action

Related papers