VulExplainer: A Transformer-Based Hierarchical Distillation for Explaining Vulnerability Types

被引:13
|
作者
Fu, Michael [1 ]
Nguyen, Van [1 ]
Tantithamthavorn, Chakkrit [1 ]
Le, Trung [1 ]
Phung, Dinh [1 ]
机构
[1] Monash Univ, Fac Informat Technol, Melbourne, Australia
关键词
Software vulnerability; software security; CLASSIFICATION;
D O I
10.1109/TSE.2023.3305244
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Deep learning-based vulnerability prediction approaches are proposed to help under-resourced security practitioners to detect vulnerable functions. However, security practitioners still do not know what type of vulnerabilities correspond to a given prediction (aka CWE-ID). Thus, a novel approach to explain the type of vulnerabilities for a given prediction is imperative. In this paper, we propose VulExplainer, an approach to explain the type of vulnerabilities. We represent VulExplainer as a vulnerability classification task. However, vulnerabilities have diverse characteristics (i.e., CWE-IDs) and the number of labeled samples in each CWE-ID is highly imbalanced (known as a highly imbalanced multi-class classification problem), which often lead to inaccurate predictions. Thus, we introduce a Transformer-based hierarchical distillation for software vulnerability classification in order to address the highly imbalanced types of software vulnerabilities. Specifically, we split a complex label distribution into sub-distributions based on CWE abstract types (i.e., categorizations that group similar CWE-IDs). Thus, similar CWE-IDs can be grouped and each group will have a more balanced label distribution. We learn TextCNN teachers on each of the simplified distributions respectively, however, they only perform well in their group. Thus, we build a transformer student model to generalize the performance of TextCNN teachers through our hierarchical knowledge distillation framework. Through an extensive evaluation using the real-world 8,636 vulnerabilities, our approach outperforms all of the baselines by 5%-29%. The results also demonstrate that our approach can be applied to Transformer-based architectures such as CodeBERT, GraphCodeBERT, and CodeGPT. Moreover, our method maintains compatibility with any Transformer-based model without requiring any architectural modifications but only adds a special distillation token to the input. These results highlight our significant contributions towards the fundamental and practical problem of explaining software vulnerability.
引用
收藏
页码:4550 / 4565
页数:16
相关论文
共 50 条
  • [21] Carbon emissions forecasting based on temporal graph transformer-based attentional neural network
    Wu, Xingping
    Yuan, Qiheng
    Zhou, Chunlei
    Chen, Xiang
    Xuan, Donghai
    Song, Jinwei
    JOURNAL OF COMPUTATIONAL METHODS IN SCIENCES AND ENGINEERING, 2024, 24 (03) : 1405 - 1421
  • [22] Transformer-based embedding applied to classify bacterial species using sequencing reads
    Gwak, Ho-Jin
    Rho, Mina
    2022 IEEE INTERNATIONAL CONFERENCE ON BIG DATA AND SMART COMPUTING (IEEE BIGCOMP 2022), 2022, : 374 - 377
  • [23] Task-Specific Transformer-Based Language Models in HealthCare:Scoping Review
    Cho, Ha Na
    Jun, Tae Joon
    Kim, Young-Hak
    Kang, Heejun
    Ahn, Imjin
    Gwon, Hansle
    Kim, Yunha
    Seo, Jiahn
    Choi, Heejung
    Kim, Minkyoung
    Han, Jiye
    Kee, Gaeun
    Park, Seohyun
    Ko, Soyoung
    JMIR MEDICAL INFORMATICS, 2024, 12
  • [24] DCST: Dual Cross-Supervision for Transformer-based Unsupervised Domain Adaptation
    Cheng, Yi
    Yao, Peng
    Xu, Liang
    Chen, Mingxiao
    Liu, Peng
    Shao, Pengfei
    Shen, Shuwei
    Xu, Ronald X.
    NEURAL NETWORKS, 2025, 181
  • [25] Transformer-based semantic segmentation and CNN network for detection of histopathological lung cancer
    Talib, Lareib Fatima
    Amin, Javaria
    Sharif, Muhammad
    Raza, Mudassar
    BIOMEDICAL SIGNAL PROCESSING AND CONTROL, 2024, 92
  • [26] FlexSleepTransformer: a transformer-based sleep staging model with flexible input channel configurations
    Guo, Yanchen
    Nowakowski, Maciej
    Dai, Weiying
    SCIENTIFIC REPORTS, 2024, 14 (01):
  • [27] TR-Net: A Transformer-Based Neural Network for Point Cloud Processing
    Liu, Luyao
    Chen, Enqing
    Ding, Yingqiang
    MACHINES, 2022, 10 (07)
  • [28] Identifying suicidal emotions on social media through transformer-based deep learning
    Kodati, Dheeraj
    Tene, Ramakrishnudu
    APPLIED INTELLIGENCE, 2023, 53 (10) : 11885 - 11917
  • [29] Personality BERT: A Transformer-Based Model for Personality Detection from Textual Data
    Jain, Dipika
    Kumar, Akshi
    Beniwal, Rohit
    PROCEEDINGS OF INTERNATIONAL CONFERENCE ON COMPUTING AND COMMUNICATION NETWORKS (ICCCN 2021), 2022, 394 : 515 - 522
  • [30] Hyperspectral Imaging for Remote Sensing and Agriculture: A Comparative study of transformer-based models
    Alanazi, Ali
    Wahab, Nur Haliza Abdul
    Al-Rimy, Bander Ali Saleh
    2024 IEEE 14TH SYMPOSIUM ON COMPUTER APPLICATIONS & INDUSTRIAL ELECTRONICS, ISCAIE 2024, 2024, : 129 - 136