mlsanityData to 24 Nov 2026

Reasoning Patterns for Efficient AI Coding: An Empirical Study

arXiv 2610.34943 ↗Submitted 26 Oct 2026cs.SE cs.AIcited by 0

On the map: LLM reasoning → Reasoning for agents, planning and code also fits: Test-time compute and efficient thinking

Abstract (arXiv)

Large Reasoning Models (LRMs) generate long reasoning traces that expose intermediate inference behavior, offering opportunities to study and control reasoning in AI coding. However, the underlying patterns in these traces and their potential for analyzing and guiding coding models remain poorly understood, limiting systematic characterization and inference-time control of LRM reasoning. We conduct an empirical study of reasoning patterns across four representative coding tasks. We transform reasoning traces into structured action sequences and mine recurring fragments using within-task support, cross-task contrasts, and valid--invalid support contrasts. We characterize four general reasoning patterns by coding agents: design-to-implementation for code generation, state tracing for execution reasoning, evidence--fix--recheck for debugging, and semantic mapping for translation. We further identify positive and negative patterns associated with valid and invalid reasoning traces, respectively. Positive patterns reflect verification-driven convergence, whereas negative patterns reflect repeated design revision, reflection, and knowledge recall without closure. To demonstrate their practical utility, we evaluate three pattern-based applications: task identification, pattern-guided prompting, and pattern-aware early stopping. Features capturing general reasoning patterns enable accurate task identification from reasoning traces without accessing task descriptions or final answers. Prompting guided by positive and negative patterns improves the overall accuracy of downstream tasks, while negative pattern-aware early stopping substantially reduces API-reported token usage with only a modest decrease in pass@1. All three applications also generalize to previously unseen models, showing that reasoning patterns can support both the analysis and control of LRM behavior in AI coding.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 30 of its 38 references that are in the map. Submitted 26 Oct 2026.

Builds on

30 of 38 references.

Closest ancestors · 10

Same direction, newest first

  1. 2025Demystifying Errors in LLM Reasoning Traces: An Empirical Study of Code Execution Simulation28 Nov
  2. 2025An Empirical Study of Reasoning Steps in Thinking Code LLMs8 Nov
  3. 2025SEER: Enhancing Chain-of-Thought Code Generation through Self-Exploring Deep Reasoning20 Oct
  4. 2025A Study on Thinking Patterns of Large Reasoning Models in Code Generation17 Sep
  5. 2025Are They All Good? Evaluating the Quality of CoTs in LLM-based Code Generation9 Jul
  6. 2025MCTS-Refined CoT: High-Quality Fine-Tuning Data for LLM-Based Repository Issue Resolution15 Jun
  7. 2025CodeSense: a Real-World Benchmark and Dataset for Code Semantic Reasoning31 May
  8. 2025Think Like Human Developers: Harnessing Community Knowledge for Structured Code Reasoning19 Mar
  9. 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMs26 Feb
  10. 2023CodeCoT: Tackling Code Syntax Errors in CoT Reasoning for Code Generation17 Aug

Other references · 20

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,963
  2. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 9,360
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,938
  4. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 6,016
  5. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,789
  6. 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 4,110
  7. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,871
  8. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,799
  9. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 2,069
  10. 2026DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencecited by 1,363
  11. 2025Dynamic Early Exit in Reasoning Modelscited by 242
  12. 2024DebugBench: Evaluating Debugging Capability of Large Language Modelscited by 85
8 more
  1. 2025Answer Convergence as a Signal for Early Stopping in Reasoningcited by 50
  2. 2025Detection and Mitigation of Hallucination in Large Reasoning Models: A Mechanistic Perspectivecited by 37
  3. 2025Pruning the Unsurprising: Efficient LLM Reasoning via First-Token Surprisalcited by 34
  4. 2023Exploring the Reliability of Large Language Models as Customized Evaluators for Diverse NLP Taskscited by 26
  5. 2025An Empirical Analysis of Uncertainty in Large Language Model Evaluationscited by 24
  6. 2025More with Less: An Empirical Study of Turn-Control Strategies for Efficient Coding Agentscited by 13
  7. 2024ClassEval-T: Evaluating Large Language Models in Class-Level Code Translationcited by 10
  8. 2025CodeVisionary: An Agent-based Framework for Evaluating Large Language Models in Code Generationcited by 9

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026Exploring Extrinsic and Intrinsic Properties for Effective Reasoning with Code Interpreter
  2. 2025Unveiling the Magic of Code Reasoning through Hypothesis Decomposition and Amendment
  3. 2026Measuring AI Reasoning: A Guide for Researchers
  4. 2025Reasoning as a Resource: Optimizing Fast and Slow Thinking in Code Generation Models
  5. 2026Tracing the Thoughts of a Coding Agent Playing ARC-AGI-3: Lessons for Continual Learning
  6. 2025CodeI/O: Condensing Reasoning Patterns via Code Input-Output Prediction
  7. 2026Playing Psychic: Using Thought Trees to Predict Reasoning Models Accuracy on Coding Tasks
  8. 2025Reasoning Pattern Matters: Learning to Reason without Human Rationales