TL;DR
LAWA (Latency-Aware Workflow OptimizAtion) is a new framework designed to automatically generate and refine multi-agent workflows that are both highly accurate and fast to execute. By using theoretically grounded graph edits to shorten a workflow's "critical path," LAWA significantly reduces execution time (makespan) without sacrificing task performance, making it ideal for real-world, recurrent applications like AI customer support.
What Problem Does This Paper Address?
Large Language Model-based Multi-Agent Systems (LLM-based MAS) are great at solving complex tasks by breaking them down into multi-step workflows. However, most current methods for building these workflows focus entirely on accuracy, ignoring latency.
In a multi-agent setup, every "agent call" is an LLM inference request that can take seconds due to model size or server congestion. If a workflow is designed sequentially (Agent A $\rightarrow$ Agent B $\rightarrow$ Agent C), these delays stack up. This becomes a major bottleneck for "recurrent queries"—tasks like troubleshooting or customer service that are run thousands of times. The authors identify a gap: we need a way to optimize the structure of the workflow to maximize parallelism and remove redundant steps, ensuring the system is responsive enough for production environments.
Methods
The authors propose LAWA, which treats workflow optimization as a graph-editing problem. They model a workflow as a Directed Acyclic Graph (DAG) where nodes are agent calls and edges represent data dependencies.
LAWA consists of three core components:
- Structural Optimization Engine: This engine performs a beam search to find the best workflow. It uses three specific graph edits:
- Parallel Rewiring: Removes a sequential dependency between two nodes and merges their edges to allow them to run in parallel.
- Node Removal: Deletes redundant agent calls while maintaining the overall connectivity of the graph.
- Node Permutation: Reorders agents to find a more efficient sequence.
- Graph Evaluator (GNN): A Graph Neural Network trained to predict how a specific workflow structure will perform on a task. This acts as a "filter" during the search, ensuring that speed-up edits don't break the system's accuracy.
- Graph Generator (Transformer): When no starting workflow is provided, this module generates an initial "chain" of agents to be optimized.
Crucially, the authors provide mathematical proofs that their graph edits are makespan-monotonic (they never increase latency) and complete (they can eventually reach any valid workflow structure).
Datasets
The researchers evaluated LAWA across seven diverse benchmarks spanning three domains:
- Code Generation: MBPP and HumanEval.
- Mathematical Reasoning: GSM8K, MATH500, SVAMP, and AQuA.
- General Knowledge: MMLU.
For the agent backbones, they used Qwen3-30B-A3B-Instruct-2507, configuring different "roles" (e.g., AlgoPlanner, CodeAuditor, MathReasoner) for the agents to play within the workflows.
Key Insights and Ideas
- The Critical Path is the Enemy: In parallel computing, the "makespan" is determined by the longest sequence of dependent tasks (the critical path). LAWA specifically targets these bottlenecks for rewiring or removal.
- Optimize Once, Execute Fast: The "learning" and "optimization" happen offline. Once the optimal graph is found, it can be reused for millions of queries with zero additional overhead, making the initial training cost negligible over time.
- Plug-in Versatility: LAWA isn't just for new workflows. It can take a workflow generated by other state-of-the-art methods (like DyLAN or AFlow) and "compress" it, significantly reducing its latency while often maintaining or even slightly improving its accuracy.
- Gradient-Based Filtering: To avoid testing every possible rewiring (which is computationally expensive), LAWA uses the gradients of the Graph Evaluator to estimate which edits are most likely to preserve performance.
Key Results
LAWA consistently outperformed existing multi-agent frameworks in both speed and accuracy.
- Latency: LAWA achieved the lowest makespan on 6 out of 7 benchmarks. For example, on the SVAMP math benchmark, it reduced latency to 6.18s, compared to 8.12s for the next best method (LAMaS) and 13.60s for a standard discussion-based baseline.
- Accuracy: Despite the focus on speed, LAWA achieved the best average rank for accuracy across all benchmarks, proving that a leaner, more parallel workflow can be just as effective as a complex, sequential one.
As shown in Figure 2, while other methods like DyLAN create dense, synchronized layers that force agents to wait for the slowest peer, LAWA creates an asynchronous, streamlined structure that finishes the task much faster.
Limitations and Future Work
- Static Agent Pool: The current version of LAWA assumes a fixed set of available agents. In the real world, new tools or models might become available dynamically.
- Fixed Task Distribution: The optimization is performed for a specific type of task. If the nature of the user queries shifts significantly over time, the "optimized" workflow might become sub-optimal.
- Future Directions: The authors suggest extending the framework to dynamic environments where the agent pool can change and developing mechanisms for incremental updates to the workflow as new data comes in, rather than rebuilding from scratch.
Summary updated