|
Download README.md from LLMs4CodeSecurity/DR_Evaluation: direct link, hf CLI and curl.
- Browser
- Download file 4.91 kB
-
https://huggingface.co/datasets/LLMs4CodeSecurity/DR_Evaluation/resolve/refs%2Fpr%2F1/README.md
- Command line
-
hf download hf://datasets/LLMs4CodeSecurity/DR_Evaluation@refs/pr/1/README.md
-
curl -L -o README.md https://huggingface.co/datasets/LLMs4CodeSecurity/DR_Evaluation/resolve/refs%2Fpr%2F1/README.md
4.91 kB
| license: mit | |
| task_categories: | |
| - text-classification | |
| tags: | |
| - code | |
| - cybersecurity | |
| - vulnerability-detection | |
| - robustness | |
| - c | |
| - java | |
| pretty_name: DR Evaluation Noise Pools | |
| size_categories: | |
| - 10K<n<100K | |
| # DR Evaluation Noise Pools | |
| This dataset contains the retained behavior-preserving code variants and | |
| realized-distance metadata used to evaluate the robustness of LLM-based | |
| vulnerability analyzers. The corresponding evaluation and Acc-based DR/SIR | |
| implementation is available in the | |
| [TOSEM artifact repository](https://github.com/Jackline97/TOSEM-artifact). | |
| ## Files | |
| | File | Description | | |
| |---|---| | |
| | `noise_pools_all.zip` | Combined Juliet, PrimeVul, and MegaVul perturbation pools | | |
| Archive properties: | |
| - compressed size: 494,118,658 bytes (471.23 MiB); | |
| - uncompressed size: 7,188,405,146 bytes (approximately 6.69 GiB); | |
| - JSON pool files: 22,293; | |
| - SHA-256: `2EFC57199F3E497D48772FB322D97EA7F1393BC8C1D24EB00D2E1D224F6ED824`. | |
| ## Evaluation Scope | |
| The reported evaluation uses five dataset-language subsets: | |
| | Dataset | Language | Paired base files | | |
| |---|---:|---:| | |
| | Juliet | Java | 244 | | |
| | Juliet | C | 363 | | |
| | PrimeVul | C | 196 | | |
| | MegaVul | Java | 335 | | |
| | MegaVul | C | 335 | | |
| Only these dataset-language combinations are part of the reported benchmark. | |
| The archive is preserved byte-for-byte for reproducibility; consumers should | |
| use the combinations above when reproducing the evaluation. | |
| ## Perturbation Families | |
| | Directory | Family | Target levels | | |
| |---|---|---| | |
| | `comment_noise` | Contradiction Comments (CC) | 0.2, 0.4, 0.6, 0.8 | | |
| | `prompt_inject_noise` | Prompt-Injection Comments (PI) | 0.2, 0.4, 0.6, 0.8 | | |
| | `variable_noise` | Variable Replacement (VR) | 0.2, 0.4, 0.6, 0.8 | | |
| | `structure_noise_checked` | Structure Perturbation (SP) | 0.03, 0.10, 0.17, 0.24 | | |
| After extraction, the top-level layout is: | |
| ```text | |
| noise_pools_juliet/ | |
| noise_pools_megavul/ | |
| noise_pools_primevul/ | |
| ``` | |
| Within each root, records are organized as: | |
| ```text | |
| <edit_family>/<language>/noise_<target_level>/<base_record>.json | |
| ``` | |
| ## JSON Record Structure | |
| Each JSON pool record contains: | |
| - `cleaned_code`: normalized base source code; | |
| - `formatted_code`: formatted source representation; | |
| - `cwe_id`: associated CWE identifier; | |
| - one function-specific key containing retained `Combo_*` variants. | |
| Each retained variant contains the edited code in `code_comment_variant`, safe | |
| and vulnerable harnesses in `harness_command_good` and | |
| `harness_command_bad`, and a `meta_info` object. In `meta_info`, `score` is the | |
| realized normalized perturbation distance consumed by the DR estimator. | |
| Comment-based families also retain `code_comment_org` where applicable. | |
| ## Download and Extract | |
| Download with `huggingface_hub`: | |
| ```python | |
| from huggingface_hub import hf_hub_download | |
| archive = hf_hub_download( | |
| repo_id="LLMs4CodeSecurity/DR_Evaluation", | |
| filename="noise_pools_all.zip", | |
| repo_type="dataset", | |
| ) | |
| print(archive) | |
| ``` | |
| Extract with Python: | |
| ```python | |
| from pathlib import Path | |
| from zipfile import ZipFile | |
| archive = Path("noise_pools_all.zip") | |
| with ZipFile(archive) as bundle: | |
| bundle.extractall(archive.parent) | |
| ``` | |
| PowerShell: | |
| ```powershell | |
| Expand-Archive -Path .\noise_pools_all.zip -DestinationPath . -Force | |
| ``` | |
| Bash: | |
| ```bash | |
| unzip noise_pools_all.zip | |
| ``` | |
| ## Evaluation Code | |
| Clone the companion code repository: | |
| ```bash | |
| git clone https://github.com/Jackline97/TOSEM-artifact.git | |
| cd TOSEM-artifact | |
| python -m pip install -r requirements.txt | |
| ``` | |
| For example, after placing and extracting the archive in the repository root: | |
| ```bash | |
| python evaluation_batch.py \ | |
| --dataset juliet \ | |
| --language java \ | |
| --noise-base noise_pools_juliet \ | |
| --noise-type comment_noise \ | |
| --models deepseek-chat \ | |
| --noise-scales 0.2,0.4,0.6,0.8 \ | |
| --max-combo 20 \ | |
| --num-runs 1 \ | |
| --out-base eval_res | |
| ``` | |
| See the [artifact README](https://github.com/Jackline97/TOSEM-artifact#readme) | |
| for model configuration, Ollama usage, output semantics, and DR/SIR commands. | |
| ## Intended Use and Limitations | |
| The package is intended for research on vulnerability analysis, robustness, | |
| and behavior-preserving code transformations. It contains vulnerable code and | |
| should not be deployed as production software. The package provides retained | |
| inputs and transformation metadata; model inference outputs are generated by | |
| the companion evaluation code. | |
| The source samples originate from Juliet, PrimeVul, and MegaVul. Users remain | |
| responsible for following the applicable terms of the upstream datasets and | |
| projects represented in those corpora. | |
| ## Citation | |
| ```bibtex | |
| @misc{dr_evaluation_artifact_2026, | |
| author = {{LLMs4CodeSecurity}}, | |
| title = {DR Evaluation Noise Pools}, | |
| year = {2026}, | |
| howpublished = {\url{https://huggingface.co/datasets/LLMs4CodeSecurity/DR_Evaluation}}, | |
| note = {Evaluation code: \url{https://github.com/Jackline97/TOSEM-artifact}} | |
| } | |
| ``` | |