Beyond Semantics: The Unreasonable Effectiveness of Reasonless Intermediate Tokens

Kaya Stechly, Karthik Valmeekam, Vardhan Palod, Atharva Gundawar, Subbarao Kambhampati

TL;DR

Large reasoning models produce long intermediate "chains of thought" that are widely anthropomorphized as human-like reflection, backtracking, or algorithmic search. By evaluating models on formally verifiable planning problems (mazes and Sokoban), this paper reveals a striking paradox: models trained on completely irrelevant, corrupted intermediate traces (swapped from entirely different problems) match or outperform models trained on correct algorithmic traces, challenging the idea that intermediate tokens must carry semantically valid reasoning to be effective.

What Problem Does This Paper Address?

Recent reasoning models (e.g., DeepSeek-R1) spend substantial test-time computation generating long intermediate tokens before outputting a solution. This is commonly claimed to show models "thinking," executing cognitive procedures like self-correction, or discovering algorithmic behaviors (e.g., "aha" moments). However, in natural language domains like math or general QA, intermediate steps are polysemantic, meandering, and lack formal ground-truth semantics—making it virtually impossible to verify whether the intermediate tokens actually cause or reflect valid reasoning.

This paper investigates: Do the semantics and algorithmic correctness of intermediate reasoning tokens actually drive the final performance gains, or does outputting extra tokens help for non-semantic reasons?

Methods

The authors adopt a "model organism" approach using fully controllable, formally verifiable planning domains:

  • From-Scratch Architectures: They train 0.5B decoder-only transformers (modified Qwen-2.5 architecture with a custom 944-token vocabulary, reducing parameters to ~380M) from scratch, as well as evaluating existing encoder-decoder Searchformer models (15M–175M parameters).
  • Formal $A^*$ Trace Validator: They build a deterministic validator that parses linearized $A^*$ execution logs (create x y cA cB, close x y cA cB) and checks for adherence to $A^*$ semantics (valid neighbor expansions, closed/open list membership, priority queue order by lowest $f$-value, and goal reaching).
  • Trace Datasets:
  • Solution-Only: Training directly on problem $\to$ plan without any intermediate tokens.
  • Regular $A^*$ Traces: Training on the problem paired with its true $A^*$ search trace followed by the optimal solution.
  • Swapped Traces: Training on the original problem and its correct solution, but teacher-forcing an intermediate $A^*$ trace permuted from an entirely different, unrelated problem.
  • RL Post-Training: Base models are further trained with Group Relative Policy Optimization (GRPO), rewarding only final plan validity, to see if RL incentivizes trace correctness.

Datasets

The study focuses on grid-based shortest path navigation on $30 \times 30$ grids:

  • In-Distribution Training Data: Mazes generated using Wilson’s algorithm (loop-erased random walks creating uniform spanning trees; 50k and 500k training sets).
  • Out-of-Distribution (OOD) Test Sets (1k samples each):
  • Acyclic mazes: Kruskal’s algorithm (biased toward local connections/dead ends) and Randomized Depth-First Search (DFS) (long corridors, low branching factor).
  • Cave/Loop-permitting structures: Drunkard’s Walk (open chambers, cycles) and SearchFormer-style (random obstacle density with rejection sampling).
  • Secondary Domain: A dataset of 50,000 $7 \times 7$ Sokoban puzzles (a PSPACE-complete problem) evaluated on hard, long-solution test instances.

Key Insights and Ideas

  • Trace Validity Does Not Guarantee Plan Validity (and Vice Versa): Models trained on ground-truth $A^*$ traces frequently output invalid search traces yet produce perfectly valid final plans, or conversely, generate valid traces and fail the plan.
  • Semantics Are Optional for Performance: Swapping reasoning traces—so the model outputs a search trace for a completely different maze before outputting the correct plan for the current maze—yields 0% trace validity, yet the model performs just as well or better than the model trained on correct traces.
  • Swapped Traces Generalize Better OOD: In out-of-distribution environments, the swapped-trace model consistently showed better generalization than the model taught strict $A^*$ traces. For example, on Drunkard's Walk mazes, the swapped model achieved 26.0% plan validity compared to 2.5% for the model trained on ground-truth $A^*$ traces.
  • RL Does Not Fix Trace Semantics: Post-training with GRPO increased overall plan accuracy, but the swapped model widened its lead over the regular model (reaching 92.2% vs. 88.0%), while the swapped trace validity remained at exactly 0%.
  • Reasoning Chains as Prompt Augmentations: The authors hypothesize intermediate tokens act less like human thoughts and more like learned, non-semantic prompt augmentations (analogous to adversarial suffix tokens or computational scratch space) that trigger useful transformer dynamics rather than step-by-step symbolic derivation.

Key Results

Across 50k training examples: - Wilson (In-Distribution): Solution-only achieves 4.0% plan validity; regular $A^*$ trace achieves 50.1% (95.2% trace validity); swapped trace achieves 51.6% (0% trace validity). - DFS (OOD): Regular trace achieves 30.8%, while swapped trace achieves 41.7%. - Drunkard's Walk (OOD Cave): Regular trace achieves 2.5%, while swapped trace achieves 26.0% (a 10x improvement).

Scaling up to 500k training examples: - Wilson: Regular trace achieves 79.9% vs. 83.3% for swapped. - Drunkard's Walk: Regular trace collapses to 0.0%, whereas swapped retains 11.7%.

Sokoban Evaluation: - The regular $A^*$ model achieved 1.1% plan validity (0% trace validity), whereas the swapped trace model achieved 2.3% (solution-only achieved 18.1%), confirming that correct traces do not outperform corrupted traces on this complex domain.

Limitations and Future Work

  • Scope of Domains: Experiments are limited to synthetic, formal planning domains (Grid Mazes and Sokoban). While these allow rigorous semantic verification, findings may not fully map to ambiguous natural language reasoning.
  • Architecture and Scale: Models evaluated were relatively small (~380M parameter Qwen-based transformers and 15M–175M Searchformers) trained from scratch; massive frontier models pretrained on internet-scale text might interact with reasoning traces differently.
  • Theoretical Mechanism: The authors pose a hypothesis regarding prompt augmentation and the Skolem function mapping tasks to effective token sequences, but a complete mechanistic explanation for why arbitrary intermediate tokens improve representation and out-of-distribution robustness remains open for future research.

Summary updated

BibTeX
@article{stechly2026beyond,
  author = {Kaya Stechly and Karthik Valmeekam and Vardhan Palod and Atharva Gundawar and Subbarao Kambhampati},
  title = {{Beyond Semantics: The Unreasonable Effectiveness of Reasonless Intermediate Tokens}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2026},
}
Figure