Datasets:
Update dataset card to v3
Browse files
README.md
CHANGED
|
@@ -52,10 +52,30 @@ A multi-label dataset mapping **CVE vulnerability descriptions** to their **CWE
|
|
| 52 |
## TL;DR
|
| 53 |
|
| 54 |
- **Task:** given a CVE description, predict the CWE ID(s) — multi-label.
|
| 55 |
-
- **
|
| 56 |
- **Format:** conversational `messages` (system / user / assistant), ready for chat-template SFT.
|
| 57 |
- **Trust model:** labels are the **intersection** of two independent official sources (NVD + CNA), so single-source errors are excluded by construction.
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
## Example row
|
| 60 |
|
| 61 |
```json
|
|
@@ -79,7 +99,6 @@ Multi-label targets are comma-separated and numerically sorted, e.g. `"CWE-79, C
|
|
| 79 |
4. **Filtering:** REJECTED/DISPUTED CVEs, non-English and too-short (<40 char) descriptions are dropped; pseudo-labels (`NVD-CWE-noinfo`/`-Other`) are excluded.
|
| 80 |
5. **De-duplication:** near-duplicate descriptions (MinHash, Jaccard ≥ 0.7) are grouped into families, and **whole families stay within a single split**, so near-identical text cannot leak across train/validation/test (verified: 0 shared descriptions across splits).
|
| 81 |
6. **Split:** dedup-family-aware, ~80/10/10.
|
| 82 |
-
7. **Balance (cap):** each CWE label is capped at **2,500 examples** (single seeded shuffle) so common classes don't swamp the long tail — see Statistics.
|
| 83 |
|
| 84 |
## Provenance (reproducibility)
|
| 85 |
|
|
@@ -91,8 +110,8 @@ Multi-label targets are comma-separated and numerically sorted, e.g. `"CWE-79, C
|
|
| 91 |
|
| 92 |
## Statistics
|
| 93 |
|
| 94 |
-
- **
|
| 95 |
-
- **
|
| 96 |
- **Recency skew:** consensus concentrates on **2023+** CVEs, because that is when CNAs began reliably populating CWE — this is the main coverage bias.
|
| 97 |
- **Label space:** 127 distinct View-1003 CWEs appear in the consensus set; a minimum-examples floor (50) prunes the rarest, leaving ~117 effective labels. The distribution is long-tailed (CWE-79 most common).
|
| 98 |
- **Cardinality:** most examples carry a single label; ~14% carry two or more.
|
|
|
|
| 52 |
## TL;DR
|
| 53 |
|
| 54 |
- **Task:** given a CVE description, predict the CWE ID(s) — multi-label.
|
| 55 |
+
- **71,640 examples** — train 50,074 / validation 11,052 / test 10,514. *(v3 — see "What's new in v3")*
|
| 56 |
- **Format:** conversational `messages` (system / user / assistant), ready for chat-template SFT.
|
| 57 |
- **Trust model:** labels are the **intersection** of two independent official sources (NVD + CNA), so single-source errors are excluded by construction.
|
| 58 |
|
| 59 |
+
## What's new in v3
|
| 60 |
+
|
| 61 |
+
This `v3` revision is re-weighted to train models on the cases they actually fail
|
| 62 |
+
(inferring the CWE when the description does not name the weakness), and to evaluate
|
| 63 |
+
them honestly. Changes vs. the previous revision:
|
| 64 |
+
|
| 65 |
+
- **Low-information filter:** bare impact-title descriptions ("`<Product> <Impact>
|
| 66 |
+
Vulnerability`") that name no mechanism are dropped (~1.5% of rows; the CWE is
|
| 67 |
+
not derivable from the text).
|
| 68 |
+
- **Hard-weighted training cap, train split only:** when a common CWE exceeds the
|
| 69 |
+
per-class cap (lowered to **1,500**), the **train** split keeps inference-"hard"
|
| 70 |
+
rows (weakness not named) over easy lexical-match rows. **Validation/test are
|
| 71 |
+
capped without this weighting**, so they keep real-world prevalence — train is
|
| 72 |
+
~20% lexical-easy, val/test ~44%. Evaluate on the stratified easy/hard numbers.
|
| 73 |
+
- **69 reviewed label corrections:** gold labels that two independent models flagged
|
| 74 |
+
and a human confirmed against the MITRE CWE definition (e.g. a CSRF labeled XSS,
|
| 75 |
+
an SSRF labeled "improper encoding") override the computed consensus.
|
| 76 |
+
|
| 77 |
+
Models trained on the previous revision were trained on the un-reweighted data.
|
| 78 |
+
|
| 79 |
## Example row
|
| 80 |
|
| 81 |
```json
|
|
|
|
| 99 |
4. **Filtering:** REJECTED/DISPUTED CVEs, non-English and too-short (<40 char) descriptions are dropped; pseudo-labels (`NVD-CWE-noinfo`/`-Other`) are excluded.
|
| 100 |
5. **De-duplication:** near-duplicate descriptions (MinHash, Jaccard ≥ 0.7) are grouped into families, and **whole families stay within a single split**, so near-identical text cannot leak across train/validation/test (verified: 0 shared descriptions across splits).
|
| 101 |
6. **Split:** dedup-family-aware, ~80/10/10.
|
|
|
|
| 102 |
|
| 103 |
## Provenance (reproducibility)
|
| 104 |
|
|
|
|
| 110 |
|
| 111 |
## Statistics
|
| 112 |
|
| 113 |
+
- **Keep rate:** 115,636 of 354,163 scanned CVEs reach consensus (~33%); after the low-information filter, the rarest-CWE floor, and hard-weighted capping, **71,640** rows are exported. Most drops are "no consensus" (sources disagreed, or only one assigned a CWE).
|
| 114 |
+
- **Easy/hard composition (v3):** the weakness is lexically named in ~**20%** of train rows (hard-weighted) vs ~**44%** of validation/test (natural prevalence).
|
| 115 |
- **Recency skew:** consensus concentrates on **2023+** CVEs, because that is when CNAs began reliably populating CWE — this is the main coverage bias.
|
| 116 |
- **Label space:** 127 distinct View-1003 CWEs appear in the consensus set; a minimum-examples floor (50) prunes the rarest, leaving ~117 effective labels. The distribution is long-tailed (CWE-79 most common).
|
| 117 |
- **Cardinality:** most examples carry a single label; ~14% carry two or more.
|