DCN-based cross-dimensional feature interaction for smart contract vulnerability detection
摘要
The current smart contract vulnerability detection suffers from issues such as incomplete semantic mining and insufficient feature learning capabilities, resulting in sparse features and low detection accuracy. Smart contract vulnerability detection plays an important role in ensuring transaction security on blockchain platforms. To address these challenges, we propose a Cross-Dimensional Smart Contract Vulnerability Detection model (CD-SCVD) based on Deep & Cross Network (DCN). Firstly, the low-dimensional expert pattern features and the high-dimensional semantic features derived from BERT (Bidirectional Encoder Representations from Transformers) are extracted from the contract source code to obtain more comprehensive semantic information. Secondly, the DCN is employed to model nonlinear feature interactions through layered cross computations, enhancing the representation of complex and implicit feature correlations. Finally, a self-attention mechanism is incorporated to capture long-range dependencies within the contract code, thereby improving the accuracy of vulnerability detection. The experiment shows that CD-SCVD can accurately detect reentrancy, timestamp dependency, and infinite loop vulnerabilities with accuracies of 95.44%, 94.88%, and 89.59%, respectively. Compared to the state-of-the-art methods, the accuracy improvements are 3.31%, 4.03% and 2.65% respectively, which shows better vulnerability detection performance.