Introduction
Tree-of-Thought (ToT) and Monte Carlo Tree Search (MCTS) have significantly enhanced the problem-solving capabilities of Large Language Models (LLMs) by allowing them to explore multiple reasoning paths. However, this exploration is often inefficient due to semantic redundancy, where the model generates multiple branches that are logically identical but phrased differently. This paper introduces Semantic Similarity-Based Dynamic Pruning (SSDP), a method designed to identify and merge these redundant paths in real-time during tree growth.
Methodology: Semantic Similarity-Based Dynamic Pruning
SSDP is integrated into a parallel search framework to prune redundant nodes online. The process follows a three-step pipeline:
- Embedding: Newly generated child nodes are converted into dense vectors using a lightweight sentence-transformer (
all-MiniLM-L6-v2). - Clustering: Sibling nodes are compared using cosine similarity. Nodes exceeding a threshold ($\tau = 0.75$) are grouped as semantically equivalent.
- Pruning: Within each cluster, a Process Reward Model (PRM) identifies the highest-scoring node to serve as the "representative," while others are discarded and their KV caches are freed.
By merging during the search rather than post-hoc, the algorithm prevents exponential growth of redundant rollouts and reallocates compute to novel reasoning paths.
Experimental Results
The authors evaluated SSDP using Llama-3 and Qwen-2.5 models on the GSM8K and MATH500 benchmarks.
Efficiency and Speedup
SSDP demonstrated substantial performance gains over existing search strategies. It achieved a 2.3x speedup over the optimized Dynamic Parallel Tree Search (DPTS) baseline and was up to 7.7x faster than standard MCTS.
Node Reduction and Accuracy
The method reduced the number of explored nodes by 85-90%. For instance, on MATH500 with Qwen-2.5 1.5B, the average nodes explored per sample dropped from 53.3 to 11.5. Crucially, this aggressive pruning did not significantly degrade performance, with accuracy remaining within 5% of the strongest baselines.
Discussion and Limitations
While effective, SSDP relies on text similarity which may not always align with logical equivalence. A hand-tuned similarity threshold ($\tau$) may also lack optimality across diverse tasks. Future work could explore task-specific encoders or adaptive thresholds to further refine the pruning process in domains like code generation or creative writing.
Summary updated