Robust Smart Contract Vulnerability Detection via Contrastive Learning-Enhanced Granular-ball Training
Not on the map. Why?
Abstract (arXiv)
Deep neural networks (DNNs) have emerged as a prominent approach for detecting smart contract vulnerabilities, driven by the growing contract datasets and advanced deep learning techniques. However, DNNs typically require large-scale labeled datasets to model the relationships between contract features and vulnerability labels. In practice, the labeling process often depends on existing open-sourced tools, whose accuracy cannot be guaranteed. Consequently, label noise poses a significant challenge for the accuracy and robustness of the smart contract, which is rarely explored in the literature. To this end, we propose Contrastive learning-enhanced Granular-Ball smart Contracts training, CGBC, to enhance the robustness of contract vulnerability detection. Specifically, CGBC first introduces a Granular-ball computing layer between the encoder layer and the classifier layer, to group similar contracts into Granular-Balls (GBs) and generate new coarse-grained representations (i.e., the center and the label of GBs) for them, which can correct noisy labels based on the most correct samples. An inter-GB compactness loss and an intra-GB looseness loss are combined to enhance the effectiveness of clustering. Then, to improve the accuracy of GBs, we pretrain the model through unsupervised contrastive learning supported by our novel semantic-consistent smart contract augmentation method. This procedure can discriminate contracts with different labels by dragging the representation of similar contracts closer, assisting CGBC in clustering. Subsequently, we leverage the symmetric cross-entropy loss function to measure the model quality, which can combat the label noise in gradient computations. Finally, extensive experiments show that the proposed CGBC can significantly improve the robustness and effectiveness of the smart contract vulnerability detection when contrasted with baselines.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 22 of its 52 references that are in the map. First posted on arXiv 29 Mar 2026.
Builds on
22 of 52 references.
References · 22
- 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,282
- 2019Symmetric Cross Entropy for Robust Learning with Noisy Labelscited by 499
- 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 142
- 2018SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilitiescited by 91
- 2019Slither: A Static Analysis Framework For Smart Contractscited by 88
- 2018Securify: Practical Security Analysis of Smart Contractscited by 61
- 2021Vulnerability Detection with Fine-grained Interpretationscited by 56
- 2019Empirical Review of Automated Analysis Tools on 47,587 Ethereum Smart Contractscited by 35
- 2021ReGVD: Revisiting Graph Neural Networks for Vulnerability Detectioncited by 32
- 2021Smart Contract Vulnerability Detection: From Pure Neural Network to Interpretable Graph Feature and Expert Pattern Fusioncited by 24
- 2022PiCO+: Contrastive Label Disambiguation for Robust Partial Label Learningcited by 21
- 2020sFuzz: An Efficient Adaptive Fuzzer for Solidity Smart Contractscited by 19
10 more
- 2020eThor: Practical and Provably Sound Static Analysis of Ethereum Smart Contractscited by 11
- 2025SCALM: Detecting Bad Practices in Smart Contracts Through LLMscited by 8
- 2024Improving Smart Contract Security with Contrastive Learning-based Vulnerability Detectioncited by 7
- 2025Smart-LLaMA-DPO: Reinforced Large Language Model for Explainable Smart Contract Vulnerability Detectioncited by 7
- 2023PNT-Edge: Towards Robust Edge Detection with Noisy Labels by Learning Pixel-level Noise Transitionscited by 4
- 2023VulnSense: Efficient Vulnerability Detection in Ethereum Smart Contracts by Multimodal Learning with Graph Neural Network and Language Modelcited by 4
- 2020Ethna: Analyzing the Underlying Peer-to-Peer Network of the Ethereum Blockchaincited by 3
- 2023Usenix'23 Extended Version: Smart Learning to Find Dumb Contractscited by 2
- 2025MTVHunter: Smart Contracts Vulnerability Detection Based on Multi-Teacher Knowledge Translationcited by 2
- 2019EVulHunter: Detecting Fake Transfer Vulnerabilities for EOSIO's Smart Contracts at Webassembly-levelcited by 1
Built on by
Not cited yet.