mlsanityData to 7 Oct 2026

Reasoning as a Resource: Optimizing Fast and Slow Thinking in Code Generation Models

arXiv 2506.09396 ↗First posted 11 Jun 2025cs.SE cs.AIcited by 3

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

Abstract (arXiv)

This position paper proposes a fundamental shift in designing code generation models: treating reasoning depth as a controllable resource. Rather than being an incidental byproduct of prompting, we argue that the trade-off between rapid, direct answers ("fast thinking") and elaborate, chain-of-thought deliberation ("slow thinking") must be explicitly managed. We contend that optimizing reasoning budgets across the entire model lifecycle - from synthetic data creation and benchmarking to real-world deploymen - can unlock superior trade-offs among accuracy, latency, and cost. This paper outlines how adaptive control over reasoning can enrich supervision signals, motivate new multi-dimensional benchmarks, and inform cost-aware, security-conscious deployment policies. By viewing fast and slow thinking as complementary modes to be scheduled, we envision coding agents that think deep when necessary and act fast when possible.

Key facts. Cited by 3 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 22 of its 32 references that are in the map. First posted on arXiv 11 Jun 2025.

Builds on

22 of 32 references.

Closest ancestors · 1

Same direction, newest first

  1. 2023Structured Chain-of-Thought Prompting for Code Generation11 May

Other references · 21

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
  3. 2021Program Synthesis with Large Language Modelscited by 3,509
  4. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  5. 2023StarCoder: may the source be with you!cited by 790
  6. 2023Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizescited by 710
  7. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  8. 2025AdaptThink: Reasoning Models Can Learn When to Thinkcited by 141
  9. 2023Verify-and-Edit: A Knowledge-Enhanced Chain-of-Thought Frameworkcited by 139
  10. 2023Split and Merge: Aligning Position Biases in LLM-based Evaluatorscited by 71
  11. 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Mannercited by 57
  12. 2025RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditingcited by 47
9 more
  1. 2024HumanEval Pro and MBPP Pro: Evaluating Large Language Models on Self-invoking Code Generationcited by 39
  2. 2022CCTEST: Testing and Repairing Code Completion Systemscited by 35
  3. 2023Refining Decompiled C Code with Large Language Modelscited by 24
  4. 2024Exploring Multi-Lingual Bias of Large Code Models in Code Generationcited by 17
  5. 2023Fixing Large Language Models' Specification Misunderstanding for Better Code Generationcited by 16
  6. 2024API-guided Dataset Synthesis to Finetune Large Code Modelscited by 11
  7. 2022Unleashing the Power of Compiler Intermediate Representation to Enhance Neural Program Embeddingscited by 10
  8. 2025Low-Cost and Comprehensive Non-textual Input Fuzzing with LLM-Synthesized Input Generatorscited by 10
  9. 2024SPVR: syntax-to-prompt vulnerability repair based on large language modelscited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Think Anywhere in Code Generation
  2. 2026Thinking Before Thinking: Scaling Agentic Inference Through Meta-Reasoning
  3. 2025Reasoning Efficiently Through Adaptive Chain-of-Thought Compression: A Self-Optimizing Framework
  4. 2024Tree-of-Code: A Tree-Structured Exploring Framework for End-to-End Code Generation and Execution in Complex Task Handling
  5. 2025ThinkSwitcher: When to Think Hard, When to Think Fast
  6. 2025Z1: Efficient Test-time Scaling with Code
  7. 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMs
  8. 2025Breakpoint: Scalable evaluation of system-level reasoning in LLM code agents