harinpurumandla/cve-severity-dataset
Viewer β’ Updated β’ 230k β’ 30
Fine-tuned google/flan-t5-base (250M parameters) on 200k NVD CVE description β CVSS v3.1
base vector pairs. Predicts all 8 base metrics from free-text vulnerability descriptions.
Trained on CVEs from 2016β2023. Tested on a held-out 2025 split (temporal, never seen during training).
| Metric | Score |
|---|---|
| Exact vector match | 44.9% |
| Severity band accuracy | 67.4% |
| Score MAE | 0.91 |
| AV | AC | PR | UI | S | C | I | A |
|---|---|---|---|---|---|---|---|
| 93.9% | 91.6% | 75.8% | 92.5% | 91.6% | 81.3% | 81.8% | 80.7% |
PR (Privileges Required) and C/I/A (Impact) are the hardest components β advisory text rarely encodes privilege context or impact scope explicitly.
| Model | Exact Match | Band Accuracy | MAE | Cost/1k CVEs |
|---|---|---|---|---|
| Majority class (always "High") | 0.0% | ~45% | ~1.8 | $0 |
| FLAN-T5-base fine-tuned (this model) | 45.9% | 66.9% | 0.93 | $0 |
| Claude Opus 4.8 (zero-shot) | 34.5% | 62.6% | 0.97 | $2.07 |
| Claude Opus 4.8 (few-shot) | 33.0% | 60.0% | 1.08 | $4.29 |
| GPT-5.4 (zero-shot) | 26.5% | 57.8% | 1.23 | $0.68 |
| GPT-5.4 (few-shot) | 30.5% | 55.9% | 1.25 | $1.30 |
| Gemma4 E4B local (zero-shot) | 12.9% | 38.0% | 1.93 | $0 |
| Gemma4 E4B local (few-shot) | 14.3% | 37.7% | 1.89 | $0 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("harinpurumandla/cve-severity-net")
model = AutoModelForSeq2SeqLM.from_pretrained("harinpurumandla/cve-severity-net")
description = "A heap-based buffer overflow allows unauthenticated remote code execution."
inputs = tokenizer(
"predict cvss vector: " + description,
return_tensors="pt",
truncation=True,
max_length=512,
)
outputs = model.generate(**inputs, num_beams=4, max_new_tokens=48)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
google/flan-t5-base"predict cvss vector: {description}"