comp agent
commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,71 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CompRealVul_LLVM Dataset
|
| 2 |
+
|
| 3 |
+
[](https://huggingface.co/datasets/compAgent/CompRealVul_LLVM)
|
| 4 |
+
|
| 5 |
+
## Dataset Summary
|
| 6 |
+
|
| 7 |
+
**CompRealVul_LLVM** is the LLVM IR (Intermediate Representation) version of the [CompRealVul](https://huggingface.co/datasets/compAgent/CompRealVul) 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.
|
| 8 |
+
|
| 9 |
+
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.
|
| 10 |
+
|
| 11 |
+
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.
|
| 12 |
+
|
| 13 |
+
## Key Features
|
| 14 |
+
|
| 15 |
+
- ✅ **LLVM IR representation** of each function (field: `llvm_ir_function`)
|
| 16 |
+
- ✅ Includes **train**, **validation**, and **test** splits
|
| 17 |
+
- ✅ Vulnerability labels (`label`) for supervised learning
|
| 18 |
+
- ✅ Metadata about original source (`dataset`, `file`, `fun_name`)
|
| 19 |
+
- ✅ Structured as **Parquet** files for fast loading and processing
|
| 20 |
+
|
| 21 |
+
## Dataset Structure
|
| 22 |
+
|
| 23 |
+
Each record contains:
|
| 24 |
+
|
| 25 |
+
- `dataset`: Original dataset source of the function (e.g., Juliet, NVD)
|
| 26 |
+
- `file`: File path of the source from which the function was extracted
|
| 27 |
+
- `fun_name`: Name of the function in the source code
|
| 28 |
+
- `llvm_ir_function`: LLVM IR string representing the function
|
| 29 |
+
- `label`: Binary label indicating vulnerability (`1` for vulnerable, `0` for non-vulnerable)
|
| 30 |
+
- `split`: Dataset split (`train`, `validation`, `test`)
|
| 31 |
+
|
| 32 |
+
## Format
|
| 33 |
+
|
| 34 |
+
This dataset is provided in [Apache Parquet](https://parquet.apache.org/) format under the `default` configuration. It follows the [Croissant schema](https://mlcommons.org/croissant/) and includes three predefined splits.
|
| 35 |
+
|
| 36 |
+
## Usage
|
| 37 |
+
|
| 38 |
+
You can load and explore the dataset using the 🤗 `datasets` library:
|
| 39 |
+
|
| 40 |
+
```python
|
| 41 |
+
from datasets import load_dataset
|
| 42 |
+
|
| 43 |
+
# Load a specific split
|
| 44 |
+
train_ds = load_dataset("compAgent/CompRealVul_LLVM", split="train")
|
| 45 |
+
print(train_ds[0])
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
## Example
|
| 49 |
+
```json
|
| 50 |
+
{
|
| 51 |
+
"dataset": "Juliet",
|
| 52 |
+
"file": "CWE121/s01.c",
|
| 53 |
+
"fun_name": "bad_function",
|
| 54 |
+
"llvm_ir_function": "define dso_local i32 @bad_function() #0 { ... }",
|
| 55 |
+
"label": "1",
|
| 56 |
+
"split": "train"
|
| 57 |
+
}
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
## License
|
| 61 |
+
This dataset is released under the Apache 2.0 License.
|
| 62 |
+
|
| 63 |
+
## Citation
|
| 64 |
+
```cite
|
| 65 |
+
@misc{comprealvul_llvm,
|
| 66 |
+
author = {comp agent},
|
| 67 |
+
title = {CompRealVul_LLVM: A Dataset of Vulnerable and Non-Vulnerable Functions in LLVM IR},
|
| 68 |
+
howpublished = {\url{https://huggingface.co/datasets/compAgent/CompRealVul_LLVM}},
|
| 69 |
+
year = {2025}
|
| 70 |
+
}
|
| 71 |
+
```
|