Manuscript Offprint

arXiv:2609.31047

DynBranch: Speculative Subgraph Reuse for Dynamic Agentic LLM Serving

Junyi Shen, Noppanat Wadlom, Zhengyuan Su, Yao Lu

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

Abstract

Agentic LLM workflows decide their execution paths at runtime. Downstream computation may be predictable, or may have run before, yet it cannot begin until the model or the user resolves the branch. We call this serialization the branch-resolution barrier. Caching alone does not hide it: the key that identifies a reusable result is not known until then.

In this paper, we propose DynBranch, which makes an unresolved branch addressable before it resolves. Its stable coordinate lets candidate subgraphs run during resolution and completed subgraph results be reused across later requests. A two-level controller admits this work when its expected benefit exceeds the load price. DynBranch sits at the model-API boundary and requires no changes to agent harnesses or model execution engines.

Across four agentic workloads with Qwen3-32B on 4× H200 GPUs, DynBranch reduces mean latency by up to 32% over each workload’s strongest prior system and by 46–66% against a no-reuse floor, while preserving workflow results. The benefit persists across backbone families and on a commodity Qwen3-8B/RTX 4090 deployment.

1 Introduction

LLM applications are moving from workflows whose model and tool calls are fixed before execution [38, 52] to agentic ones that decide each next step as they run, by the model or by the user [101, 104, 108]. Measured agent workloads show tens to hundreds of model and tool calls per task [55, 120], so these decision windows repeatedly enter the critical path. Downstream work waits on a choice the model has yet to decode: the handler a request needs, the sub-task a sub-agent runs, the entity a retrieval fetches. Each is typically followed by model inference. For example, a ReAct agent answering multi-hop questions decodes the entity it will search next [108], and coding agents such as Claude Code and Codex show both: they decode the next tool call, and at interactive decision points they wait for the user to pick from a short list of suggested actions [5, 63].

Noppanat Wadlom

National University of Singapore

Singapore

noppanat@comp.nus.edu.sg

Yao Lu

National University of Singapore

Singapore

luyao@comp.nus.edu.sg

(a) human-wait window – indep. top-K used now

Figure

(b) model-decode window – exclusive

Figure

Figure 1. Predicted subgraphs fill during the shaded resolution window; each candidate’s status is printed beside it. (a) independent top-K. (b) exclusive route.

We call this serialization the branch-resolution barrier: downstream computation that may be predictable, or may have run before, waits for the model output or user choice that determines the branch. In measured coding, research, and scientific agents, 45–57% of end-to-end latency is downstream time serialized after model output [88]. This creates two opportunities. Starting likely downstream computation before resolution can hide part of its latency on the first occurrence (Figure 1). Reusing a validated result can avoid that computation on later occurrences.

Existing systems provide result caching [9, 94] and agent-level speculation [28, 34, 109] as separate mechanisms. Caches retain completed responses and operator results, while speculative agents consume or discard predicted work within the current request. Prefix caches reuse KV state [116], and dataflow schedulers overlap work once its inputs are known [38, 52, 89, 102]. These systems do not jointly support reusing a subgraph result across later requests, starting a branch before it resolves, and pricing that work against serving load. Each is hard in a different way. C1, shared-subgraph reuse: the unit that recurs is a sub-DAG rather than a whole request, and moving the boundary there must not weaken exact matching or freshness. C2, early fill during resolution: the name that authorizes reuse does not exist until the branch resolves, yet the work must start before it does. C3, load-priced admission: speculative work draws on the same slots and KV as the request it accelerates, so what helps at low load hurts at high load.

In this paper, we propose DynBranch, which makes an unresolved branch addressable before it resolves ( §3§3). For C1, it records a completed branch subgraph together with the input that produced it and the external reads it made. A later request consumes the entry only when its input matches exactly and those reads are still fresh; a write to any of them invalidates it. For C2, the workflow template provides a coordinate: the identity of a decision point in the template, such as the router stage of a routing workflow, known before the branch resolves in our target workloads ( §5.6§5.6). Predicted candidate subgraphs run as fills during the resolution window; completed results can also serve later requests. Fills remain invisible until branch selection and an exact, fresh canonical (non-speculative) demand authorize their use, so wrong predictions cannot change workflow results. For C3, a two-level controller decides whether to generate candidates and whether to execute each fill, admitting either when expected benefit exceeds the load price over the fill's execution horizon. That price reads the engine's current decode and KV occupancy, so it rises as speculative and canonical work accumulate.

We implement DynBranch at the model-API boundary between agent harnesses and unmodified SGLang or vLLM engines [39, 116], an interface that covers both framework-driven workflows [25, 41, 101] and text-based coding agents [5, 21, 63]. With Qwen3-32B on 4× H200 GPUs, DynBranch reduces mean latency by up to 32% over each workload's strongest prior system on the same GPUs and by 46–66% against a no-reuse floor, while preserving workflow results. With reuse disabled, early fill alone reduces mean latency by 8.5–34.4% on model-driven paths and user-turn latency by 46.6–47.7% on HCI (§5.4). The benefit persists across backbone families and on a commodity Qwen3-8B/RTX 4090 deployment.

We make three contributions:

• We identify the branch-resolution barrier and quantify its cost on production traces and four agentic workloads ( §2§2).

• We propose a branch-state abstraction connecting speculative execution with cross-request subgraph reuse, promoted on exact match and invalidated by writes ( §3.2–§3.3§3.2–§3.3).

• We design a two-level online controller that prices candidate generation and fill execution against benefit and load, learning from delayed feedback ( §3.4§3.4, §5.4–§5.5§5.4–§5.5).

Figure

82–318 steps/task [111, 120]

50 paths / 52 requests

45–57% serial time [88]

26–43% overlap

59–94% coverage [67]

top-1 prior 29/30 turns

54–62% prefix hits [95]

26% sub-tasks recur

C3 Spare capacity,

Priced by load

≈81% SM idle [26]

50% unused compute [73]

Figure 2. Opportunities for early execution (C2) and cross-request reuse (C1), subject to available serving capacity (C3). Upright figures are from prior work; italic figures are our own measurements with speculation disabled.

References (51)