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

GRACE: Discriminator-Guided Chain-of-Thought Reasoning

Muhammad Khalifa, Lajanugen Logeswaran, Moontae Lee, Honglak Lee, Lu Wang

Abstract

Large Language Models (LLMs) often struggle with multi-step reasoning tasks, frequently generating plausible but logically incorrect intermediate steps that lead to wrong final answers. We introduce GRACE (Guiding chain-of-thought ReAsoning with a CorrectnEss Discriminator), a novel decoding strategy that uses a small, specialized judge model to steer LLMs toward logically sound reasoning paths. By scoring the correctness of individual steps during the generation process, GRACE significantly improves accuracy on complex mathematical and symbolic reasoning tasks without requiring any fine-tuning of the underlying LLM.

The Misalignment of Likelihood and Correctness

Standard LLM training focuses on next-token prediction, which teaches models to generate plausible text rather than correct logic. In multi-step reasoning, a single high-probability hallucination can derail an entire solution. Existing methods like Self-Consistency attempt to mitigate this by taking a majority vote over multiple full solutions, but they do not actively intervene in the reasoning process itself.

The misalignment between likelihood (Avg. Prob) and correctness in a multi-step math problem.

As shown in the figure above, an LLM may assign higher probabilities to incorrect candidate steps than to the correct one. GRACE addresses this by "calibrating" the model's output with a correctness score from a dedicated discriminator.

The GRACE Framework

GRACE operates through a three-phase training pipeline followed by a guided decoding process at inference time:

  1. Negative Sampling: The system samples thousands of solutions from the base LLM, specifically isolating those that lead to incorrect final answers to identify common failure modes.
  2. Automated Step Alignment: To train the judge without expensive human labeling, GRACE uses a modified Needleman-Wunsch algorithm to align incorrect sampled steps with a "gold" reference solution. This allows for the automatic identification of the exact point where a reasoning chain first diverges from logical truth.
  3. Discriminator Learning: A relatively small encoder model (e.g., FLAN-T5 Large) is trained using a contrastive max-margin loss to distinguish between correct and incorrect reasoning steps.
The GRACE framework: (Top) Discriminator training via sampling, alignment, and learning; (Bottom) Stepwise decoding using the trained discriminator.

During Stepwise Decoding, the LLM generates multiple candidate next steps. The discriminator scores each candidate, and the final selection is based on a combination of the LLM's original probability and the discriminator's correctness score. This process repeats until a final answer is reached.

Key Results and Insights

GRACE was evaluated across several benchmarks, including GSM8K (math), SVAMP (math), and Shuffled Objects (symbolic reasoning). Key findings include:

  • Significant Accuracy Gains: GRACE improved LLaMA-7B accuracy by 5.4% on GSM8K. When combined with Self-Consistency, it outperformed vanilla majority voting by up to 15.7% on MultiArith.
  • Parameter Efficiency: A discriminator with 20x to 38x fewer parameters than the generator can effectively steer it. For instance, a 340M parameter T5 model significantly improved the performance of a 13B parameter LLaMA model.
  • Reduced Trace Error: Human evaluation confirmed that GRACE reduces intermediate logical mistakes (trace errors) by 44% compared to standard greedy decoding.

Limitations and Future Work

While effective, GRACE introduces computational overhead because it requires sampling and scoring multiple candidates at every step. Additionally, its performance is capped by the quality of the candidates generated by the LLM; if no correct step is sampled, the discriminator cannot select one. Future research may explore using these alignment techniques to provide reward signals for Reinforcement Learning (RLHF) to improve the base LLM directly.

Summary updated

BibTeX
@inproceedings{khalifa2023grace,
  author = {Muhammad Khalifa and Lajanugen Logeswaran and Moontae Lee and Honglak Lee and Lu Wang},
  title = {{GRACE: Discriminator-Guided Chain-of-Thought Reasoning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.1022},
}
Figure