mlsanityData to 7 Oct 2026

Z1: Efficient Test-time Scaling with Code

arXiv 2504.00810 ↗First posted 1 Apr 2025cs.CLcited by 35

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Large Language Models (LLMs) can achieve enhanced complex problem-solving through test-time computing scaling, yet this often entails longer contexts and numerous reasoning token costs. In this paper, we propose an efficient test-time scaling method that trains LLMs on code-related reasoning trajectories, facilitating their reduction of excess thinking tokens while maintaining performance. First, we create Z1-Code-Reasoning-107K, a curated dataset of simple and complex coding problems paired with their short and long solution trajectories. Second, we present a novel Shifted Thinking Window to mitigate overthinking overhead by removing context-delimiting tags (e.g., <think>. . . </think>) and capping reasoning tokens. Trained with long and short trajectory data and equipped with Shifted Thinking Window, our model, Z1-7B, demonstrates the ability to adjust its reasoning level as the complexity of problems and exhibits efficient test-time scaling across different reasoning tasks that matches R1-Distill-Qwen-7B performance with about 30% of its average thinking tokens. Notably, fine-tuned with only code trajectories, Z1-7B demonstrates generalization to broader reasoning tasks (47.5% on GPQA Diamond). Our analysis of efficient reasoning elicitation also provides valuable insights for future research.

Key facts. Cited by 35 papers in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 23 of its 37 references that are in the map. First posted on arXiv 1 Apr 2025.

Builds on

23 of 37 references.

Closest ancestors · 2

Same direction, newest first

  1. 2024Qwen2.5-Coder Technical Report18 Sep
  2. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar

Other references · 21

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  2. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
  3. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
  4. 2023Let's Verify Step by Stepcited by 3,598
  5. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  6. 2023GPQA: A Graduate-Level Google-Proof Q&A Benchmarkcited by 2,748
  7. 2025s1: Simple test-time scalingcited by 1,311
  8. 2025Kimi k1.5: Scaling Reinforcement Learning with LLMscited by 1,193
  9. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  10. 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,116
  11. 2023StarCoder: may the source be with you!cited by 790
  12. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
9 more
  1. 2025LIMO: Less is More for Reasoningcited by 488
  2. 2025Process Reinforcement through Implicit Rewardscited by 478
  3. 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
  4. 2023Alphazero-like Tree-Search can Guide Large Language Model Decoding and Trainingcited by 291
  5. 2025O1-Pruner: Length-Harmonizing Fine-Tuning for O1-Like Reasoning Pruningcited by 278
  6. 2025SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software Evolutioncited by 246
  7. 2025Competitive Programming with Large Reasoning Modelscited by 115
  8. 2025SWE-Lancer: Can Frontier LLMs Earn 1 Million from Real-World Freelance Software Engineering?cited by 99
  9. 2023WaveCoder: Widespread And Versatile Enhancement For Code Large Language Models By Instruction Tuningcited by 42

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 29; 2026: 6.

35 papers.

Sort:

By area:

  1. 2025ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memorycited by 253
  2. 2025A Survey of Reinforcement Learning for Large Reasoning Modelscited by 175
  3. 2025Don't Overthink it. Preferring Shorter Thinking Chains for Improved LLM Reasoningcited by 82
  4. 2025Reasoning on a Budget: A Survey of Adaptive and Controllable Test-Time Compute in LLMscited by 31
  5. 2025Steering LLM Thinking with Budget Guidancecited by 30
  6. 2025MUR: Momentum Uncertainty guided Reasoning for Large Language Modelscited by 17
  7. 2025Generative AI Act II: Test Time Scaling Drives Cognition Engineeringcited by 14
  8. 2025AutoL2S: Auto Long-Short Reasoning for Efficient Large Language Modelscited by 12
  9. 2025Don't Think Longer, Think Wisely: Optimizing Thinking Dynamics for Large Reasoning Modelscited by 11
  10. 2025Exploring the System 1 Thinking Capability of Large Reasoning Modelscited by 10
  11. 2025Revisiting Model Interpolation for Efficient Reasoningcited by 10
  12. 2025ToTRL: Unlock LLM Tree-of-Thoughts Reasoning Potential through Puzzles Solvingcited by 8
23 more
  1. 2025SATURN: SAT-based Reinforcement Learning to Unleash LLMs Reasoningcited by 8
  2. 2025Revisiting Test-Time Scaling: A Survey and a Diversity-Aware Method for Efficient Reasoningcited by 8
  3. 2025How Far Are We from Optimal Reasoning Efficiency?cited by 8
  4. 2025Shadow-FT: Tuning Instruct Model via Training on Paired Base Modelcited by 7
  5. 2026Neural Chain-of-Thought Search: Searching the Optimal Reasoning Path to Enhance Large Language Modelscited by 7
  6. 2025AdaSTaR: Adaptive Data Sampling for Training Self-Taught Reasonerscited by 6
  7. 2025AutoChemSchematic AI: Agentic Physics-Aware Automation for Chemical Manufacturing Scale-Upcited by 6
  8. 2025J1: Exploring Simple Test-Time Scaling for LLM-as-a-Judgecited by 5
  9. 2025DART: Difficulty-Adaptive Reasoning Truncation for Efficient Large Language Modelscited by 5
  10. 2025Thinking with Nothinking Calibration: A New In-Context Learning Paradigm in Reasoning Large Language Modelscited by 4
  11. 2025Understanding the Role of Training Data in Test-Time Scalingcited by 4
  12. 2025How Many Code and Test Cases Are Enough? Evaluating Test Cases Generation from a Binary-Matrix Perspectivecited by 4
  13. 2025Nature's Insight: A Novel Framework and Comprehensive Analysis of Agentic Reasoning Through the Lens of Neurosciencecited by 3
  14. 2026R2-Write: Reflection and Revision for Open-Ended Writing with Deep Reasoningcited by 3
  15. 2025Fast, Slow, and Tool-augmented Thinking for LLMs: A Reviewcited by 2
  16. 2025Adaptive Test-Time Reasoning via Reward-Guided Dual-Phase Searchcited by 2
  17. 2026Efficient Test-Time Scaling via Temporal Reasoning Aggregationcited by 2
  18. 2025Follow the Path: Reasoning over Knowledge Graph Paths to Improve Large Language Model Factualitycited by 1
  19. 2025ARISE: An Adaptive Resolution-Aware Metric for Test-Time Scaling Evaluation in Large Reasoning Modelscited by 1
  20. 2026Interpretable Adaptive Sampling for LLM Test-Time Scalingcited by 1
  21. 2025TimeHC-RL: Temporal-aware Hierarchical Cognitive Reinforcement Learning for Enhancing LLMs' Social Intelligencecited by 0
  22. 2026Graph Reasoning Paradigm: Structured and Symbolic Reasoning with Topology-Aware Reinforcement Learning for Large Language Modelscited by 0
  23. 2026RefineRL: Advancing Competitive Programming with Self-Refinement Reinforcement Learningcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2025A Survey on Test-Time Scaling in Large Language Models: What, How, Where, and How Well?
  2. 2025The Art of Scaling Test-Time Compute for Large Language Models
  3. 2025S*: Test Time Scaling for Code Generation
  4. 2026ThinkBooster: A Unified Framework for Seamless Test-Time Scaling of LLM Reasoning
  5. 2026When More Thinking Hurts: Overthinking in LLM Test-Time Compute Scaling
  6. 2025Towards Thinking-Optimal Scaling of Test-Time Compute for LLM Reasoning
  7. 2025OpenCodeReasoning-II: A Simple Test Time Scaling Approach via Self-Critique
  8. 2025ScaleRTL: Scaling LLMs with Reasoning Data and Test-Time Compute for Accurate RTL Code Generation