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.
翻译:我们提出了一种微调的RoBERTa-base分类器(1.25亿参数),用于将通用漏洞披露(CVE)描述映射到通用缺陷枚举(CWE)类别。我们利用Claude Sonnet 4.6构建了一个包含234,770条CVE描述的大规模训练数据集,并采用AI精炼的CWE标签,同时创建了基于NVD与AI标签一致性的协议过滤评估集。在我们保留的测试集上(27,780个样本,205个CWE类别),该模型实现了87.4%的top-1准确率和60.7%的宏观F1分数——相较于已达到84.9% top-1准确率的TF-IDF基线,宏观F1分数提升了15.5个百分点,证明了该模型在罕见缺陷类别上的优势。在外部基准CTI-Bench(NeurIPS 2024)上,该模型实现了75.6%的严格准确率(95%置信区间:72.8-78.2%)——与拥有80亿参数的Cisco Foundation-Sec-8B-Reasoning模型(75.3%准确率)在统计上无显著差异,而参数量仅为后者的1/64。我们公开了数据集、模型及训练代码。