DecompRL: Solving Harder Problems by Learning Modular Code Generation
Not on the map. Why?
Abstract (arXiv)
How can Large Language Models (LLMs) solve problems they currently cannot? Repeated sampling scales test-time compute but GPU cost grows linearly with attempts, while reinforcement learning (RL) with verifiable rewards improves single-attempt accuracy at the expense of sample diversity. Both strategies ultimately fail when the base policy has near-zero probability of producing a correct solution: no amount of sampling or gradient signal can overcome a search space that is simply too large. We take a different approach: rather than sampling harder, we make the task easier by decomposing problems into smaller, independently solvable sub-functions whose implementations can be recombined. Since off-the-shelf models are not trained for this modular generation, we introduce DecompRL, an RL algorithm that explicitly learns to decompose and implement hierarchical code structures. Recombining k implementations of n modules yields up to kn candidate solutions, shifting the bottleneck from GPU inference to cheap CPU evaluation and cutting GPU token cost by ~50×. On LiveCodeBench and CodeContests (Qwen~2.5~7B, Code World Model~32B), DecompRL outperforms standard and diversity-optimized RL baselines beyond 105 tokens per problem, solving problems that standard generation cannot reach.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 35 of its 58 references that are in the map. First posted on arXiv 2 Jul 2026.
Builds on
35 of 58 references.
References · 35
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2013Playing Atari with Deep Reinforcement Learningcited by 3,211
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
- 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 946
- 2017Counterfactual Multi-Agent Policy Gradientscited by 733
23 more
- 2022Decomposed Prompting: A Modular Approach for Solving Complex Taskscited by 554
- 2023Reinforced Self-Training (ReST) for Language Modelingcited by 486
- 2025The Entropy Mechanism of Reinforcement Learning for Reasoning Language Modelscited by 463
- 2024ReST-MCTS*: LLM Self-Training via Process Reward Guided Tree Searchcited by 338
- 2024Quiet-STaR: Language Models Can Teach Themselves to Think Before Speakingcited by 292
- 2023Alphazero-like Tree-Search can Guide Large Language Model Decoding and Trainingcited by 291
- 2017Thinking Fast and Slow with Deep Learning and Tree Searchcited by 245
- 2022HyperTree Proof Search for Neural Theorem Provingcited by 192
- 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solvingcited by 177
- 2020DreamCoder: Growing generalizable, interpretable knowledge with wake-sleep Bayesian program learningcited by 159
- 2025Pass@k Training for Adaptively Balancing Exploration and Exploitation of Large Reasoning Modelscited by 134
- 2024Planning In Natural Language Improves LLM Search For Code Generationcited by 79
- 2024Symbolic Regression with a Learned Concept Librarycited by 76
- 2022Language Models Can Teach Themselves to Program Bettercited by 75
- 2025Learn to Reason Efficiently with Adaptive Length-based Reward Shapingcited by 74
- 2023CodeChain: Towards Modular Code Generation Through Chain of Self-revisions with Representative Sub-modulescited by 58
- 2025Optimizing Language Models for Inference Time Objectives using Reinforcement Learningcited by 49
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2024Learning Formal Mathematics From Intrinsic Motivationcited by 45
- 2023LLM-Assisted Code Cleaning For Training Accurate Code Generatorscited by 27
- 2024Divide-and-Conquer Meets Consensus: Unleashing the Power of Functions in Code Generationcited by 19
- 2025Soft Policy Optimization: Online Off-Policy RL for Sequence Modelscited by 12
- 2023Alien Codingcited by 9
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Adaptive Decoding via Test-Time Policy Learning for Self-Improving Generation
- 2025TritonRL: Training LLMs to Think and Code Triton Without Cheating
- 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation
- 2024StepCoder: Improve Code Generation with Reinforcement Learning from Compiler Feedback
- 2025Decoupling Task-Solving and Output Formatting in LLM Generation
- 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learning
- 2026Selective Left-Shift: Turning Test-Time Compute and Difficulty-based Curation into Training Data for Low-Resource Code Generation
- 2025Teaching Language Models to Critique via Reinforcement Learning