

浏览全部资源
扫码关注微信
北京信息科技大学计算机学院,北京 100192
Received:30 December 2025,
Accepted:06 February 2026,
Published:25 February 2026
移动端阅览
康海燕, 樊瑞洋. 基于大语言模型语义增强的多模态智能合约漏洞检测方法研究[J]. 电子学报, 2026, 54(02): 723-733.
KANG Haiyan, FAN Ruiyang. Multimodal Smart Contract Vulnerability Detection Enhanced by Large Language Model Semantics[J]. Acta Electronica Sinica, 2026, 54(02): 723-733.
康海燕, 樊瑞洋. 基于大语言模型语义增强的多模态智能合约漏洞检测方法研究[J]. 电子学报, 2026, 54(02): 723-733. DOI:10.12263/DZXB.20251000
KANG Haiyan, FAN Ruiyang. Multimodal Smart Contract Vulnerability Detection Enhanced by Large Language Model Semantics[J]. Acta Electronica Sinica, 2026, 54(02): 723-733. DOI:10.12263/DZXB.20251000
近年来,大语言模型(Large Language Models, LLM)的快速发展为智能合约漏洞检测领域带来了新的机遇。为将LLM强大的语言理解能力有效转化为漏洞检测能力,并克服单一模态检测方法的局限性,提出一种基于大语言模型语义增强的多模态智能合约漏洞检测方法(Multimodal Vulnerability detection for smart contracts with LLM enhancement,MVul-L)。该方法融合文本、图结构与视觉三种模态特征,实现了对智能合约语义、结构与上下文信息的深层建模。首先,设计一种用于LLM漏洞检测的任务提示模板,共包含七个关键字段,为LLM提供明确的分析目标、提示策略与输入输出规范,有效减少模型理解偏差。其次,提出一种基于大语言模型和CodeBERT语义增强的文本特征提取方法,LLM通过任务提示模板对合约进行推理解释,生成语义注释的文本输出,将源代码与注释共同输入CodeBERT中,获得合约的文本特征表示。最后,引入图注意力神经网络与卷积神经网络分别对合约结构信息与视觉特征进行建模,并采用基于Transformer的多模态特征融合机制,实现多模态特征间的深度融合。在公开数据集上的实验结果表明,MVul-L较现有方法整体性能更优,在可重入漏洞、时间戳依赖和整数溢出漏洞检测任务中,F1值提升3.51%~9.40%,验证了该方法的有效性。
The rapid advancement of large language models (LLMs) has created new opportunities for smart contract vulnerability detection. To exploit LLMs’ semantic understanding while overcoming single-modal limitations
a multimodal smart contract vulnerability detection method (MVul-L) is proposed. The proposed method integrates textual
structural
and visual modalities for comprehensive modeling of smart contracts. First
a task prompting template for LLM-based vulnerability detection is designed. It contains seven key fields that clearly define analytical objectives
prompting strategies
and input-output specifications
reducing model understanding bias. Second
a semantic-enhanced textual feature extraction method based on LLM reasoning and CodeBERT encoding is developed. The LLM interprets contract logic through the task template and generates semantically annotated textual outputs. Both source code and annotations are fed into CodeBERT to obtain enriched textual representations. Finally
a graph attention network (GAT) and a convolutional neural network (CNN) are employed to model structural and visual features
respectively. A Transformer-based multimodal fusion mechanism is further adopted to achieve deep cross-modal integration. Experimental results on public datasets demonstrate that the overall performance of MVul-L surpasses existing methods. In reentrancy
timestamp dependency
and integer overflow vulnerability detection tasks
the F1 score is improved by 3.51%~9.40%
confirming the effectiveness of the proposed method.
Liu Yang , He Jinlong , Li Xiangyang , et al . An overview of blockchain smart contract execution mechanism [J ] . Journal of Industrial Information Integration , 2024 , 41 : 100674 . DOI: 10.1016/j.jii.2024.100674 http://dx.doi.org/10.1016/j.jii.2024.100674
Kang Haiyan , Wu Bing , Cao Yiran . Research on efficient data processing method for fog computing based on blockchain and federated learning [J ] . Neurocomputing , 2025 , 626 : 129529 . DOI: 10.1016/j.neucom.2025.129529 http://dx.doi.org/10.1016/j.neucom.2025.129529
Wu Guangfu , Wang Haiping , Lai Xin , et al . A comprehensive survey of smart contract security: State of the art and research directions [J ] . Journal of Network and Computer Applications , 2024 , 226 : 103882 . DOI: 10.1016/j.jnca.2024.103882 http://dx.doi.org/10.1016/j.jnca.2024.103882
Vidal F R , Ivaki N , Laranjeiro N . Vulnerability detection techniques for smart contracts: A systematic literature review [J ] . Journal of Systems and Software , 2024 , 217 : 112160 . DOI : 10.1016/j.jss.2024.112160 http://dx.doi.org/10.1016/j.jss.2024.112160
Zheng Zibin , Xie Shaoan , Dai Hongning , et al . An overview on smart contracts: Challenges, advances and platforms [J ] . Future Generation Computer Systems , 2020 , 105 : 475 - 491 . DOI: 10.1016/j.future.2019.12.019 http://dx.doi.org/10.1016/j.future.2019.12.019
Crisostomo J , Bacao F , Lobo V . Machine learning methods for detecting smart contracts vulnerabilities within Ethereum blockchain-A review [J ] . Expert Systems with Applications , 2025 , 268 : 126353 . DOI: 10.1016/j.eswa.2024.126353 http://dx.doi.org/10.1016/j.eswa.2024.126353
Ali Khan Z , Namin A S . A survey of vulnerability detection techniques by smart contract tools [J ] . IEEE Access , 2024 , 12 : 70870 - 70910 . DOI: 10.1109/access.2024.3401623 http://dx.doi.org/10.1109/access.2024.3401623
DefiLlama . Defillama hacks [EB/OL ] . [ 2025-12-30 ] . https://defillama.com/hacks https://defillama.com/hacks .
Chu Hanting , Zhang Pengcheng , Dong Hai , et al . A survey on smart contract vulnerabilities: Data sources, detection and repair [J ] . Information and Software Technology , 2023 , 159 : 107221 . DOI: 10.1016/j.infsof.2023.107221 http://dx.doi.org/10.1016/j.infsof.2023.107221
Feist J , Grieco G , Groce A . Slither: A static analysis framework for smart contracts [C ] // 2019 IEEE/ACM 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain . Piscataway : IEEE , 2019 : 8 - 15 . DOI: 10.1109/wetseb.2019.00008 http://dx.doi.org/10.1109/wetseb.2019.00008
Tikhomirov S , Voskresenskaya E , Ivanitskiy I , et al . SmartCheck: Static analysis of ethereum smart contracts [C ] // Proceedings of the 1st International Workshop on Emerging Trends in Software Engineering for Blockchain . New York : ACM , 2018 : 9 - 16 . DOI: 10.1145/3194113.3194115 http://dx.doi.org/10.1145/3194113.3194115
Luu L , Chu D H , Olickel H , et al . Making smart contracts smarter [C ] // Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security . New York : ACM , 2016 : 254 - 269 . DOI: 10.1145/2976749.2978309 http://dx.doi.org/10.1145/2976749.2978309
Durieux T , Ferreira J F , Abreu R , et al . Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts [C ] // Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering . New York : ACM , 2020 : 530 - 541 . DOI: 10.1145/3377811.3380364 http://dx.doi.org/10.1145/3377811.3380364
Nguyen T D , Pham L H , Sun Jun , et al . sFuzz: An efficient adaptive fuzzer for solidity smart contracts [C ] // Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering . New York : ACM , 2020 : 778 - 788 . DOI: 10.1145/3377811.3380334 http://dx.doi.org/10.1145/3377811.3380334
Kushwaha S S , Joshi S , Singh D , et al . Systematic review of security vulnerabilities in ethereum blockchain smart contract [J ] . IEEE Access , 2022 , 10 : 6605 - 6621 . DOI: 10.1109/access.2021.3140091 http://dx.doi.org/10.1109/access.2021.3140091
康海燕 , 王骁识 . 基于数据特征相关性和自适应差分隐私的深度学习方法研究 [J ] . 电子学报 , 2024 , 52 ( 6 ): 1963 - 1976 .
Kang Haiyan , Wang Xiaoshi . Research on the deep learning method based on data feature relevance and adaptive differential privacy [J ] . Acta Electronica Sinica , 2024 , 52 ( 6 ): 1963 - 1976 . (in Chinese)
Al Ghanmi H , Ahmadjee S , Bahsoon R , et al . Exploring human-centric dimensions in blockchain smart contracts [J ] . ACM Computing Surveys , 2026 , 58 ( 7 ): 1 - 43 . DOI: 10.1145/3777414 http://dx.doi.org/10.1145/3777414
张亚洲 , 刘祈蒙 , 戎璐 , 等 . 语音大模型: 架构、训练与挑战分析 [J ] . 电子学报 , 2025 , 53 ( 9 ): 3454 - 3472 .
Zhang Yazhou , Liu Qimeng , Rong Lu , et al . Speech large language models: Architecture, training and challenges analysis [J ] . Acta Electronica Sinica , 2025 , 53 ( 9 ): 3454 - 3472 . (in Chinese)
Jie Wanqing , Qiu Wangjie , Yang Haofu , et al . Agent4Vul: Multimodal LLM agents for smart contract vulnerability detection [J ] . Science China Information Sciences , 2025 , 68 ( 6 ): 160101 . DOI: 10.1007/s11432-024-4402-2 http://dx.doi.org/10.1007/s11432-024-4402-2
黄辰 , 刘会杰 , 张龑 , 等 . 基于自适应噪声和方面图关联学习增强多模态方面级情感分析 [J ] . 电子学报 , 2025 , 53 ( 9 ): 3397 - 3409 .
Huang Chen , Liu Huijie , Zhang Yan , et al . Enhancing multimodal aspect-based sentiment analysis with adaptive noise and aspect graph association learning [J ] . Acta Electronica Sinica , 2025 , 53 ( 9 ): 3397 - 3409 . (in Chinese)
Duy P T , Khoa N H , Quyen N H , et al . Vulnsense: Efficient vulnerability detection in ethereum smart contracts by multimodal learning with graph neural network and language model [J ] . International Journal of Information Security , 2024 , 24 ( 1 ): 48 . DOI: 10.1007/s10207-024-00965-2 http://dx.doi.org/10.1007/s10207-024-00965-2
Wang Tengfei , Zhao Xiangfu , Zhang Jiarui . TMF-Net: Multimodal smart contract vulnerability detection based on multiscale transformer fusion [J ] . Information Fusion , 2025 , 122 : 103189 . DOI: 10.1016/j.inffus.2025.103189 http://dx.doi.org/10.1016/j.inffus.2025.103189
Qian Peng , Liu Zhenguang , He Qinming , et al . Towards automated reentrancy detection for smart contracts based on sequential models [J ] . IEEE Access , 2020 , 8 : 19685 - 19695 . DOI: 10.1109/access.2020.2969429 http://dx.doi.org/10.1109/access.2020.2969429
Zhuang Yuan , Liu Zhenguang , Qian Peng , et al . Smart contract vulnerability detection using graph neural network [C ] // Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence . New York : ACM , 2020 : 3283 - 3290 . DOI: 10.24963/ijcai.2020/454 http://dx.doi.org/10.24963/ijcai.2020/454
Zhen Zixain , Zhao Xiangfu , Zhang Jinkai , et al . DA-GNN: A smart contract vulnerability detection method based on Dual Attention Graph Neural Network [J ] . Computer Networks , 2024 , 242 : 110238 . DOI: 10.1016/j.comnet.2024.110238 http://dx.doi.org/10.1016/j.comnet.2024.110238
Zhang Yifan , Kang Haiyan , Wang Qiang . MMFDetect: Webshell evasion detect method based on multimodal feature fusion [J ] . Electronics , 2025 , 14 ( 3 ): 416 . DOI: 10.3390/electronics14030416 http://dx.doi.org/10.3390/electronics14030416
Kalla D , Smith N , Samaah F , et al . Study and analysis of chat GPT and its impact on different fields of study [J ] . International journal of innovative science and research technology , 2023 , 8 ( 3 ): 3639117 .
Sun Yuqiang , Wu Daoyuan , Xue Yue , et al . GPTScan: Detecting logic vulnerabilities in smart contracts by combining GPT with program analysis [C ] // Proceedings of the IEEE/ACM 46th International Conference on Software Engineering . New York : ACM , 2024 : 1 - 13 . DOI: 10.1145/3597503.3639117 http://dx.doi.org/10.1145/3597503.3639117
Yu Lei , Lu Junyi , Liu Xianglong , et al . PSCVFinder: A prompt-tuning based framework for smart contract vulnerability detection [C ] // 2023 IEEE 34th International Symposium on Software Reliability Engineering . Piscataway : IEEE , 2023 : 556 - 567 . DOI: 10.1109/issre59848.2023.00030 http://dx.doi.org/10.1109/issre59848.2023.00030
Xia Shihao , Shao Shuai , He Mengting , et al . AuditGPT: Auditing smart contracts with ChatGPT [PP/OL ] . V1. arXiv ( 2024-04-05 )[ 2025-12-30 ] . https://doi.org/10.48550/arXiv.2404.04306 https://doi.org/10.48550/arXiv.2404.04306 .
Yuan Hang , Yu Lei , Huang Zhirong , et al . MOS: Towards effective smart contract vulnerability detection through mixture-of-experts tuning of large language models [PP/OL ] . V1. arXiv ( 2025-04-16 )[ 2025-12-30 ] . https://doi.org/10.48550/arXiv.2504.12234 https://doi.org/10.48550/arXiv.2504.12234 .
Vukić N , Petrović V B , Dragan D , et al . LLM-based tooling for smart contract auditing [C ] // 2025 12th International Conference on Electrical, Electronic and Computing Engineering . Piscataway : IEEE , 2025 : 11114151 . DOI: 10.1109/icetran66854.2025.11114151 http://dx.doi.org/10.1109/icetran66854.2025.11114151
Wang Jinbo , Aryani A , Wyborn L , et al . Providing research graph data in JSON-LD using schema.org [C ] // Proceedings of the 26th International Conference on World Wide Web Companion . New York : ACM , 2017 : 1213 - 1218 . DOI: 10.1145/3041021.3053052 http://dx.doi.org/10.1145/3041021.3053052
Li Jandong , Fu Jia . A multi-label text classification model combining label graph embedding and transformer decoding [C ] // 2023 5th International Academic Exchange Conference on Science and Technology Innovation . Piscataway : IEEE , 2023 : 375 - 379 . DOI: 10.1109/iaecst60924.2023.10503359 http://dx.doi.org/10.1109/iaecst60924.2023.10503359
Huang Hsien-De T T , Kao H Y . R2-d2: Color-inspired convolutional neural network (cnn)-based android malware detections [C ] // 2018 IEEE International Conference on Big Data . Piscataway : IEEE , 2018 : 2633 - 2642 . DOI: 10.1109/bigdata.2018.8622324 http://dx.doi.org/10.1109/bigdata.2018.8622324
Kang Hai , Wang Yunhe , Chen Hanting , et al . A survey on vision transformer [J ] . IEEE Transactions on Pattern Analysis and Machine Intelligence , 2023 , 45 ( 1 ): 87 - 110 . DOI: 10.1109/tpami.2022.3152247 http://dx.doi.org/10.1109/tpami.2022.3152247
Qian Peng , Liu Zhenguang , Yin Yifan , et al . Cross-modality mutual learning for enhancing smart contract vulnerability detection on bytecode [C ] // Proceedings of the ACM Web Conference 2023 . New York : ACM , 2023 : 2220 - 2229 . DOI: 10.1145/3543507.3583367 http://dx.doi.org/10.1145/3543507.3583367
Liu Zhengguang , Qian Peng , Yang Jiaxu , et al . Rethinking smart contract fuzzing: Fuzzing with invocation ordering and important branch revisiting [PP/OL ] . V2. arXiv ( 2023-01-12 )[ 2025-12-30 ] . https://doi.org/10.48550/arXiv.2301.03943 https://doi.org/10.48550/arXiv.2301.03943 .
Guo Daya , Ren Shuo , Lu Shuai , et al . GraphCodeBERT: Pre-training code representations with data flow [PP/OL ] . V4.arXiv ( 2021-09-13 )[ 2025-12-30 ] . https://doi.org/10.48550/arXiv.2009.08366 https://doi.org/10.48550/arXiv.2009.08366 .
Wang Yue , Wang Weishi , Joty S , et al . CodeT5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation [C ] // Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing . Stroudsburg : ACL , 2021 : 8696 - 8708 . DOI: 10.18653/v1/2021.emnlp-main.685 http://dx.doi.org/10.18653/v1/2021.emnlp-main.685
0
Views
37
下载量
0
CSCD
Publicity Resources
Related Articles
Related Author
Related Institution
京公网安备11010802024621