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

被引:12
|
作者
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] A transformer-based hierarchical registration framework for multimodality deformable image registration
    Zhao, Yao
    Chen, Xinru
    Mcdonald, Brigid
    Yu, Cenji
    Mohamed, Abdalah S. R.
    Fuller, Clifton D.
    Court, Laurence E.
    Pan, Tinsu
    Wang, He
    Wang, Xin
    Phan, Jack
    Yang, Jinzhong
    COMPUTERIZED MEDICAL IMAGING AND GRAPHICS, 2023, 108
  • [22] Hierarchical Image Generation via Transformer-Based Sequential Patch Selection
    Xu, Xiaogang
    Xu, Ning
    THIRTY-SIXTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE / THIRTY-FOURTH CONFERENCE ON INNOVATIVE APPLICATIONS OF ARTIFICIAL INTELLIGENCE / THE TWELVETH SYMPOSIUM ON EDUCATIONAL ADVANCES IN ARTIFICIAL INTELLIGENCE, 2022, : 2938 - 2945
  • [23] PE-Attack: On the Universal Positional Embedding Vulnerability in Transformer-Based Models
    Gao, Shiqi
    Zhou, Haoyi
    Chen, Tianyu
    He, Mingrui
    Xu, Runhua
    Li, Jianxin
    IEEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY, 2024, 19 : 9359 - 9373
  • [24] Pruning-guided feature distillation for an efficient transformer-based pose estimation model
    Kim, Dong-hwi
    Lee, Dong-hun
    Kim, Aro
    Jeong, Jinwoo
    Lee, Jong Taek
    Kim, Sungjei
    Park, Sang-hyo
    IET COMPUTER VISION, 2024, 18 (06) : 745 - 758
  • [25] Distillation Using Oracle Queries for Transformer-based Human-Object Interaction Detection
    Qu, Xian
    Ding, Changxing
    Li, Xingao
    Zhong, Xubin
    Tao, Dacheng
    2022 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR 2022), 2022, : 19536 - 19545
  • [26] Hierarchical Transformer-based Siamese Network for Related Trading Detection in Financial Market
    Kang, Le
    Mu, Tai-Jiang
    Zhao, Guoping
    2023 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS, IJCNN, 2023,
  • [27] From Patch to Pixel: A Transformer-Based Hierarchical Framework for Compressive Image Sensing
    Gan, Hongping
    Shen, Minghe
    Hua, Yi
    Ma, Chunyan
    Zhang, Tao
    IEEE TRANSACTIONS ON COMPUTATIONAL IMAGING, 2023, 9 : 133 - 146
  • [28] MaxSimE: Explaining Transformer-based Semantic Similarity via Contextualized Best Matching Token Pairs
    Brito, Eduardo
    Iser, Henri
    PROCEEDINGS OF THE 46TH INTERNATIONAL ACM SIGIR CONFERENCE ON RESEARCH AND DEVELOPMENT IN INFORMATION RETRIEVAL, SIGIR 2023, 2023, : 2154 - 2158
  • [29] Efficient Lightweight Network with Transformer-Based Distillation for Micro-crack Detection of Solar Cells
    Xie, Xiangying
    Liu, Xinyue
    Chen, QiXiang
    Leng, Biao
    NEURAL INFORMATION PROCESSING, ICONIP 2023, PT III, 2024, 14449 : 3 - 15
  • [30] TraKDis: A Transformer-Based Knowledge Distillation Approach for Visual Reinforcement Learning With Application to Cloth Manipulation
    Chen, Wei
    Rojas, Nicolas
    IEEE ROBOTICS AND AUTOMATION LETTERS, 2024, 9 (03) : 2455 - 2462