FormAI Dataset
收藏资源简介:
FormAI是一个新型的人工智能生成数据集,包含112,000个可编译且独立的C程序。所有程序均由GPT-3.5-turbo使用动态零样本提示技术生成,涵盖了不同复杂度的程序,从简单的字符串操作到复杂的网络管理、桌面游戏或加密任务。每个程序都根据使用基于ESBMC的正式验证方法识别的代码中的漏洞进行标记,确保无误报和误检。这些标记的样本可用于训练大型语言模型,因为它们精确地指出了软件漏洞的位置。
FormAI is a novel artificial intelligence-generated dataset comprising 112,000 compilable and independent C programs. All programs are generated by GPT-3.5-turbo using dynamic zero-shot prompting techniques, encompassing a range of complexities from simple string manipulations to intricate network management, desktop games, or cryptographic tasks. Each program is labeled based on vulnerabilities identified in the code using a formal verification method based on ESBMC, ensuring no false positives or false negatives. These labeled samples can be utilized to train large language models as they precisely indicate the locations of software vulnerabilities.
FormAI Dataset Summary
Dataset Overview
FormAI Dataset is a collection of AI-generated compilable and independent C programs with vulnerability classification. It includes two versions:
- FormAI-v1: Contains 112,000 compilable C programs generated by GPT-3.5-turbo.
- FormAI-v2: Recently released with 265,000 compilable C programs generated using various Large Language Models (LLMs) including Googles GEMINI-pro, OpenAIs GPT-4, TIIs 180 billion-parameter Falcon, CodeLLama2, and other compact models.
Dataset Features
- Generation Technique: Utilizes dynamic zero-shot prompting.
- Program Complexity: Varies from simple tasks like string manipulation to complex tasks such as network management, table games, or encryption.
- Vulnerability Labelling: Each program is labelled based on vulnerabilities using a formal verification method based on the Efficient SMT-based Bounded Model Checker (ESBMC).
- Use Cases: Suitable for machine learning training, testing vulnerability detection software, and other tasks requiring a substantial collection of C files.
Dataset Structure
FormAI-v1
- File Format: CSV.
- Compilation: 109,757 samples can be compiled using gcc -lm, while the remaining 3% require additional dependencies.
FormAI-v2
- File Format: JSON.
- Additional Metrics: Includes cyclomatic complexity for understanding code complexities.
- Dataset Files:
- FormAI-v2-DATASET.7z: Contains all 265,000 C files.
- FormAI-v2-classification.7z.001 and FormAI-v2-classification.7z.002: Contain FormAI-v2.json with vulnerability classification and C code.
Citation Information
FormAI-v1
- Paper: Presented at the 19th International Conference on Predictive Models and Data Analytics in Software Engineering (PROMISE 2023).
- Citation: https://dl.acm.org/doi/10.1145/3617555.3617874
FormAI-v2
- Paper: Recently released.
- Citation: https://arxiv.org/abs/2404.18353
Usage Guidelines
FormAI-v2
- Installation: Requires Ubuntu LTS version 22.04.03, Linux kernel version 5.19.0, and gcc 11.4.0.
- Compilation Verification: Can be tested by compiling a subset of files.
- ESBMC Usage: Used for verifying vulnerabilities; a pre-compiled binary is available.
FormAI-v1
- Installation: Similar to FormAI-v2 but with different dataset file names and versions of ESBMC.
Disclaimer
- Security Warning: Some compiled codes may have capabilities to connect to the web, scan local networks, or delete files. Users are advised to check source code before running.




