MHVD: Multigranularity Smart Contract Vulnerability Detection Using Reinforced Multiplex Heterogeneous Graph Convolutional Network
摘要
The rapid development of blockchain technology has enabled the realization and widespread application of Turing-complete smart contracts. These contracts establish trust and transparency through the immutability of blockchain. However, their irreversible deployment will amplify potential security risks. Therefore, effective vulnerability detection is crucial. This study proposes a Multi-Granularity Framework for Smart Contract Vulnerability Detection, named MHVD. It is built upon a Reinforced Multiplex Heterogeneous Graph Neural Network(RMHGCN) and comprises three main stages. (1) We construct heterogeneous contract graphs based on control flow graphs and call graphs. (2) We extract node-level textual attributes and learn node representations through the RMHGCN. (3) We perform vulnerability detection at multiple granularities. MHVD addresses the limitations of relying solely on structured information by integrating the text information of nodes. RMHGCN addresses the problems of relying on expert-defined rules and meta-path combinatorial explosion by adaptively learning the importance of meta-paths and applying sparse aggregation. Experimental results show that MHVD achieves strong performance on seven types of vulnerabilities, surpassing baseline models and traditional tools at both the contract and line levels.