How Do Humans Write Code? Large Models Do It the Same Way Too
On the map: LLM reasoning → Prompting and chain-of-thought reasoning
Abstract (arXiv)
Program-of-Thought (PoT) replaces natural language-based Chain-of-Thought (CoT) as the most popular method in Large Language Models (LLMs) mathematical reasoning tasks by utilizing external tool calls to circumvent computational errors. However, our evaluation of the GPT-4 and Llama series reveals that using PoT introduces more reasoning errors, such as incorrect formulas or flawed logic, compared to CoT. To address this issue, we propose Human-Think Language (HTL), which leverages a suite of strategies that help integrate PoT and CoT, encompassing: (1) a new generation paradigm that uses full CoT reasoning to control code generation. (2) Focus Attention, that directs model attention to the CoT reasoning during PoT to generate more logical code. (3) reinforcement learning that utilizes the accuracy of both CoT and PoT responses as rewards to prevent repetitive reasoning steps in LLMs when solving difficult math problems. Our method achieves an average improvement of 6.5% on the Llama-Base model and 4.3% on the Mistral-Base model across 8 mathematical calculation datasets. It also shows significant effectiveness on five out-of-domain datasets by controlling the model's information flow, exhibiting strong transferability. Additionally, HTL shows the most significant improvement in non-mathematical natural language inference task, contributing to a unified reasoning task framework
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). Placed in Prompting and chain-of-thought reasoning, one of 17 directions in LLM reasoning. Builds on 29 of its 44 references that are in the map. First posted on arXiv 24 Feb 2024.
Builds on
29 of 44 references.
Closest ancestors · 4
Same direction, newest first
- 2023Measuring Faithfulness in Chain-of-Thought Reasoning17 Jul
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective24 May
- 2023Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Prompting7 May
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Tasks22 Nov
Other references · 25
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2019Fine-Tuning Language Models from Human Preferencescited by 2,124
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,359
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 861
- 2023The RefinedWeb Dataset for Falcon LLM: Outperforming Curated Corpora with Web Data, and Web Data Onlycited by 755
- 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 751
- 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instructcited by 618
- 2019Be Your Own Teacher: Improve the Performance of Convolutional Neural Networks via Self Distillationcited by 491
13 more
- 2023MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuningcited by 483
- 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 331
- 2021A Diverse Corpus for Evaluating and Developing English Math Word Problem Solverscited by 314
- 2023Think before you speak: Training Language Models With Pause Tokenscited by 254
- 2024ReFT: Reasoning with Reinforced Fine-Tuningcited by 236
- 2023Secrets of RLHF in Large Language Models Part I: PPOcited by 226
- 2022Language Models of Code are Few-Shot Commonsense Learnerscited by 160
- 2023SelfCheck: Using LLMs to Zero-Shot Check Their Own Step-by-Step Reasoningcited by 157
- 2024OpenMathInstruct-1: A 1.8 Million Math Instruction Tuning Datasetcited by 143
- 2023Rephrase and Respond: Let Large Language Models Ask Better Questions for Themselvescited by 123
- 2022NumGLUE: A Suite of Fundamental yet Challenging Mathematical Reasoning Taskscited by 110
- 2021On the Connection between Local Attention and Dynamic Depth-wise Convolutioncited by 61
- 2020Ape210K: A Large-Scale and Template-Rich Dataset of Math Word Problemscited by 60
Built on by
Citing papers per year: 2024: 1; 2025: 6; 2026: 4.
11 papers.
- 2025Crossing the Reward Bridge: Expanding RL with Verifiable Rewards Across Diverse Domainscited by 150
- 2025One Token to Fool LLM-as-a-Judgecited by 56
- 2025The Choice of Divergence: A Neglected Key to Mitigating Diversity Collapse in Reinforcement Learning with Verifiable Rewardcited by 36
- 2024I-SHEEP: Self-Alignment of LLM from Scratch through an Iterative Self-Enhancement Paradigmcited by 27
- 2025To Code or not to Code? Adaptive Tool Integration for Math Language Models via Expectation-Maximizationcited by 25
- 2025Reasoning-as-Logic-Units: Scaling Test-Time Reasoning in Large Language Models Through Logic Unit Alignmentcited by 12
- 2026Save the Good Prefix: Precise Error Penalization via Process-Supervised RL to Enhance LLM Reasoningcited by 10
- 2026SPPO: Sequence-Level PPO for Long-Horizon Reasoning Taskscited by 7
- 2026DyJR: Preserving Diversity in Reinforcement Learning with Verifiable Rewards via Dynamic Jensen-Shannon Replaycited by 3
- 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregationcited by 3
- 2025Parrot: A Training Pipeline Enhances Both Program CoT and Natural Language CoT for Reasoningcited by 0
- 2026SPPO: Sequence-Level PPO for Long-Horizon Reasoning Tasks10 Apr 2026
- 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregation17 Mar 2026
- 2026DyJR: Preserving Diversity in Reinforcement Learning with Verifiable Rewards via Dynamic Jensen-Shannon Replay17 Mar 2026
- 2026Save the Good Prefix: Precise Error Penalization via Process-Supervised RL to Enhance LLM Reasoning26 Jan 2026
- 2025Parrot: A Training Pipeline Enhances Both Program CoT and Natural Language CoT for Reasoning29 Oct 2025
- 2025The Choice of Divergence: A Neglected Key to Mitigating Diversity Collapse in Reinforcement Learning with Verifiable Reward9 Sep 2025
- 2025One Token to Fool LLM-as-a-Judge11 Jul 2025
- 2025Crossing the Reward Bridge: Expanding RL with Verifiable Rewards Across Diverse Domains31 Mar 2025
- 2025Reasoning-as-Logic-Units: Scaling Test-Time Reasoning in Large Language Models Through Logic Unit Alignment5 Feb 2025
- 2025To Code or not to Code? Adaptive Tool Integration for Math Language Models via Expectation-Maximization2 Feb 2025
- 2024I-SHEEP: Self-Alignment of LLM from Scratch through an Iterative Self-Enhancement Paradigm15 Aug 2024
Similar, not cited
Close in wording, no citation either way
- 2024To CoT or not to CoT? Chain-of-thought helps mainly on math and symbolic reasoning
- 2025Scaling Code-Assisted Chain-of-Thoughts and Instructions for Model Reasoning
- 2025An Empirical Study of Reasoning Steps in Thinking Code LLMs
- 2023Chain-of-Thought in Neural Code Generation: From and For Lightweight Language Models
- 2026Hierarchical Chain-of-Thought: Enhancing LLM Reasoning Performance and Efficiency
- 2025Reasoning Can Hurt the Inductive Abilities of Large Language Models
- 2025Understanding Chain-of-Thought Effectiveness in Code Generation: An Empirical and Information-Theoretic Analysis
- 2025Chain-of-Thought Tokens are Computer Program Variables