paper-with-me

홈 › Papers

Training Language Models to Generate Quality Code with Program Analysis Feedback

2025-05-28 · Feng Yao, Zilong Wang, Liyuan Liu, Junxia Cui, Li Zhong, Xiaohan Fu, Haohui Mai, Vish Krishnan, Jianfeng Gao, Jingbo Shang

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.

📄 PDF Abstract BibTeX arXiv:2505.22704

Code (1)

yaof20/real 공식 구현 pytorch

Tasks

Code Generation

Methods 이 논문이 사용한 방법론

SPEED The monocular depth estimation (MDE) is the task of estimating depth from a single frame. This information is an essential knowledge in many computer vision tasks such as scene…

Similar Papers 제목 키워드 기반

GANCoder: An Automatic Natural Language-to-Programming Language Translation Approach based on GAN

2019-12-02 · Yabing Zhu, Yanfeng Zhang, Huili Yang, Fangjing Wang

We propose GANCoder, an automatic programming approach based on Generative Adversarial Networks (GAN), which can generate the same functional and logical programming language codes conditioned on the given natural langua…

Code GenerationTranslation

SLaDe: A Portable Small Language Model Decompiler for Optimized Assembly

2023-05-21 · Jordi Armengol-Estapé, Jackson Woodruff, Chris Cummins, Michael F. P. O'Boyle

Decompilation is a well-studied area with numerous high-quality tools available. These are frequently used for security tasks and to port legacy code. However, they regularly generate difficult-to-read programs and requi…

Language ModelingLanguage ModellingLarge Language ModelSmall Language Model

Automatic Programming: Large Language Models and Beyond

2024-05-03 · Michael R. Lyu, Baishakhi Ray, Abhik Roychoudhury, Shin Hwei Tan 외

Automatic programming has seen increasing popularity due to the emergence of tools like GitHub Copilot which rely on Large Language Models (LLMs). At the same time, automatically generated code faces challenges during de…

Program Repair

The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation

2023-05-09 · Dung Nguyen Manh, Nam Le Hai, Anh T. V. Dau, Anh Minh Nguyen 외

We present The Vault, a dataset of high-quality code-text pairs in multiple programming languages for training large language models to understand and generate code. We present methods for thoroughly extracting samples t…

Code GenerationCode SearchCode Summarization

Large Language Models for Code Generation from Multilingual Prompts: A Curated Benchmark and a Study on Code Quality

2026-07-16 · Saima Afrin, Alessandro Midolo, Camilo Escobar-Velásquez, Mario Linares-Vásquez 외 arxiv

Large Language Models (LLMs) perform differently on identical programming tasks when prompted in different natural languages, a phenomenon known as language bias. While this behavior has been widely studied for general t…

Code GenerationText Generation