125M RoBERTa matches 8B LLM on CVE-to-CWE mapping with 87% accuracy
A fine-tuned RoBERTa-base model achieves performance comparable to an 8-billion-parameter LLM on CVE-to-CWE classification
AI/ML arXiv 16 Mar 2026 Method Real-world evidence
Published as “Fine-tuning RoBERTa for CVE-to-CWE Classification: A 125M Parameter Model Competitive with LLMs”
Why it matters
A compact 125M-parameter model can replace much larger LLMs for CVE-to-CWE mapping, enabling deployment in resource-constrained security pipelines.
Summary
The fine-tuned RoBERTa-base model reaches 87.4% top-1 accuracy and 60.7% Macro F1 on a held-out CVE-to-CWE test set, and its 75.6% strict accuracy on the CTI-Bench benchmark is statistically indistinguishable from an 8B-parameter LLM while using 64× fewer parameters. The authors built a 234,770-sample training set with AI-refined CWE labels and show a +15.5-point Macro F1 gain over a TF-IDF baseline. Evidence is limited to the reported test sets; no additional evaluation details are provided.
What they found 2
- High top-1 accuracy and macro F1 on internal test set
“the model achieves 87.4% top-1 accuracy and 60.7% Macro F1”
- Comparable strict accuracy to a large LLM on CTI-Bench
“On the external CTI-Bench benchmark (NeurIPS 2024), the model achieves 75.6% strict accuracy (95% CI: 72.8-78.2%)”
Caveats 2
- The TF-IDF baseline already reaches 84.9% top-1 accuracy, leaving only a 2.5-point absolute gain for the RoBERTa model.
- Macro F1 of 60.7% indicates limited performance on many of the 205 CWE classes.
What’s new here 4
- Fine-tunes a 125M-parameter RoBERTa model specifically for CVE-to-CWE classification.
- Creates a large-scale AI-refined labeling pipeline using Claude Sonnet 4.6.
- Demonstrates performance comparable to an 8B-parameter LLM on an external benchmark.
- Releases the dataset, model, and training code for community use.