Lightweight dual-branch neural router for graph-based multi-agent systems that fuses semantic embeddings with structural meta-features to estimate per-step task difficulty, dispatching sub-tasks to strong or weak LLMs. Trained via cold-start synthetic data + on-policy negative feedback. Achieves up to 72.4% cost reduction while matching strong-model quality, Pareto-dominating FrugalGPT cascading.
Graph-based multi-agent systems (e.g., LangGraph workflows) face a cost-performance paradox: deploying strong models (GPT-4o) uniformly wastes compute on trivial sub-tasks, while using weak models risks cascading logic failures where a single upstream error propagates to total task failure. Existing routing approaches are inadequate:
The gap: no existing method provides step-level, context-aware, predictive routing within cyclic agent workflows.
CASTER is a dynamic interceptor module within LangGraph's cyclic execution graph. Before any agent node executes, the router inspects the current shared state and routes to either the strong or weak model backend.
Dual-Branch Feature Fusion Network (the core architecture):
Training strategy (two-stage):
核心技术壁垒: The on-policy negative feedback re-labeling mechanism — specifically, the insight that only boundary failures (where the router's misjudgment caused the failure) should update labels, while random exploration introduces noise that makes the router overly conservative. This creates a self-improving flywheel: the router's own mistakes become its best training signal, converging to the cost-optimal decision boundary without requiring ground-truth difficulty annotations.
| Metric | Value | Context |
|---|---|---|
| Max cost reduction vs. strong baseline | 72.4% | OpenAI/Software (GPT-4o → GPT-4o-mini) |
| Cross-domain cost reduction range | 23.1%–54.4% | Across 4 domains (primary eval) |
| Quality vs. strong baseline | Matches or exceeds | Science: 95.3 vs 95.2; Security: 86.2 vs 85.5 |
| Cost reduction vs. FrugalGPT | 20.7%–48.0% | All 4 domains |
| Quality gain vs. FrugalGPT | +0.7 to +1.2 | Higher in all domains |
| Cross-provider validation | 5 providers | Claude, DeepSeek, Gemini, OpenAI, Qwen |
Key insight: CASTER sometimes beats the all-strong baseline (Science, Security), attributed to avoiding "over-thinking" where strong models over-reason on simple sub-tasks. The headline 72.4% comes from the best-case cell (OpenAI/Software with large price gap); typical reductions are 30–55%.

Paper's Figure 1: The overall architecture of the CASTER framework. The system begins with mock data and dynamic task generation via GPT-4o. The core Router integrates semantic and meta-features to dispatch tasks, evolving through cold start and on-policy negative feedback mechanisms.
The architecture shows the complete pipeline: task generation → router inference → domain-specific agent execution → evaluation → feedback loop. The router sits as an interceptor before every agent node, not as a preprocessing step — this is what enables step-level granularity within cyclic workflows.

Paper's Figure 3: Overview of the Domain-Specific Multi-Agent Workflows following a "Linear Initialization + Iterative Loop" design pattern.
Each domain instantiates a specific agent graph: initialization agents define scope, then execution agents loop with a reviewer providing accept/reject signals. The reviewer's credit assignment (SUCCESS/FAILURE tags) directly feeds CASTER's training pipeline — making the evaluation loop dual-purpose.
无形式化作者证明 — 仅实证
No formal convergence or optimality guarantees are provided. The paper relies entirely on empirical validation. Below are the checks:
| # | Check | Status | Evidence |
|---|---|---|---|
| 1 | Router learns meaningful difficulty separation | ✓ | Fig. 2: confidence scores show clear polarization — trivial tasks ≈0.02, complex tasks ≈0.91 |
| 2 | Cost reduction is real, not artifact | ✓ | Table 6: cumulative costs measured in USD across 20 tasks per domain |
| 3 | Quality not sacrificed for cost | ✓ | Table 10: CASTER ≥ Force Strong in 2/4 domains (Science, Security) |
| 4 | On-policy > random exploration | Partial | Claimed in §3.3 ("validated empirically") but no direct ablation table showing random-exploration baseline performance |
| 5 | Generalizes across providers | ✓ | Table 1: tested on 5 providers (Claude, DeepSeek, Gemini, OpenAI, Qwen) |
| 6 | Outperforms cascading (FrugalGPT) | ✓ | Table 3: Pareto-dominant on cost AND quality in all 4 domains |
Agent-specific checks:
What could have been bounded: Given that the router is a binary classifier with sigmoid output, one could derive PAC-style generalization bounds on misrouting probability given the training set size, or prove that the negative feedback loop contracts the error set monotonically under certain distributional assumptions.

Paper's Figure 2: Inference scores across Software, Data, Science, and Security. The threshold (y=0.5, dashed) separates simple tasks (blue, Weak Model) from complex ones (yellow, Strong Model).
The polarization is striking: trivial tasks cluster near 0.0–0.1 while complex tasks cluster near 0.8–0.95. Mid-range scores (0.3–0.7) are rare, indicating the router learns a near-binary difficulty signal rather than a continuous distribution. This sharp separation validates that the dual-branch architecture captures meaningful task complexity features.

Paper's Figure 10: Accumulated token cost (USD) over 20 tasks. Force Strong (orange), Force Weak (grey), CASTER (green). CASTER significantly suppresses cost growth while adapting to task complexity.
CASTER's cost curve sits consistently between the two extremes but closer to Force Weak, demonstrating that the majority of sub-tasks can be handled cheaply. The step-wise increases in CASTER's curve reveal moments where the router escalates to the strong model — these correspond to genuinely hard sub-tasks.

Paper's Figure 19: Average Success Rate and Average Cost per Task for three strategies. CASTER achieves Pareto-optimal balance: strong-model quality at FrugalGPT-level cost.
This is the paper's strongest visual evidence. CASTER occupies the Pareto frontier — simultaneously achieving the quality of Force Strong and the cost profile comparable to FrugalGPT. The "one-shot routing" principle (predict difficulty upfront rather than try-and-fail) explains the simultaneous advantage.
Cross-provider cost-quality trade-off (from Table 1, selected rows):
| Provider | Domain | CASTER Cost | Reduction | Score | Strong Score |
|---|---|---|---|---|---|
| OpenAI | Software | $0.405 | 72.4% | 97.0 | 95.3 |
| Claude | Data | $0.919 | 71.5% | 84.6 | 83.3 |
| Gemini | Security | $0.306 | 68.9% | 96.2 | 95.6 |
| Qwen | Science | $0.070 | 32.3% | 97.6 | 96.7 |
| DeepSeek | Security | $0.111 | -12.4% | 94.8 | 91.1 |
The DeepSeek anomaly is notable: identical pricing for strong/weak models breaks the router's economic rationale, yet quality still improves (+3.7 in Security), suggesting the routing decision has a regularization effect beyond cost savings.
From Table 9, CASTER underperforms Force Weak in several categories:
These losses are not discussed in the paper. They suggest the router occasionally over-routes to the strong model in domains where the weak model is already sufficient, or that routing introduces state perturbation.
| Step | Claim | Evidence | Logical link |
|---|---|---|---|
| 1 | Static model allocation in MAS is wasteful: strong models are overkill for trivial sub-tasks | §1: cost-performance paradox argument; Table 6: Force Strong costs 5-24× Force Weak | Establishes the optimization opportunity |
| 2 | Cascading (try-weak-first) is suboptimal due to double-billing and context pollution | §4.5: FrugalGPT costs 20-48% more than CASTER while achieving lower quality (Table 3) | Eliminates the main alternative approach |
| 3 | Task difficulty is predictable from semantic + structural signals | §3.2.1: Dual-branch architecture; Fig. 2: confidence scores show clean separation by difficulty | Establishes feasibility of predictive routing |
| 4 | On-policy negative feedback trains better than random exploration | §3.3: claimed; §4.2: clean polarization suggests effective training | Partial — no explicit ablation against random-exploration baseline shown |
| 5 | CASTER achieves Pareto superiority: matching/exceeding strong-model quality at substantially reduced cost | Table 1, Table 2, Table 10: quality ≥ strong in 2/4 domains; cost reduction 23-72% | Synthesizes cost and quality evidence |
| 6 | Method generalizes across domains and providers | Table 1: 5 providers × 4 domains; consistent cost reduction (except DeepSeek cost inversion) | Validates external validity |
Weakest link: Step 4 — the claim that on-policy negative feedback outperforms random exploration lacks a direct ablation. The paper states it is "empirically validated" (§1 contribution #3) but does not present a random-exploration comparator row in any results table.
[实现未公开]
The paper does not reference a public code repository. Implementation details recoverable from the paper:
关键实现细节:
text-embedding-3-small (1536-dim output) for the semantic branch. Swapping to a different embedding model would require retraining. The tiny meta-branch (6-dim → 16-dim) contributes negligible parameter count but encodes crucial role context — specifically, the 4-dim one-hot for {ProductManager, Engineer, Reviewer, Analyst} roles provides the router with agent-position awareness within the workflow graph.核心技术壁垒 (expanded):
The self-improving training loop — where routing failures on boundary cases become the highest-value training signal — is the key architectural insight. This creates an asymmetry: false negatives (misrouting hard tasks to weak models → failure → automatic correction signal) are self-healing, while false positives (misrouting easy tasks to strong models → success but wasteful) are invisible to the feedback loop and can only be addressed through the cold-start prior. Production deployment would need a secondary mechanism (cost-based regret signal) to correct false-positive over-routing.
LLM backbone requirements: