Security Vulnerability Detection with Multitask Self-Instructed Fine-Tuning of Large Language Models
On the map: Synthetic data and self-improvement for LLMs → Code and instruction data synthesis
Abstract (arXiv)
Software security vulnerabilities allow attackers to perform malicious activities to disrupt software operations. Recent Transformer-based language models have significantly advanced vulnerability detection, surpassing the capabilities of static analysis based deep learning models. However, language models trained solely on code tokens do not capture either the explanation of vulnerability type or the data flow structure information of code, both of which are crucial for vulnerability detection. We propose a novel technique that integrates a multitask sequence-to-sequence LLM with pro-gram control flow graphs encoded as a graph neural network to achieve sequence-to-classification vulnerability detection. We introduce MSIVD, multitask self-instructed fine-tuning for vulnerability detection, inspired by chain-of-thought prompting and LLM self-instruction. Our experiments demonstrate that MSIVD achieves superior performance, outperforming the highest LLM-based vulnerability detector baseline (LineVul), with a F1 score of 0.92 on the BigVul dataset, and 0.48 on the PreciseBugs dataset. By training LLMs and GNNs simultaneously using a combination of code and explanatory metrics of a vulnerable program, MSIVD represents a promising direction for advancing LLM-based vulnerability detection that generalizes to unseen data. Based on our findings, we further discuss the necessity for new labelled security vulnerability datasets, as recent LLMs have seen or memorized prior datasets' held-out evaluation data.
Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Placed in Code and instruction data synthesis, one of 13 directions in Synthetic data and self-improvement for LLMs. Builds on 26 of its 45 references that are in the map. First posted on arXiv 9 Jun 2024.
Builds on
26 of 45 references.
Closest ancestors · 1
Same direction, newest first
Other references · 25
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 886
- 2015Gated Graph Sequence Neural Networkscited by 792
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2023Scaling Data-Constrained Language Modelscited by 391
- 2020Multi-Task Learning with Deep Neural Networks: A Surveycited by 374
- 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challengescited by 278
13 more
- 2021ExT5: Towards Extreme Multi-Task Scaling for Transfer Learningcited by 161
- 2018Automated Vulnerability Detection in Source Code Using Deep Representation Learningcited by 114
- 2023Plug-and-Play Policy Planner for Large Language Model Powered Dialogue Agentscited by 76
- 2023Large Language Models for Test-Free Fault Localizationcited by 67
- 2018The Art, Science, and Engineering of Fuzzing: A Surveycited by 61
- 2021Vulnerability Detection with Fine-grained Interpretationscited by 56
- 2022An Empirical Study of Deep Learning Models for Vulnerability Detectioncited by 44
- 2022LineVD: Statement-level Vulnerability Detection using Graph Neural Networkscited by 35
- 2023MFTCoder: Boosting Code LLMs with Multitask Fine-Tuningcited by 34
- 2020Maximum Roaming Multi-Task Learningcited by 11
- 2024Toward Improved Deep Learning-based Vulnerability Detectioncited by 9
- 2024Your Instructions Are Not Always Helpful: Assessing the Efficacy of Instruction Fine-tuning for Software Vulnerability Detectioncited by 6
- 2023PreciseBugCollector: Extensible, Executable and Precise Bug-fix Collectioncited by 3
Built on by
Citing papers per year: 2024: 1; 2025: 8; 2026: 5.
14 papers.
Sort:
By area:
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysiscited by 10
- 2025R2Vul: Learning to Reason about Software Vulnerabilities with Reinforcement Learning and Structured Reasoning Distillationcited by 7
- 2025Improving LLM Reasoning for Vulnerability Detection via Group Relative Policy Optimizationcited by 4
- 2025A Mixture of Linear Corrections Generates Secure Codecited by 4
- 2026From SFT to RL: Demystifying the Post-Training Pipeline for LLM-based Vulnerability Detectioncited by 4
- 2025Evaluating Language Models For Threat Detection in IoT Security Logscited by 3
- 2025VULPO: Context-Aware Vulnerability Detection via On-Policy LLM Optimizationcited by 3
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
- 2026DREA: Decoupled Reasoning and Exploration Agents for Repository-Level Vulnerability Detectioncited by 3
- 2024Direction for Detection: A Survey of Automated Vulnerability Detection and all of its Pain Pointscited by 0
- 2025Learning to Triage Vulnerability Reports from Program Analysis: An Empirical Study in Node.jscited by 0
- 2025On the Difficulty of Selecting Few-Shot Examples for Effective LLM-based Vulnerability Detectioncited by 0
- 2026DREA: Decoupled Reasoning and Exploration Agents for Repository-Level Vulnerability Detection15 Jul 2026
- 2026DCVD: Dual-Channel Cross-Modal Fusion for Joint Vulnerability Detection and Localization10 May 2026
- 2026From SFT to RL: Demystifying the Post-Training Pipeline for LLM-based Vulnerability Detection15 Feb 2026
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation14 Jan 2026
- 2026An Empirical Evaluation of LLM-Based Approaches for Code Vulnerability Detection: RAG, SFT, and Dual-Agent Systems1 Jan 2026
- 2025VULPO: Context-Aware Vulnerability Detection via On-Policy LLM Optimization14 Nov 2025
- 2025On the Difficulty of Selecting Few-Shot Examples for Effective LLM-based Vulnerability Detection31 Oct 2025
- 2025Learning to Triage Vulnerability Reports from Program Analysis: An Empirical Study in Node.js23 Oct 2025
- 2025A Mixture of Linear Corrections Generates Secure Code13 Jul 2025
- 2025Improving LLM Reasoning for Vulnerability Detection via Group Relative Policy Optimization3 Jul 2025
- 2025Evaluating Language Models For Threat Detection in IoT Security Logs3 Jul 2025
- 2025R2Vul: Learning to Reason about Software Vulnerabilities with Reinforcement Learning and Structured Reasoning Distillation7 Apr 2025
- 2025R2Vul: Learning to Reason about Software Vulnerabilities with Reinforcement Learning and Structured Reasoning Distillationcited by 7
- 2025Improving LLM Reasoning for Vulnerability Detection via Group Relative Policy Optimizationcited by 4
- 2025VULPO: Context-Aware Vulnerability Detection via On-Policy LLM Optimizationcited by 3
- 2026DREA: Decoupled Reasoning and Exploration Agents for Repository-Level Vulnerability Detectioncited by 3
- 2026DREA: Decoupled Reasoning and Exploration Agents for Repository-Level Vulnerability Detection15 Jul 2026
- 2025VULPO: Context-Aware Vulnerability Detection via On-Policy LLM Optimization14 Nov 2025
- 2025Improving LLM Reasoning for Vulnerability Detection via Group Relative Policy Optimization3 Jul 2025
- 2025R2Vul: Learning to Reason about Software Vulnerabilities with Reinforcement Learning and Structured Reasoning Distillation7 Apr 2025
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysiscited by 10
- 2025A Mixture of Linear Corrections Generates Secure Codecited by 4
- 2025Evaluating Language Models For Threat Detection in IoT Security Logscited by 3
- 2024Direction for Detection: A Survey of Automated Vulnerability Detection and all of its Pain Pointscited by 0
- 2025Learning to Triage Vulnerability Reports from Program Analysis: An Empirical Study in Node.jscited by 0
- 2025On the Difficulty of Selecting Few-Shot Examples for Effective LLM-based Vulnerability Detectioncited by 0
- 2026DCVD: Dual-Channel Cross-Modal Fusion for Joint Vulnerability Detection and Localizationcited by 0
- 2026DCVD: Dual-Channel Cross-Modal Fusion for Joint Vulnerability Detection and Localization10 May 2026
- 2025On the Difficulty of Selecting Few-Shot Examples for Effective LLM-based Vulnerability Detection31 Oct 2025
- 2025Learning to Triage Vulnerability Reports from Program Analysis: An Empirical Study in Node.js23 Oct 2025
- 2025A Mixture of Linear Corrections Generates Secure Code13 Jul 2025
- 2025Evaluating Language Models For Threat Detection in IoT Security Logs3 Jul 2025
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysis5 Feb 2025
- 2024Direction for Detection: A Survey of Automated Vulnerability Detection and all of its Pain Points15 Dec 2024
Similar, not cited
Close in wording, no citation either way
- 2024Towards Explainable Vulnerability Detection with Large Language Models
- 2026VulTriage: Triple-Path Context Augmentation for LLM-Based Vulnerability Detection
- 2024To Err is Machine: Vulnerability Detection Challenges LLM Reasoning
- 2026Dissecting the Black Box: Circuit-Level Analysis of LLM Vulnerability Detection
- 2025Boosting Vulnerability Detection of LLMs via Curriculum Preference Optimization with Synthetic Reasoning Data
- 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoning
- 2024DLAP: A Deep Learning Augmented Large Language Model Prompting Framework for Software Vulnerability Detection
- 2026VulReaD: Knowledge-Graph-guided Software Vulnerability Reasoning and Detection