智能合约异常检测:对比学习范式

IF 4.4 2区 计算机科学 Q1 COMPUTER SCIENCE, HARDWARE & ARCHITECTURE
Oumaima Fadi , Adil Bahaj , Karim Zkik , Abdellatif El Ghazi , Mounir Ghogho , Mohammed Boulmalf
{"title":"智能合约异常检测:对比学习范式","authors":"Oumaima Fadi ,&nbsp;Adil Bahaj ,&nbsp;Karim Zkik ,&nbsp;Abdellatif El Ghazi ,&nbsp;Mounir Ghogho ,&nbsp;Mohammed Boulmalf","doi":"10.1016/j.comnet.2025.111121","DOIUrl":null,"url":null,"abstract":"<div><div>Smart contracts are digital agreements automating the execution of transactions in a decentralized manner. Although they offer many advantages, smart contracts are prone to multiple security vulnerabilities that might cause severe financial losses. Traditional anomaly detection methods, including Machine Learning and Deep Learning, struggle to capture the complexity of smart contract features. Recent advancements have utilized graph neural networks (GNNs) by transforming smart contracts into graphs. However, these approaches face robustness challenges due to small data sizes and model overparameterization. To address these issues, this paper proposes <strong>ACAD</strong> (<strong>A</strong>daptive <strong>C</strong>ontrastive Learning for Smart Contract <strong>A</strong>ttack <strong>D</strong>etection), a novel framework employing a two-phase training process for smart contract classification. After converting smart contract codes to representative graphs, the task-agnostic features are learned using graph contrastive learning with adaptive augmentations. Next, these features are utilized for smart contract vulnerability classification in a downstream task. Unlike previous works, which rely on a single-phase GNN-based approach, ACAD leverages contrastive learning to improve robustness and generalization. This approach effectively overcomes data scarcity while capturing richer and more distinctive representations. Extensive experiments demonstrate that ACAD outperforms baseline models, achieving 95.7% accuracy and 92.44% precision in reentrancy attack detection, which represents an improvement of 5.78% in accuracy and 6.19% in precision compared to the best-performing baseline model.</div></div>","PeriodicalId":50637,"journal":{"name":"Computer Networks","volume":"260 ","pages":"Article 111121"},"PeriodicalIF":4.4000,"publicationDate":"2025-02-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Smart contract anomaly detection: The Contrastive Learning Paradigm\",\"authors\":\"Oumaima Fadi ,&nbsp;Adil Bahaj ,&nbsp;Karim Zkik ,&nbsp;Abdellatif El Ghazi ,&nbsp;Mounir Ghogho ,&nbsp;Mohammed Boulmalf\",\"doi\":\"10.1016/j.comnet.2025.111121\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>Smart contracts are digital agreements automating the execution of transactions in a decentralized manner. Although they offer many advantages, smart contracts are prone to multiple security vulnerabilities that might cause severe financial losses. Traditional anomaly detection methods, including Machine Learning and Deep Learning, struggle to capture the complexity of smart contract features. Recent advancements have utilized graph neural networks (GNNs) by transforming smart contracts into graphs. However, these approaches face robustness challenges due to small data sizes and model overparameterization. To address these issues, this paper proposes <strong>ACAD</strong> (<strong>A</strong>daptive <strong>C</strong>ontrastive Learning for Smart Contract <strong>A</strong>ttack <strong>D</strong>etection), a novel framework employing a two-phase training process for smart contract classification. After converting smart contract codes to representative graphs, the task-agnostic features are learned using graph contrastive learning with adaptive augmentations. Next, these features are utilized for smart contract vulnerability classification in a downstream task. Unlike previous works, which rely on a single-phase GNN-based approach, ACAD leverages contrastive learning to improve robustness and generalization. This approach effectively overcomes data scarcity while capturing richer and more distinctive representations. Extensive experiments demonstrate that ACAD outperforms baseline models, achieving 95.7% accuracy and 92.44% precision in reentrancy attack detection, which represents an improvement of 5.78% in accuracy and 6.19% in precision compared to the best-performing baseline model.</div></div>\",\"PeriodicalId\":50637,\"journal\":{\"name\":\"Computer Networks\",\"volume\":\"260 \",\"pages\":\"Article 111121\"},\"PeriodicalIF\":4.4000,\"publicationDate\":\"2025-02-15\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Computer Networks\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S1389128625000891\",\"RegionNum\":2,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, HARDWARE & ARCHITECTURE\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Networks","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S1389128625000891","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, HARDWARE & ARCHITECTURE","Score":null,"Total":0}
引用次数: 0

摘要

本文章由计算机程序翻译,如有差异,请以英文原文为准。
Smart contract anomaly detection: The Contrastive Learning Paradigm
Smart contracts are digital agreements automating the execution of transactions in a decentralized manner. Although they offer many advantages, smart contracts are prone to multiple security vulnerabilities that might cause severe financial losses. Traditional anomaly detection methods, including Machine Learning and Deep Learning, struggle to capture the complexity of smart contract features. Recent advancements have utilized graph neural networks (GNNs) by transforming smart contracts into graphs. However, these approaches face robustness challenges due to small data sizes and model overparameterization. To address these issues, this paper proposes ACAD (Adaptive Contrastive Learning for Smart Contract Attack Detection), a novel framework employing a two-phase training process for smart contract classification. After converting smart contract codes to representative graphs, the task-agnostic features are learned using graph contrastive learning with adaptive augmentations. Next, these features are utilized for smart contract vulnerability classification in a downstream task. Unlike previous works, which rely on a single-phase GNN-based approach, ACAD leverages contrastive learning to improve robustness and generalization. This approach effectively overcomes data scarcity while capturing richer and more distinctive representations. Extensive experiments demonstrate that ACAD outperforms baseline models, achieving 95.7% accuracy and 92.44% precision in reentrancy attack detection, which represents an improvement of 5.78% in accuracy and 6.19% in precision compared to the best-performing baseline model.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
Computer Networks
Computer Networks 工程技术-电信学
CiteScore
10.80
自引率
3.60%
发文量
434
审稿时长
8.6 months
期刊介绍: Computer Networks is an international, archival journal providing a publication vehicle for complete coverage of all topics of interest to those involved in the computer communications networking area. The audience includes researchers, managers and operators of networks as well as designers and implementors. The Editorial Board will consider any material for publication that is of interest to those groups.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信