CCompote's picture
Update README.md
10cf0ef verified
---
license: gpl-3.0
---
# Juliet-train-split-test-on-BinRealVul
[![Hugging Face](https://img.shields.io/badge/🤗%20View%20on-HuggingFace-blue)](https://huggingface.co/datasets/CCompote/Juliet-train-split-test-on-BinRealVul)
## Dataset Summary
**Juliet-train-split-test-on-BinRealVul** is a curated subset of the Juliet Test Suite (as organized in the [GitHub repository](https://github.com/arichardson/juliet-test-suite-c)), compiled and lifted to **LLVM Intermediate Representation (IR)** after pre-process phase. This dataset is designed specifically for **training binary vulnerability detection models** in a setting that ensures a **fair comparison** with models trained on [CompRealVul_LLVM](https://huggingface.co/datasets/compAgent/CompRealVul_LLVM).
The split was constructed to **match the CompRealVul_LLVM train split** in both **function count** and **vulnerability distribution**, enabling direct performance benchmarking between models trained on **Juliet-derived functions** and those trained on **real-world vulnerable code**.
## Purpose
This dataset supports the evaluation framework introduced in our paper. It enables testing the **generalization ability** of models across different code distributions:
- ✅ Train on **Juliet-train-split-test-on-BinRealVul**
- ✅ Test on **CompRealVul_LLVM** test split
- 🔁 Compare results with models trained on CompRealVul_LLVM's train split
## Key Features
- ✅ Based on the **Juliet Test Suite**(as organized in the [GitHub repository](https://github.com/arichardson/juliet-test-suite-c)), compiled to binary and lifted to **LLVM IR**
- ✅ Matches **size and class balance** of CompRealVul_LLVM train split
- ✅ Field `llvm_ir_function` contains pre-processed function in LLVM-IR form
- ✅ Includes binary **vulnerability labels** (`label`)
- ✅ Suitable for **cross-dataset generalization experiments**
## Dataset Structure
Each record includes:
- `dataset`: `"Juliet"`
- `file`: Original source file from Juliet suite
- `fun_name`: Function name in C source
- `llvm_ir_function`: LLVM IR code for the function
- `label`: `"1"` for vulnerable, `"0"` for non-vulnerable
- `split`: `"train"` (single split in this dataset)
## Format
The dataset is stored in [Apache Parquet](https://parquet.apache.org/) format and follows the [Croissant schema](https://mlcommons.org/croissant/). Only a `train` split is included.
## Usage
You can load the dataset using Hugging Face 🤗 `datasets`:
```python
from datasets import load_dataset
ds = load_dataset("compAgent/Juliet-train-split-test-on-BinRealVul", split="train")
print(ds[0])
```
## Example
```json
{
"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}
}
```