Source-linked AI summary

SharedKV-BT: Node-Local Typed Decisions for Behavior-Tree Agents

Naoki Wake, Justin Wagle

arXiv:2610.07327v1cs.ROcs.CL

TL;DR

Agent tasks require interdependent decisions, but typed-decision interfaces do not manage execution or verify action success. SharedKV-BT combines stage-specific behavior-tree interfaces with parallel shared-prefix candidate scoring; across tested tasks it reduced decision latency and improved manipulation decisions and execution, while external checks governed progression.

  • Problem

    Typed-decision interfaces choose field values but do not specify when decisions are valid or verify action success, despite agents’ interdependent action sequences.

    Source: §I · p. 1
  • Method

    SharedKV-BT exposes only the active behavior-tree node’s fields and candidates, scores them using a reused task-state KV cache, and delegates execution and progression checks externally.

    Source: B. Behavior-Tree Decision Interface · p. 3
  • Results

    2.36–4.15× faster than prompt-matched constrained autoregressive decoding across three tasks; node-local Shared-KV improved correct joint typed decisions from 75% to 94% and closed-loop completion from 0% to 60%.

    Source: §I · p. 1
  • Takeaways & Limitations

    Stage gating kept actions in order and external postconditions prevented premature completion, while downstream execution failures remained distinct from model-selection errors.

    Source: §V · p. 7

    The experiments cover simulated robot domains and three fixed computer-use tasks, and do not establish generalization to unseen tasks, physical hardware, or real-world perception.

    Source: §VI · p. 7

Abstract

from arXiv · show

Agent tasks require sequences of interdependent decisions. Autoregressive models support more flexible decision interfaces than conventional classifiers but incur the latency of token-by-token generation. Recent shared-prefix methods reduce this cost by reusing encoded context and scoring multiple decisions in parallel, but do not model decision dependencies or verify execution. We propose SharedKV-BT, where each active node of a behavior tree (BT) exposes stage-local fields and candidates, and Shared-KV scores the candidates in parallel and passes the selected decision to a separate execution system. We tested SharedKV-BT on robot manipulation, mobile navigation, and computer-use tasks. Across three tasks, SharedKV-BT made typed decisions 2.36-4.15 times faster than prompt-matched autoregressive decoding. On the manipulation task, node-local Shared-KV improved joint decision accuracy from 75% to 94% and closed-loop success from 0% to 60%. Fixed-score policy replay showed that stage gating prevented out-of-order actions and external postconditions prevented premature completion.

I. Introduction

Agent tasks require stage-appropriate choices across interdependent actions, but typed-decision interfaces do not manage execution or verify success. SharedKV-BT combines node-local decisions with behavior-tree control and shared-prefix scoring, with reported gains in decision speed, accuracy, and execution control.

I. Introduction

  • Typed decisions must depend on the current stage and environment state, yet existing typed-decision interfaces do not determine when choices are valid or whether an action succeeded.Conventional classifiers use predefined classes, while autoregressive models offer flexible text interfaces but incur token-by-token latency.Source: §I · p. 1
  • SharedKV-BT combines typed-decision fields and candidates exposed by the active behavior-tree node with shared-prefix candidate scoring and external execution and postcondition checks.The node defines stage-specific choices; the separate execution system acts, and the postcondition controls progression and retry.Source: §I · p. 1
  • 2.36–4.15× faster than prompt-matched constrained autoregressive decoding across three tasks; node-local Shared-KV also improved correct joint typed decisions from 75% to 94% and closed-loop completion from 0% to 60%.Stage gating prevented out-of-order actions, while external postconditions prevented model-reported completion from advancing an unsatisfied task.Source: §I · p. 1
  • The paper evaluates prefix reuse, node-local routing, and stage gating with postconditions across robot manipulation, navigation, and computer-use tasks, separating decision errors from downstream execution failures.These are the three corresponding mechanisms and evaluation domains named among the paper’s contributions.Source: §I · p. 1

A. Robot Execution Architectures

The related work places SharedKV-BT at the intersection of behavior-tree execution, language-model skill selection, and shared-prefix inference. It selects among candidates exposed by a predefined tree rather than generating procedures or searching for action sequences and trajectories.

A. Robot Execution Architectures

  • Behavior trees structure execution with periodic ticks, success or failure returns, sequential composition, and failure recovery; task-and-motion planning instead searches over discrete action sequences and continuous motions.SharedKV-BT selects among candidates exposed by a predefined behavior tree rather than planning action sequences or trajectories.Source: A. Robot Execution Architectures · p. 2

B. Language-Model Planning and Skill Selection

  • Prior language-model agents range from generated procedures and plans to predefined skill selection, while SharedKV-BT combines fast candidate scoring with behavior-tree stage constraints.Examples include SayCan’s feasibility scoring, ProgPrompt’s program-like action context, and Inner Monologue’s use of feedback.Source: B. Language-Model Planning and Skill… · p. 2

C. Complete-Candidate Scoring and Shared-Prefix Inference

  • Shared-prefix systems reuse model context or manage caches, while SharedKV-BT applies prefix reuse to multi-step agent decisions with multiple typed fields and candidates at each behavior-tree node.The approach combines shared task-state context with node-local decision interfaces.Source: C. Complete-Candidate Scoring and… · p. 2

III. SharedKV-BT System

SharedKV-BT scores typed candidate decisions using a task-state prefix encoded once, then reuses its KV cache to evaluate candidates in parallel. The method ranks supplied candidates, while its experimental interfaces are designed to keep exposed field combinations executable.

A. Shared-KV Complete-Candidate Scoring

  • SharedKV encodes the task-state prefix once and reuses its KV cache to score complete candidates in one batch, with only candidate tokens contributing to the mean log score.The method selects the highest-scoring candidate independently for each field; the paper notes the approach applies to autoregressive models that expose token probabilities and permit KV-cache reuse.Source: A. Shared-KV Complete-Candidate Scoring · pp. 2–3, §III · p. 2
  • Typed decisions fill named fields from predefined candidates, whose scores rank the supplied options rather than serving as reliable correctness probabilities or evidence that an option is valid.The task-state prefix represents common instructions and system state, while each field’s name and candidates form its prompt.Source: A. Shared-KV Complete-Candidate Scoring · pp. 2–3
  • Independent fieldwise argmax does not guarantee cross-field compatibility, so arbitrary interfaces need an explicit compatibility check; the tested node-local interfaces were designed with executable field combinations.The comparison methods include unconstrained autoregressive generation, prompt-matched constrained greedy decoding, sequential scoring, and Shared-KV batch scoring.Source: A. Shared-KV Complete-Candidate Scoring · p. 3

B. Behavior-Tree Decision Interface

The behavior tree determines when a decision is requested and which fields and candidates are exposed; separate execution and external postcondition checks govern what happens next. The evaluation spans manipulation, navigation, and computer-use tasks, including node-specific manipulation decisions and simulator-state checks.

B. Behavior-Tree Decision Interface

  • The active behavior-tree node exposes its fields and candidates; an external system executes the chosen decision, and an evaluator checks the postcondition to determine the next step.In full BT control, neither model-reported completion nor a skill’s return value authorizes progression; the evaluator advances only after confirming the external postcondition.Source: B. Behavior-Tree Decision Interface · p. 3

C. Tasks

  • The primary comparisons cover Stack, NavigateKitchen, and three WindowsAgentArena tasks; broader manipulation evaluation adds full PickPlace, NutAssemblySquare, and Door, for eight tasks overall.Adaptive PickPlace uses Acquire, Transport, and Deposit nodes, with simulator postconditions checking grasp, transport, placement, and task completion.Source: C. Tasks · p. 3, Figure 2 · p. 3

D. Experimental Conditions

The experiments separate inference method from execution control and evaluate decision latency, decision validity, task completion, and execution errors across simulation and computer-use tasks.

D. Experimental Conditions

  • Four Stack and NavigateKitchen conditions crossed AR or Shared-KV with flat execution or BT execution, which exposes node-local candidates and advances after an external postcondition is satisfied.All conditions shared the model, observations, actions, skills, initial states, and evaluator.Source: D. Experimental Conditions · p. 3
  • A fixed-score Stack replay compared full BT control with policies lacking stage gating, external postcondition verification, or both.Identical saved scores let execution-error differences be attributed to policy; this replay isolates effects at saved states, not their frequency in new episodes.Source: D. Experimental Conditions · pp. 3–4

E. Evaluation Protocol

  • Latency replay used identical saved model inputs across methods, while end-to-end timing also included prompt construction and tokenization.Qwen2.5-3B-Instruct measurements used one RTX 2080 Ti GPU, two warm-ups, and ten measured trials; matched-batch timing excluded tokenization but included tensor construction, transfer, forward passes, scoring, and cache copying.Source: E. Evaluation Protocol · p. 4
  • Adaptive PickPlace replayed the same 120 saved pre-execution states under node-local Shared-KV, a global interface, and node-local constrained AR.The paired states comprised 60 direct-grasp, 30 oriented-grasp, and 30 reset-required states; separate closed-loop evaluations used 30 episodes per condition.Source: E. Evaluation Protocol · p. 4, D. Experimental Conditions · p. 4
  • Candidate-order tests changed only field candidate order, and task evaluations checked outcomes with platform or simulator evaluators.The order analysis tested seven fixed orders; WindowsAgentArena used four fresh-state runs per task, and manipulation tasks used 30 episodes each with external simulator postconditions.Source: E. Evaluation Protocol · p. 4

IV. Results

Shared-KV reduced latency in controlled cache-reuse tests and was faster than prompt-matched constrained AR end to end. Its benefit varied with the amount of prefix computation reused and candidate-set size.

A. Decision Efficiency

  • Shared-KV was 2.36–4.15 times faster than prompt-matched constrained AR end to end, while controlled cache reuse alone yielded 2.09× on Stack, 1.75× on NavigateKitchen, and 1.29× on Clock.The end-to-end factors include preprocessing, decoding, and Python-level token-trie masking; peak memory was comparable across tested implementations.Source: A. Decision Efficiency · p. 4
  • Constrained AR produced valid candidates but matched Shared-KV only on Stack, because greedy tokenwise decoding need not maximize mean complete-sequence log likelihood.Source: A. Decision Efficiency · p. 4
  • Reuse speedup reached 4.29 times at a 283-token prefix, fell to 0.51 with only two field-candidate pairs, and ranged from 1.63 to 2.01 across one- to eight-word candidates.Shared-KV and full-prefix scoring selected identical candidates in all Qwen2.5-3B latency trials.Source: A. Decision Efficiency · p. 4

B. Node-Local Interface Routing

Adaptive PickPlace tests whether stage-local interfaces improve decisions and execution compared with a global interface or constrained autoregressive decoding. The node-local advantage persisted across tested candidate orders and in a supplementary model check.

B. Node-Local Interface Routing

  • Node-local Shared-KV made 113/120 correct joint typed skill–object decisions, versus 90/120 for global-interface Shared-KV and 68/120 for node-local constrained AR.The global interface chose the required acquisition skill in every state but the wrong object in 30/120; node-local Shared-KV made seven reset-state skill errors.Source: B. Node-Local Interface Routing · pp. 4–5
  • Node-local Shared-KV averaged 128 ms per paired decision and completed 18/30 four-object episodes, averaging 2.97/4 object–bin relations.The global interface completed 0/30 episodes after 90 stage-inappropriate Transport selections were rejected; constrained AR also completed 0/30 and averaged 1.50/4 relations.Source: B. Node-Local Interface Routing · p. 5
  • Across seven candidate orders, node-local accuracy was higher every time: 90–113/120 correct Acquire decisions versus 14–90/120 for the global interface.Node-local Shared-KV selected MOVE TO BIN in all 90 saved Transport states under every order, while candidate order changed Acquire values in 46/120 node-local states and all 120 global states.Source: B. Node-Local Interface Routing · p. 5
  • In a supplementary Qwen3-4B check, node-local and global interfaces achieved 120/120 and 90/120 correct joint decisions, with mean latencies of 189 and 480 ms.The limited 10-seed closed-loop check recorded 8/10 node-local successes and 0/10 global-interface successes; it does not replace the predefined Qwen2.5 evaluation set.Source: B. Node-Local Interface Routing · p. 5

C. Execution Authority under Fixed Scores

Fixed-score replay isolates how BT stage gating and external postcondition verification affect execution errors. Full episodes show that execution control prevented out-of-order actions, while navigation planning remained a failure point.

C. Execution Authority under Fixed Scores

  • With identical saved scores, full BT control produced no errors; removing stage gating caused premature DONE selections in 10/15 states, while removing the postcondition gate caused premature termination in those same states.Flat execution exhibited both errors in the same 10/15 states; this replay isolates gate effects at saved states but does not estimate their frequency in new episodes.Source: C. Execution Authority under Fixed… · p. 5

D. Task Success and Execution Errors

  • SharedKV-BT completed all 10 Stack seeds and all 12 WindowsAgentArena runs; on NavigateKitchen, each BT decoder completed 1/10 episodes, with a mean of 0.5/5 goals.The WindowsAgentArena result covered Clock, Notepad, and File Explorer and demonstrates portability across those tested interfaces, not general computer-use reliability.Source: D. Task Success and Execution Errors · p. 6
  • Both flat Stack conditions failed all 10 seeds and each produced 60 out-of-order actions, whereas both BT conditions completed all seeds without invalid, out-of-order, or premature-completion errors.Within BT conditions, Shared-KV reduced mean decision latency from 153.4 to 75.1 ms, a 2.04× speedup over AR.Source: D. Task Success and Execution Errors · p. 6
  • On NavigateKitchen, both flat conditions failed all 10 episodes, while both BT decoders completed 1/10 and had no invalid outputs, out-of-order actions, or premature completions.The nine unsuccessful episodes per BT decoder failed during maproute planning at the first goal; Shared-KV reduced mean decision latency from 688.8 to 334.9 ms, a 2.06× speedup.Source: D. Task Success and Execution Errors · p. 6

E. Recovery Under Controlled Failure

Recovery activated consistently after planner rejection but restored all five ordered goals in only one episode. Constrained selection also remained unreliable when no candidate was valid.

E. Recovery Under Controlled Failure

  • Shared-KV selected MAP REPLAN in all ten recovery-enabled episodes, restoring first-goal progress in one episode that completed all five ordered goals.Recovery activated consistently under injected planner rejection, but downstream navigation still limited physical recovery and full-task completion.Source: E. Recovery Under Controlled Failure · p. 6

F. Boundaries of Constrained Selection

  • 27/28 explicit target labels were matched by complete-candidate scoring, compared with 14/28 by first-token scoring on collision-containing candidate sets.This evaluates candidate identification, not general task understanding.Source: F. Boundaries of Constrained Selection · p. 6
  • 51/60 correct decisions came from autoregressive generation, compared with 45/60 for Shared-KV with ABSTAIN.ABSTAIN rejected 28/30 invalid cases but selected the correct non-abstaining value in only 17/30 valid cases; candidate scores were not reliable confidence values.Source: F. Boundaries of Constrained Selection · p. 6

G. Closed-Loop Manipulation and Verification

External simulator postconditions retained termination authority in closed-loop manipulation, while the remaining unsuccessful episodes resulted from downstream execution. The discussion separates candidate-scoring efficiency, stage-specific focus, and progression control as distinct roles.

G. Closed-Loop Manipulation and Verification

  • 102/120 manipulation episodes completed across Stack, full PickPlace, NutAssemblySquare, and Door; postconditions blocked seven of eight unsupported completion requests.None of the blocked requests ended an episode prematurely, and the study did not evaluate a separately trained verifier.Source: G. Closed-Loop Manipulation and… · p. 6
  • The 18 unsuccessful episodes were downstream execution failures: four NutAssemblySquare and five Door episodes hit physical attempt limits, while nine full-PickPlace episodes ended after skill failure.No broad-manipulation episode failed because of an invalid model output or an accepted premature completion. Archived examples distinguish safety withholding, physical controller failure, and exhausted recovery attempts.Source: G. Closed-Loop Manipulation and… · p. 6, Figure 5 · p. 7

V. Discussion

  • Shared-KV reduces typed-decision cost, active BT nodes focus the interface, and external postconditions retain authority over progression.This separation keeps model selection, procedural control, execution, and verification attributable to different modules.Source: §V · p. 6
  • The efficiency benefit grows when shared-input encoding dominates computation and shrinks for small candidate sets or long candidate labels.Prompt-matched constrained autoregressive decoding shows that the speedup is not solely due to allowing invalid free-form outputs.Source: §V · p. 7
  • Node-local interfaces improved joint typed decisions and closed-loop execution when the global interface exposed valid but stage-irrelevant skills and arguments.Accuracy remained higher across all seven tested candidate orders, although both interfaces remained order-sensitive on Acquire states.Source: §V · p. 7
  • Fixed-score replay showed that stage gating kept actions in order and external postconditions prevented premature completion, but valid decisions did not guarantee completion when execution failed.The closed-loop study also blocked seven completion requests whose required simulator state was absent.Source: §V · p. 7

VI. Limitations

The evidence is bounded by simulated robot domains, three fixed computer-use tasks, and specified interfaces and execution components. The conclusion describes separate roles for candidate scoring, BT routing, and external progression checks within the tested protocols.

VI. Limitations

  • The experiments do not establish generalization to unseen tasks, physical hardware, or real-world perception.They cover simulated robot domains and three fixed computer-use tasks; recovery was tested with one injected planner failure.Source: §VI · p. 7
  • Adaptive PickPlace uses manually specified structured states and a deterministic intervention schedule, does not test continuous geometric reasoning, and repeats states across seeds rather than providing 120 independent samples.Its candidate-order analysis covers seven fixed permutations; closed-loop robustness to order was not tested, and the 18/30 versus 0/30 result uses only the published order.Source: §VI · p. 7
  • SharedKV-BT assumes predefined BTs, application-defined candidate sets, compatible field combinations, skills, and external postconditions.Reliable rejection when no candidate is valid and automatic compatibility enforcement remain unresolved; some postconditions and inputs rely on internal simulator state unavailable directly to a real robot.Source: §VI · p. 7

VII. Conclusion

  • Across the tested robot and computer-use protocols, SharedKV-BT reduced decision latency, prevented out-of-order or premature progression, and kept downstream execution failures distinct from model-selection errors.The design separates faster typed decisions over predefined candidates, active-interface focus through BT nodes, and progression authority through external postconditions.Source: §VII · p. 7
Loading 2610.07327v1…