mlsanityData to 14 Oct 2026

Training Language Models to Generate Quality Code with Program Analysis Feedback

arXiv 2505.22704 ↗First posted 28 May 2025cs.CL cs.AIcited by 12

Not on the map. Why?

Abstract (arXiv)

Code generation with large language models (LLMs), often termed vibe coding, is increasingly adopted in production but fails to ensure code quality, particularly in security (e.g., SQL injection vulnerabilities) and maintainability (e.g., missing type annotations). Existing methods, such as supervised fine-tuning and rule-based post-processing, rely on labor-intensive annotations or brittle heuristics, limiting their scalability and effectiveness. We propose REAL, a reinforcement learning framework that incentivizes LLMs to generate production-quality code using program analysis-guided feedback. Specifically, REAL integrates two automated signals: (1) program analysis detecting security or maintainability defects and (2) unit tests ensuring functional correctness. Unlike prior work, our framework is prompt-agnostic and reference-free, enabling scalable supervision without manual intervention. Experiments across multiple datasets and model scales demonstrate that REAL outperforms state-of-the-art methods in simultaneous assessments of functionality and code quality. Our work bridges the gap between rapid prototyping and production-ready code, enabling LLMs to deliver both speed and quality.

Key facts. Cited by 12 papers in the map (data through 14 Oct 2026). Builds on 16 of its 37 references that are in the map. First posted on arXiv 28 May 2025.

Builds on

16 of 37 references.

References · 16

  1. 2017Proximal Policy Optimization Algorithmscited by 15,215
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2024Qwen2.5-Coder Technical Reportcited by 1,203
  4. 2021Measuring Coding Challenge Competence With APPScited by 902
  5. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
  6. 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 358
  7. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 155
  8. 2023Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Modelscited by 138
  9. 2024StepCoder: Improve Code Generation with Reinforcement Learning from Compiler Feedbackcited by 77
  10. 2024Instruction Tuning for Secure Code Generationcited by 68
  11. 2025Teaching Language Models to Critique via Reinforcement Learningcited by 42
  12. 2024Constrained Decoding for Secure Code Generationcited by 37
4 more
  1. 2024PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)cited by 19
  2. 2023B-Coder: Value-Based Deep Reinforcement Learning for Program Synthesiscited by 17
  3. 2024SecCoder: Towards Generalizable and Robust Secure Code Generationcited by 14
  4. 2024Code Security Vulnerability Repair Using Reinforcement Learning with Large Language Modelscited by 10

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 4; 2026: 8.

12 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generation
  2. 2025Integrating Symbolic Execution into the Fine-Tuning of Code-Generating LLMs
  3. 2025Improving LLM-Generated Code Quality with GRPO
  4. 2024Process Supervision-Guided Policy Optimization for Code Generation
  5. 2025Enhancing the Non-Functional Quality Compliance of LLM-Generated Code through Quality-Aware Preference Learning
  6. 2025Rethinking Verification for LLM Code Generation: From Generation to Testing
  7. 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learning
  8. 2025Seed-Coder: Let the Code Model Curate Data for Itself