Multi-LLM Collaboration + Data-Centric Innovation = 2x Better
Vulnerability Repair
- URL: http://arxiv.org/abs/2401.15459v3
- Date: Tue, 12 Mar 2024 10:46:46 GMT
- Title: Multi-LLM Collaboration + Data-Centric Innovation = 2x Better
Vulnerability Repair
- Authors: Xin Zhou, Kisub Kim, Bowen Xu, DongGyun Han, David Lo
- Abstract summary: VulMaster is a Transformer-based neural network model that excels at generating vulnerability repairs through data-centric innovation.
We evaluate VulMaster on a real-world C/C++ vulnerability repair dataset comprising 1,754 projects with 5,800 vulnerable functions.
- Score: 14.920535179015006
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: The advances of deep learning (DL) have paved the way for automatic software
vulnerability repair approaches, which effectively learn the mapping from the
vulnerable code to the fixed code. Nevertheless, existing DL-based
vulnerability repair methods face notable limitations: 1) they struggle to
handle lengthy vulnerable code, 2) they treat code as natural language texts,
neglecting its inherent structure, and 3) they do not tap into the valuable
expert knowledge present in the expert system.
To address this, we propose VulMaster, a Transformer-based neural network
model that excels at generating vulnerability repairs through data-centric
innovation. Specifically, VulMaster introduces the utilization and combination
of various types of input data, including complete vulnerable code of any size,
vulnerable code structures, and expert knowledge from the CWE system.
Additionally, VulMaster leverages the collaboration between two Large Language
Models (LLMs), CodeT5 and ChatGPT: CodeT5 acts as the customizable backbone
LLM, fine-tuned with the training data, while ChatGPT supplements by providing
missing relevant inputs to CodeT5. We evaluated VulMaster on a real-world C/C++
vulnerability repair dataset comprising 1,754 projects with 5,800 vulnerable
functions. The experimental results demonstrated that VulMaster exhibits
substantial improvements compared to the learning-based state-of-the-art
vulnerability repair approach. Specifically, VulMaster improves the EM, BLEU,
and CodeBLEU scores from 10.2\% to 20.0\%, 21.3\% to 29.3\%, and 32.5\% to
40.9\%, respectively.
Related papers
- Code Vulnerability Repair with Large Language Model using Context-Aware Prompt Tuning [5.1071146597039245]
Large Language Models (LLMs) have shown significant challenges in detecting and repairing vulnerable code.
In this study, we utilize GitHub Copilot as the LLM and focus on buffer overflow vulnerabilities.
Our experiments reveal a notable gap in Copilot's abilities when dealing with buffer overflow vulnerabilities, with a 76% vulnerability detection rate but only a 15% vulnerability repair rate.
arXiv Detail & Related papers (2024-09-27T02:25:29Z) - HexaCoder: Secure Code Generation via Oracle-Guided Synthetic Training Data [60.75578581719921]
Large language models (LLMs) have shown great potential for automatic code generation.
Recent studies highlight that many LLM-generated code contains serious security vulnerabilities.
We introduce HexaCoder, a novel approach to enhance the ability of LLMs to generate secure codes.
arXiv Detail & Related papers (2024-09-10T12:01:43Z) - Unintentional Security Flaws in Code: Automated Defense via Root Cause Analysis [2.899501205987888]
We developed an automated vulnerability root cause (RC) toolkit called T5-RCGCN.
It combines T5 language model embeddings with a graph convolutional network (GCN) for vulnerability classification and localization.
We tested T5-RCGCN with 56 junior developers across three datasets, showing a 28.9% improvement in code security compared to previous methods.
arXiv Detail & Related papers (2024-08-30T18:26:59Z) - M2CVD: Enhancing Vulnerability Semantic through Multi-Model Collaboration for Code Vulnerability Detection [52.4455893010468]
Large Language Models (LLMs) have strong capabilities in code comprehension, but fine-tuning costs and semantic alignment issues limit their project-specific optimization.
Code models such CodeBERT are easy to fine-tune, but it is often difficult to learn vulnerability semantics from complex code languages.
This paper introduces the Multi-Model Collaborative Vulnerability Detection approach (M2CVD) to improve the detection accuracy of code models.
arXiv Detail & Related papers (2024-06-10T00:05:49Z) - Camouflage is all you need: Evaluating and Enhancing Language Model
Robustness Against Camouflage Adversarial Attacks [53.87300498478744]
Adversarial attacks represent a substantial challenge in Natural Language Processing (NLP)
This study undertakes a systematic exploration of this challenge in two distinct phases: vulnerability evaluation and resilience enhancement.
Results suggest a trade-off between performance and robustness, with some models maintaining similar performance while gaining robustness.
arXiv Detail & Related papers (2024-02-15T10:58:22Z) - LLM-Powered Code Vulnerability Repair with Reinforcement Learning and
Semantic Reward [3.729516018513228]
We introduce a multipurpose code vulnerability analysis system textttSecRepair, powered by a large language model, CodeGen2.
Inspired by how humans fix code issues, we propose an instruction-based dataset suitable for vulnerability analysis with LLMs.
We identify zero-day and N-day vulnerabilities in 6 Open Source IoT Operating Systems on GitHub.
arXiv Detail & Related papers (2024-01-07T02:46:39Z) - Enhancing Large Language Models for Secure Code Generation: A
Dataset-driven Study on Vulnerability Mitigation [24.668682498171776]
Large language models (LLMs) have brought significant advancements to code generation, benefiting both novice and experienced developers.
However, their training using unsanitized data from open-source repositories, like GitHub, introduces the risk of inadvertently propagating security vulnerabilities.
This paper presents a comprehensive study focused on evaluating and enhancing code LLMs from a software security perspective.
arXiv Detail & Related papers (2023-10-25T00:32:56Z) - How Effective Are Neural Networks for Fixing Security Vulnerabilities [25.050519427592253]
This paper is the first to study and compare Java vulnerability repair capabilities of LLMs and DL-based APR models.
The results call for innovations to enhance automated Java vulnerability repair such as creating larger vulnerability repair training data.
arXiv Detail & Related papers (2023-05-29T20:50:27Z) - CodeLMSec Benchmark: Systematically Evaluating and Finding Security
Vulnerabilities in Black-Box Code Language Models [58.27254444280376]
Large language models (LLMs) for automatic code generation have achieved breakthroughs in several programming tasks.
Training data for these models is usually collected from the Internet (e.g., from open-source repositories) and is likely to contain faults and security vulnerabilities.
This unsanitized training data can cause the language models to learn these vulnerabilities and propagate them during the code generation procedure.
arXiv Detail & Related papers (2023-02-08T11:54:07Z) - VELVET: a noVel Ensemble Learning approach to automatically locate
VulnErable sTatements [62.93814803258067]
This paper presents VELVET, a novel ensemble learning approach to locate vulnerable statements in source code.
Our model combines graph-based and sequence-based neural networks to successfully capture the local and global context of a program graph.
VELVET achieves 99.6% and 43.6% top-1 accuracy over synthetic data and real-world data, respectively.
arXiv Detail & Related papers (2021-12-20T22:45:27Z) - ESCORT: Ethereum Smart COntRacTs Vulnerability Detection using Deep
Neural Network and Transfer Learning [80.85273827468063]
Existing machine learning-based vulnerability detection methods are limited and only inspect whether the smart contract is vulnerable.
We propose ESCORT, the first Deep Neural Network (DNN)-based vulnerability detection framework for smart contracts.
We show that ESCORT achieves an average F1-score of 95% on six vulnerability types and the detection time is 0.02 seconds per contract.
arXiv Detail & Related papers (2021-03-23T15:04:44Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.