Improving Smart Contract Security with Contrastive Learning-based Vulnerability Detection
Not on the map. Why?
Abstract (arXiv)
Currently, smart contract vulnerabilities (SCVs) have emerged as a major factor threatening the transaction security of blockchain. Existing state-of-the-art methods rely on deep learning to mitigate this threat. They treat each input contract as an independent entity and feed it into a deep learning model to learn vulnerability patterns by fitting vulnerability labels. It is a pity that they disregard the correlation between contracts, failing to consider the commonalities between contracts of the same type and the differences among contracts of different types. As a result, the performance of these methods falls short of the desired level. To tackle this problem, we propose a novel Contrastive Learning Enhanced Automated Recognition Approach for Smart Contract Vulnerabilities, named Clear. In particular, Clear employs a contrastive learning (CL) model to capture the fine-grained correlation information among contracts and generates correlation labels based on the relationships between contracts to guide the training process of the CL model. Finally, it combines the correlation and the semantic information of the contract to detect SCVs. Through an empirical evaluation of a large-scale real-world dataset of over 40K smart contracts and compare 13 state-of-the-art baseline methods. We show that Clear achieves (1) optimal performance over all baseline methods; (2) 9.73%-39.99% higher F1-score than existing deep learning methods.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). First posted on arXiv 27 Apr 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 2; 2025: 4; 2026: 1.
7 papers.
- 2024Smart-LLaMA: Two-Stage Post-Training of Large Language Models for Smart Contract Vulnerability Detection and Explanationcited by 8
- 2025SCALM: Detecting Bad Practices in Smart Contracts Through LLMscited by 8
- 2024Vulnerability Detection in Ethereum Smart Contracts via Machine Learning: A Qualitative Analysiscited by 2
- 2025SAEL: Leveraging Large Language Models with Adaptive Mixture-of-Experts for Smart Contract Vulnerability Detectioncited by 2
- 2025AI-Based Vulnerability Analysis of NFT Smart Contractscited by 1
- 2025UEChecker: Detecting Unchecked External Call Vulnerabilities in DApps via Graph Analysiscited by 1
- 2026Robust Smart Contract Vulnerability Detection via Contrastive Learning-Enhanced Granular-ball Trainingcited by 0
- 2026Robust Smart Contract Vulnerability Detection via Contrastive Learning-Enhanced Granular-ball Training29 Mar 2026
- 2025UEChecker: Detecting Unchecked External Call Vulnerabilities in DApps via Graph Analysis2 Aug 2025
- 2025SAEL: Leveraging Large Language Models with Adaptive Mixture-of-Experts for Smart Contract Vulnerability Detection30 Jul 2025
- 2025AI-Based Vulnerability Analysis of NFT Smart Contracts18 Apr 2025
- 2025SCALM: Detecting Bad Practices in Smart Contracts Through LLMs4 Feb 2025
- 2024Smart-LLaMA: Two-Stage Post-Training of Large Language Models for Smart Contract Vulnerability Detection and Explanation9 Nov 2024
- 2024Vulnerability Detection in Ethereum Smart Contracts via Machine Learning: A Qualitative Analysis26 Jul 2024