Manuscript Offprint

arXiv:2608.30345

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 Liu

Abstract

Generating multiple diverse and high-quality solutions is valuable for many applications, such as code-test generation and drug discovery. However, Large Language Models (LLMs) tend to converge on a single high-confidence solution during inference, limiting exploration of alternative valid solution paths. Existing test-time methods promote diversity through tree-like search and prune semantically similar branches using response-level semantic embeddings. However, we find that such embeddings are easily confounded by linguistic and stylistic similarities, making it difficult to distinguish genuinely distinct solution paths. To address this, we introduce Answer Probing, which probes the potential answer an LLM would reach from an intermediate reasoning path. We demonstrate that the hidden states of probed answers more effectively differentiate distinct solution paths than semantic embeddings, and the perplexity of probed answers serves as a practical proxy for reasoning correctness. Based on these findings, we propose Answer Probing-Guided Tree Search (APTS), which guides the tree search by the probed answers' hidden state similarity and perplexity. Experiments on three reasoning tasks across two LLMs show that APTS consistently enhances solution diversity, demonstrating its effectiveness and robustness.

1 Introduction

Diverse solution generation requires Large Language Models (LLMs) to explore various solution paths and produce multiple high-quality solution candidates. This capability is highly valuable in real-world tasks where a set of high-quality candidates is needed rather than a single gold standard answer. For example, in code-test generation (Jain et al., 2025), diverse test cases enable more comprehensive software evaluation. In drug discovery (Drews, 2000), diverse candidates provide a

Figure

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.

broader range of chemical structures, helping experts identify novel drug leads. However, during inference, current LLMs tend to converge on a single high-confidence trajectory when sampling multiple times (Song et al., 2025; Jiang et al., 2025), limiting their ability to explore other valid solutions. To address this issue, it is important to develop methods that encourage LLMs to explore more diverse yet valid reasoning paths.

To improve reasoning diversity without incurring prohibitive training costs, several test-time methods have been explored. These approaches can be broadly categorized into decoding-based and search-based methods. Decoding-based methods, such as temperature sampling (Renze, 2024) and nucleus sampling (Holtzman et al., 2020), enhance diversity by introducing probabilistic perturbations into the token generation process. However, these methods often yield token-level variation without true semantic diversity: the generated reasoning paths may exhibit different token sequences but still reflect similar lines of reasoning (Yun et al.,

∗^{*} Corresponding authors.

(2025). Search-based methods address this limitation by leveraging semantic embeddings to guide the generation process (Shi et al., 2025; Vijayakumar et al., 2018). Specifically, they employ search algorithms such as beam search (Li et al., 2016) and Tree of Thoughts (Yao et al., 2023) to explore multiple candidate paths at each reasoning step. These paths are then pruned based on their semantic embedding similarity, retaining only semantically diverse branches for further reasoning, thereby improving the diversity of the final reasoning set. However, LLM responses to the same problem frequently exhibit high structural and stylistic homogeneity (Kirk et al., 2024; O'Mahony et al., 2024). As illustrated in Figure 1, shared reasoning signposts and surface patterns can induce high similarity in semantic space, reducing the effectiveness of semantic embeddings in identifying truly distinct solution paths (see detailed analysis in Section 2).

To address this limitation, we seek an alternative representation that better reflects underlying solution paths while being less affected by linguistic and stylistic noise. Our preliminary analysis (Section 2) shows that answer-level hidden states are more effective than response-level semantic embeddings at distinguishing divergent solution paths. Motivated by this finding, we propose Answer Probing: at each reasoning step, we probe the potential answers the LLM would reach from the current intermediate reasoning path. This process exposes the latent solution tendency encoded in the intermediate reasoning path. By representing candidate reasoning paths with the mean-pooled hidden states of probed answers, we can better distinguish paths leading to distinct solutions. We also find that the perplexity (PPL) of probed answers provides a useful proxy for the quality of a candidate reasoning path, with lower PPL generally associated with more accurate outcomes.

Based on these findings, we propose Answer Probing-Guided Tree Search (APTS), which improves solution diversity while maintaining solution quality during generation. At each tree search step, APTS performs answer probing to evaluate candidate nodes. It uses the PPL of the probed answer as a quality signal and the hidden state similarity between probed answers as a diversity signal. By selecting nodes that are both high quality and non-redundant for further expansion, APTS guides the search toward candidate paths that are both promising and diverse. Extensive evaluations on three cross-domain reasoning tasks and two LLMs show that APTS improves solution diversity with only a modest impact on accuracy, demonstrating its effectiveness and robustness. In summary, the contributions of this work are threefold:

• We propose Answer Probing, which probes intermediate answers to yield both a quality signal and a diversity signal, defining diversity at the level of underlying solution tendency rather than text-level semantic similarity.

• We propose APTS, a tree search algorithm which guides search using probed-answer hidden state similarity and PPL to improve solution diversity.

• We conduct extensive experiments across three domains and two LLM architectures, showing that APTS consistently improves diversity with minimal impact on accuracy.

References (19)