信息安全研究 ›› 2026, Vol. 12 ›› Issue (11): 993-1000.DOI: 10.12379/j.issn.2096-1057.2026.11.03

• • 上一篇    

面向特征融合的智能合约深度学习检测模型

龚一轩,吴恺旻,马海梁   

  • 发布日期:2026-11-11

Smart Contract Deep Learning Detection Model for Feature Fusion

Gong Yixuan, Wu Kaimin, Ma Hailiang   

  • Published:2026-11-11

摘要: 随着区块链技术的快速发展,智能合约漏洞检测已成为保障区块链系统安全的关键环节。现有方法通过将字节码转化为图结构并利用图神经网络进行特征学习,但对源码语义与结构特征的利用不足。为此,本文提出了一种融合抽象语法树(Abstract Syntax Tree,AST)语义特征与控制流图(Control Flow Graph,CFG)结构特征的漏洞检测框架(Smart Contract Vulnerability Detection Framework based on AST and CFG Fusion,ACF-VDF)。该方法基于智能合约源代码构建AST,并得到表征语法层级和语义信息的语法特征向量;再将合约字节码转化为CFG,结合全局池化和节点特征提取,生成反映执行路径与结构关系的结构特征向量。二者联合建模,输入到基于Transformer编码器的深度神经网络分类器中,实现对智能合约漏洞的检测。实验结果表明,该方法在F1值上较七种现有主流检测方法提升了2.10%~34.28%,显著提高了漏洞检测的准确率与泛化能力。

关键词: 深度学习;特征融合;区块链;智能合约;漏洞检测

Abstract: With the rapid development of blockchain technology, smart contract vulnerability detection has become a critical task for ensuring the security of blockchain systems. Existing advanced methods typically transform bytecode into graph structures and apply graph neural networks for feature learning, but they insufficiently exploit the semantic and structural characteristics of source code. To address this issue, this paper proposes ACF-VDF, a vulnerability detection framework that fuses Abstract Syntax Tree (AST) semantic features with Control Flow Graph (CFG) structural features. Specifically, the method constructs ASTs from smart contract source code to obtain syntax feature vectors that capture hierarchical and semantic information; meanwhile, contract bytecode is transformed into CFGs, and through global pooling and node feature extraction, structural feature vectors that reflect execution paths and structural dependencies are generated. The two feature vectors are jointly modeled and fed into a Transformer-based deep neural network classifier to detect vulnerabilities in smart contracts. Experimental results demonstrate that the proposed method improves the F1 score by 2.10%–34.28% compared with seven state-of-the-art detection methods, significantly boosting both accuracy and generalization performance in vulnerability detection.

Key words: deep learning; feature fusion; blockchain; smart contract; vulnerability detection

中图分类号: