基于RoBERTa的CVE到CWE分类微调:一个125M参数模型与LLMs竞争
Fine-tuning RoBERTa for CVE-to-CWE Classification: A 125M Parameter Model Competitive with LLMs
AI总结:
本文提出一个125M参数的RoBERTa基分类器,通过AI优化的CWE标签构建大规模训练数据集,在27780个样本上达到87.4%的Top-1准确率和60.7%的Macro F1,优于TF-IDF基线。
摘要:
我们提出一个微调的RoBERTa-base分类器(125M参数),用于将CVE描述映射到CWE类别。我们使用Claude Sonnet 4.6构建了包含234770个CVE描述的大规模训练数据集,并使用AI优化的CWE标签。在我们的测试集(27780个样本,205个CWE类别)上,模型达到了87.4%的Top-1准确率和60.7%的Macro F1,比已经达到84.9% Top-1的TF-IDF基线提高了15.5个百分点,展示了模型在罕见弱点类别上的优势。在外部CTI-Bench基准测试(NeurIPS 2024)中,模型达到了75.6%的严格准确率(95% CI: 72.8-78.2%),在参数仅为Cisco Foundation-Sec-8B-Reasoning的64分之一时,统计上与之不可区分。我们发布了数据集、模型和训练代码。
英文摘要:
We present a fine-tuned RoBERTa-base classifier (125M parameters) for mapping Common Vulnerabilities and Exposures (CVE) descriptions to Common Weakness Enumeration (CWE) categories. We construct a large-scale training dataset of 234,770 CVE descriptions with AI-refined CWE labels using Claude Sonnet 4.6, and agreement-filtered evaluation sets where NVD and AI labels agree. On our held-out test set (27,780 samples, 205 CWE classes), the model achieves 87.4% top-1 accuracy and 60.7% Macro F1 -- a +15.5 percentage-point Macro F1 gain over a TF-IDF baseline that already reaches 84.9% top-1, demonstrating the model's advantage on rare weakness categories. On the external CTI-Bench benchmark (NeurIPS 2024), the model achieves 75.6% strict accuracy (95% CI: 72.8-78.2%) -- statistically indistinguishable from Cisco Foundation-Sec-8B-Reasoning (75.3%, 8B parameters) at 64x fewer parameters. We release the dataset, model, and training code.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。