Improving Smart Contract Security with Contrastive Learning-based Vulnerability Detection

Improving Smart Contract Security with Contrastive Learning-based Vulnerability Detection

April 14-20, 2024 | Yizhou Chen, Zeyu Sun, Zhihao Gong, Dan Hao
This paper proposes a novel approach called Clear for improving smart contract vulnerability detection (SCVD) using contrastive learning. Smart contracts are increasingly used in blockchain systems, but their vulnerabilities pose significant security risks. Existing methods rely on deep learning to detect vulnerabilities but fail to consider the correlations between contracts, leading to suboptimal performance. Clear addresses this by introducing contrastive learning to capture fine-grained correlation information among contracts and generates correlation labels to guide the training process. The method combines correlation and semantic information to detect SCVs. The approach is evaluated on a large-scale dataset of over 40,000 smart contracts and compared with 13 state-of-the-art methods. The results show that Clear outperforms all baseline methods, achieving a 9.73%-39.99% higher F1-score than existing deep learning methods. Clear also demonstrates significant improvements in precision, recall, and F1-score compared to the best-performing method DMT. The method is effective in detecting three types of SCVs: reentrancy, timestamp dependency, and integer overflow/underflow. The results indicate that incorporating contract correlation information significantly enhances the performance of SCVD. The proposed method is also effective in improving the performance of traditional deep learning models such as RNN, LSTM, and GRU. The study highlights the importance of contract correlation in SCVD and demonstrates the effectiveness of the proposed approach in detecting vulnerabilities. The paper also discusses related work in SCVD and contrastive learning, and addresses potential threats to the validity of the study. The findings suggest that the proposed Clear model is a promising approach for improving SCVD.This paper proposes a novel approach called Clear for improving smart contract vulnerability detection (SCVD) using contrastive learning. Smart contracts are increasingly used in blockchain systems, but their vulnerabilities pose significant security risks. Existing methods rely on deep learning to detect vulnerabilities but fail to consider the correlations between contracts, leading to suboptimal performance. Clear addresses this by introducing contrastive learning to capture fine-grained correlation information among contracts and generates correlation labels to guide the training process. The method combines correlation and semantic information to detect SCVs. The approach is evaluated on a large-scale dataset of over 40,000 smart contracts and compared with 13 state-of-the-art methods. The results show that Clear outperforms all baseline methods, achieving a 9.73%-39.99% higher F1-score than existing deep learning methods. Clear also demonstrates significant improvements in precision, recall, and F1-score compared to the best-performing method DMT. The method is effective in detecting three types of SCVs: reentrancy, timestamp dependency, and integer overflow/underflow. The results indicate that incorporating contract correlation information significantly enhances the performance of SCVD. The proposed method is also effective in improving the performance of traditional deep learning models such as RNN, LSTM, and GRU. The study highlights the importance of contract correlation in SCVD and demonstrates the effectiveness of the proposed approach in detecting vulnerabilities. The paper also discusses related work in SCVD and contrastive learning, and addresses potential threats to the validity of the study. The findings suggest that the proposed Clear model is a promising approach for improving SCVD.
Reach us at info@study.space
[slides] Improving Smart Contract Security with Contrastive Learning-Based Vulnerability Detection | StudySpace