TL;DR
DOTS (Dynamically via Optimal reasoning Trajectories Search) is a framework that teaches Large Language Models (LLMs) to dynamically select the best reasoning strategy—such as writing code, thinking step-by-step, or decomposing a problem—for any given question. By searching for the most effective "reasoning trajectory" for a specific model during training, DOTS allows LLMs to allocate more "thinking time" to hard problems while staying efficient on easy ones, consistently outperforming static prompting methods.
What Problem Does This Paper Address?
Most current methods to improve LLM reasoning are "one-size-fits-all." For example, Chain-of-Thought (CoT) forces a model to explain its logic step-by-step, while Program-of-Thought (PoT) forces it to write code.
However, not every problem needs a Python script, and not every model is equally good at every strategy. A math problem might be trivial for a model using code but hallucination-prone using natural language. Conversely, a logic puzzle might be easier to solve through verbal reasoning. Current models lack the "metacognition" to look at a prompt and decide: "For this specific question, I should first break it down into sub-questions, then solve it with a program, and finally double-check my work."
The authors address this gap by creating a system that tailors the reasoning path to both the specific question and the inherent strengths of the model solving it.
Methods
The DOTS framework consists of three main stages:
- Defining Atomic Actions: The researchers broke reasoning down into "atomic" modules across three layers:
- Analysis Layer: Rewriting the query or decomposing it into sub-tasks.
- Solution Layer: Choosing between natural language (CoT) or programming (PoT).
- Verification Layer: A self-verification step to check the final answer.
- Note: They also included an "EMPTY" action for each layer to allow the model to skip unnecessary steps.
- Searching for the Optimal Trajectory: For the training data, the authors didn't just give the model the right answer. They used an iterative search algorithm to try different combinations of actions. They identified the "optimal" path based on two factors: success rate and efficiency (shorter paths are preferred if they yield the same result).
- Learning to Plan: Once they had a dataset of "Question + Optimal Path," they trained a Planner. They proposed two ways to do this:
- External Planner: A smaller, separate LLM (like Llama-3-8B) acts as a "manager" that tells a larger, frozen "solver" (like GPT-4o) which path to take.
- Internalized Planner: Fine-tuning the solver model itself to output the plan before it starts solving the problem.
Datasets
The researchers evaluated DOTS across a diverse range of eight reasoning benchmarks:
- In-Distribution: MATH (mathematics).
- Few-Shot/In-Distribution: BBH (Big-Bench Hard), Game of 24 (numerical), and TheoremQA (scientific).
- Out-of-Distribution (OOD): Deepmind Math, MMLU-pro, StrategyQA, and DROP (multi-hop reasoning).
Key Insights and Ideas
- Model-Specific Optimization: A strategy that works for GPT-4o might fail for Llama-3. DOTS finds the "sweet spot" for the specific model being used. For instance, the paper found that GPT-4o-mini often performs better with CoT, while Llama-3-70B-Instruct is more successful when it uses PoT for the same math problems.
- Dynamic Computation: The model naturally learns to work harder on harder problems. Analysis showed that as the difficulty level of a MATH problem increased, the average length of the reasoning trajectory chosen by DOTS also increased.
- Internalization is Key: The "Internalized Planner" (where the solver learns to plan for itself) generally performed better than the "External Planner." This suggests that joint optimization of planning and solving creates a more cohesive reasoning process.
- The Power of "Empty": By allowing the model to choose an "EMPTY" action, DOTS avoids the "over-thinking" trap where unnecessary steps lead to more opportunities for error or increased latency.
Key Results
- Superior Accuracy: DOTS consistently outperformed static baselines (like pure CoT or PoT) and vanilla instruction tuning. On the BBH dataset, the internalized DOTS model achieved a 69.7% accuracy, an 8.7% improvement over vanilla SFT (61.0%).
- Generalization: Even on "Out-of-Distribution" tasks the model wasn't specifically trained for, DOTS remained stable and high-performing, whereas static methods often fluctuated wildly depending on the task.
- Efficiency: Despite adding planning steps, DOTS is often more token-efficient than advanced multi-step methods like "Self-Refine" because it skips unnecessary verification or decomposition steps for simpler queries.
Limitations and Future Work
- Task-Specific Failures: The authors noted that in "date understanding" tasks, the model sometimes chose to write a program (using Python's
datetimelibrary) but failed to follow the specific output format required by the benchmark, leading to lower scores. - Search Cost: The initial search for optimal trajectories is computationally expensive, as it requires running multiple paths for every training question.
- Action Space: The current "atomic actions" are limited to a few predefined categories. Future work could involve expanding this to a wider variety of tools or more granular reasoning steps.
- Inference Latency: While more efficient than some multi-turn methods, the planning step still adds some overhead compared to a direct zero-shot response.
Summary updated