File size: 3,190 Bytes
8c1e75a 404aa0c b14a40e 404aa0c 7f6c648 404aa0c 7f6c648 404aa0c 693db18 404aa0c 46326cb 404aa0c 47d2809 404aa0c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
---
license: gpl-3.0
---
# CompRealVul_LLVM Dataset
[](https://huggingface.co/datasets/compAgent/CompRealVul_LLVM)
## Dataset Summary
**CompRealVul_LLVM** is the LLVM IR (Intermediate Representation) version of the [CompRealVul_C](https://huggingface.co/datasets/CCompote/CompRealVul_C) dataset. This version is designed specifically for **training and evaluating machine learning models** on the task of **binary vulnerability detection** in a setting that closely mimics how models are used in practice — operating on the compiled representation of code rather than raw source code.
Each function in this dataset was compiled from C code to LLVM IR, enabling robust training of models on semantically rich, architecture-independent binary representations.
This dataset supports research aligned with the methodology described in our paper, where the goal is to predict vulnerabilities directly from **compiled IR representations** rather than from source code.
## Key Features
- ✅ **LLVM IR representation** of each function (field: `llvm_ir_function`)
- ✅ Includes **train**, **validation**, and **test** splits (see below)
- ✅ Vulnerability labels (`label`) for supervised learning
- ✅ Metadata about original source (`dataset`, `file`, `fun_name`)
## Dataset Structure
Each record contains:
- `dataset`: Original dataset source of the function (e.g., Juliet, NVD)
- `file`: File path of the source from which the function was extracted
- `fun_name`: Name of the function in the source code
- `llvm_ir_function`: LLVM IR string representing the function
- `label`: Binary label indicating vulnerability (`1` for vulnerable, `0` for non-vulnerable)
- `split`: Dataset split (`train`, `validation`, `test`)
## Split Information
This dataset is split into **train**, **validation**, and **test** sets, following the exact partitioning strategy used in the experiments described in our paper. The split ensures a fair evaluation of generalization performance by separating functions into disjoint sets with no overlap. This allows researchers to directly reproduce our results or compare against them under consistent conditions.
- `train`: Used to fit model parameters
- `validation`: Used for model selection and hyperparameter tuning
- `test`: Used exclusively for final evaluation and benchmarking
## Usage
You can load and explore the dataset using the 🤗 `datasets` library:
```python
from datasets import load_dataset
# Load a specific split
train_ds = load_dataset("compAgent/CompRealVul_LLVM", split="train")
print(train_ds[0])
## Example
```json
{
"dataset": "CompRealVul",
"file": "app_122.c",
"fun_name": "app",
"llvm_ir_function": "define dso_local i32 @app() #0 { ... }",
"label": "1",
"split": "train"
}
```
## License
This dataset is released under the GPL-3.0.
## Citation
```cite
@misc{comprealvul_llvm,
author = {Compote},
title = {CompRealVul_LLVM: A Dataset of Vulnerable and Non-Vulnerable Functions in LLVM IR},
howpublished = {\url{https://huggingface.co/datasets/compAgent/CompRealVul_LLVM}},
year = {2025}
}
``` |