节点文献
基于元学习的小样本漏洞检测模型
Few-Shot vulnerability detection model based on meta-learning
【摘要】 针对传统漏洞检测模型在真实开源软件代码中泛化性不足的问题,该文提出一种基于元学习的小样本漏洞检测模型MetaFSVD。该模型采用融合语法特征与语义信息的漏洞切片表示方法,结合CodeBERT基学习器与双层MAML元学习框架实现跨特征交互建模,从而提升对不同类型漏洞的检测能力。该文利用公开数据集NVD构建不同类型的漏洞切片数据集,并进行了多角度的消融、对比实验。实验结果表明,MetaFSVD方法在少样本场景下表现优异,在完整数据集上准确率、召回率和F1分数分别达到97.0%、97.0%和96.8%,较最优对比方法的F1分数提升7.4%;在真实数据集中,Devign和REVEAL的F1分数分别达到76.2%和82.7%,显著优于基线模型。结果验证了该模型的高效性与泛化能力,为小样本漏洞检测提供了有效的解决方案。
【Abstract】 Aiming at the problem of insufficient generalization of traditional vulnerability detection models in real open source software code,this paper proposes a Few-Shot vulnerability detection model MetaFSVD based on meta-learning. The model uses grammatical feature extraction and semantic enhanced vulnerability slicing representation,combined with CodeBERT-based learner and two-layer MAML meta-learning framework to achieve cross-feature interaction modeling,thereby improving the detection ability of different types of vulnerabilities. In this paper,the public dataset NVD is used to construct different types of vulnerability slice datasets,and multi-angle ablation and comparison experiments are carried out. The experimental results show that the MetaFSVD method performs well in scenarios with few samples. On the complete data set,the accuracy rate,recall rate and F1 score reach97.0%,97.0% and 96.8% respectively,which is 7.4% higher than the F1 score of the optimal comparison method;In the real data set,the F1 scores of Devign and REVEAL reached 76.2% and82.7%,respectively,which were significantly better than the baseline model. The results verify the efficiency and generalization ability of the model,and provide an effective solution for Few-Shot vulnerability detection.
【Key words】 vulnerability detection; meta-learning; abstract syntax tree; Few-Shot;
- 【文献出处】 电子设计工程 ,Electronic Design Engineering , 编辑部邮箱 ,2026年11期
- 【分类号】TP18;TP393.08
- 【下载频次】28