Skip to content
Go back 2505.02865 arXiv logo

Accelerating Large Language Model Reasoning via Speculative Search

Published:  at  11:12 AM
78.41 🤔

Speculative Search (SpecSearch) accelerates LLM reasoning by up to 2.12× through a bi-level speculative thought generator that collaborates between small and large models, maintaining comparable reasoning quality via a quality-preserving rejection mechanism.

Large Language Model, Reasoning, Efficiency, Speculative Decoding, Thought Generation

Zhihai Wang, Jie Wang, Jilai Pan, Xilin Xia, Huiling Zhen, Mingxuan Yuan, Jianye Hao, Feng Wu

MoE Key Laboratory of Brain-inspired Intelligent Perception and Cognition, University of Science and Technology of China, Noah’s Ark Lab, Huawei Technologies, College of Intelligence and Computing, Tianjin University

Generated by grok-3

Background Problem

The paper addresses the significant inference latency in large language models (LLMs) caused by tree-search-based (TSB) reasoning methods, which explore numerous intermediate reasoning steps (thoughts) to enhance reasoning capabilities. This latency, increasing by orders of magnitude, poses a major barrier to practical deployment in real-time applications. The key problem solved is the optimization of thought generation efficiency in TSB reasoning, aiming to reduce latency while maintaining comparable reasoning quality to that of a large model.

Method

SpecSearch introduces a bi-level speculative thought generator that collaborates between a small model and a large model at both coarse-grained thought and fine-grained token levels. The framework operates on a draft-evaluate-reject-correct paradigm: (1) a small model drafts multiple reasoning thoughts efficiently; (2) a thought evaluator (e.g., a process reward model) assesses their quality; (3) a novel quality-preserving rejection mechanism filters out low-quality thoughts using a step-wise threshold based on historical data from the large model, estimated via Exponential Moving Average (EMA); (4) rejected thoughts are corrected at the token level using lossless speculative decoding with the large model. This approach leverages the inherent structure of TSB reasoning and aims to balance efficiency and quality, supported by theoretical guarantees of undegraded quality under specific conditions.

Experiment

The experiments evaluate SpecSearch on two mathematical reasoning datasets, GSM8K and MATH, using quantized Qwen (72B and 7B) and Llama (70B and 8B) models, with beam search and MCTS as search algorithms. The setup includes a tree width of 6 and depth of 50, running on NVIDIA RTX A800 GPUs. Results show SpecSearch achieves significant speedups (up to 2.12× over state-of-the-art speculative decoding and 3.35× over autoregressive decoding) while maintaining comparable reasoning accuracy (e.g., 87% on MATH-100 with Qwen, matching the large model). However, slight accuracy degradation occurs on GSM8K-100 with Qwen (96% vs. 97%), attributed to misleading thoughts deceiving the evaluator. The experimental design is comprehensive, testing across different models, datasets, search algorithms, and thought evaluators, demonstrating broad compatibility. Ablation studies confirm the importance of each component (evaluation and rejection modules), though the setup’s reliance on specific hyperparameters (e.g., EMA weight θ=0.9) and limited sample sizes for some tests (e.g., 100 samples per dataset) might affect generalizability. Overall, the results align with expectations of improved efficiency but highlight areas for refining quality preservation.

Further Thoughts

The SpecSearch framework presents a promising direction for addressing latency in LLM reasoning, particularly in TSB methods, but it also opens up several avenues for deeper exploration. One intriguing aspect is the potential adaptation of the quality-preserving rejection mechanism to other domains beyond mathematical reasoning, such as natural language understanding or code generation, where thought structures might differ significantly—could the historical data estimation still hold under less structured reasoning paths? Additionally, the observed accuracy degradation due to misleading thoughts suggests a connection to broader challenges in AI interpretability and robustness; integrating techniques from adversarial training or robust evaluation models might enhance the rejection mechanism’s ability to detect deceptive outputs. Furthermore, the reliance on a small model for initial thought generation parallels trends in federated learning, where resource-constrained devices handle preliminary computations—could SpecSearch inspire hybrid architectures for edge AI applications? Lastly, the theoretical assumptions (e.g., normal distribution of thought quality) might be revisited with more empirical data on LLM behavior, potentially linking to scaling laws research to better predict quality degradation across model sizes. These considerations could guide future iterations of SpecSearch towards even broader applicability and robustness.



Previous Post
Elastic Weight Consolidation for Full-Parameter Continual Pre-Training of Gemma2
Next Post
Reinforced MLLM: A Survey on RL-Based Reasoning in Multimodal Large Language Models