mlsanityData to 7 Oct 2026

Neural Transfer Learning for Repairing Security Vulnerabilities in C Code

arXiv 2104.08308 ↗First posted 16 Apr 2021cs.SE cs.CR cs.LGcited by 36

Not on the map. Why?

Abstract (arXiv)

In this paper, we address the problem of automatic repair of software vulnerabilities with deep learning. The major problem with data-driven vulnerability repair is that the few existing datasets of known confirmed vulnerabilities consist of only a few thousand examples. However, training a deep learning model often requires hundreds of thousands of examples. In this work, we leverage the intuition that the bug fixing task and the vulnerability fixing task are related and that the knowledge learned from bug fixes can be transferred to fixing vulnerabilities. In the machine learning community, this technique is called transfer learning. In this paper, we propose an approach for repairing security vulnerabilities named VRepair which is based on transfer learning. VRepair is first trained on a large bug fix corpus and is then tuned on a vulnerability fix dataset, which is an order of magnitude smaller. In our experiments, we show that a model trained only on a bug fix corpus can already fix some vulnerabilities. Then, we demonstrate that transfer learning improves the ability to repair vulnerable C functions. We also show that the transfer learning model performs better than a model trained with a denoising task and fine-tuned on the vulnerability fixing task. To sum up, this paper shows that transfer learning works well for repairing security vulnerabilities in C compared to learning on a small dataset.

Key facts. Cited by 36 papers in the map (data through 7 Oct 2026). Builds on 38 of its 86 references that are in the map. First posted on arXiv 16 Apr 2021.

Builds on

38 of 86 references.

References · 38

  1. 2017Attention Is All You Needcited by 59,932
  2. 2014Adam: A Method for Stochastic Optimizationcited by 36,960
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
  5. 2015Rethinking the Inception Architecture for Computer Visioncited by 5,451
  6. 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
  7. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
  8. 2016Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translationcited by 1,471
  9. 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,303
  10. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  11. 2015Teaching Machines to Read and Comprehendcited by 1,039
  12. 2017Revisiting Unreasonable Effectiveness of Data in Deep Learning Eracited by 916
26 more
  1. 2016Abstractive Text Summarization Using Sequence-to-Sequence RNNs and Beyondcited by 809
  2. 2018A Survey on Deep Transfer Learningcited by 417
  3. 2018Rethinking ImageNet Pre-trainingcited by 376
  4. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  5. 2017OpenNMT: Open-source Toolkit for Neural Machine Translationcited by 251
  6. 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
  7. 2016Incorporating Copying Mechanism in Sequence-to-Sequence Learningcited by 217
  8. 2016Deep Convolutional Neural Networks for Computer-Aided Detection: CNN Architectures, Dataset Characteristics and Transfer Learningcited by 209
  9. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
  10. 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
  11. 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
  12. 2018Automated Vulnerability Detection in Source Code Using Deep Representation Learningcited by 114
  13. 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 106
  14. 2020Graph-based, Self-Supervised Program Repair from Diagnostic Feedbackcited by 93
  15. 2018CODIT: Code Editing with Tree-Based Neural Modelscited by 40
  16. 2018Learning to Represent Editscited by 34
  17. 2019A Manually-Curated Dataset of Fixes to Vulnerabilities of Open-Source Softwarecited by 28
  18. 2019Learning to Fix Build Errors with Graph2Diff Neural Networkscited by 26
  19. 2018Learning to Repair Software Vulnerabilities with Generative Adversarial Networkscited by 11
  20. 2020SeqTrans: Automatic Vulnerability Fix via Sequence to Sequence Learningcited by 11
  21. 2019On the Feasibility of Transfer-learning Code Smells using Deep Learningcited by 7
  22. 2018The Coming Era of AlphaHacking? A Survey of Automatic Software Vulnerability Detection, Exploitation and Patching Techniquescited by 5
  23. 2019ENCORE: Ensemble Learning using Convolution Neural Machine Translation for Automatic Program Repaircited by 3
  24. 2018IntRepair: Informed Repairing of Integer Overflowscited by 2
  25. 2020A Software-Repair Robot based on Continual Learningcited by 2
  26. 2020Application of Seq2Seq Models on Code Correctioncited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 1; 2022: 1; 2023: 11; 2024: 12; 2025: 4; 2026: 7.

36 papers.

Sort:

By area:

  1. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 149
  2. 2023How Effective Are Neural Networks for Fixing Security Vulnerabilitiescited by 50
  3. 2023RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program Repaircited by 50
  4. 2023A New Era in Software Security: Towards Self-Healing Software via Large Language Models and Formal Verificationcited by 42
  5. 2024HDLdebugger: Streamlining HDL debugging with Large Language Modelscited by 25
  6. 2024LLM-Powered Code Vulnerability Repair with Reinforcement Learning and Semantic Rewardcited by 16
  7. 2022On Distribution Shift in Learning-based Bug Detectorscited by 15
  8. 2023RAPGen: An Approach for Fixing Code Inefficiencies in Zero-Shotcited by 14
  9. 2023Enhancing Large Language Models for Secure Code Generation: A Dataset-driven Study on Vulnerability Mitigationcited by 14
  10. 2023KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repaircited by 13
  11. 2023SecureFalcon: Are We There Yet in Automated Software Vulnerability Detection with LLMs?cited by 13
  12. 2024Enhanced Automated Code Vulnerability Repair using Large Language Modelscited by 10
24 more
  1. 2024Code Security Vulnerability Repair Using Reinforcement Learning with Large Language Modelscited by 10
  2. 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Securitycited by 9
  3. 2025Large Language Models for Security Operations Centers: A Comprehensive Surveycited by 9
  4. 2024Automated Program Repair: Emerging trends pose and expose problems for benchmarkscited by 7
  5. 2024Can GPT-O1 Kill All Bugs? An Evaluation of GPT-Family LLMs on QuixBugscited by 7
  6. 2025Agent That Debugs: Dynamic State-Guided Vulnerability Repaircited by 7
  7. 2024A Survey of Source Code Representations for Machine Learning-Based Cybersecurity Taskscited by 4
  8. 2024Enhancing Source Code Security with LLMs: Demystifying The Challenges and Generating Reliable Repairscited by 4
  9. 2021Self-Supervised Learning to Prove Equivalence Between Straight-Line Programs via Rewrite Rulescited by 3
  10. 2024AI for DevSecOps: A Landscape and Future Opportunitiescited by 3
  11. 2024SCoPE: Evaluating LLMs for Software Vulnerability Detectioncited by 3
  12. 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Trainingcited by 2
  13. 2026VulnResolver: A Hybrid Agent Framework for LLM-Based Automated Vulnerability Issue Resolutioncited by 2
  14. 2026EvoRepair: Enhancing Vulnerability Repair Agents Through Experience-Based Self-Evolutioncited by 2
  15. 2023Redundancy and Concept Analysis for Code-trained Language Modelscited by 1
  16. 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Codecited by 1
  17. 2023Towards Automatically Addressing Self-Admitted Technical Debt: How Far Are We?cited by 1
  18. 2025Empirical Study of Code Large Language Models for Binary Security Patch Detectioncited by 1
  19. 2026RAVEN: Agentic RAG for Automated Vulnerability Repaircited by 1
  20. 2026AgenticRepair: Multi-Faceted Program Context Engineering for Agentic Vulnerability Repaircited by 1
  21. 2024Unintentional Security Flaws in Code: Automated Defense via Root Cause Analysiscited by 0
  22. 2026A Metamorphic Testing Approach to Diagnosing Memorization in LLM-Based Program Repaircited by 0
  23. 2026ContraFix: Skill-Enhanced Contrastive Runtime Analysis for Vulnerability Repaircited by 0
  24. 2026Knowledge-Enhanced Agentic Vulnerability Repaircited by 0