Exploit Intel commited on
Commit
fdc8056
·
verified ·
1 Parent(s): 6566156

Fix card: capped/balanced build (69,386 rows), accurate stats

Browse files
Files changed (1) hide show
  1. README.md +4 -2
README.md CHANGED
@@ -52,7 +52,7 @@ 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
- - **116,793 examples** — train 91,862 / validation 13,705 / test 11,226.
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
 
@@ -79,6 +79,7 @@ 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
 
83
  ## Provenance (reproducibility)
84
 
@@ -90,7 +91,8 @@ Multi-label targets are comma-separated and numerically sorted, e.g. `"CWE-79, C
90
 
91
  ## Statistics
92
 
93
- - **Keep rate:** 116,793 of 354,163 scanned CVEs (~33%); most drops are "no consensus" (sources disagreed, or only one assigned a CWE).
 
94
  - **Recency skew:** consensus concentrates on **2023+** CVEs, because that is when CNAs began reliably populating CWE — this is the main coverage bias.
95
  - **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).
96
  - **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
+ - **69,386 examples** (capped/balanced build) — train 55,810 / validation 6,774 / test 6,802.
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
 
 
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
 
92
  ## Statistics
93
 
94
+ - **Consensus keep rate:** 116,793 of 354,163 scanned CVEs reach consensus (~33%); most drops are "no consensus" (sources disagreed, or only one assigned a CWE).
95
+ - **Balanced/capped build:** majority CWEs are then capped at **2,500 examples** each, reducing the 116,793 consensus rows to the **69,386 published rows** (train 55,810 / val 6,774 / test 6,802). This drops the top-10 label share from ~55% to **~31.5%**; all 117 labels appear in every split. The pre-cap natural distribution remains in this repo's git history (and is reproducible with `max_examples_per_cwe: null`).
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.