Abstract
The recent development of chain-of-thought (CoT) decoding has enabled large language models (LLMs) to generate explicit logical reasoning paths for complex problem-solving. However, research indicates that these paths are not always deliberate and optimal. The tree-of-thought (ToT) method employs tree-searching to extensively explore the reasoning space and find better reasoning paths that CoT decoding might overlook. This deliberation, however, comes at the cost of significantly increased inference complexity. In this work, we demonstrate that fine-tuning LLMs leveraging the search tree constructed by ToT allows CoT to achieve similar or better performance, thereby avoiding the substantial inference burden. This is achieved through Chain of Preference Optimization (CPO), where LLMs are fine-tuned to align each step of the CoT reasoning paths with those of ToT using the inherent preference information in the tree-search process. Extensive experimental results show that CPO significantly improves LLM performance in solving a variety of complex problems, including question answering, fact verification, and arithmetic reasoning, demonstrating its effectiveness.
1. Introduction
Large Language Models (LLMs) typically approach reasoning in one of two ways. The standard Chain-of-Thought (CoT) approach is fast and intuitive but often "unconscious," meaning the model generates a single path and lacks the mechanism to self-correct or explore alternatives. Conversely, the Tree-of-Thought (ToT) method is deliberate and accurate, using tree-search algorithms to explore multiple branches. However, ToT is computationally expensive, often requiring 50 times more tokens and time than CoT.
This paper introduces Chain of Preference Optimization (CPO), a fine-tuning methodology designed to bridge this gap. CPO distills the deliberate reasoning of tree-search methods into a standard, fast LLM, allowing it to achieve search-level accuracy with the inference speed of a single-path model.
2. Methodology
CPO treats reasoning as a series of preference-based choices, moving beyond simple Supervised Fine-Tuning (SFT) which typically only trains on successful final paths. The CPO process involves two distinct phases:
2.1 Synthesizing the Chain of Preference
To generate training data, the authors use a base model to construct a search tree for a given problem:
- Thought Generation: The model generates multiple potential next steps (branches) for a problem.
- State Evaluation: The LLM evaluates these steps, scoring them based on their likelihood of leading to a correct solution.
- Search and Collection: Using Breadth-First Search (BFS), the best path is identified. Crucially, CPO collects pairs at each junction: the step chosen for the final path (the preferred thought) and the sibling steps that were generated but discarded (the dispreferred thoughts).
2.2 Step-wise Preference Optimization
Instead of sequence-level optimization, CPO applies Direct Preference Optimization (DPO) at each individual step of the reasoning chain. This approach solves the Longest Common Prefix (LCP) Gradient Cancellation problem. In standard path-level DPO, if two reasoning paths are identical for several steps and only differ at the end, the gradients for those initial steps cancel each other out. By optimizing step-by-step, CPO ensures every part of the reasoning chain receives a clear training signal.
3. Experimental Evaluation
The researchers evaluated CPO using LLaMA-2 (7B/13B) and Mistral-7B across seven benchmarks, including Bamboogle (QA), Feverous (Fact Verification), and SVAMP (Arithmetic).
3.1 Key Results
- Performance Gains: CPO improved average accuracy across models by up to 4.3%, with specific task improvements reaching as high as 9.7%.
- Inference Efficiency: CPO-tuned models are 57.5x faster on average than ToT methods while maintaining comparable accuracy. By "baking" the search logic into the model weights, the LLM makes smarter choices in a single pass.
- Superiority over SFT: CPO consistently outperformed models trained only on successful ToT paths (TS-SFT). This demonstrates that the "negative" information found in pruned branches is a critical learning signal for avoiding logical pitfalls.
- Generalization: The models showed robust performance when trained on a mixture of task types, suggesting the development of general reasoning capabilities rather than simple pattern memorization.
4. Discussion and Limitations
While CPO significantly reduces inference costs, the initial data generation phase still requires expensive ToT searches. Additionally, the current study focused on text-based reasoning; future work could extend CPO to multimodal models or more open-ended creative tasks. There is also potential to integrate CPO with more complex structures like Graph-of-Thought or AlphaZero-style searches.
5. Conclusion
Chain of Preference Optimization (CPO) offers a powerful method for improving LLM reasoning by leveraging the discarded data from tree-search processes. By training models to prefer optimal reasoning steps over pruned alternatives, CPO enables the efficiency of Chain-of-Thought with the logical rigor of Tree-of-Thought.
Summary updated