DELTA / README.md
codemetic's picture
Add DELTA dataset card
6cb528f verified
|
Raw History Blame Contribute Delete
2.47 kB
metadata
license: other
task_categories:
  - text-classification
tags:
  - vulnerability-detection
  - software-security
  - code-property-graph
  - retrieval-augmented-generation
  - cwe
configs:
  - config_name: primevul
    data_files:
      - split: train
        path: primevul/train.parquet
      - split: val
        path: primevul/val.parquet
      - split: test
        path: primevul/test.parquet
  - config_name: megavul
    data_files:
      - split: train
        path: megavul/train.parquet
      - split: val
        path: megavul/val.parquet
      - split: test
        path: megavul/test.parquet
  - config_name: crossvul
    data_files:
      - split: train
        path: crossvul/train.parquet
      - split: val
        path: crossvul/val.parquet
      - split: test
        path: crossvul/test.parquet

DELTA vulnerability datasets

This repository contains the three benchmark splits used by DELTA: Differential Evidence for LLM Taxonomy-Aware Software Vulnerability Detection.

Configurations

config task training knowledge base validation/test
primevul single-language C/C++ C/C++
megavul cross-language C/C++ Java
crossvul multi-language transfer C, Go, Java, PHP, TypeScript C++, C#, JavaScript, Python, Ruby, Rust, Scala

Each config has train, val and test splits. The training split is the knowledge-base construction set. In DELTA, each pair contributes two classification items during evaluation: the vulnerable version (label 1) and the fixed version (label 0).

Loading

from datasets import load_dataset

primevul = load_dataset("codemetic/DELTA", "primevul", split="train")
megavul_java = load_dataset("codemetic/DELTA", "megavul", split="test")
crossvul = load_dataset("codemetic/DELTA", "crossvul", split="val")

Or use the DELTA code directly:

python -m delta.cli run --config configs/primevul.yaml --run-id primevul-full

The loader pulls the data from this repository by default (data.source: hf).

Columns

The parquet files preserve the original benchmark columns, including:

  • vul_code, fixed_code
  • cwe or cwe_id, and cwe_description where available
  • language for CrossVul
  • project/CVE metadata for PrimeVul and MegaVul

Citation

Please cite the DELTA paper. See the project repository for the full author list and bibliography.

Notes

These datasets are redistributed for research convenience. Please also follow the terms of the original PrimeVul, MegaVul and CrossVul releases.