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 条
  • [1] A Transformer-Based Knowledge Distillation Network for Cortical Cataract Grading
    Wang, Jinhong
    Xu, Zhe
    Zheng, Wenhao
    Ying, Haochao
    Chen, Tingting
    Liu, Zuozhu
    Chen, Danny Z.
    Yao, Ke
    Wu, Jian
    IEEE TRANSACTIONS ON MEDICAL IMAGING, 2024, 43 (03) : 1089 - 1101
  • [2] Transformer-Based Hierarchical Model for Non-Small Cell Lung Cancer Detection and Classification
    Imran, Muhammad
    Haq, Bushra
    Elbasi, Ersin
    Topcu, Ahmet E.
    Shao, Wei
    IEEE ACCESS, 2024, 12 : 145920 - 145933
  • [3] BlinkLinMulT: Transformer-Based Eye Blink Detection
    Fodor, Adam
    Fenech, Kristian
    Lorincz, Andras
    JOURNAL OF IMAGING, 2023, 9 (10)
  • [4] Transformer-based statement level vulnerability detection by cross-modal fine-grained features capture
    Tao, Wenxin
    Su, Xiaohong
    Ke, Yekun
    Han, Yi
    Zheng, Yu
    Wei, Hongwei
    KNOWLEDGE-BASED SYSTEMS, 2025, 316
  • [5] A Swin Transformer-Based Approach for Motorcycle Helmet Detection
    Bouhayane, Ayyoub
    Charouh, Zakaria
    Ghogho, Mounir
    Guennoun, Zouhair
    IEEE ACCESS, 2023, 11 : 74410 - 74419
  • [6] ASTROMER A transformer-based embedding for the representation of light curves
    Donoso-Oliva, C.
    Becker, I.
    Protopapas, P.
    Cabrera-Vives, G.
    Vishnu, M.
    Vardhan, H.
    ASTRONOMY & ASTROPHYSICS, 2023, 670
  • [7] TransNet: Transformer-Based Point Cloud Sampling Network
    Lee, Hookyung
    Jeon, Jaeseung
    Hong, Seokjin
    Kim, Jeesu
    Yoo, Jinwoo
    SENSORS, 2023, 23 (10)
  • [8] Classification of hyperspectral and LiDAR data by transformer-based enhancement
    Pan, Jiechen
    Shuai, Xing
    Xu, Qing
    Dai, Mofan
    Zhang, Guoping
    Wang, Guo
    REMOTE SENSING LETTERS, 2024, 15 (10) : 1074 - 1084
  • [9] EchoBERT: A Transformer-Based Approach for Behavior Detection in Echograms
    Maloy, Hakon
    IEEE ACCESS, 2020, 8 : 218372 - 218385
  • [10] A Transformer-based Framework for Multivariate Time Series Representation Learning
    Zerveas, George
    Jayaraman, Srideepika
    Patel, Dhaval
    Bhamidipaty, Anuradha
    Eickhoff, Carsten
    KDD '21: PROCEEDINGS OF THE 27TH ACM SIGKDD CONFERENCE ON KNOWLEDGE DISCOVERY & DATA MINING, 2021, : 2114 - 2124