LLM-Powered Code Vulnerability Repair with Reinforcement Learning and Semantic Reward
Not on the map. Why?
Abstract (arXiv)
In software development, the predominant emphasis on functionality often supersedes security concerns, a trend gaining momentum with AI-driven automation tools like GitHub Copilot. These tools significantly improve developers' efficiency in functional code development. Nevertheless, it remains a notable concern that such tools are also responsible for creating insecure code, predominantly because of pre-training on publicly available repositories with vulnerable code. Moreover, developers are called the "weakest link in the chain" since they have very minimal knowledge of code security. Although existing solutions provide a reasonable solution to vulnerable code, they must adequately describe and educate the developers on code security to ensure that the security issues are not repeated. Therefore we introduce a multipurpose code vulnerability analysis system textttSecRepair, powered by a large language model, CodeGen2 assisting the developer in identifying and generating fixed code along with a complete description of the vulnerability with a code comment. Our innovative methodology uses a reinforcement learning paradigm to generate code comments augmented by a semantic reward mechanism. Inspired by how humans fix code issues, we propose an instruction-based dataset suitable for vulnerability analysis with LLMs. We further identify zero-day and N-day vulnerabilities in 6 Open Source IoT Operating Systems on GitHub. Our findings underscore that incorporating reinforcement learning coupled with semantic reward augments our model's performance, thereby fortifying its capacity to address code vulnerabilities with improved efficacy.
Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Builds on 14 of its 29 references that are in the map. First posted on arXiv 7 Jan 2024.
Builds on
14 of 29 references.
References · 14
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
- 2017Beam Search Strategies for Neural Machine Translationcited by 232
- 2015Contextual Markov Decision Processescited by 213
- 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
- 2023The Programmer's Assistant: Conversational Interaction with a Large Language Model for Software Developmentcited by 95
- 2023Large Language Models and Simple, Stupid Bugscited by 45
- 2020VulDeeLocator: A Deep Learning-based Fine-grained Vulnerability Detectorcited by 37
- 2021Neural Transfer Learning for Repairing Security Vulnerabilities in C Codecited by 36
Built on by
Citing papers per year: 2024: 6; 2025: 8; 2026: 2.
16 papers.
Sort:
By area:
- 2024When LLMs Meet Cybersecurity: A Systematic Literature Reviewcited by 70
- 2024OSCAR: Operating System Control via State-Aware Reasoning and Re-Planningcited by 37
- 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
- 2024PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)cited by 17
- 2024Enhanced Automated Code Vulnerability Repair using Large Language Modelscited by 10
- 2025Large Language Models for Security Operations Centers: A Comprehensive Surveycited by 9
- 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMscited by 7
- 2025Tests as Prompt: A Test-Driven-Development Benchmark for LLM Code Generationcited by 5
- 2025The Impact of Fine-tuning Large Language Models on Automated Program Repaircited by 3
- 2025Rewarding the Journey, Not Just the Destination: A Composite Path and Answer Self-Scoring Reward Mechanism for Test-Time Reinforcement Learningcited by 3
- 2025Augmenting Large Language Models with Static Code Analysis for Automated Code Quality Improvementscited by 2
- 2025Generative AI for Internet of Things Security: Challenges and Opportunitiescited by 1
4 more
- 2025A Blueprint for AI-Driven Software Quality: Integrating LLMs with Established Standardscited by 1
- 2026Precise Debugging Benchmark: Is Your Model Debugging or Regenerating?cited by 1
- 2024CVE-LLM : Automatic vulnerability evaluation in medical device industry using large language modelscited by 0
- 2026From Evaluation to Optimisation: Hierarchy-Aware Training Signals for CWE Prediction in Pythoncited by 0
- 2026From Evaluation to Optimisation: Hierarchy-Aware Training Signals for CWE Prediction in Python23 Jul 2026
- 2026Precise Debugging Benchmark: Is Your Model Debugging or Regenerating?19 Apr 2026
- 2025Rewarding the Journey, Not Just the Destination: A Composite Path and Answer Self-Scoring Reward Mechanism for Test-Time Reinforcement Learning20 Oct 2025
- 2025Large Language Models for Security Operations Centers: A Comprehensive Survey13 Sep 2025
- 2025The Impact of Fine-tuning Large Language Models on Automated Program Repair26 Jul 2025
- 2025Augmenting Large Language Models with Static Code Analysis for Automated Code Quality Improvements12 Jun 2025
- 2025A Blueprint for AI-Driven Software Quality: Integrating LLMs with Established Standards19 May 2025
- 2025Tests as Prompt: A Test-Driven-Development Benchmark for LLM Code Generation13 May 2025
- 2025Frontier AI's Impact on the Cybersecurity Landscape7 Apr 2025
- 2025Generative AI for Internet of Things Security: Challenges and Opportunities13 Feb 2025
- 2024OSCAR: Operating System Control via State-Aware Reasoning and Re-Planning24 Oct 2024
- 2024PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)19 Sep 2024
4 more
- 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMs7 Aug 2024
- 2024CVE-LLM : Automatic vulnerability evaluation in medical device industry using large language models19 Jul 2024
- 2024When LLMs Meet Cybersecurity: A Systematic Literature Review6 May 2024
- 2024Enhanced Automated Code Vulnerability Repair using Large Language Models8 Jan 2024
- 2024When LLMs Meet Cybersecurity: A Systematic Literature Reviewcited by 70
- 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
- 2024PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)cited by 17
- 2024Enhanced Automated Code Vulnerability Repair using Large Language Modelscited by 10
- 2025Large Language Models for Security Operations Centers: A Comprehensive Surveycited by 9
- 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMscited by 7
- 2025Tests as Prompt: A Test-Driven-Development Benchmark for LLM Code Generationcited by 5
- 2025The Impact of Fine-tuning Large Language Models on Automated Program Repaircited by 3
- 2025Augmenting Large Language Models with Static Code Analysis for Automated Code Quality Improvementscited by 2
- 2025Generative AI for Internet of Things Security: Challenges and Opportunitiescited by 1
- 2025A Blueprint for AI-Driven Software Quality: Integrating LLMs with Established Standardscited by 1
- 2026Precise Debugging Benchmark: Is Your Model Debugging or Regenerating?cited by 1
12 most cited of 14 All 14 (JSON)
- 2026From Evaluation to Optimisation: Hierarchy-Aware Training Signals for CWE Prediction in Python23 Jul 2026
- 2026Precise Debugging Benchmark: Is Your Model Debugging or Regenerating?19 Apr 2026
- 2025Large Language Models for Security Operations Centers: A Comprehensive Survey13 Sep 2025
- 2025The Impact of Fine-tuning Large Language Models on Automated Program Repair26 Jul 2025
- 2025Augmenting Large Language Models with Static Code Analysis for Automated Code Quality Improvements12 Jun 2025
- 2025A Blueprint for AI-Driven Software Quality: Integrating LLMs with Established Standards19 May 2025
- 2025Tests as Prompt: A Test-Driven-Development Benchmark for LLM Code Generation13 May 2025
- 2025Frontier AI's Impact on the Cybersecurity Landscape7 Apr 2025
- 2025Generative AI for Internet of Things Security: Challenges and Opportunities13 Feb 2025
- 2024PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)19 Sep 2024
- 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMs7 Aug 2024
- 2024CVE-LLM : Automatic vulnerability evaluation in medical device industry using large language models19 Jul 2024
12 newest of 14 All 14 (JSON)