Divide-and-Conquer Meets Consensus: Unleashing the Power of Functions in Code Generation
Jingchang Chen, Hongxuan Tang, Zheng Chu, Qianglong Chen, Zekun Wang,, Ming Liu, Bing Qin

TL;DR
FunCoder introduces a divide-and-conquer approach with functional consensus for code generation, recursively decomposing tasks into sub-functions to improve accuracy and outperform state-of-the-art models on multiple benchmarks.
Contribution
The paper presents a novel framework combining recursive function decomposition with functional consensus, enhancing code generation quality beyond existing methods.
Findings
Outperforms state-of-the-art methods by +9.8% on average across benchmarks.
Surpasses GPT-3.5 by +18.6% on smaller models like StableCode-3b.
Functional consensus is more effective than self-testing for correctness evaluation.
Abstract
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.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
Taxonomy
TopicsModel-Driven Software Engineering Techniques
Methods15 Ways to Contact How can i speak to someone at Delta Airlines · Attention Is All You Need · Label Smoothing · Adam · Position-Wise Feed-Forward Layer · Dropout · Dense Connections · Absolute Position Encodings · Softmax · {Dispute@FaQ-s}How to file a dispute with Expedia?
