File size: 3,673 Bytes
55c653c 35c776e 55c653c a1e51c1 830fb52 55c653c 830fb52 55c653c 830fb52 55c653c ec674df 55c653c a1e51c1 830fb52 55c653c ec674df 55c653c 8961890 |
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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
---
license: gpl-3.0
---
# Juliet_LLVM Dataset
[](https://huggingface.co/datasets/compAgent/Juliet_LLVM)
## Dataset Summary
**Juliet_LLVM** is a dataset of **compiled C functions from the Juliet Test Suite** (as organized in the [GitHub repository](https://github.com/arichardson/juliet-test-suite-c)
), translated into **LLVM Intermediate Representation (IR)** after pre-process phase. It is designed for training and evaluating machine learning models on the task of **binary vulnerability detection**. Each function is labeled as either vulnerable or non-vulnerable and is presented in an architecture-agnostic, semantically rich format.
This LLVM version allows models to be trained and tested on realistic, compiler-transformed code — reflecting how such models would be deployed in real-world binary analysis scenarios.
This dataset supports experiments described in our paper and follows the same compilation, splitting, and evaluation procedures.
## Key Features
- ✅ Based on the **Juliet Test Suite**, a standard benchmark for vulnerability detection
- ✅ **LLVM IR representation** of each function (field: `llvm_ir_function`)
- ✅ Predefined **train**, **validation**, and **test** splits
- ✅ **Binary vulnerability labels** (`label`) for classification
- ✅ Includes metadata: original file and function name
- ✅ Efficiently stored as **Parquet** files for fast loading and processing
## Dataset Structure
Each record contains:
- `dataset`: The origin source, always `"Juliet"` for this dataset
- `file`: Source file from the Juliet suite
- `fun_name`: The name of the function
- `llvm_ir_function`: The LLVM IR pre-processed code for the function
- `label`: `"1"` for vulnerable, `"0"` for non-vulnerable
- `split`: One of `"train"`, `"validation"`, or `"test"`
## Split Information
This dataset is split into three subsets:
- `train`: Used for training the models
- `validation`: Used for hyperparameter tuning and model selection
- `test`: Held out for final evaluation and benchmarking
> ✅ These splits match exactly the partitioning used in our **paper experiments**, allowing reproducibility and direct comparison with our reported results. Each split is disjoint and ensures no function-level overlap between sets.
## Format
This dataset is stored in [Apache Parquet](https://parquet.apache.org/) format under the `default` configuration. It adheres to the [Croissant schema](https://mlcommons.org/croissant/) and includes metadata for fields and splits.
## Usage
You can load the dataset using the Hugging Face 🤗 `datasets` library:
```python
from datasets import load_dataset
# Load train split
train_ds = load_dataset("compAgent/Juliet_LLVM", split="train")
print(train_ds[0])
```
```
{
"dataset": "Juliet",
"file": "CWE121/s01.c",
"fun_name": "CWE121_bad",
"llvm_ir_function": "define dso_local void @CWE121_bad() { ... }",
"label": "1",
"split": "train"
}
```
## License
This dataset is released under the GPL-3.0.
## Related Work
[Juliet Test Suite](https://samate.nist.gov/SARD/test-suites) — the original source of these functions.
[Juliet Test Suite GitHub repository](https://github.com/arichardson/juliet-test-suite-c) - the GitHub repository we took the Juliet Test Suite dataset from.
## Citation
```
@misc{juliet_llvm,
author = {Compote},
title = {Juliet_LLVM: A Dataset of Vulnerable and Non-Vulnerable Functions from the Juliet Suite in LLVM IR},
howpublished = {\url{https://huggingface.co/datasets/compAgent/Juliet_LLVM}},
year = {2025}
}
``` |