Shared Prefixes, Better Credit: Adaptive Routing for Multi-Agent Reasoning

Yiqing Liu, Zihao Wang, Hantao Yao, Wu Liu, Yongdong ZhangarXiv 2026

TL;DR

Multi-agent reasoning (MAR) boosts LLM performance but incurs massive token costs, and training smart "routers" to manage this is difficult due to blurry, trajectory-level rewards. TreeCredit solves this by expanding alternative actions from the exact same intermediate state offline, assigning precise credit based on downstream correctness and cost. This allows a lightweight router to dynamically choose the most efficient path during inference, hitting the sweet spot on the accuracy-cost Pareto frontier.

What Problem Does This Paper Address?

Multi-agent reasoning (MAR) frameworks allow multiple language models to debate, refine, and aggregate answers to solve complex tasks. While this collaborative process significantly boosts accuracy, it also causes token consumption to explode.

To control costs, recent work has shifted toward adaptive routing—using a policy to dynamically decide whether to keep debating, call a different model, or stop and deliver the answer. However, training these routers suffers from a severe credit assignment problem. Existing methods typically use coarse, trajectory-level outcomes to reward or penalize routing decisions. As a result, a router might mistakenly favor a redundant or harmful action just because the overall trajectory succeeded, or penalize a brilliant intermediate move because a subsequent step failed.

Figure 1: Motivation for state-matched operator credit. (a) The same operator yields different outcomes across states. (b) Different operators at the same state produce different correctness and costs.

Methods

The authors introduce TreeCredit, a framework that isolates the impact of individual routing decisions by comparing alternative actions from the exact same intermediate state.

The framework operates in four main stages:

  1. Shared-Prefix Tree Expansion: During offline training, for any given collaboration state, TreeCredit forks execution and samples all admissible next actions (operators: Accept, Debate, or Vote) to see how they play out. This ensures that all sibling branches share an identical query and interaction history (the "shared prefix").
  2. Correctness-Prioritized Suffix Credit: Instead of using a messy scalar reward that blends accuracy and cost, TreeCredit evaluates the downstream paths ("suffixes") lexicographically. Correctness is the absolute priority; if two paths are both correct, the one with the lower additional token cost wins.
  3. State-Local Preference Extraction: These structured credits are converted into pairwise operator preferences (e.g., "at state $s_1$, Debate is preferred over Accept").
  4. Pairwise State Router: A lightweight multi-layer perceptron (MLP) router is trained on these preferences using a weighted Bradley-Terry loss.

During online inference, TreeCredit does not build trees. It simply executes a single adaptive trajectory, greedily picking the highest-scoring operator at each step.

Figure 2: Overview of TreeCredit. Shared-prefix collaboration trees are expanded offline to assign correctness-prioritized suffix credits and extract state-local operator preferences. These preferences train a pairwise state router that follows a single adaptive trajectory during inference.

Datasets

TreeCredit was evaluated across six diverse, challenging reasoning benchmarks:

  • MMLU: General multi-task knowledge.
  • GPQA-Diamond: Graduate-level scientific knowledge.
  • GSM8K: Grade-school math word problems.
  • MATH-500: Harder mathematical competition problems.
  • MedQA: Medical board exam questions.
  • LogiQA2.0: Logical reasoning tasks.

Key Insights and Ideas

  • State-Matched Counterfactuals: By forcing alternative actions to branch from the exact same history, TreeCredit eliminates the noise of prior steps. This provides a clean counterfactual signal for training.
  • Lexicographical > Scalarization: Combining accuracy and token cost into a single scalar reward via a hyperparameter ($\lambda$) is notoriously brittle. Prioritizing correctness strictly over cost prevents the router from prematurely giving up on hard problems just to save tokens, while still enforcing efficiency when multiple correct paths exist.
  • Aggressive Early Exits: The router successfully learns when a problem is "easy enough." It terminates a vast majority of queries at round 0 via initial acceptance (e.g., 97.27% of GSM8K and 93.21% of MMLU), reserving expensive multi-agent debate exclusively for truly difficult instances.

Key Results

  • Pareto Frontier Dominance: TreeCredit achieves an average accuracy of 86.66% across the six benchmarks while consuming only 2,193 tokens per query on average. As shown in the Pareto comparison, it strictly dominates standard multi-agent debate and other adaptive routing baselines.
  • Massive Token Savings: Compared to fixed Multi-Agent Debate (MAD), TreeCredit reduces token consumption by over 91% while actually improving accuracy (86.66% vs 85.45%). Compared to the strong rule-based HCP-MAD workflow, it cuts token usage by 55.59% and improves accuracy by 0.93 percentage points.
Figure 3: Accuracy-Cost comparison using the average re- sults over six benchmarks.

Limitations and Future Work

  • Restricted Operator Set: The current implementation is limited to a simple three-operator catalog (Accept, Debate, Vote).
  • Data Dependency: The framework relies on benchmark-specific labeled training data to construct the offline preference trees.
  • Future Directions: The authors plan to explore richer operator sets (e.g., switching between different specialized agent roles), cross-domain routing generalization, and incorporating uncertainty-aware credit estimation to make the router even more robust.

Summary updated

Abstract

Multi-agent reasoning (MAR) improves reasoning reliability through iterative solution exchange and refinement. Existing adaptive MAR methods typically learn routing decisions from query-level labels or trajectory-level returns, but such coarse supervision cannot accurately estimate the state-conditioned utility of individual operators in multi-step collaboration. We propose TreeCredit, a shared-prefix credit assignment framework for efficient adaptive MAR. Its core insight is to estimate operator utility through state-matched downstream comparisons, rather than directly attributing trajectory-level outcomes to preceding decisions. TreeCredit constructs shared-prefix collaboration trees by expanding candidate operators from the same intermediate state and assigns each state--operator pair a correctness-prioritized suffix credit based on the terminal correctness and cumulative additional cost of its complete continuation. These structured credits are converted into state-local operator preferences to train a lightweight pairwise state router, which dynamically selects the next admissible operator during inference. Experiments on six reasoning benchmarks show that TreeCredit modestly improves accuracy while substantially reducing inference cost, achieving a better accuracy--cost trade-off than representative MAR methods.
BibTeX
@misc{liu2026shared,
  author = {Yiqing Liu and Zihao Wang and Hantao Yao and Wu Liu and Yongdong Zhang},
  title = {{Shared Prefixes, Better Credit: Adaptive Routing for Multi-Agent Reasoning}},
  year = {2026},
  eprint = {2608.02291},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.02291},
}
Figure