MOSAIC: Scaling Long-Horizon Language Agents via Multi-Scale Adaptive Inference Control

Bowei He, Meng Ding, Weixu Zhang, Xunzhuo Liu, Huamin Chen, Xue LiuNeurIPS 2026

TL;DR

Imagine agonizing just as hard over clicking "scroll down" as you do over redesigning an entire software architecture—while reading a 200-page diary of your own past keystrokes before every single click. That is how standard AI agents operate today, burning massive compute on trivial steps until their memory overflows. MOSAIC gives language agents a cognitive hierarchy—splitting thinking into strategic, tactical, and operational scales—and uses a tiny learned scheduler to spend deep reasoning tokens only when the problem actually gets hard.

What Problem Does This Paper Address?

Today’s dominant AI agent design (like ReAct) runs in a flat loop: reason, act, observe, repeat. While elegant for short tasks, this breaks down over long horizons (50 to 200+ steps) due to two coupled flaws:

  1. Uniform Inference Allocation: In a 200-step software bug fix, maybe 15 steps require deep deliberation (diagnosing the root cause), while 185 are mechanical navigation (opening files, running tests). Flat agents allocate roughly the same chain-of-thought token budget to every step, wasting compute on trivialities and starving critical turning points.
  2. Context Window Saturation: Recording every action and observation in one flat log quickly balloons past 200K+ tokens, overwhelming the model's effective attention. Existing compression methods summarize everything at a single level of detail, ignoring that a high-level pivot needs a broad history of failed strategies, whereas clicking a link only requires looking at the current webpage.

Methods

Drawing inspiration from human cognitive control (System 1 vs. System 2 thinking) and hierarchical reinforcement learning, MOSAIC decouples "how deep to think" from "what to do."

Figure 1: Overview of the MOSAIC framework. The Scale Scheduler dynamically routes decisions to the appropriate temporal scale, while inter-scale context distillation maintains coherent state rep- resentations across layers.

Instead of a flat loop or a rigid two-level planner that replans every $k$ steps, MOSAIC introduces three novelties:

  • Three-Scale Decision Stack: The Strategic Layer maintains a global task graph (4,096-token budget, invoked rarely); the Tactical Layer plans 5–20 step subtasks and selects tools (2,048 tokens); and the Operational Layer executes single actions using a tiny 5-step sliding window (512 tokens), handling ~75% of all steps.
  • Inter-Scale Context Distillation: Two LLM-prompted operators keep layers synced without sharing noisy raw logs. Distill↑ compresses lower-level execution logs into structured summaries and deterministic graph updates, while Refine↓ expands abstract subgoals into concrete tool checklists and expected outcomes.
  • Learned Scale Scheduler: A lightweight, 68K-parameter neural network trained via Proximal Policy Optimization (PPO). At each step, it reads five cheap, environment-agnostic state signals—task progress, plan divergence, action entropy, tool error flags, and subtask proximity—to dynamically choose which layer to invoke and customize its token budget ($\pm 50\%$).

Datasets

No new benchmarks are introduced. Instead, the authors evaluate across six existing multi-step benchmarks:

  • Main Evaluation & Scheduler Training: SWE-Bench Verified (500 GitHub coding issues), BrowseComp (1,266 deep web-search questions), WebArena (812 web interaction tasks), and GAIA Level 2&3 (320 multi-tool assistant questions). The scheduler is trained on just 200 held-out tasks (50 per benchmark).
  • Zero-Shot Transfer: OSWorld (369 desktop computer-use tasks) and $\tau$-bench (retail/airline customer service with simulated users), testing generalization to completely unseen tools.

Key Insights and Ideas

  • Imperfect intuition still wins mathematically: Framing the agent as a hierarchical semi-MDP, the authors prove that because reasoning has diminishing returns, shifting tokens to high-difficulty steps strictly beats uniform budgets. Crucially, the scheduler doesn't need to be an oracle—any positive correlation between estimated and true step difficulty guarantees an advantage.
  • Surprise and failure are the best triggers to stop and think: Feature ablations reveal that plan divergence (cosine distance between expected and actual step outcomes) and error flags drive over 75% of the scheduler's gains. Knowing when your plan just derailed matters far more than token entropy (since LLMs are often confidently wrong).
  • Smaller models punch above their weight: Multi-scale scaffolding yields the biggest relative boost on the smallest tested backbone (Qwen3.5-9B), showing that smart context scoping compensates for limited single-turn model capacity.

Key Results

Across Qwen3.5-9B, Qwen3.5-35B-A3B, and Gemma-4-27B-A4B backbones, MOSAIC outperforms strong baselines—including ReAct, Plan-and-Act, GoalAct, Reflexion, and Context-Folding—while slashing total inference tokens by 21–45% relative to ReAct.

Table 1: Main results with Qwen3.5-35B-A3B backbone. Best in bold, second-best underlined. Tokens are reported in thousands (K). η = Pareto efficiency ratio (higher is better).
  • State-of-the-art Pareto efficiency: Using Qwen3.5-35B-A3B, MOSAIC hits 37.6% on SWE-Bench Verified (298K tokens vs. ReAct's 28.4% at 487K), 19.2% on BrowseComp (42.6% fewer tokens than ReAct), 33.1% on WebArena, and 46.3% on GAIA L2&3.
  • Zero-shot scheduler transfer: When trained on only three benchmarks and tested zero-shot on the fourth, the scheduler retains 85–87% of its performance gain over ReAct. On unseen environments, it boosts OSWorld success from 11.2% (ReAct) to 15.6% while using 36% fewer tokens.

Limitations and Future Work

  • Horizon-length sensitivity: If the scheduler is trained exclusively on shorter tasks (<100 steps), its performance drops by 1.8–3.2 percentage points when deployed on longer trajectories.
  • Fixed three-layer structure: The hierarchy is manually fixed at three scales, and the global task state graph is never regenerated from scratch—meaning it is safe from corruption, though it can become stale.
  • Future directions: The authors suggest learning the number of abstraction scales directly from data, training across wider horizon distributions, extending to multi-agent communication scales, and pairing MOSAIC with native test-time reasoning models (like DeepSeek-R1).

Summary updated

Abstract

Large language model (LLM) agents have shown strong potential in tackling complex, multi-step tasks, yet scaling them to long-horizon settings remains fundamentally constrained by two problems: context window saturation and uniform allocation of inference-time compute across steps of vastly different cognitive demands. We introduce MOSAIC (**M**ulti-Scale **O**rchestrated **S**cale-**A**daptive **I**nference **C**ontrol), a hierarchical agent framework that decomposes long-horizon decision making into three temporal scales: strategic, tactical, and operational, each governed by distinct context scopes and reasoning budgets. Central to MOSAIC is a *Scale Scheduler*, a lightweight policy trained via reinforcement learning that dynamically determines (i) which abstraction level should be invoked at each time step, and (ii) how many reasoning tokens to allocate, based on the estimated decision complexity. We further propose *inter-scale context distillation*, a bidirectional information compression mechanism that maintains coherent state representations across scales without redundant token consumption. Theoretically, we show that under a fixed total inference budget, MOSAIC's adaptive allocation policy achieves a strictly lower regret bound than any fixed-rate policy in a hierarchical semi-MDP formulation, and that this advantage is retained, in proportion to the squared correlation between estimated and true information gain, when the scheduler's estimates are imperfect. Empirically, MOSAIC achieves state-of-the-art or competitive results on four diverse long-horizon benchmarks: SWE-Bench Verified, BrowseComp, WebArena, and GAIA (Level 2\&3), while reducing total inference tokens by 21--45\% relative to flat ReAct baselines. Ablation studies confirm that each component of multi-scale decomposition, adaptive scheduling, and context distillation contributes meaningfully to both performance and efficiency. Trained without any data from the evaluation benchmark, the scheduler still retains 85--87\% of the gain over ReAct, and it transfers zero-shot to unseen tool environments. Code is available at \url{https://github.com/BokwaiHo/MOSAIC}.
BibTeX
@inproceedings{he2026mosaic,
  author = {Bowei He and Meng Ding and Weixu Zhang and Xunzhuo Liu and Huamin Chen and Xue Liu},
  title = {{MOSAIC: Scaling Long-Horizon Language Agents via Multi-Scale Adaptive Inference Control}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=U7oqLxPLgG},
}
Figure