mlsanityData to 14 Oct 2026

Towards Causal Deep Learning for Vulnerability Detection

arXiv 2310.07958 ↗First posted 12 Oct 2023cs.SE cs.CR cs.LGcited by 9

Not on the map. Why?

Abstract (arXiv)

Deep learning vulnerability detection has shown promising results in recent years. However, an important challenge that still blocks it from being very useful in practice is that the model is not robust under perturbation and it cannot generalize well over the out-of-distribution (OOD) data, e.g., applying a trained model to unseen projects in real world. We hypothesize that this is because the model learned non-robust features, e.g., variable names, that have spurious correlations with labels. When the perturbed and OOD datasets no longer have the same spurious features, the model prediction fails. To address the challenge, in this paper, we introduced causality into deep learning vulnerability detection. Our approach CausalVul consists of two phases. First, we designed novel perturbations to discover spurious features that the model may use to make predictions. Second, we applied the causal learning algorithms, specifically, do-calculus, on top of existing deep learning models to systematically remove the use of spurious features and thus promote causal based prediction. Our results show that CausalVul consistently improved the model accuracy, robustness and OOD performance for all the state-of-the-art models and datasets we experimented. To the best of our knowledge, this is the first work that introduces do calculus based causal learning to software engineering models and shows it's indeed useful for improving the model accuracy, robustness and generalization. Our replication package is located at https://figshare.com/s/0ffda320dcb96c249ef2.

Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Builds on 20 of its 29 references that are in the map. First posted on arXiv 12 Oct 2023.

Builds on

20 of 29 references.

References · 20

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  3. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  4. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  5. 2021Unified Pre-training for Program Understanding and Generationcited by 366
  6. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  7. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
  8. 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 144
  9. 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 103
  10. 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 54
  11. 2020Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformationscited by 49
  12. 2022An Empirical Study of Deep Learning Models for Vulnerability Detectioncited by 46
8 more
  1. 2022LineVD: Statement-level Vulnerability Detection using Graph Neural Networkscited by 35
  2. 2023TRACED: Execution-aware Pre-training for Source Codecited by 27
  3. 2021Counterfactual Explanations for Models of Codecited by 25
  4. 2022Causal Transportability for Visual Recognitioncited by 23
  5. 2021Towards Learning (Dis)-Similarity of Source Code from Program Contrastscited by 17
  6. 2022Unicorn: Reasoning about Configurable System Performance through the lens of Causalitycited by 12
  7. 2022MVD: Memory-Related Vulnerability Detection Based on Flow-Sensitive Graph Neural Networkscited by 12
  8. 2021Detecting Multi-Sensor Fusion Errors in Advanced Driver-Assistance Systemscited by 8

Built on by

Cited by year

Citing papers per year: 2023: 2; 2024: 3; 2025: 4.

9 papers.