MoTCoder: Elevating Large Language Models with Modular of Thought for Challenging Programming Tasks
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Large Language Models (LLMs) have showcased impressive capabilities in handling straightforward programming tasks. However, their performance tends to falter when confronted with more challenging programming problems. We observe that conventional models often generate solutions as monolithic code blocks, restricting their effectiveness in tackling intricate questions. To overcome this limitation, we present Module-of-Thought Coder (MoTCoder). We introduce a framework for MoT instruction tuning, designed to promote the decomposition of tasks into logical sub-tasks and sub-modules. Our investigations reveal that, through the cultivation and utilization of sub-modules, MoTCoder significantly improves both the modularity and correctness of the generated solutions, leading to substantial pass@1 improvements of 5.9% on APPS and 5.8% on CodeContests. MoTCoder also achieved significant improvements in self-correction capabilities, surpassing the current SOTA by 3.3%. Additionally, we provide an analysis of between problem complexity and optimal module decomposition and evaluate the maintainability index, confirming that the code generated by MoTCoder is easier to understand and modify, which can be beneficial for long-term code maintenance and evolution. Our codes are available at https://github.com/dvlab-research/MoTCoder.
Key facts. Cited by 9 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 30 of its 78 references that are in the map. First posted on arXiv 26 Dec 2023.
Builds on
30 of 78 references.
Closest ancestors · 1
Same direction, newest first
Other references · 29
- 2023GPT-4 Technical Reportcited by 18,132
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
- 2023Qwen Technical Reportcited by 3,273
- 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
- 2022Training Compute-Optimal Large Language Modelscited by 2,927
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
- 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,199
17 more
- 2023PaLM 2 Technical Reportcited by 1,154
- 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,116
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
- 2022GLM-130B: An Open Bilingual Pre-trained Modelcited by 837
- 2023StarCoder: may the source be with you!cited by 790
- 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 711
- 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instructcited by 618
- 2023Textbooks Are All You Needcited by 561
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2023MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuningcited by 483
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
- 2022UL2: Unifying Language Learning Paradigmscited by 292
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 191
- 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
- 2023CodeChain: Towards Modular Code Generation Through Chain of Self-revisions with Representative Sub-modulescited by 58
- 2022Referee: Reference-Free Sentence Summarization with Sharper Controllability through Symbolic Knowledge Distillationcited by 14
Built on by
Citing papers per year: 2024: 6; 2025: 2; 2026: 1.
9 papers.
- 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solvingcited by 177
- 2025CODESIM: Multi-Agent Code Generation and Problem Solving through Simulation-Driven Planning and Debuggingcited by 31
- 2024DAPE: Data-Adaptive Positional Encoding for Length Extrapolationcited by 30
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolationcited by 10
- 2025Execution Guided Line-by-Line Code Generationcited by 10
- 2024MOODv2: Masked Image Modeling for Out-of-Distribution Detectioncited by 6
- 2024QuickLLaMA: Query-aware Inference Acceleration for Large Language Modelscited by 4
- 2024Survey of User Interface Design and Interaction Techniques in Generative AI Applicationscited by 3
- 2026Customized User Plane Processing via Code Generating AI Agents for Next Generation Mobile Networkscited by 0
- 2026Customized User Plane Processing via Code Generating AI Agents for Next Generation Mobile Networks24 Mar 2026
- 2025Execution Guided Line-by-Line Code Generation12 Jun 2025
- 2025CODESIM: Multi-Agent Code Generation and Problem Solving through Simulation-Driven Planning and Debugging8 Feb 2025
- 2024Survey of User Interface Design and Interaction Techniques in Generative AI Applications28 Oct 2024
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolation7 Oct 2024
- 2024QuickLLaMA: Query-aware Inference Acceleration for Large Language Models11 Jun 2024
- 2024DAPE: Data-Adaptive Positional Encoding for Length Extrapolation23 May 2024
- 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solving18 May 2024
- 2024MOODv2: Masked Image Modeling for Out-of-Distribution Detection5 Jan 2024
Similar, not cited
Close in wording, no citation either way
- 2025MoT: Modularization-of-Thought Prompting for Effective Code Generation
- 2023CodeApex: A Bilingual Programming Evaluation Benchmark for Large Language Models
- 2025Chain of Execution Supervision Promotes General Reasoning in Large Language Models
- 2025Hierarchical Evaluation of Software Design Capabilities of Large Language Models of Code
- 2026EsoLang-Bench: Evaluating Genuine Reasoning in Large Language Models via Esoteric Programming Languages
- 2026Narrowing the Complexity Gap in the Evaluation of Large Language Models ↗
- 2024Assessing Code Generation with Intermediate Languages
- 2026CodeEval: A pedagogical approach for targeted evaluation of code-trained Large Language Models