Abstract
Traditional Large Language Model (LLM) tool-use paradigms rely on sequential execution, leading to high latency and limited global task perception. We present the Divide-Then-Aggregate (DTA) framework, a novel approach that enables parallel tool invocation. By transforming sequential tool-use trajectories into Directed Acyclic Graphs (DAGs) and implementing a process-thread-inspired inference mechanism, DTA allows models to execute independent sub-tasks concurrently. Our fine-tuned DTA-Llama2-7B achieves a 66.1% Solvable Pass Rate on StableToolBench, outperforming traditional search-based methods while reducing inference latency by 21% and significantly lowering token consumption.
Introduction
As Large Language Models (LLMs) transition from passive text generators to active agents, their ability to interact with external APIs—often referred to as "tool learning"—has become a critical frontier. Current methodologies, such as ReAct (Reason + Act) or Chain-of-Thought (CoT), typically follow a "one-tool-at-a-time" loop. While effective for simple tasks, this sequential bottleneck introduces significant latency and prevents the model from perceiving the task's global structure.
More advanced search-based methods, such as Depth First Search based Decision Trees (DFSDT), improve success rates by exploring multiple potential paths. However, these methods are notoriously inefficient, often consuming thousands of tokens on backtracking through failed branches. To address these challenges, we introduce Divide-Then-Aggregate (DTA), a framework designed to move LLM tool use toward a parallel execution paradigm that mimics multi-threaded computing.
The Sequentiality Bottleneck
The authors identify two primary issues with current tool-learning paradigms:
- Efficiency: Sequential execution is inherently slow. If a task requires five independent API calls, a sequential model must wait for each to return before initiating the next.
- Perceptual Scope: Sequential models often plan only for the immediate next step based on local observations. This lack of a "global view" makes it difficult to coordinate complex tasks that involve multiple independent sub-goals.
The DTA Framework
The DTA framework addresses these issues through a two-pronged strategy involving data restructuring and a specialized inference mechanism.
1. DAG-based Data Transformation
To train models for parallel execution, the researchers developed DTA-Tool, a dataset of approximately 20,000 entries. They utilized a "teacher" model (GPT-4) to analyze successful tool-use trajectories from existing datasets (like ToolBench) and identify steps that could be executed simultaneously. These serial paths were converted into Directed Acyclic Graphs (DAGs). This transformation filters out the "noise" of failed search paths and provides high-density training data that emphasizes task dependencies and parallel opportunities.
2. Process/Thread Inference Mechanism
Borrowing concepts from operating systems, DTA implements a "Process/Thread" analogy for model inference:
- Process (The Controller): The LLM acts as the central controller. It evaluates the current state and "divides" the task into multiple parallelizable tool calls.
- Threads (The Workers): These tool calls are dispatched and executed independently and concurrently.
- Intermediate State Lock: This synchronization mechanism ensures the system waits for all parallel threads to return their results. These results are then aggregated into a single observation, which the LLM digests before the next planning round.
Experimental Results
The framework was evaluated using StableToolBench, an improved benchmark that uses API simulators to ensure stable and reproducible testing. Performance was measured using Solvable Pass Rate (SoPR) and Solvable Win Rate (SoWR).
Performance and Success Rates
A fine-tuned Llama2-7B using the DTA method achieved an average SoPR of 66.1%. This significantly outperformed the standard ToolLLaMA (using DFSDT) at 54.2% and reached a level of performance comparable to GPT-3.5’s native parallel function calling capabilities.
Efficiency and Latency
DTA-Llama demonstrated a 21% reduction in inference latency compared to the sequential ReAct baseline. Furthermore, by avoiding the repetitive backtracking inherent in search-based methods, DTA-Llama utilized drastically fewer tokens, making it both faster and more cost-effective.
Generalization
The benefits of the DTA approach were not limited to Llama2. When applied to Llama3-8B, the method yielded a nearly 40% improvement in win rates on specific subsets of the benchmark, suggesting that the parallel planning heuristic scales well across different model architectures.
Discussion and Limitations
Parallel tool invocation is more than a speed optimization; it is a planning heuristic that forces the model to understand task dependencies. To call multiple tools at once, the model must successfully identify which sub-goals are independent, fostering a broader "global" understanding of the problem space.
However, several challenges remain:
- Model Scale: Current evaluations focused on models up to 13B parameters. Testing on 70B+ models is required to see if larger models can handle even more complex parallel structures.
- Long-Horizon Reasoning: While DTA excels at API orchestration, LLMs still struggle with extremely deep, multi-layered reasoning tasks that go beyond simple parallelization.
- Teacher Dependency: The current data construction pipeline relies on GPT-4. Future research should explore "self-evolution" techniques where models learn to optimize their own parallel execution paths without external supervision.
Conclusion
Divide-Then-Aggregate represents a significant step toward more efficient and capable LLM agents. By moving away from sequential loops and toward parallel DAG-based execution, DTA-Llama achieves high success rates with lower latency and token costs, providing a robust blueprint for the next generation of tool-using AI.
Summary updated