Semantic Interaction and Relation-Decoupled Heterogeneous Graph Structure Learning: Application to Smart Contracts
摘要
Smart contracts are increasingly targeted by deceptive behaviors and phishing attacks, posing serious security risks to blockchain systems. Due to the heterogeneous nature of contracts, accounts, and transactions, Heterogeneous Graph Neural Networks (HGNNs) are commonly used for smart contract detection. However, existing HGNNs often entangle node features with graph topology, leading to semantic interference in complex interactions. Additionally, noise from disguised invocations and asynchronous data further undermines model robustness. To address these issues, we propose Semantic Interaction and Relation-Decoupled Heterogeneous Graph Structure Learning (SRHGSL), a self-supervised heterogeneous graph structure learning framework that incorporates semantic interaction and relation decoupling. SRHGSL constructs meta-path-based subgraphs to isolate semantics, applies attention to capture relational diversity, and leverages triplet contrastive loss to align semantic and attribute views. Extensive experiments on real-world datasets show that SRHGSL outperforms state-of-the-art methods, demonstrating superior robustness and effectiveness in smart contract detection and broader applications. The code is publicly available at https://github.com/7A13/SRHGSL .