Divide-and-Conquer Meets Consensus: Unleashing the Power of Functions in Code Generation
Not on the map. Why?
Abstract (arXiv)
Despite recent progress made by large language models in code generation, they still struggle with programs that meet complex requirements. Recent work utilizes plan-and-solve decomposition to decrease the complexity and leverage self-tests to refine the generated program. Yet, planning deep-inside requirements in advance can be challenging, and the tests need to be accurate to accomplish self-improvement. To this end, we propose FunCoder, a code generation framework incorporating the divide-and-conquer strategy with functional consensus. Specifically, FunCoder recursively branches off sub-functions as smaller goals during code generation, represented by a tree hierarchy. These sub-functions are then composited to attain more complex objectives. Additionally, we designate functions via a consensus formed by identifying similarities in program behavior, mitigating error propagation. FunCoder outperforms state-of-the-art methods by +9.8% on average in HumanEval, MBPP, xCodeEval and MATH with GPT-3.5 and GPT-4. Moreover, our method demonstrates superiority on smaller models: With FunCoder, StableCode-3b surpasses GPT-3.5 by +18.6% and achieves 97.7% of GPT-4's performance on HumanEval. Further analysis reveals that our proposed dynamic function decomposition is capable of handling complex requirements, and the functional consensus prevails over self-testing in correctness evaluation.
Key facts. Cited by 19 papers in the map (data through 7 Oct 2026). Builds on 47 of its 65 references that are in the map. First posted on arXiv 30 May 2024.
Builds on
47 of 65 references.
References · 47
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
35 more
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,201
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023StarCoder: may the source be with you!cited by 790
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2024Executable Code Actions Elicit Better LLM Agentscited by 537
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
- 2023MathPrompter: Mathematical Reasoning using Large Language Modelscited by 236
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
- 2023AdaPlanner: Adaptive Planning from Feedback with Language Modelscited by 193
- 2023Self-planning Code Generation with Large Language Modelscited by 121
- 2023Chain of Code: Reasoning with a Language Model-Augmented Code Emulatorcited by 120
- 2022Successive Prompting for Decomposing Complex Questionscited by 94
- 2023Cumulative Reasoning with Large Language Modelscited by 94
- 2024If LLM Is the Wizard, Then Code Is the Wand: A Survey on How Code Empowers Large Language Models to Serve as Intelligent Agentscited by 77
- 2022Parsel: Algorithmic Reasoning with Language Models by Composing Decompositionscited by 62
- 2021AVATAR: A Parallel Corpus for Java-Python Program Translationcited by 59
- 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 55
- 2024Stable Code Technical Reportcited by 16
- 2023Binary Code Summarization: Benchmarking ChatGPT/GPT-4 and Other Large Language Modelscited by 13
- 2018FrAngel: Component-Based Synthesis with Control Structurescited by 10
Built on by
Citing papers per year: 2024: 1; 2025: 9; 2026: 9.
19 papers.
Sort:
By area:
- 2024CodeTree: Agent-guided Tree Search for Code Generation with Large Language Modelscited by 32
- 2025Internet of Agents: Fundamentals, Applications, and Challengescited by 31
- 2025StepFun-Formalizer: Unlocking the Autoformalization Potential of LLMs through Knowledge-Reasoning Fusioncited by 15
- 2025MAPRO: Recasting Multi-Agent Prompt Optimization as Maximum a Posteriori Inferencecited by 15
- 2025Reasoning-as-Logic-Units: Scaling Test-Time Reasoning in Large Language Models Through Logic Unit Alignmentcited by 12
- 2025DISC: Dynamic Decomposition Improves LLM Inference Scalingcited by 9
- 2025A Survey of Deep Learning for Geometry Problem Solvingcited by 4
- 2025Program Synthesis via Test-Time Transductioncited by 4
- 2025Agint: Agentic Graph Compilation for Software Engineering Agentscited by 4
- 2025SIGMA: Refining Large Language Model Reasoning via Sibling-Guided Monte Carlo Augmentationcited by 3
- 2026Falsification, Not Exposure: An Internally Preregistered Placebo-Controlled Decomposition of Self-Repair Feedback in Frozen Small Code Modelscited by 3
- 2026A Theoretical Analysis of Test-Driven Code Generationcited by 2
7 more
- 2026PaT: Planning-after-Trial for Efficient Test-Time Code Generationcited by 2
- 2026Majority Voting for Code Generationcited by 1
- 2026DecompRL: Solving Harder Problems by Learning Modular Code Generationcited by 0
- 2026MineValiCoder: Reliable Code Generation with Test Case Quality Mining and Bipartite Graph-Based Mutual Validationcited by 0
- 2026Entropy-Regularized Rank-Masked Policy Optimization for Test-Time Reinforcement Learning in Code Generationcited by 0
- 2026Confidence-Gated Transductive Test Generation for Code Rerankingcited by 0
- 2026Harness as a Language: A Minimalist Agent Framework With Maximal Expressivitycited by 0
- 2026Harness as a Language: A Minimalist Agent Framework With Maximal Expressivity22 Sep 2026
- 2026Confidence-Gated Transductive Test Generation for Code Reranking11 Sep 2026
- 2026Entropy-Regularized Rank-Masked Policy Optimization for Test-Time Reinforcement Learning in Code Generation8 Sep 2026
- 2026MineValiCoder: Reliable Code Generation with Test Case Quality Mining and Bipartite Graph-Based Mutual Validation24 Jul 2026
- 2026DecompRL: Solving Harder Problems by Learning Modular Code Generation2 Jul 2026
- 2026Falsification, Not Exposure: An Internally Preregistered Placebo-Controlled Decomposition of Self-Repair Feedback in Frozen Small Code Models30 Jun 2026
- 2026PaT: Planning-after-Trial for Efficient Test-Time Code Generation8 May 2026
- 2026Majority Voting for Code Generation17 Apr 2026
- 2026A Theoretical Analysis of Test-Driven Code Generation5 Feb 2026
- 2025Agint: Agentic Graph Compilation for Software Engineering Agents24 Nov 2025
- 2025MAPRO: Recasting Multi-Agent Prompt Optimization as Maximum a Posteriori Inference8 Oct 2025
- 2025Program Synthesis via Test-Time Transduction22 Sep 2025
7 more
- 2025StepFun-Formalizer: Unlocking the Autoformalization Potential of LLMs through Knowledge-Reasoning Fusion6 Aug 2025
- 2025A Survey of Deep Learning for Geometry Problem Solving16 Jul 2025
- 2025SIGMA: Refining Large Language Model Reasoning via Sibling-Guided Monte Carlo Augmentation6 Jun 2025
- 2025Internet of Agents: Fundamentals, Applications, and Challenges12 May 2025
- 2025DISC: Dynamic Decomposition Improves LLM Inference Scaling23 Feb 2025
- 2025Reasoning-as-Logic-Units: Scaling Test-Time Reasoning in Large Language Models Through Logic Unit Alignment5 Feb 2025
- 2024CodeTree: Agent-guided Tree Search for Code Generation with Large Language Models7 Nov 2024
- 2024CodeTree: Agent-guided Tree Search for Code Generation with Large Language Modelscited by 32
- 2025StepFun-Formalizer: Unlocking the Autoformalization Potential of LLMs through Knowledge-Reasoning Fusioncited by 15
- 2025Reasoning-as-Logic-Units: Scaling Test-Time Reasoning in Large Language Models Through Logic Unit Alignmentcited by 12
- 2025A Survey of Deep Learning for Geometry Problem Solvingcited by 4
- 2025SIGMA: Refining Large Language Model Reasoning via Sibling-Guided Monte Carlo Augmentationcited by 3
- 2026PaT: Planning-after-Trial for Efficient Test-Time Code Generationcited by 2
- 2026PaT: Planning-after-Trial for Efficient Test-Time Code Generation8 May 2026
- 2025StepFun-Formalizer: Unlocking the Autoformalization Potential of LLMs through Knowledge-Reasoning Fusion6 Aug 2025
- 2025A Survey of Deep Learning for Geometry Problem Solving16 Jul 2025
- 2025SIGMA: Refining Large Language Model Reasoning via Sibling-Guided Monte Carlo Augmentation6 Jun 2025
- 2025Reasoning-as-Logic-Units: Scaling Test-Time Reasoning in Large Language Models Through Logic Unit Alignment5 Feb 2025
- 2024CodeTree: Agent-guided Tree Search for Code Generation with Large Language Models7 Nov 2024
- 2025Internet of Agents: Fundamentals, Applications, and Challengescited by 31
- 2025MAPRO: Recasting Multi-Agent Prompt Optimization as Maximum a Posteriori Inferencecited by 15
- 2025Agint: Agentic Graph Compilation for Software Engineering Agentscited by 4
- 2026Harness as a Language: A Minimalist Agent Framework With Maximal Expressivitycited by 0
- 2026Harness as a Language: A Minimalist Agent Framework With Maximal Expressivity22 Sep 2026
- 2025Agint: Agentic Graph Compilation for Software Engineering Agents24 Nov 2025
- 2025MAPRO: Recasting Multi-Agent Prompt Optimization as Maximum a Posteriori Inference8 Oct 2025
- 2025Internet of Agents: Fundamentals, Applications, and Challenges12 May 2025
- 2025DISC: Dynamic Decomposition Improves LLM Inference Scalingcited by 9
- 2025Program Synthesis via Test-Time Transductioncited by 4
- 2026Falsification, Not Exposure: An Internally Preregistered Placebo-Controlled Decomposition of Self-Repair Feedback in Frozen Small Code Modelscited by 3
- 2026A Theoretical Analysis of Test-Driven Code Generationcited by 2
- 2026Majority Voting for Code Generationcited by 1
- 2026DecompRL: Solving Harder Problems by Learning Modular Code Generationcited by 0
- 2026MineValiCoder: Reliable Code Generation with Test Case Quality Mining and Bipartite Graph-Based Mutual Validationcited by 0
- 2026Entropy-Regularized Rank-Masked Policy Optimization for Test-Time Reinforcement Learning in Code Generationcited by 0
- 2026Confidence-Gated Transductive Test Generation for Code Rerankingcited by 0
- 2026Confidence-Gated Transductive Test Generation for Code Reranking11 Sep 2026
- 2026Entropy-Regularized Rank-Masked Policy Optimization for Test-Time Reinforcement Learning in Code Generation8 Sep 2026
- 2026MineValiCoder: Reliable Code Generation with Test Case Quality Mining and Bipartite Graph-Based Mutual Validation24 Jul 2026
- 2026DecompRL: Solving Harder Problems by Learning Modular Code Generation2 Jul 2026
- 2026Falsification, Not Exposure: An Internally Preregistered Placebo-Controlled Decomposition of Self-Repair Feedback in Frozen Small Code Models30 Jun 2026
- 2026Majority Voting for Code Generation17 Apr 2026
- 2026A Theoretical Analysis of Test-Driven Code Generation5 Feb 2026
- 2025Program Synthesis via Test-Time Transduction22 Sep 2025
- 2025DISC: Dynamic Decomposition Improves LLM Inference Scaling23 Feb 2025