Triplet Learning for Cross-Version Smart Contract Vulnerability Detection
This repository contains the code implementation and datasets for the paper titled Triplet Learning for Cross-Version Smart Contract Vulnerability Detection. I have used Google Colab to run all the codes, so I encourage to use it in case of reproduction failure!!!
- Python 3
- torch
- transformers
- tensorflow
- keras
- tree_sitter
- scikit-learn
To install the required packages, follow these steps:
- Install the additional packages using pip: !pip install torch !pip install transformers !pip install tensorflow !pip install keras !pip install tree_sitter !pip install scikit-learn
To use this code, follow these steps:
- Clone this repository: git clone https://github.com/chansuixi/Triplet_Detection.git
- Navigate to the repository directory, such as: %cd drive/MyDrive/Triplet-Detection
- Open the provided Colab notebook and run the code cells: !python detect.py