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 条
  • [31] Transformer-based material recognition via short-time contact sensing
    Liu, Zhenyang
    Shao, Yitian
    Li, Qiliang
    Su, Jingyong
    PATTERN RECOGNITION, 2025, 163
  • [32] Classifying Drug Ratings Using User Reviews with Transformer-Based Language Models
    Shiju, Akhil
    He, Zhe
    2022 IEEE 10TH INTERNATIONAL CONFERENCE ON HEALTHCARE INFORMATICS (ICHI 2022), 2022, : 163 - 169
  • [33] T-PRIME: Transformer-based Protocol Identification for Machine-learning at the Edge
    Belgiovine, Mauro
    Groen, Joshua
    Sirera, Miguel
    Tassie, Chinenye
    Trudeau, Sage
    Ioannidis, Stratis
    Chowdhury, Kaushik
    IEEE INFOCOM 2024-IEEE CONFERENCE ON COMPUTER COMMUNICATIONS, 2024, : 1031 - 1040
  • [34] Transformer-Based Disease Identification for Small-Scale Imbalanced Capsule Endoscopy Dataset
    Bai, Long
    Wang, Liangyu
    Chen, Tong
    Zhao, Yuanhao
    Ren, Hongliang
    ELECTRONICS, 2022, 11 (17)
  • [35] ComfortGPT: a transformer-based architecture for predicting preferred temperature setpoints leveraging big data
    Chen, Kai
    Ghahramani, Ali
    BUILDING AND ENVIRONMENT, 2024, 248
  • [36] DeePathNet: A Transformer-Based Deep Learning Model Integrating Multiomic Data with Cancer Pathways
    Cai, Zhaoxiang
    Poulos, Rebecca C.
    Aref, Adel
    Robinson, Phillip J.
    Reddel, Roger R.
    Zhong, Qing
    CANCER RESEARCH COMMUNICATIONS, 2024, 4 (12): : 3151 - 3164
  • [37] A Fast Identification Method of Gunshot Types Based on Knowledge Distillation
    Li, Jian
    Guo, Jinming
    Sun, Xiushan
    Li, Chuankun
    Meng, Lingpeng
    APPLIED SCIENCES-BASEL, 2022, 12 (11):
  • [38] A transformer-based deep neural network for arrhythmia detection using continuous ECG signals
    Hu, Rui
    Chen, Jie
    Zhou, Li
    COMPUTERS IN BIOLOGY AND MEDICINE, 2022, 144
  • [39] Transformer-based approaches for neuroimaging: an in-depth review of their role in classification and regression tasks
    Zhu, Xinyu
    Sun, Shen
    Lin, Lan
    Wu, Yutong
    Ma, Xiangge
    REVIEWS IN THE NEUROSCIENCES, 2025, 36 (02) : 209 - 228
  • [40] Vision transformer-based weakly supervised histopathological image analysis of primary brain tumors
    Li, Zhongxiao
    Cong, Yuwei
    Chen, Xin
    Chen, Yupeng
    Qi, Jiping
    Sun, Jingxian
    Yan, Tao
    Yang, He
    Liu, Junsi
    Gao, Xin
    Lu, Enzhou
    Wang, Lixiang
    Li, Jiafeng
    Hu, Hong
    Zhang, Cheng
    Yang, Quan
    Yao, Jiawei
    Yao, Penglei
    Jiang, Qiuyi
    Liu, Wenwu
    Song, Jiangning
    Carin, Lawrence
    Zhao, Shiguang
    ISCIENCE, 2023, 26 (01)