arXiv:2508.02840cs.LGcs.CR2025-08中稿 · Engineering Applic…被引 2

用优化+知识蒸馏,让小模型高效识别软件漏洞。

Resource-Efficient Automatic Software Vulnerability Assessment via Knowledge Distillation and Particle Swarm Optimization

  • 用粒子群算法优化小模型结构,平衡速度与能力。
  • 模型体积缩小99.4%,准确率仍保持原模型的89.3%。
  • 适合资源受限环境下的自动化漏洞检测,效率更高。

软件系统复杂度提升导致安全漏洞激增,亟需高效可扩展的漏洞评估方案。然而,大型预训练模型在实际部署中受制于高计算与存储开销。为此,我们提出一种融合知识蒸馏与粒子群优化的轻量级漏洞评估框架。该框架采用两阶段策略:首先利用粒子群优化调整紧凑学生模型的架构,在计算效率与模型容量间取得平衡;随后通过知识蒸馏将大型教师模型中的关键漏洞识别知识迁移至优化后的学生模型,显著降低模型规模并维持高性能。在包含12,071个CVSS v3标注漏洞的增强版MegaVul数据集上的实验表明,该方法实现99.4%的模型尺寸压缩,同时保留89.3%的原始准确率,并在准确率上优于现有最佳基线1.7%,参数减少60%。此外,相比传统遗传算法,训练时间缩短72.1%,架构搜索时间减少34.88%。

原文摘要 · Abstract (English)

The increasing complexity of software systems has led to a surge in cybersecurity vulnerabilities, necessitating efficient and scalable solutions for vulnerability assessment. However, the deployment of large pre-trained models in real-world scenarios is hindered by their substantial computational and storage demands. To address this challenge, we propose a novel resource-efficient framework that integrates knowledge distillation and particle swarm optimization to enable automated vulnerability assessment. Our framework employs a two-stage approach: First, particle swarm optimization is utilized to optimize the architecture of a compact student model, balancing computational efficiency and model capacity. Second, knowledge distillation is applied to transfer critical vulnerability assessment knowledge from a large teacher model to the optimized student model. This process significantly reduces the model size while maintaining high performance. Experimental results on an enhanced MegaVul dataset, comprising 12,071 CVSS (Common Vulnerability Scoring System) v3 annotated vulnerabilities, demonstrate the effectiveness of our approach. Our approach achieves a 99.4% reduction in model size while retaining 89.3% of the original model's accuracy. Furthermore, it outperforms state-of-the-art baselines by 1.7% in accuracy with 60% fewer parameters. The framework also reduces training time by 72.1% and architecture search time by 34.88% compared to traditional genetic algorithms.

漏洞检测知识蒸馏模型压缩优化算法

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。