SCFusionLocator: A Statement-Level Smart Contract Vulnerability Localization Framework Based on Code Slicing and Multi-Modal Feature Fusion
Abstract
Smart contract vulnerabilities have led to over $20 billion in losses, but existing methods suffer from coarse-grained detection, two-stage “detection-then-localization” pipelines, and insufficient feature extraction. This paper proposes SCFusionLocator, a statement-level vulnerability localization framework for smart contracts. It adopts a novel code-slicing mechanism (via function call graphs and data-flow graphs) to decompose contracts into single-function subcontracts and filter low-saliency statements, paired with source code normalization to reduce noise. A dual-branch architecture captures complementary features: the code-sequence branch uses GraphCodeBERT (with data-flow-aware masking) for semantic extraction, while the graph branch fuses call/control-flow/data-flow graphs into a heterogeneous graph and applies HGAT for structural modeling. SCFusionLocator enables end-to-end statement-level localization by framing tasks as statement classification.We release BJUT_SC02, a large dataset of over 240,000 contracts with line-level labels for 58 vulnerability types. Experiments on BJUT_SC02, SCD, and MANDO datasets show SCFusionLocator outperforms 8 conventional tools and nearly 20 ML baselines, achieving over 90% average F1 at the statement level, with better generalization to similar unknown vulnerabilities, and remains competitive in contract-level detection.
Fields of Study & Subjects
Advanced Malware Detection Techniques
Adversarial Robustness in Machine Learning
Software Engineering Research
Publication details
- Journal / source
- IEEE Transactions on Network and Service Management
- Publisher
- Institute of Electrical and Electronics Engineers (IEEE)
- Volume
- 23
- Pages
- 2832–2851
- Publication date
- 1 January 2026