Code Security Vulnerability Repair Using Reinforcement Learning with Large Language Models
원문 초록
With the recent advancement of Large Language Models (LLMs), generating functionally correct code has become less complicated for a wide array of developers. While using LLMs has sped up the functional development process, it poses a heavy risk to code security. Code generation with proper security measures using LLM is a significantly more challenging task than functional code generation. Security measures may include adding a pair of lines of code with the original code, consisting of null pointer checking or prepared statements for SQL injection prevention. Currently, available code repair LLMs generate code repair by supervised fine-tuning, where the model looks at cross-entropy loss. However, the original and repaired codes are mostly similar in functionality and syntactically, except for a few (1-2) lines, which act as security measures. This imbalance between the lines needed for security measures and the functional code enforces the supervised fine-tuned model to prioritize generating functional code without adding proper security measures, which also benefits the model by resulting in minimal loss. Therefore, in this work, for security hardening and strengthening of generated code from LLMs, we propose a reinforcement learning-based method for program-specific repair with the combination of semantic and syntactic reward mechanisms that focus heavily on adding security and functional measures in the code, respectively.
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
ReCode: Updating Code API Knowledge with Reinforcement Learning
Co-Evolving LLM Coder and Unit Tester via Reinforcement Learning
CUDA-L1: Improving CUDA Optimization via Contrastive Reinforcement Learning
Scaling Up RL: Unlocking Diverse Reasoning in LLMs via Prolonged Training
CodeJudgeBench: Benchmarking LLM-as-a-Judge for Coding Tasks
Learn Globally, Speak Locally: Bridging the Gaps in Multilingual Reasoning
토론
이 논문과 연결된 포럼 글이 아직 없습니다.