Understanding the Role of Training Data in Test-Time Scaling
Adel Javanmard, Baharan Mirzasoleiman, Vahab Mirrokni
TL;DR
This work analyzes how training-data properties shape the benefits of test-time scaling for chain-of-thought reasoning in transformers. Focusing on in-context weight prediction for linear regression, it shows that test-time CoT approximates a multi-step (pseudo-)Newton method and yields a global optimum under gradient-descent training of a one-layer linear self-attention, with a closed-form characterization involving a regularized covariance operator $\Gamma$. A hardness measure based on the feature-covariance spectrum is introduced, and the authors prove that, at fixed downstream error, longer CoT can reduce the required training context, while underrepresented skills can cause overthinking; they also derive a tractable quadratic program to optimize task selection, endorsing diverse, relevant, and hard training tasks. Empirical validation on both linear and nonlinear transformers (LSA and GPT-2) confirms the scaling laws and the benefit of carefully chosen task mixtures, highlighting implications for data curation and inference-time computation. The results illuminate when test-time thinking helps or hurts and provide principled guidelines for designing training curricula to maximize test-time gains in reasoning tasks.
Abstract
Test-time scaling improves the reasoning capabilities of large language models (LLMs) by allocating extra compute to generate longer Chains-of-Thoughts (CoTs). This enables models to tackle more complex problem by breaking them down into additional steps, backtracking, and correcting mistakes. Despite its strong performance--demonstrated by OpenAI's o1 and DeepSeek R1, the conditions in the training data under which long CoTs emerge, and when such long CoTs improve the performance, remain unclear. In this paper, we study the performance of test-time scaling for transformers trained on an in-context weight prediction task for linear regression. Our analysis provides a theoretical explanation for several intriguing observations: First, at any fixed test error, increasing test-time compute allows us to reduce the number of in-context examples (context length) in training prompts. Second, if the skills required to solve a downstream task are not sufficiently present in the training data, increasing test-time compute can harm performance. Finally, we characterize task hardness via the smallest eigenvalue of its feature covariance matrix and show that training on a diverse, relevant, and hard set of tasks results in best performance for test-time scaling. We confirm our findings with experiments on large, nonlinear transformer architectures.
