arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.27734cs.LGcs.AI
收藏

通过对比学习增强的细粒度球训练实现鲁棒的智能合约漏洞检测

Robust Smart Contract Vulnerability Detection via Contrastive Learning-Enhanced Granular-ball Training

Chongqing Key Laboratory of Computational Intelligence(重庆计算智能重点实验室);Key Laboratory of Cyberspace Big Data Intelligent Security, Ministry of Education(教育部网络空间大数据智能安全重点实验室);Key Laboratory of Big Data Intelligent Computing(大数据智能计算重点实验室);Chongqing University of Posts and Telecommunications(重庆邮电大学);School of Cyber Science and Engineering, Huazhong University of Science and Technology(华中科技大学网络空间安全学院);School of Computer Science and Artificial Intelligence, Zhengzhou University(郑州大学计算机与人工智能学院);College of Computer and Information Science, Southwest University(西南大学计算机与信息科学学院)

Zeli Wang, Qingxuan Yang, Shuyin Xia, Yueming Wu, Bo Liu, Longlong Lin

AI总结:

本文提出CGBC方法,通过细粒度球训练和对比学习增强智能合约漏洞检测的鲁棒性,解决标签噪声问题。

摘要:

深度神经网络(DNNs)已成为检测智能合约漏洞的主流方法,但其通常需要大规模标注数据集来建模合约特征与漏洞标签之间的关系。然而,标注过程往往依赖现有开源工具,其准确性无法保证,导致标签噪声对检测准确性和鲁棒性构成重大挑战。为此,本文提出对比学习增强的细粒度球智能合约训练(CGBC),通过在编码器层和分类器层之间引入细粒度球计算层,将相似合约分组为细粒度球(GBs),并生成新的粗粒度表示(即GBs的中心和标签),以基于最正确的样本纠正噪声标签。通过结合GB间紧凑性损失和GB内松散性损失来增强聚类效果。然后,通过无监督对比学习预训练模型,利用我们提出的语义一致的智能合约增强方法提高GB的准确性。最后,通过大量实验表明,所提出的CGBC方法在对比基线方法时显著提高了智能合约漏洞检测的鲁棒性和有效性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑