TL;DR
Division-of-Thoughts (DoT) is a new hybrid edge-cloud framework that optimizes on-device AI agents by breaking complex user queries into smaller sub-tasks and dynamically allocating them between local smaller language models (SLMs) and powerful cloud LLMs. By combining a dependency-aware task scheduler with a lightweight, plug-and-play adapter, DoT slashes cloud API costs by 83.57% and cuts reasoning time by 66.12% while maintaining competitive accuracy.
What Problem Does This Paper Address?
Deploying Large Language Models (LLMs) directly onto consumer edge devices like smartphones or laptops is a massive hurdle due to strict hardware constraints. Conversely, routing every single user request to a commercial cloud LLM is incredibly expensive, introduces latency, and raises valid user privacy concerns.
While current edge-cloud hybrid systems try to solve this by routing simpler queries to an on-device Smaller Language Model (SLM) and harder ones to the cloud, they operate at a coarse, query-level granularity. The authors point out a crucial flaw in this approach: even highly complex user queries are usually composed of multiple smaller steps, many of which are simple enough for a local SLM to handle. The challenge lies in efficiently decomposing these queries, mapping their interdependencies, and accurately routing individual sub-tasks to the right model without incurring heavy computational or human-annotation overhead.
Methods
The DoT framework introduces a fine-grained "division of labor" through three core components:
- Task Decomposer: Using In-Context Learning (ICL), the framework prompts a language model to break down a complex user query into independent, manageable sub-tasks.
- Task Scheduler: Instead of processing sub-tasks linearly, DoT prompts the agent to analyze pairwise dependencies between steps, constructing a Directed Acyclic Graph (DAG). Sub-tasks at the same depth level of the graph are executed in parallel, significantly reducing overall latency.
- Plug-and-Play Adapter: To decide which model handles which sub-task, the authors append a lightweight Multi-Layer Perceptron (MLP) head to the local SLM. This adapter extracts sentence embeddings from the sub-task text using a prompt-based method and outputs a difficulty score, routing the task to either the SLM or the cloud LLM. Crucially, it leaves the base SLM parameters completely untouched.
To train this adapter without expensive human labels, the authors designed the $\alpha$-Tree Search Algorithm. This method uses the $\alpha$-quantile of token probabilities from the SLM to measure model uncertainty (higher uncertainty = harder task). It then iteratively refines the task allocation strategy based purely on whether the final execution feedback is correct or incorrect, automatically building a high-quality training dataset.
Datasets
The authors evaluated DoT across seven prominent open-source benchmarks, categorized into four distinct domains:
- Logical Reasoning: P3 (Python Programming Puzzles) and SCAN.
- Math Problem Solving: MATH, CHAMP, and DROP.
- Commonsense Reasoning: CSQA.
- Web Browsing: WebShop (a simulated e-commerce environment testing interactive agent capabilities).
For each benchmark, 8 instances were manually annotated to serve as few-shot exemplars for the Task Decomposer.
Key Insights and Ideas
- Sub-Task Granularity Unlocks Efficiency: Moving from query-level routing to sub-task-level routing allows the local SLM to do the heavy lifting for easy sub-steps, reserving expensive cloud compute only for the truly difficult bottlenecks.
- Uncertainty as a Labeler: Token sampling probabilities (specifically $\alpha$-quantiles) serve as an excellent proxy for task difficulty. This allows the system to self-correct and generate its own training data via reinforcement feedback loops.
- Parallelism via Graph Scheduling: Linear reasoning paths (like standard Chain-of-Thought) introduce unnecessary sequential delays. Structuring sub-tasks as a DAG allows independent steps to run simultaneously, optimizing execution time.
Key Results
- Massive Cost and Latency Savings: Across all seven benchmarks, DoT reduced average cloud API costs by 83.57% and cut reasoning time by 66.12% compared to the most accurate baselines (such as pure GPT-4o execution).
- Maintained (and Sometimes Improved) Accuracy: DoT achieved comparable accuracy to heavy cloud models. Remarkably, it even improved accuracy on certain complex math benchmarks (+1.75% on CHAMP and +5.59% on DROP), demonstrating that structured graph-based reasoning can inherently reduce model errors.
- Superior SLM Utilization: DoT increased the proportion of tasks successfully offloaded to the local on-device model by an average of 21.92% compared to query-level routing alternatives like DataShunt.
Limitations and Future Work
While highly effective, DoT's performance hinges on the initial quality of the task decomposition and dependency mapping. If the model generates an incorrect DAG, the downstream reasoning path can fail. Additionally, highly dynamic, state-dependent environments (like real-time web browsing in WebShop) don't always fit a rigid, predefined graph structure perfectly.
For future work, the authors aim to adapt the framework to handle more dynamic, state-dependent decision-making processes and test its generalization across an even broader array of edge AI deployment scenarios.
Summary updated