Pith. sign in

REVIEW 4 cited by

Code Security Vulnerability Repair Using Reinforcement Learning with Large Language Models

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2401.07031 v2 pith:HH3WVDWC submitted 2024-01-13 cs.CR cs.AIcs.SE

classification cs.CRcs.AIcs.SE
keywords codesecuritymeasuresfunctionalllmsrepairaddinglines
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

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.

Discussion (0). Sign in to comment.

Forward citations

Cited by 4 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Training Language Models to Generate Quality Code with Program Analysis Feedback

    cs.CL 2025-05 conditional novelty 7.0 of 10

    REAL trains LLMs with rewards from program analysis and unit tests, improving joint functionality and code quality over prior methods.

  2. From Evaluation to Optimisation: Hierarchy-Aware Training Signals for CWE Prediction in Python

    cs.LG 2026-07 conditional novelty 6.0 of 10

    Using the ALPHA hierarchy penalty as a direct GRPO reward improves CWE prediction under distribution shift, while supervised delivery of the same penalty regresses below zero-shot.

  3. BitsAI-Fix: LLM-Driven Approach for Automated Lint Error Resolution in Practice

    cs.SE 2025-08 conditional novelty 6.0 of 10

    A 32B LLM trained with progressive reinforcement learning on cold-start and user-feedback data fixes Go lint errors at 84.68% accuracy with 1.72% redundancy on a private ByteDance test set.

  4. Guiding AI to Fix Its Own Flaws: An Empirical Study on LLM-Driven Secure Code Generation

    cs.SE 2025-06 conditional novelty 6.0 of 10

    Across two Python security benchmarks, all eight LLMs produced vulnerable code at rates from 9.8% to 42.1%, and self-generated hints plus explained feedback reduced vulnerabilities mainly for the strongest models.

Pith tools