Model Training Part for Solidity vulnerability Detection based on GPT (torch backen)
Paper "SolGPT: a GPT-Based Static Vulnerability Detection Model for Enhancing Smart Contract Security" has published in ICA3PP 2023.
Author: Shengqiang Zeng, Hongwei Zhang, Jinsong Wang, and Kai Shi.
Online Link SolGPT: a GPT-Based Static Vulnerability Detection Model for Enhancing Smart Contract Security.
Paper Manuscript already upload as "SolGPT.9.17.2023".
- python3
- torch1(https://pytorch.org/get-started/locally/)
- transformers
This repository contains the smart contract dataset of source code and processed code fragment. As to the source code, we crawled the source code of the smart contract from the Ethereum by using the crawler tool. Besides, we have collected some data from some other websites. At the same time, we also designed and wrote some smart contract codes with reentrancy vulnerabilities.
Note: crawler tool is available here.
Original Ethereum smart contracts: Etherscan_contract
The train data after normalization in dataset
.
Training contain two part
- TAPT training
- finetunnng
You can see the instruction in train_tapt.sh and train_finetune.sh to learn how to train this model
- Rechecker for Normalized dataset: https://github.com/Messi-Q/ReChecker
- This Project already stops maintained, this is a branch that I keep maintaining.
- https://github.com/PoilZero/ReChecker
@inproceedings{zeng2023solgpt,
title={SolGPT: A GPT-Based Static Vulnerability Detection Model for Enhancing Smart Contract Security},
author={Zeng, Shengqiang and Zhang, Hongwei and Wang, Jinsong and Shi, Kai},
booktitle={International Conference on Algorithms and Architectures for Parallel Processing},
pages={42--62},
year={2023},
organization={Springer}
}
@inproceedings{zeng2023high,
title={A High-Performance Smart Contract Vulnerability Detection Scheme Based on BERT},
author={Zeng, Shengqiang and Chen, Ruhuang and Zhang, Hongwei and Wang, Jinsong},
booktitle={2023 IEEE 29th International Conference on Parallel and Distributed Systems (ICPADS)},
pages={653--658},
year={2023},
organization={IEEE}
}