Micro-Routing with Graph Neural Cellular Automata for Sub-Millisecond Agent Tool Selection

Julian M. Kleber

PAPER · v7.7 · 2026-11-10 · ai

Formal Sciences Computer Science Artificial intelligence and machine learning

Abstract

Selecting which tool to invoke in an autonomous agent is a micro-routing decision, yet current harnesses dispatch every turn through multi-billion-parameter LLMs. We adapt and improve existing Graph Neural Cellular Automata (GNCA) and GNN algorithms (Grattarola et al., 2021) into a 35.3k–59.2k parameter System-1 reflex router that selects tools via recurrent message passing on a relational trace graph. In Lean 4, we machine-check ten formal theorems certifying discrete topologies, continuous trained recurrence operators, and algorithmic simulation duality with zero axioms, including star-vs-chain diameter separation (O(1) vs Ω(V)), continuous row-softmax convex boundedness, trained damped recurrence dyadic contraction on a certified convex relaxation variant (61.99 ± 0.14% test top-1, ρ ≤ 0.47 < 0.50 on 100% of test turns), and a simulation-and-compression duality proving that K cellular steps on a tree graph exact-simulate any depth-K binary decision tree while compressing parameters by 307× relative to the 18.2M-parameter Hermes Random Forest. GNCA executes batch-1 CPU forward passes in 0.35–0.66 ms (42.1 ms decode latency for local LLMs). Across four 3-seed benchmarks on unified CUDA hardware, GNCA achieves 87.09 ± 1.57% test top-1 on API-Bank (outperforming API-Bank Random Forest at 80.13 ± 0.55%, p = 0.0002, and HistGradientBoosting at 84.75 ± 0.59%, p = 0.0036), 76.30 ± 1.85% test top-1 on ToolBench (vs 74.33 ± 1.12% ToolBench Random Forest), and 76.83 ± 0.60% test top-1 on BFCL v4 (vs 74.18 ± 0.96% BFCL Random Forest, p = 0.0022). On Hermes (3,530 test turns), 10k-step class-weighted GNCA trades top-1 (64.64%–66.19% curated test top-1) for 2.15× higher rare-tool macro-F1 (0.608 vs 0.283), while unweighted label-smoothed Tree GNCA reaches 67.37% curated test top-1 at 10k steps, 68.07% curated test top-1 over a 200k grokking progression, and our primary pre-specified headline result of 68.92 ± 0.47% curated test top-1 across 3 seeds (68.90 ± 0.21% at K=4 in statistical parity, paired bootstrap p=0.88). While GNCA outperforms Random Forest (67.88%, paired p=0.041), it trails HistGradientBoosting (69.47%) by 0.55 pp, trading that 0.55 pp margin for 307× parameter compression (59.2k vs 18.2M/2.4M) and sub-millisecond CPU forward evaluation (0.35 ms).

Keywords

neural cellular automata graph neural networks tool calling LLM agents routing Lean 4

Download PDF