<p>Smart contracts are self-executing programs on blockchains, critical for enabling efficient, secure, and reliable data exchange and value transfer. However, as their application scenarios expand, reliability issues have become a major bottleneck for blockchain development. Existing vulnerability detection methods often model smart contract source code as graph structures and use Graph Neural Networks (GNNs) for feature learning. Yet these methods over-rely on static execution flow features and ignore dynamic behavioral information of contract accounts in real runtime environments, limiting their ability to capture dynamic patterns and semantic details of contracts. To address these challenges, this paper proposes a graph attention network vulnerability detection model with global feature augmentation for smart contracts (GaGAT). Specifically, we first model key functions and variables in the contract source code as nodes, and execution flows as edges to construct a base contract graph. Then, we innovatively introduce global virtual nodes that integrate two types of information: contract categories and contract account behavioral features, including balance changes, Ether inflow/outflow, daily transaction frequency and single transaction duration. After contract graph contraction and feature transformation, we generate a feature matrix as input to the GaGAT model. Subsequently, we conduct vulnerability detection. Through a series of experiments, we provide empirical evidence of the superior performance of our proposed method compared to existing approaches in detecting six different categories of vulnerabilities.This study provides a new paradigm for cross-modal feature fusion for smart contract security analysis.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Graph attention network vulnerability detection model with global feature augmentation for smart contracts

  • Miaoer Li,
  • Yi Zhu,
  • Yali Liu,
  • Zexin Li,
  • Junge Huang

摘要

Smart contracts are self-executing programs on blockchains, critical for enabling efficient, secure, and reliable data exchange and value transfer. However, as their application scenarios expand, reliability issues have become a major bottleneck for blockchain development. Existing vulnerability detection methods often model smart contract source code as graph structures and use Graph Neural Networks (GNNs) for feature learning. Yet these methods over-rely on static execution flow features and ignore dynamic behavioral information of contract accounts in real runtime environments, limiting their ability to capture dynamic patterns and semantic details of contracts. To address these challenges, this paper proposes a graph attention network vulnerability detection model with global feature augmentation for smart contracts (GaGAT). Specifically, we first model key functions and variables in the contract source code as nodes, and execution flows as edges to construct a base contract graph. Then, we innovatively introduce global virtual nodes that integrate two types of information: contract categories and contract account behavioral features, including balance changes, Ether inflow/outflow, daily transaction frequency and single transaction duration. After contract graph contraction and feature transformation, we generate a feature matrix as input to the GaGAT model. Subsequently, we conduct vulnerability detection. Through a series of experiments, we provide empirical evidence of the superior performance of our proposed method compared to existing approaches in detecting six different categories of vulnerabilities.This study provides a new paradigm for cross-modal feature fusion for smart contract security analysis.