On the Bias of Next-Token Predictors Toward Systematically Inefficient Reasoning: A Shortest-Path Case Study

Riccardo Alberghi, Elizaveta Demyanenko, Luca Biggio, Luca Saglietti · DOI

Introduction

As Large Language Models (LLMs) transition toward "test-time compute" paradigms, such as OpenAI’s o1, the quality and structure of reasoning traces—or Chain of Thought (CoT)—have become central to model performance. While it is often assumed that the most direct, computationally efficient path to a solution provides the best training signal, recent research suggests a counterintuitive "inefficiency bias." This study investigates how the inductive bias of next-token predictors favors longer, systematic reasoning traces over globally optimal ones in algorithmic tasks.

Methodology: The Shortest-Path Task

To isolate reasoning dynamics, researchers utilized a controlled algorithmic task: finding the shortest path in a layered directed acyclic graph (DAG). A 28.5M parameter decoder-only transformer, based on the Phi-3 architecture, was trained from scratch on "Question–Trace–Answer" triples.

The core of the experiment involved a tunable efficiency parameter ($\eta$) to generate distinct reasoning styles for the training data:

  • Efficient ($\eta = +5$): A bottom-up Dynamic Programming (DP) approach that finds the optimal path with the minimum number of steps.
  • Inefficient ($\eta = -5$): A systematic Depth-First Search (DFS) style approach involving backtracking and node revisiting.
  • Random ($\eta = 0$): A non-systematic exploration of the graph.
Experimental setup: (a) Sample layered graph; (c) Answer accuracy; (d) Next-token confidence; and the tokenization format for efficient vs. inefficient traces.

Crucially, models were compared using a fixed token budget. Because the inefficient traces are longer, the model trained on them saw significantly fewer unique graph instances during training than the efficient model, creating a rigorous test for generalization.

Key Results: The Superiority of Systematic Inefficiency

The results challenge standard optimization intuition. The model trained on DFS-style inefficient traces achieved near-perfect accuracy on unseen 7-layer graphs, significantly outperforming the DP-based efficient model. Models trained to go directly from Question to Answer (zero-trace) failed to generalize entirely, confirming that intermediate reasoning steps are pivotal for algorithmic tasks.

The Predictability Factor

The primary driver for this performance gap appears to be next-token confidence. Inefficient traces are "locally incremental," meaning each step builds clearly and predictably on the one before it. In contrast, DP traces, while shorter, often involve logical "jumps" that are harder for a next-token predictor to anticipate.

Next-token confidence trends over training epochs, illustrating the higher predictability of inefficient traces compared to efficient ones.

The study found that generalization correlates strongly with this local predictability. While DP is computationally optimal, its lack of step-by-step transparency makes it a poorer training signal for transformers compared to the systematic, albeit longer, DFS traces.

Discussion and Insights

  • Internalization vs. Memorization: Optimization trajectories for inefficient models often showed sudden "jumps" in performance (phase transitions), suggesting the model had successfully internalized the underlying algorithm rather than just memorizing patterns.
  • Systematicity over Redundancy: Simply making a trace longer by repeating steps (artificial redundancy) did not help. The benefit stems from the systematic nature of the reasoning, not just the token count.
  • Surprisal Metrics: Average "surprisal" (uncertainty) was lowest for DFS traces (0.48) and highest for random traces (1.90), explaining why systematic inefficiency provides a cleaner training signal.

Conclusion

This research highlights a fundamental tension between computational efficiency and learnability in next-token predictors. The findings suggest that for complex reasoning, the most "efficient" path for a computer may not be the most "teachable" path for a transformer. Future work may explore curriculum learning strategies that transition from long, systematic traces to more compact reasoning, or utilize mechanistic interpretability to map the specific circuits formed during backtracking tasks.

Summary updated

BibTeX
@inproceedings{alberghi2025bias,
  author = {Riccardo Alberghi and Elizaveta Demyanenko and Luca Biggio and Luca Saglietti},
  title = {{On the Bias of Next-Token Predictors Toward Systematically Inefficient Reasoning: A Shortest-Path Case Study}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=l8razJItEy},
}
Figure