ReMAS: Cross-Scenario Reusable Workflow Design for Multi-Agent Systems

Cheikh Ahmed, Mahdi Mostajabdaveh, Amirhossein Abaskohi, Zirui ZhouarXiv 2026

TL;DR

Designing multi-agent AI workflows automatically is painfully expensive because existing methods test every candidate workflow end-to-end on validation data, burning millions of tokens. ReMAS cuts this cost by up to 3.4× by separating how agents are wired together (a compact, reusable topology shared across a task family) from what each agent actually says and does (a lightweight, per-scenario refinement step). It matches or beats state-of-the-art workflow-search methods across math, coding, science, and multiple-choice benchmarks—and the discovered topologies even transfer to unseen tasks.

What Problem Does This Paper Address?

When a single LLM call isn't enough, we build Multi-Agent Systems (MAS): teams of LLM agents connected by an explicit workflow. Designing these systems requires two coupled choices:

  1. Graph topology: How agents are connected (sequentially, in parallel, in loops, etc.).
  2. Node configuration: Each agent's specific role, prompt, and input-output contract.

Automated search methods like ADAS and AFlow optimize both levels simultaneously. To score a candidate workflow, they execute it end-to-end on validation queries. That creates a massive search-cost bottleneck—in the authors' experiments, AFlow and ADAS burn 17.1M and 21.8M executor tokens just searching on MATH Level-5. Worse, the resulting workflow is rigidly tied to the exact dataset it was searched on; moving from MMLU-Pro Physics to MMLU-Pro Law means starting the expensive search all over again.

Methods

ReMAS breaks this bottleneck with a two-stage decoupled search:

Figure 2: ReMAS overview. Stage 1 searches for a topology shared across a task family’s scenarios; Stage 2 fixes it and adapts each scenario’s node roles, contracts, and prompts from validation feedback.
  • Stage 1: Shared Topology Search. Instead of searching over full, executable workflows, ReMAS runs an LLM-guided evolutionary search over configuration-agnostic topologies written in a compact Domain-Specific Language (DSL). The DSL uses coordination combinators (seq, par, spawn, loop, route, debate, residual, END) and three node operators (cot for reasoning, predict for direct answers, reduce for aggregation). Starting from a single node, an LLM mutator proposes structural changes, and each candidate topology is scored by averaging its performance across a family of related scenarios.
  • Stage 2: Scenario-Conditioned Refinement. Once the shared topology $G^\star$ is locked in, ReMAS adapts it to each specific scenario independently. It compiles the abstract topology into Python code and runs a trace-guided refinement loop: executing on a small validation split, summarizing errors, and letting an LLM refiner update each node's role, prompt, and input-output contract (using just $T=1$ refinement step in the main experiments).

Datasets

The authors evaluate ReMAS across four established task families (no new benchmarks are introduced), holding out two unseen scenarios per family to test transferability:

  • MATH Level-5 (Mathematical Reasoning): Number Theory, Precalculus, Counting & Probability (held-out: Algebra, Geometry).
  • MMLU-Pro (Multiple-Choice QA): Physics, Economics, Philosophy, Engineering (held-out: Law, CS).
  • FullStackBench (Code Generation): Advanced Programming, Scientific Computing, Data Analysis, Desktop/Web Dev (held-out: Software Engineering, ML).
  • SciCode (Scientific Computing): Mathematics, Physics, Materials Science (held-out: Chemistry, Biology).
  • GPQA-Diamond (Cross-Benchmark Adaptation): Chemistry and Physics subsets.

Key Insights and Ideas

  • Compact topologies emerge naturally: Even with a structural budget of up to 5 executable nodes, ReMAS's evolutionary search naturally settles on lean, 2-to-4-node topologies. Keeping Stage 1 small is what drives the huge drop in executor tokens.
  • Structure transfers; details specialize: A single topology learned on a task family transfers cleanly to unseen scenarios—even with a zero-shot, data-free instantiation—and even across benchmarks (from MMLU-Pro to GPQA-Diamond). Most of the adaptation value comes from re-specializing the node prompts and contracts, not rewiring the graph.
  • Diminishing returns in refinement: On GPQA-Diamond, roughly three-quarters of the total accuracy gain from Stage-2 refinement happens by iteration 3; pushing further triples the compile cost for only ~2 extra points.

Key Results

Using DeepSeek-V4-Flash as both optimizer and executor, ReMAS achieves top accuracy while slashing search-time token costs:

  • MMLU-Pro: 85.8% average accuracy (beating AFlow's 84.1% and ADAS's 83.8%).
  • MATH Level-5: 92.2% average accuracy (vs. 89.0% for ADAS and 88.8% for AFlow).
  • SciCode: 53.2% average subproblem accuracy (vs. 48.4% for AFlow and 28.9% for ADAS).
  • FullStackBench: 69.0% pass@1, statistically on par with AFlow (69.5%) while using 22% fewer inference tokens per query.
  • Optimization Cost: ADAS and AFlow consume 3.4× and 2.9× more optimization tokens than ReMAS on FullStackBench, 3.3× and 2.5× more on MATH, and 1.8× and 1.1× more on SciCode.
Figure 3: Total optimization tokens per family; parentheses: each baseline’s total relative to ReMAS.

Limitations and Future Work

  • Heuristic approximation: The two-stage objective relies on a sample-average approximation over a small number of training scenarios ($N$), which the authors treat as a practical heuristic rather than a method with finite-sample theoretical guarantees.
  • Missing baselines: Two closely related co-optimization methods, MASS and Maestro, were not included in the experiments because neither had a public, end-to-end runnable implementation at the time of submission.
  • Future directions: The authors note that risk-sensitive variants of the two-stage objective (optimizing for worst-case scenario performance rather than just the average) are a natural next step.

Summary updated

BibTeX
@misc{ahmed2026remas,
  author = {Cheikh Ahmed and Mahdi Mostajabdaveh and Amirhossein Abaskohi and Zirui Zhou},
  title = {{ReMAS: Cross-Scenario Reusable Workflow Design for Multi-Agent Systems}},
  year = {2026},
  eprint = {2612.03298},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.03298},
}
Figure