NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

$\nabla$-Reasoner: LLM Reasoning via Test-Time Gradient Descent in Latent Space

Peihao Wang, Ruisi Cai, Zhen Wang, Hongyuan Mei, qiang liu, Pan Li, Zhangyang Wang

TL;DR

$\nabla$-Reasoner (Nabla-Reasoner) introduces a paradigm shift in LLM reasoning by replacing inefficient discrete search algorithms with first-order gradient descent at inference time. By optimizing token representations in latent space using feedback from a reward model, it achieves over 20% accuracy gains on math benchmarks while requiring 10-40% fewer model calls than traditional sampling methods.

What Problem Does This Paper Address?

Large Language Models (LLMs) have shown that "thinking longer" at inference time—using techniques like Chain-of-Thought (CoT) or sampling multiple paths (Best-of-N)—significantly boosts reasoning performance. However, current methods for scaling inference-time compute are largely zeroth-order. They rely on "trial-and-error" sampling or complex tree searches (like Tree-of-Thought) to find a correct answer.

Gradient-based optimization vs. greedy decoding

These methods are often inefficient: they explore the massive space of possible sentences blindly, struggling when reward signals are sparse or when reasoning chains grow long. The authors argue that we are leaving valuable information on the table by ignoring the gradients available from differentiable reward models and the LLM itself.

Methods

The authors propose $\nabla$-Reasoner, which treats reasoning as a continuous optimization problem in the latent space of token logits.

  1. Differentiable Textual Optimization (DTO): This is the engine of the framework. Instead of just sampling tokens, DTO takes the initial "logits" (the raw scores before the final word choice) and refines them using gradient descent. The objective function balances two things:
  2. Reward Maximization: Nudging the sequence toward a higher score from a reward model.
  3. Fluency Regularization: Ensuring the sequence stays within the "natural language" distribution of the original LLM to prevent "reward hacking" (generating gibberish that happens to trick the reward model).
  4. The "Straight-Through" Bridge: Since tokens are discrete and gradients are continuous, the authors use a "straight-through estimator" (Gumbel-softmax trick) to allow gradients to flow from the reward model back into the token representations.
  5. Iterative Decoding with Rejection Sampling: The model doesn't just optimize once. It iteratively refines the sequence, resamples the next token, and uses a rejection sampling step to ensure the "new" thought is actually better than the "old" one.
  6. System Acceleration: To make this practical, they implement Gradient Caching (reusing gradients when tokens don't change) and Guided Token Selection (only running optimization on "uncertain" tokens), significantly reducing the computational overhead.

Datasets

The researchers evaluated $\nabla$-Reasoner on several challenging mathematical reasoning benchmarks:

  • MATH-500: A subset of the standard MATH dataset.
  • AMC (American Mathematics Competitions): High-school level competition math.
  • AIME 24 & 25 (American Invitational Mathematics Examination): Highly difficult problems requiring multi-step logical leaps.

They tested these against a variety of models, including Qwen-2.5-7B (Base and Instruct) and Llama-3.1-8B-Instruct.

Key Insights and Ideas

  • "Deamortized" PPO: One of the most elegant theoretical contributions is the proof that performing gradient descent on a single sample at test time is mathematically dual to Reinforcement Learning (like PPO). While standard RL "amortizes" the cost by training a global policy, $\nabla$-Reasoner performs "non-parametric" inference, tailoring the optimization to the specific problem at hand.
  • Bidirectional Information Flow: Unlike standard autoregressive decoding (which only looks left-to-right), the gradients in DTO allow information to flow backward. A reward signal at the end of a sentence can "correct" a mistake made at the beginning of the reasoning chain.
  • Efficiency via Parallelism: While gradient descent sounds expensive, it leverages the parallel nature of Transformers. A single backward pass updates all tokens in a sequence simultaneously, whereas traditional search methods require many sequential model calls to explore different branches.

Key Results

  • Significant Accuracy Boost: On the Qwen-2.5-7B-Instruct model, $\nabla$-Reasoner improved MATH-500 accuracy from 71.2% (greedy) to 80.4%.
  • Superior Efficiency: Compared to "Best-of-N" (sampling 8 paths and picking the best), $\nabla$-Reasoner achieved higher accuracy while reducing the number of model calls by up to 40.2%.
Cost comparison across models and datasets
  • Better Scaling Laws: The paper demonstrates a "sharper" scaling law—meaning for every additional unit of compute added at inference time, $\nabla$-Reasoner yields a higher return in accuracy compared to traditional sampling or self-consistency methods.
  • Competitive with Training: In several cases, this inference-time method outperformed models that had been explicitly fine-tuned using heavy RL algorithms like GRPO.

Limitations and Future Work

  • Reward Model Dependency: The system is only as good as its reward model. If the reward model is "blind" to certain types of errors, the gradients will lead the reasoner astray.
  • Vocabulary Constraints: Currently, the LLM and the reward model must share the same vocabulary to allow for end-to-end logit optimization.
  • System Complexity: Integrating test-time gradients into existing high-throughput serving frameworks (like vLLM) requires careful system co-design to handle the overhead of backward passes.
  • Future Directions: The authors suggest exploring this for non-mathematical tasks and investigating how this might be applied to "reasoning models" like OpenAI's o1 or DeepSeek-R1 to further refine their long-form CoT outputs.

Summary updated

BibTeX
@inproceedings{wang2026nabla,
  author = {Peihao Wang and Ruisi Cai and Zhen Wang and Hongyuan Mei and qiang liu and Pan Li and Zhangyang Wang},
  title = {{$\textbackslash\{\}nabla$-Reasoner: LLM Reasoning via Test-Time Gradient Descent in Latent Space}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=pEJAja73dk},
}
Figure