mlsanityData to 7 Oct 2026

How Do Humans Write Code? Large Models Do It the Same Way Too

arXiv 2402.15729 ↗First posted 24 Feb 2024cs.AI cs.CL cs.PLcited by 11

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

  1. 2023Measuring Faithfulness in Chain-of-Thought Reasoning17 Jul
  2. 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective24 May
  3. 2023Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Prompting7 May
  4. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Tasks22 Nov

Other references · 25

  1. 2017Proximal Policy Optimization Algorithmscited by 14,441
  2. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  3. 2020Longformer: The Long-Document Transformercited by 3,362
  4. 2019Fine-Tuning Language Models from Human Preferencescited by 2,124
  5. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  6. 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,359
  7. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
  8. 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 861
  9. 2023The RefinedWeb Dataset for Falcon LLM: Outperforming Curated Corpora with Web Data, and Web Data Onlycited by 755
  10. 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 751
  11. 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instructcited by 618
  12. 2019Be Your Own Teacher: Improve the Performance of Convolutional Neural Networks via Self Distillationcited by 491
13 more
  1. 2023MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuningcited by 483
  2. 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 331
  3. 2021A Diverse Corpus for Evaluating and Developing English Math Word Problem Solverscited by 314
  4. 2023Think before you speak: Training Language Models With Pause Tokenscited by 254
  5. 2024ReFT: Reasoning with Reinforced Fine-Tuningcited by 236
  6. 2023Secrets of RLHF in Large Language Models Part I: PPOcited by 226
  7. 2022Language Models of Code are Few-Shot Commonsense Learnerscited by 160
  8. 2023SelfCheck: Using LLMs to Zero-Shot Check Their Own Step-by-Step Reasoningcited by 157
  9. 2024OpenMathInstruct-1: A 1.8 Million Math Instruction Tuning Datasetcited by 143
  10. 2023Rephrase and Respond: Let Large Language Models Ask Better Questions for Themselvescited by 123
  11. 2022NumGLUE: A Suite of Fundamental yet Challenging Mathematical Reasoning Taskscited by 110
  12. 2021On the Connection between Local Attention and Dynamic Depth-wise Convolutioncited by 61
  13. 2020Ape210K: A Large-Scale and Template-Rich Dataset of Math Word Problemscited by 60

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 6; 2026: 4.

11 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024To CoT or not to CoT? Chain-of-thought helps mainly on math and symbolic reasoning
  2. 2025Scaling Code-Assisted Chain-of-Thoughts and Instructions for Model Reasoning
  3. 2025An Empirical Study of Reasoning Steps in Thinking Code LLMs
  4. 2023Chain-of-Thought in Neural Code Generation: From and For Lightweight Language Models
  5. 2026Hierarchical Chain-of-Thought: Enhancing LLM Reasoning Performance and Efficiency
  6. 2025Reasoning Can Hurt the Inductive Abilities of Large Language Models
  7. 2025Understanding Chain-of-Thought Effectiveness in Code Generation: An Empirical and Information-Theoretic Analysis
  8. 2025Chain-of-Thought Tokens are Computer Program Variables