# Outcome-Based RL Provably Leads Transformers to Reason, but Only With the Right Data

DevFeed: [Outcome-Based RL Provably Leads Transformers to Reason, but Only With the Right Data](<https://devfeed.tech/articles/outcome-based-rl-provably-leads-transformers-to-reason-but-only-with-the-right-data-123087.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2601.15158>)

Author: Yuval Ran-Milo, Yotam Alexander, Shahar Mendel, Nadav Cohen

Published: 2026-11-09T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>), [Reinforcement learning](<https://devfeed.tech/topics/reinforcement-learning.md>), [Chain-of-thought](<https://devfeed.tech/topics/chain-of-thought.md>), [Transformers](<https://devfeed.tech/topics/transformers.md>)

Tags: [chain-of-thought](<https://devfeed.tech/tags/chain-of-thought.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [distribution](<https://devfeed.tech/tags/distribution.md>), [examples](<https://devfeed.tech/tags/examples.md>), [experiments](<https://devfeed.tech/tags/experiments.md>), [gradient](<https://devfeed.tech/tags/gradient.md>), [graph](<https://devfeed.tech/tags/graph.md>), [mathematical-reasoning](<https://devfeed.tech/tags/mathematical-reasoning.md>), [reasoning](<https://devfeed.tech/tags/reasoning.md>), [rl](<https://devfeed.tech/tags/rl.md>), [transformers](<https://devfeed.tech/tags/transformers.md>)

## AI overview

The paper analyzes policy-gradient training of single-layer linear Transformers on a graph traversal task that requires intermediate reasoning. It proves that final-answer correctness rewards can lead the model to learn an interpretable, vertex-by-vertex traversal algorithm. This emergence depends on the training distribution: enough examples requiring fewer reasoning steps enable learning that generalizes to longer chains, while removing those simpler examples makes learning infeasible. The authors report supporting experiments on synthetic data and mathematical reasoning with real-world language models. These claims are drawn from the supplied abstract.

## Source excerpt

arXiv:2601.15158v5 Announce Type: replace Abstract: Transformers trained via Reinforcement Learning (RL) with outcome-based supervision can spontaneously develop the ability to generate intermediate reasoning steps (Chain-of-Thought). Yet the mechanism by which sparse rewards drive policy gradient to discover such systematic reasoning remains poorly understood. We address this by analyzing the policy gradient dynamics of single-layer linear Transformers on a synthetic graph traversal task that cannot be solved without Chain-of-Thought but admits a simple iterative solution. We prove that despite training solely on final-answer correctness, policy gradient drives the Transformer to converge to a structured, interpretable algorithm that iteratively traverses the graph vertex-by-vertex. We characterize the distributional properties required for this emergence, identifying the critical role of "simple examples": instances requiring fewer reasoning steps. When the training distribution places sufficient mass on these simpler examples, the Transformer learns a generalizable traversal strategy that extrapolates to longer chains; when this mass vanishes, policy gradient learning becomes infeasible. We corroborate our theoretical results through experiments on synthetic data and with real-world language models on mathematical reasoning tasks, validating that our theoretical findings carry over to practical settings.