Papers › MoTCoder: Elevating Large Language Models with Modular of Thought for Challenging...

MoTCoder: Elevating Large Language Models with Modular of Thought for Challenging Programming Tasks

26 Dec 2023arXiv:2312.15960archive 2025-07-28

Jingyao Li, Pengguang Chen, Bin Xia, Hong Xu, Jiaya Jia

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2312.15960")

Code

Syntology Ran 4 of 8 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 4 ran with no contract checked.

By repository: official repository: 8 samples from 1 repository, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

dvlab-research/motcoder officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

8 samples harvested; 4 ran; 0 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

4ran
4unverified

Licence: 8 of the 8 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from dvlab-research/motcoder. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

cc2apps dvlab-research/motcoder/eval/dataset/data.py official repository ran no licence file found · pointer only · 5b8f5baa0fc73ca1 · report
custom_compare_ dvlab-research/motcoder/eval/testing_util.py official repository ran no licence file found · pointer only · cc054f0a84bb15b0 · report
extract_code_blocks dvlab-research/motcoder/eval/utils.py official repository ran fingerprinted no licence file found · pointer only · 3d0fafc764fb7aec · report
stripped_string_compare dvlab-research/motcoder/eval/testing_util.py official repository ran fingerprinted no licence file found · pointer only · 79fec3b223bb4bac · report
load_data dvlab-research/motcoder/eval/dataset/data.py official repository unverified no licence file found · pointer only · bca9e14ac3aef757 · report
process_batch dvlab-research/motcoder/eval/vllm_fix.py official repository unverified no licence file found · pointer only · 8fde5367be8c1218 · report
process_item dvlab-research/motcoder/eval/vllm_fix.py official repository unverified no licence file found · pointer only · 258657af338c1b25 · report
reflection_prompt dvlab-research/motcoder/eval/vllm_fix.py official repository unverified no licence file found · pointer only · d1021aa710d40741 · report

Tasks

Code Generation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Code Generation APPS MoTCoder-32B-V1.5 Competition Pass@1 27.84 #2 of 18 Archive leaderboard report
Code Generation APPS MoTCoder-32B-V1.5 Interview Pass@1 44.49 #2 of 18 Archive leaderboard report
Code Generation APPS MoTCoder-32B-V1.5 Introductory Pass@1 68.44 #2 of 18 Archive leaderboard report
Code Generation APPS MoTCoder-7B-V1.5 Competition Pass@1 21.18 #3 of 18 Archive leaderboard report
Code Generation APPS MoTCoder-7B-V1.5 Interview Pass@1 32.63 #3 of 18 Archive leaderboard report
Code Generation APPS MoTCoder-7B-V1.5 Introductory Pass@1 54.26 #3 of 18 Archive leaderboard report
Code Generation CodeContests MoTCoder-15B Test Set pass@1 26.34 #5 of 8 Archive leaderboard report
Code Generation CodeContests MoTCoder-15B Val Set pass@1 20.35 #5 of 8 Archive leaderboard report
Code Generation CodeContests MoTCoder-7B-v1.5 Test Set pass@1 20.77 #6 of 8 Archive leaderboard report
Code Generation CodeContests MoTCoder-7B-v1.5 Val Set pass@1 16.72 #6 of 8 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections