Improving Small Language Models for Code Generation with Reinforcement Learning from Verification Feedback
Not on the map. Why?
Abstract (arXiv)
Reinforcement learning with verifiable rewards (RLVR) trains language models using programmatically checkable signals such as unit-test outcomes, enabling direct optimization for functional correctness in code generation. We conduct an empirical study of RLVR for Python code generation on the MBPP benchmark using two small models (Qwen3-0.6B and Llama3.2-1B) with LoRA fine-tuning. Across multiple reward formulations such as: unit-test-only rewards, static-analysis-only shaping via the Ruff linter, and a combined reward, we compare group-based policy optimization variants (GRPO and GSPO) and evaluate both functional correctness and behavioral diagnostics. In our experimental setting, RLVR improves pass@1 on MBPP test by up to 13 percentage points under proposed combined reward configuration. However, we find that reward shaping can induce systematic behavioral shifts: using only static-analysis penalties may bias the policy toward shorter completions that reduce lint errors without reliably improving functional correctness. In contrast, combined rewards mitigate this degeneration and yield more stable trade-offs between correctness and style constraints. Overall, our results highlight that RLVR effectiveness for code generation is highly sensitive to reward design and optimization granularity, and that diagnostics beyond pass@1, including generation length, Ruff severity profiles, and execution error types are useful for identifying failure modes.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 12 of its 15 references that are in the map. First posted on arXiv 28 May 2026.
Builds on
12 of 15 references.
References · 12
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2025Qwen3 Technical Reportcited by 8,195
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
- 2025A Survey of Reinforcement Learning for Large Reasoning Modelscited by 175
- 2024StepCoder: Improve Code Generation with Reinforcement Learning from Compiler Feedbackcited by 74
- 2025CodeRL+: Improving Code Generation via Reinforcement with Execution Semantics Alignmentcited by 22
- 2026Benchmarking Reward Hack Detection in Code Environments via Contrastive Analysiscited by 15
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026When Do Intrinsic Rewards Work for Code Reasoning? A Comprehensive Study
- 2026Automating Formal Verification with Reinforcement Learning and Recursive Inference
- 2026CodeScaler: Scaling Code LLM Training and Test-Time Inference via Reward Models
- 2024Process Supervision-Guided Policy Optimization for Code Generation
- 2026Exploring Pass-Rate Reward in Reinforcement Learning for Code Generation
- 2026Beyond Binary: Turning Partial Success into Dense Verifiable Rewards for Reinforcement Learning in Code Generation
- 2026Beyond Execution: Static-Analysis Rewards and Hint-Conditioned Diffusion RL for Code Generation
- 2026Reinforcement Learning for Code Optimization