Soft Reasoning: Navigating Solution Spaces in Large Language Models through Controlled Embedding Exploration

Qinglin Zhu, Runcong Zhao, Hanqi Yan, Yulan He, Yudong Chen, Lin Gui

TL;DR

Soft Reasoning is a novel, training-free framework that improves Large Language Model (LLM) reasoning by injecting controlled Gaussian noise into the embedding of the very first generated token. By combining this embedding perturbation with Bayesian optimization guided by a verifier, the method systematically navigates the model's internal solution space to find highly accurate and coherent reasoning paths. This approach outperforms traditional decoding and search methods while drastically reducing computational overhead and token consumption.

What Problem Does This Paper Address?

When tackling complex multi-step reasoning tasks (like math word problems or symbolic logic), LLMs often fail if they generate answers purely based on maximum likelihood (greedy decoding). To fix this, standard approaches either increase the generation "temperature" to sample diverse paths or use heavy language-based search heuristics (like Tree-of-Thoughts or Monte Carlo Tree Search).

However, these methods suffer from two major flaws:

  1. Uncontrolled Randomness: High temperature uniformly flattens token probabilities, introducing incoherent noise rather than meaningful exploration.
  2. Heavy Prompt Heuristics: Language-based search methods rely on surface-level prompt variations and discrete text adjustments. They do not directly align with or exploit the model's internal hidden representations, making them computationally expensive and prone to inefficient "wild-goose chases."
Figure 1. Comparison of Mainstream and Proposed Approaches.

Methods

The authors introduce Soft Reasoning, a black-box framework that bypasses discrete token manipulation by operating directly in the continuous embedding space of the first token.

The framework follows a two-step iterative loop:

  1. Embedding Perturbation: The model generates the first token using standard greedy decoding. The framework takes this token's continuous embedding vector $z$ and adds a small amount of Gaussian noise controlled by a scaling factor ($\sigma$). This perturbed vector is treated as a new "special token" added to the vocabulary. Because decoding proceeds greedily from this point forward, each unique injected vector deterministically maps to a single, unique reasoning path.
  2. Bayesian Optimization (BO): To avoid infinite random sampling, the framework treats the LLM as a black box and uses Bayesian optimization to find the optimal perturbation vector. It uses Expected Improvement (EI) as its acquisition function to balance exploration (searching uncertain embedding regions) and exploitation (refining promising directions).

To overcome the curse of dimensionality (since LLM embedding spaces typically span thousands of dimensions), the authors apply a random projection matrix to compress the search space down to a manageable lower dimension ($d=50$) before mapping solutions back to the full space.

The optimization is guided by an objective function that balances correctness and fluency: $$f(x) = r_{\text{verifier}}(y) + r_{\text{coherence}}(y)$$ Where $r_{\text{verifier}}$ is a binary score provided by a generative verifier, and $r_{\text{coherence}}$ measures the fluency of the sequence based on token log-probabilities.

Overview of Soft Reasoning framework.

Datasets

The authors evaluated Soft Reasoning across several prominent reasoning benchmarks:

  • GSM8K, GSM-Hard, and SVAMP: Complex mathematical word problem datasets.
  • StrategyQA: A commonsense reasoning dataset requiring implicit multi-step strategies.
  • AIME-2024: An advanced, highly challenging mathematics competition benchmark (used specifically for evaluating the larger Qwen2-70B model).

Key Insights and Ideas

  • The Power of the First Token: Perturbing just the first token's embedding acts as a steering wheel for the entire generation path. Because subsequent tokens are decoded greedily, a tiny shift in the initial latent space completely alters the downstream trajectory in a controlled, repeatable manner.
  • Activating Critical Pathways: Probing the internal mechanics revealed that embedding perturbations stochastically increase neuron activation rates in the Transformer's MLP layers by 3–4% compared to standard Self-Consistency baselines. More importantly, as the Bayesian optimization iterations progress, the framework systematically uncovers and increasingly activates "critical neurons" that directly correlate with correct answers.
  • Generation over Judgment: When using the LLM as its own verifier, prompting the model to generate a new solution collectively from multiple candidates (Multi-Generate) yields much higher verification accuracy than asking it to explicitly judge or classify candidates as correct/incorrect.

Key Results

Soft Reasoning consistently outperformed strong baselines—including Chain-of-Thought (CoT), Self-Consistency (SC), FIRE, CoT-Decoding, and RAP—across multiple model families (LLaMA3-8B, Qwen2-7B, Mistral-7B, and Qwen2-70B).

  • Accuracy Gains: On GSM8K in a zero-shot setting using LLaMA3-8B-Instruct, Soft Reasoning achieved 79.4% accuracy, significantly outperforming CoT-Decoding (73.9%) and standard CoT (53.0%).
  • Extreme Efficiency: Compared to RAP (a tree-search baseline), Soft Reasoning achieved superior accuracy while consuming only 6.19% of the input tokens and 63.28% of the output tokens. This translated to a massive speedup, requiring only 14.3% of RAP's total inference time.
  • Rapid Convergence: The Bayesian optimization loop converges incredibly fast; the majority of test queries reached their optimal solution within just 1 to 2 iterations, minimizing test-time compute.

Limitations and Future Work

While highly effective, Soft Reasoning has a few notable limitations:

  • Verifier Dependency: The optimization performance is heavily bound to the quality of the verifier. If the verifier provides unreliable or noisy feedback, it directly degrades the optimization trajectory.
  • Interpretability Challenges: Because the perturbations happen at the continuous token embedding level, it remains difficult to interpret exactly how a specific directional shift in the latent space alters the semantic reasoning steps.
  • Scope of Optimization: The current framework only optimizes the embedding of the very first token. The authors note that extending this continuous optimization deeper into subsequent tokens could unlock even more flexible control for longer, more complex reasoning tasks.

Summary updated

BibTeX
@inproceedings{zhu2025soft,
  author = {Qinglin Zhu and Runcong Zhao and Hanqi Yan and Yulan He and Yudong Chen and Lin Gui},
  title = {{Soft Reasoning: Navigating Solution Spaces in Large Language Models through Controlled Embedding Exploration}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=4gWE7CMOlH},
}
Figure