Skip to content

chenpp1881/Clear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clear : Contrastive Learning Enhanced Automated Recognition approach for SCVs

This repo is a paper of python implementation : Contrastive Learning Enhanced Automated Recognition approach for SCVs

Framework

The overview of GPANet

The overview of our proposed method Clear is illustrated in the Figure, which consists of three modules: 1) Data Sampling, 2) Contrastive Learning, and 3) Vulnerability Detection.

Required Packages

  • python 3+
  • transformers 4.26.1
  • pandas 1.5.3
  • pytorch 1.13.1

Datasets

We use the same dataset as Qian et al., 2023. And we conduct experiments to assess reentrancy, timestamp dependence, and integer overflow/underflow vulnerabilities on the dataset.

Further instructions on the dataset can be found on Smart-Contract-Dataset, which is constantly being updated to provide more details.

Running

To run program, please use this command: python run.py.

Also all the hyper-parameters can be found in run.py.

Examples:

python run.py --dataset RE --epoch_clip 100 --mlmloss 0.1 --epoch_cla 20 --max_length 1024

Citation

If you want to cite any information about Clear. Please refer to:

@inproceedings{chen2024improving,
title={Improving Smart Contract Security with Contrastive Learning-based Vulnerability Detection},
author={Chen, Yizhou and Sun, Zeyu and Gong, Zhihao and Hao, Dan},
booktitle={2024 IEEE/ACM 46th International Conference on Software Engineering (ICSE)},
pages={940--940},
year={2024},
organization={IEEE Computer Society}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages