Datasets:
Tasks:
Text Classification
Formats:
parquet
Size:
10K - 100K
Tags:
vulnerability-detection
software-security
code-property-graph
retrieval-augmented-generation
cwe
License:
Add DELTA dataset card
Browse files
README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-classification
|
| 5 |
+
tags:
|
| 6 |
+
- vulnerability-detection
|
| 7 |
+
- software-security
|
| 8 |
+
- code-property-graph
|
| 9 |
+
- retrieval-augmented-generation
|
| 10 |
+
- cwe
|
| 11 |
+
configs:
|
| 12 |
+
- config_name: primevul
|
| 13 |
+
data_files:
|
| 14 |
+
- split: train
|
| 15 |
+
path: primevul/train.parquet
|
| 16 |
+
- split: val
|
| 17 |
+
path: primevul/val.parquet
|
| 18 |
+
- split: test
|
| 19 |
+
path: primevul/test.parquet
|
| 20 |
+
- config_name: megavul
|
| 21 |
+
data_files:
|
| 22 |
+
- split: train
|
| 23 |
+
path: megavul/train.parquet
|
| 24 |
+
- split: val
|
| 25 |
+
path: megavul/val.parquet
|
| 26 |
+
- split: test
|
| 27 |
+
path: megavul/test.parquet
|
| 28 |
+
- config_name: crossvul
|
| 29 |
+
data_files:
|
| 30 |
+
- split: train
|
| 31 |
+
path: crossvul/train.parquet
|
| 32 |
+
- split: val
|
| 33 |
+
path: crossvul/val.parquet
|
| 34 |
+
- split: test
|
| 35 |
+
path: crossvul/test.parquet
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
# DELTA vulnerability datasets
|
| 39 |
+
|
| 40 |
+
This repository contains the three benchmark splits used by **DELTA:
|
| 41 |
+
Differential Evidence for LLM Taxonomy-Aware Software Vulnerability
|
| 42 |
+
Detection**.
|
| 43 |
+
|
| 44 |
+
## Configurations
|
| 45 |
+
|
| 46 |
+
| config | task | training knowledge base | validation/test |
|
| 47 |
+
|---|---|---|---|
|
| 48 |
+
| `primevul` | single-language | C/C++ | C/C++ |
|
| 49 |
+
| `megavul` | cross-language | C/C++ | Java |
|
| 50 |
+
| `crossvul` | multi-language transfer | C, Go, Java, PHP, TypeScript | C++, C#, JavaScript, Python, Ruby, Rust, Scala |
|
| 51 |
+
|
| 52 |
+
Each config has `train`, `val` and `test` splits. The training split is the
|
| 53 |
+
knowledge-base construction set. In DELTA, each pair contributes two
|
| 54 |
+
classification items during evaluation: the vulnerable version (label `1`) and
|
| 55 |
+
the fixed version (label `0`).
|
| 56 |
+
|
| 57 |
+
## Loading
|
| 58 |
+
|
| 59 |
+
```python
|
| 60 |
+
from datasets import load_dataset
|
| 61 |
+
|
| 62 |
+
primevul = load_dataset("codemetic/DELTA", "primevul", split="train")
|
| 63 |
+
megavul_java = load_dataset("codemetic/DELTA", "megavul", split="test")
|
| 64 |
+
crossvul = load_dataset("codemetic/DELTA", "crossvul", split="val")
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
Or use the DELTA code directly:
|
| 68 |
+
|
| 69 |
+
```bash
|
| 70 |
+
python -m delta.cli run --config configs/primevul.yaml --run-id primevul-full
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
The loader pulls the data from this repository by default (`data.source: hf`).
|
| 74 |
+
|
| 75 |
+
## Columns
|
| 76 |
+
|
| 77 |
+
The parquet files preserve the original benchmark columns, including:
|
| 78 |
+
|
| 79 |
+
- `vul_code`, `fixed_code`
|
| 80 |
+
- `cwe` or `cwe_id`, and `cwe_description` where available
|
| 81 |
+
- `language` for CrossVul
|
| 82 |
+
- project/CVE metadata for PrimeVul and MegaVul
|
| 83 |
+
|
| 84 |
+
## Citation
|
| 85 |
+
|
| 86 |
+
Please cite the DELTA paper. See the project repository for the full author list
|
| 87 |
+
and bibliography.
|
| 88 |
+
|
| 89 |
+
## Notes
|
| 90 |
+
|
| 91 |
+
These datasets are redistributed for research convenience. Please also follow
|
| 92 |
+
the terms of the original PrimeVul, MegaVul and CrossVul releases.
|