|
|
--- |
|
|
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} |
|
|
} |
|
|
``` |