VulFewShot: 利用对比学习改进少样本漏洞分类
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

国家自然科学基金(62202191)


VulFewShot: Improving Few-shot Vulnerability Classification by Contrastive Learning
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    为了对漏洞进行细粒度检测, 理想的模型必须确定软件是否包含漏洞, 并确定漏洞的类型(即进行漏洞分类). 一系列深度学习模型在漏洞分类任务中取得了良好的整体性能. 然而, 观察到不同漏洞类型之间存在严重的数据不平衡. 许多漏洞类型只有少量的漏洞样本(称为少样本类型), 这导致了对少样本类型的分类性能和泛化能力较差. 为了提高少样本漏洞类型的分类性能, 实现VulFewShot. 这种基于对比学习的漏洞分类框架通过使相同类型的漏洞样本“接近”, 同时使不同类型的漏洞样本彼此“远离”, 从而为仅有少数漏洞样本类型赋予了更多的权重. 实验结果表明, VulFewShot可以提高对所有类型漏洞的分类性能. 类型包含的漏洞样本数量越少, 改进就越显著. 因此, VulFewShot可以提高样本不足的漏洞的分类性能, 并减少样本量对学习过程的影响.

    Abstract:

    To perform fine-grained vulnerability detection, an ideal model must determine whether software contains vulnerabilities and identify the type of vulnerability (i.e., perform vulnerability classification). A series of deep learning models have demonstrated strong overall performance in vulnerability classification tasks. However, a severe data imbalance exists across different vulnerability types. Many vulnerability types are represented by only a small number of samples (referred to as few-shot types in this study), resulting in poor classification performance and generalization for these few-shot types. To enhance classification performance for these types, VulFewShot is proposed. This contrastive learning-based vulnerability classification framework assigns more weight to few-shot types by bringing samples of the same type closer together while keeping samples from different types further apart. Experimental results show that VulFewShot improves classification performance across all vulnerability types. The smaller the number of samples for a given type, the more significant the improvement. Therefore, VulFewShot improves classification performance for vulnerabilities with limited samples and mitigates the impact of sample size on the learning process.

    参考文献
    相似文献
    引证文献
引用本文

吴月明,张笑睿,李志,刘恺麟,邹德清,金海. VulFewShot: 利用对比学习改进少样本漏洞分类.软件学报,2025,36(12):5495-5511

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2024-05-30
  • 最后修改日期:2024-10-10
  • 录用日期:
  • 在线发布日期: 2025-07-23
  • 出版日期: 2025-12-06
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号