Manuscript Offprint

arXiv:2610.25985

NIOCIS: Typed-Decision Next-Hop Routing with Node-Conditioned Option Spaces for Tool-Use Agents

Jin Han, Mingfeng Xin, Feng Liang, Jingtao Yu

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

ABSTRACT

Tool-use agents pay per decision: at each hop a language model re-reads the state and thinks for seconds, though its actions are finite and its decisions recur. We present NIOCIS, a routing layer that folds execution logs into a loop-collapsed action graph—forward action transitions plus explicit recovery back-edges—and answers one typed question: which declared option at a state, plus stop, does the fleet take next? A small model reads a calibrated distribution over them in one pass, generating no text. On 1,615 production security-operations episodes we measure what the layer replaces, returns and is bounded by. It replaces the per-decision deliberation: the typed encoder matches the logged next hop on 32.2% of the 3,875 held-out decisions (34.9% within the declared options) in 10 ms of encoder time (19.5 ms for the typed-choice form), against 2.2 s per LLM hop; two feature readouts on the same decisions reach 32.8% and 32.3%, an ordering the paired test does not resolve, so the typed layer is chosen for cost rather than for a separated accuracy lead. Tuning moves a language model: jpt-4b reaches 9.9% zero-shot and 31.9% fine-tuned, a gap an exact paired test does not resolve (p = 0.68), at 244 ms per decision. It returns little: the realised hop falls outside the declared options for 7.9% of decisions and outside the model's top twenty for 9.3%, while the most confident 15% holds 91.9% accuracy, a band three different confidence rules trace alike. And it is bounded: the state text binds accuracy, not the candidate count, the deliberation budget or the parameter count; node discovery saturates at the rate a zero-parameter occupancy null predicts, and on five public process logs a variable-order Markov table collects most of each margin over the majority baseline; a cross-trace leave-one-out test puts the released state's ceiling at 25.6–44.9% as the state key grows more specific, repeated states disagreeing more often than they agree; and the option-space ablation attributes the gain to per-node candidate restriction (+3.5 points over a flat catalog) rather than graph traversal (zero within its interval). The claim is narrow: containment and a small high-precision band at millisecond cost; a gated self-evolution loop lifts every arm above its anchor yet ends below full supervision; a confidence-gated cascade loses agreement when the escalation arm is the zero-shot stand-in rather than the tuned model; and agreement past a third of the fleet needs a state carrying the plan and the observation, which the released records do not.

1 INTRODUCTION

LLM agents that call tools decide by inference. At every step of every task the model re-derives what it already decided last week for the same tool in the same situation: whether to search before reading, whether to write directly or route through approval, whether to retry or roll back. The latency of such a judgment is counted in seconds and its cost in thinking tokens (Cheng et al., 2026; Li et al., 2026a), even though the decision's support is small—a closed set of declared next actions, median 46 per state here—and the deployment's accumulated logs already contain the answer, thousands of times over.

Three observations motivate NIOCIS. Execution logs converge. An internal deployment’s tools and action semantics are finite; as episodes accumulate, the action vocabulary saturates while the logs keep growing. Process mining has exploited this regularity for business event logs for two decades (van der Aalst, 2016; Leemans et al., 2013), and recent results compress agent-trace corpora into finite-state machines of 7–43 states (Cho et al., 2026); the complexity-vs-log-size reading we cite tracks only the state-count curve (§2). Also, typed decisions can be cheap. A decision model that answers exactly one of its caller’s declared options—reading a calibrated distribution from a single forward pass, with no generated text—decides in 30–65 ms (Cheng et al., 2026; Ren et al., 2026) at accuracy within a few points of LLM judges (Ren et al., 2026), and works as a first-tier agent decision layer that escalates on low confidence (Wu & Lim, 2026; Li et al., 2026c). And logs can train their own router: routing decisions, executions and outcomes form a data flywheel (Liu et al., 2026; NeoHorse Team et al., 2026), provided the update loop is gated against collapse (Nguyen et al., 2026b; Shang et al., 2026).

NIOCIS composes these into one loop (Figure 1): (i) we induce a loop-collapsed action graph from episode logs—a directed graph of forward action transitions (self-loops aside) with recovery back-edges carrying rollbacks, backtracks and task redirects; (ii) we route with the typed-decision router whose option set is exactly the current node's outgoing edges (plus stop), whose output is a calibrated distribution the caller can threshold, and whose uncertain cases escalate to the LLM; (iii) we self-evolve: each real episode becomes training data, updates pass a rollback gate and survive only with evidence, and any update that regresses beyond the gate tolerance ( δ\delta) is rolled back. In the full design, executed episodes are budget-bounded (a step budget and a per-node revisit cap; §3). Our contributions are:

• P1 The loop-collapsed action graph. We formalize induction from episode logs with explicit folding rules for loops and back-edges, and quantify the growth of the induced action graph (E1): transition discovery shows diminishing returns and loop-event rates reach a stable regime, while node-vocabulary convergence is not offered as an independent finding—a zero-parameter occupancy null already predicts it (§6).

• P2 Typed-decision path routing. We define next-hop selection as a typed decision over a node-conditioned declared option space (the current node's outgoing edges, plus stop) and implement it with one-pass feature-MLP readouts that reach 32.8% agreement with the deployed fleet's own choices (35.6% within the declared space; the hidden-state probe variant gives up two points of masked accuracy and decodes from its 10 ms encoder pass, the typed family's full predict running 19.5 ms p50), together with an accept/escalate gate analyzed with risk-coverage curves (E2); a transition-table baseline over all nine decision streams (App. B) reaches 31.1% on SOC. We also measure what the restriction is worth (E9): the node-conditioned space beats a flat 155-class catalog by 3.5 points and a size-matched global-frequency space by 1.4 points, but is statistically indistinguishable from a node-conditioned space built without graph traversal, so we claim the per-node restriction, not graph traversal. We therefore claim the formalization and the measurement rather than the traversal: the contribution is to define the next-hop choice as a typed decision over a node-conditioned declared option space, and to bound what that construction can reach on production logs, which Section 7 does quantitatively.

• P3 A gated self-evolution loop, with route replay as a measurement. We replay held-out episodes against a re-prompted MIMO Pro V2.6 stand-in (one reasoning call per hop for the fleet's LLM component: no per-stage orchestration, no tool results; §5); the route view renders the per-decision quantities—strict survival, plus a wrong-hop cost rescaling of the mismatch count—so we report it as a measurement on that graph (§6), and add the one route quantity that is not such a rescaling—the first-divergence hop index and type (median hop 2, most first divergences on escalated hops)—reading the replay as placing the cheap readout in the agreement/cost corner and the accept/escalate hybrid between its parents (the readout and the opponent; E3); and we exercise a self-evolution loop whose rollback gate scores every candidate while the loop absorbs a 12%-of-one-batch label-corruption stress, the gate refusing 13 of the 40 candidate updates, in 6 of the 10 seeded chains (E4).

The core experiments (E1–E4) run on real execution logs from a production security-operations agent fleet (§5 states provenance); E5 replicates the constructions on public event logs and open tool-use trajectories, and any Langfuse-style observations export folds into the same episode schema.

Figure

Figure 1: NIOCIS: logs are folded into a loop-collapsed action graph; a typed-decision router answers “which edge in A(v)A(v) does the fleet take next?” per state, escalating only uncertain cases to the LLM; executed walks flow back as gated updates. The step budget B and per-node revisit cap R on the execution box are full-design parameters: the corpus study of §5 replays logged episodes teacher-forced and exercises neither bound.

References (64)