Answer Probing-Guided Search for Diverse Solution Exploration of LLMs

Yi Fang, Que Shen, Chengpeng Li, Boyi Deng, Wei Shi, Wenjie Wang, Fuli Feng, Fengli Xu, Dayiheng LiuarXiv 2026

TL;DR

Large Language Models (LLMs) often suffer from "mode collapse" during generation, producing superficially different responses that actually follow the exact same logic. To tackle this, the authors introduce Answer Probing-Guided Tree Search (APTS), a test-time method that forces LLMs to prematurely predict final answers from intermediate reasoning steps. By evaluating the hidden states and perplexity of these probed answers, APTS successfully steers tree search toward genuinely diverse, high-quality solution paths.

What Problem Does This Paper Address?

For complex tasks like code generation, mathematical problem-solving, or drug discovery, we often need a diverse set of valid solutions rather than a single "gold standard" answer. However, during inference, LLMs tend to converge on a single high-confidence trajectory, even when sampled multiple times.

Existing test-time methods try to encourage diversity using tree-search algorithms that prune branches based on response-level semantic embeddings. The catch? LLM responses to the same problem frequently exhibit high structural and stylistic homogeneity. Two completely different reasoning paths might use identical introductory phrases, signposts, or formatting. This "linguistic noise" causes high semantic similarity in the embedding space, making it incredibly difficult to distinguish genuinely unique solution paths.

Figure 1: Illustration of Answer Probing. Compared with semantic embeddings, answer probing mitigates linguistic and stylistic noise in reasoning and better distinguishes different solution paths.

Methods

The core innovation of this paper is Answer Probing. At any intermediate reasoning step, the algorithm stops the model, appends an answer-inducing prompt (e.g., "The final answer is"), and uses greedy decoding to force the LLM to directly generate a "probed answer."

From this probed answer, APTS extracts two crucial signals:

  1. Diversity Signal (AnsHid): Instead of using full response text embeddings, APTS calculates the mean-pooled hidden states of the probed answer tokens. By stripping away the stylistic fluff of the reasoning path, these hidden states directly expose the model's latent solution tendency.
  2. Quality Signal (PPL): The perplexity of the probed answer under the current reasoning path serves as an excellent proxy for correctness. Lower perplexity means the model is highly confident in reaching that answer from the current state.

These two signals guide Answer Probing-Guided Tree Search (APTS), a breadth-first tree search framework. At each expansion step, candidate nodes are evaluated and selected using a joint scoring function:

$$V = (1 - \alpha) \cdot \frac{1}{\text{PPL}_i} + \alpha \cdot \text{DS}_i$$

where $\text{DS}_i$ penalizes nodes that have high hidden-state similarity to already selected nodes, and $\alpha$ balances the trade-off between quality and diversity.

Datasets

The authors evaluated APTS across three distinct reasoning domains and one open-ended domain:

  • Game of 24 (Math): A dataset of 204 problems where the goal is to manipulate four numbers to equal 24. Performance is measured by accuracy (Acc@16) and solution category coverage (Cov@16).
  • Forward Synthesis (Chemistry): Predicting chemical products from reactants. Evaluated via product quality (Conf@16) and chemical space coverage (NCircle@16).
  • TestCaseGen (Code): Generating unit tests for real-world functions. Evaluated via test accuracy, line coverage (L-Cov@16), and branch coverage (B-Cov@16).
  • LiveIdeaBench (Scientific Ideas): An open-ended benchmark used to evaluate the generalizability of APTS to tasks without explicit, discrete solution categories.

Key Insights and Ideas

  • Answers Strip Away Style Noise: Full response embeddings are easily confounded by linguistic style. Forcing the model to skip straight to the answer isolates the core logical intent.
  • Hidden States > Semantic Embeddings: Even at the answer level, internal hidden states (AnsHid) preserve richer, more discriminative reasoning dynamics than external text embeddings (AnsSem), making them far superior for guiding search.
  • Perplexity Predicts Correctness: Probed-answer perplexity is tightly correlated with final correctness. When configuring APTS to select nodes purely based on lowest PPL ($\alpha=0$), it actually beats standard repeated sampling in raw accuracy.
  • Efficiency via Caching: Tree search can be computationally heavy. However, because the candidate paths share long prefixes, the authors leverage prefix caching and batching to keep the wall-clock latency overhead down to a modest $1.46\times$.

Key Results

APTS consistently achieved the best solution diversity across all three primary tasks on both open-weight models evaluated (Qwen3-8B and GPT-OSS-120B).

  • Better Trade-offs than Temperature Tuning: Simply raising the sampling temperature ($T=1.5$) to get diverse answers caused a massive 9% drop in accuracy on average. APTS improved diversity while incurring a negligible accuracy decrease of just 0.6% compared to baseline sampling ($T=1.0$).
  • Substantial Diversity Gains: On Game of 24, APTS yielded an average absolute improvement of over 7% in solution category coverage. On TestCaseGen, it boosted line and branch coverage by over 5%.
  • Budget-Matched Efficiency: When compared against a baseline that was given a matching token budget (allowing the baseline to sample 29 times vs. APTS's 16), APTS still achieved higher solution diversity and better sample efficiency.
  • Black-Box Adaptability: The authors successfully adapted APTS to the closed-source GPT-o3-mini by swapping hidden states for semantic embeddings and PPL for semantic entropy, proving the core concept transfers even without internal model access.

Limitations and Future Work

  • Computational Overhead: While optimized with prefix caching, APTS still requires generating multiple intermediate paths and probing answers, which increases token consumption and inference time ($1.46\times$ wall-clock overhead).
  • Reasoning Task Dependency: APTS relies on the concept of a "final answer" to probe. It is highly effective for structured domains (math, code, logic) but is less applicable to purely creative open-ended text generation (e.g., story writing).
  • Hyperparameter Tuning: The trade-off coefficient $\alpha$ and the maximum search depth $D$ are task-dependent and currently require a validation set to optimize effectively.

Summary updated

BibTeX
@misc{fang2026answer,
  author = {Yi Fang and Que Shen and Chengpeng Li and Boyi Deng and Wei Shi and Wenjie Wang and Fuli Feng and Fengli Xu and Dayiheng Liu},
  title = {{Answer Probing-Guided Search for Diverse Solution Exploration of LLMs}},
  year = {2026},
  eprint = {2608.30345},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.30345},
}
Figure