Contrastive Thinking Decoding: Steering Answer Generation in Reasoning Models

Taehyeon Kim, Hyunsoo Lee, Yu Jin Kim, Youngsoo Jang, Moontae LeeNeurIPS 2026

TL;DR

Large reasoning models (LRMs) often do all the hard math correctly in their "thinking" scratchpad, only to second-guess themselves and blurt out a completely different, wrong final answer. Yet, forcing them to blindly copy their scratchpad actually lowers accuracy because the final answer phase also fixes genuine scratchpad mistakes. This paper introduces Contrastive Thinking Decoding (CTD), a clever, training-free trick that uses the model’s own empty or degraded thoughts to filter out generic chatter, boosting accuracy—and even slightly speeding up generation—without touching a single weight.

What Problem Does This Paper Address?

Modern LRMs split generation into two distinct stages: an internal <think> phase where the model works through a problem step-by-step, and an <answer> phase where it summarizes the solution for the user. We usually assume that once the hard work in the thinking trace is done, writing out the final answer is just a victory lap.

As it turns out, models stumble on that victory lap constantly. Across various LRMs, final answers diverge from clean, completed reasoning traces 6% to 48% of the time—a quirk the authors call trace-answer disagreement. Why? Because standard next-token prediction during the answer phase gets distracted by generic language priors (boilerplate phrasing and common continuations), leading the model to recompute on the fly and hallucinate a new result.

Figure 1: An example of trace-answer disagreement from Qwen3 8B. The thinking trace arrives at a correct answer, yet the answer phase recomputes with extra steps and outputs a different value. A full example is described in Appendix I.

You might ask: Why not just write a regex to copy-paste the answer straight from the thinking trace? When the authors tried this ("oracle copying"), it actually underperformed standard decoding on models like R1-Distill 7B (48.5% vs. 51.5%). The answer phase isn't just a passive readout; it has independent error-correcting power. The challenge is steering the model to respect its reasoning trace without lobotomizing its ability to catch last-minute mistakes.

Methods

Enter Contrastive Thinking Decoding (CTD). Traditional contrastive decoding pairs a large "expert" model with a smaller "amateur" model, subtracting the amateur’s token probabilities (logits) from the expert’s to amplify smart tokens. CTD ditches the second model entirely and creates the contrast inside a single LRM by manipulating its thinking trace.

Figure 2: Overview of contrastive thinking decoding (CTD).

Here is how it works at test time:

  1. Primary Trace ($s^P$): Let the model generate its normal <think> trace for a prompt.
  2. Noisy Reference Trace ($s^N$): Create a second context for the exact same prompt, but replace the thinking trace with a deliberately unhelpful placeholder—like NULL (just empty newlines) or OPPOSITE (a short prompt encouraging wrong reasoning).
  3. Logit Extrapolation: During the <answer> phase, run both contexts in parallel. At each token step, subtract a scaled fraction ($\lambda = 0.15$) of the noisy logits from the primary logits: $\tilde{\ell}_t = \ell^P_t - \lambda \ell^N_t$.

Because the noisy trace contains zero real reasoning, its answer logits represent pure, generic language priors. Subtracting them acts like noise-canceling headphones for generic boilerplate, softly anchoring the model to the specific evidence in its primary trace while leaving room to fix low-confidence errors.

Datasets

Because CTD is purely an inference-time method, no training datasets are used. Evaluation spans:

  • Mathematics: MATH500, AIME ’24, and AIME ’25.
  • Science & General Knowledge: GPQA Diamond (graduate-level science) and MMLU.
  • Coding: LiveCodeBench (March–April 2025 slice).
  • Social Pressure: Sycophancy benchmarks, testing if models abandon correct thoughts when a user pressures them toward a wrong opinion.

No new benchmarks are introduced.

Key Insights and Ideas

  • Soft anchoring beats hard copying (CTD > Base > Oracle): When the primary thinking trace is confident and well-reasoned, its logits diverge sharply from the noisy trace, so CTD locks onto the trace’s answer. When the trace is wrong and uncertain, that divergence shrinks, allowing the answer phase's natural corrective ability to take the wheel.
  • Asymmetric wins: Across 14 pooled experimental conditions, CTD turned wrong traces into right answers (recovery) 341 times, while turning right traces into wrong answers (drift) only 25 times (bounded at $\le 1.5\%$ per model).
  • Sycophancy is also a trace-answer split: Under social pressure, models often figure out the objective truth in private <think> tags, then cave to the user's bias in the <answer>. CTD narrows this gap—not by making the model "morally aligned," but simply by penalizing generic people-pleasing priors.

Key Results

  • Higher accuracy across scales: On AIME ’24 (32K budget), CTD boosts R1-Distill 7B from 51.5% to 57.7% and Qwen3-8B from 75.9% to 77.7%. On GPQA Diamond, it lifts Qwen3-8B from 57.6% to 63.6% and Qwen3-32B from 68.2% to 72.7%.
  • It’s actually faster: Even though CTD runs two forward passes per answer token, the answer phase is tiny (~5–8% of total tokens) and batches in parallel on a GPU. Because CTD stops the model from rambling and recomputing during the answer phase (saving 240–1,270 tokens), end-to-end wall-clock latency is 97.1% (Qwen3-8B) and 90.5% (R1-7B) of standard decoding!
Accuracy vs. total compute for Qwen3 8B on AIME'24, showing CTD shifting the Pareto frontier upward and using fewer total tokens.
  • Predictable scaling: CTD's accuracy gains rank-correlate perfectly (Spearman $\rho = 1.0$) with a model's baseline disagreement rate—huge boosts when models second-guess themselves often (e.g., +14.6 points on Exaone4 1.2B), and gentle preservation on near-saturated tasks like MATH500 and MMLU.

Limitations and Future Work

  • Diminishing returns on well-behaved models: CTD only fixes the transition from thinking to answering. If a model already has very low trace-answer disagreement (like larger 32B models on saturated math benchmarks), CTD’s gains are naturally modest.
  • Not an alignment silver bullet: While CTD reduces sycophancy, the authors explicitly note it is a decoding control mechanism, not a safety, alignment, or faithfulness guarantee.
  • Future directions: Combining CTD with multi-sample voting methods like self-consistency (Maj@N), dynamically selecting the best noisy reference per problem, and folding this contrastive signal back into reinforcement learning during training.

Summary updated

Abstract

Large reasoning models separate inference into an explicit thinking phase followed by a final answer phase, yet how the answer phase uses the reasoning trace remains unclear. We present a systematic study of this trace-to-answer transition across multiple LRMs and find that (i) final answers diverge from correct reasoning traces at rates between 6\% and 48\%, even when traces terminate cleanly at full budget, (ii) naively copying the trace answer underperforms standard decoding in some settings, revealing that the answer phase has independent corrective capacity, and (iii) the same phenomenon extends beyond structured tasks to settings where reasoning traces and final answers can diverge under social-pressure framing (sycophancy). These findings motivate Contrastive Thinking Decoding (CTD), a training-free, single-model decoding method that contrasts answer-phase logits under the primary reasoning trace against those from a deliberately degraded noisy trace. CTD selectively amplifies trace-consistent tokens while preserving the answer phase's corrective capacity, concentrating CTD-internal joint mass on the both-correct cell (T$\checkmark$A$\checkmark$) without inducing trace-correct-to-answer-wrong drift relative to the base distribution. Across math reasoning, science, code, social-pressure resistance (sycophancy), and a broad knowledge benchmark (MMLU), \ctd reduces trace-answer disagreement and improves the accuracy--compute trade-off without parameter updates or auxiliary models at decoding time.
BibTeX
@inproceedings{kim2026contrastive,
  author = {Taehyeon Kim and Hyunsoo Lee and Yu Jin Kim and Youngsoo Jang and Moontae Lee},
  title = {{Contrastive Thinking Decoding: Steering Answer Generation in Reasoning Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=LNzV4tfoSx},
}
Figure