Work

Enhancing blockchain network security: A targetable machine learning model for effective vulnerability repair

Year: 2025
Type: article
Abstract: Smart contracts have been widely used on blockchain to automate financial and business transactions. While they are susceptible to attacks because of their involvement in operations like asset transfers. Researchers have suggested various methods to address vulnerabilities in these contracts and improve their reliability. Nevertheless, when the contract code is excessively lengthy, redundant contextual information may adversely affect repair performance. To address this problem, we propose a localizable machine learning model to repair long contracts. Firstly, we extract a data collection that includes code structure information from the abstract syntax tree of the smart contract source code. Then we leverage a pre-trained BERT model to generate code embeddings and use BiLSTM for training the vulnerability localization model. Finally, the vulnerable code lines in the contract are localized based on statistical thresholding of the model’s output values. On this basis, we construct the corresponding code extraction algorithms to generate code repair fragments and use machine learning techniques to repair contracts. We compare our method with existing approaches using public datasets. The results demonstrate a significant improvement in performance over direct repair methods, effectively addressing the challenges associated with the repair of long-code smart contracts.
Authors: Li Yu, Jiao Jian, Jin-Ping Shi, Hong-Sheng Cao
Language: English
Open Access status: gold
Estimated APC paid: $700
OpenAlex ID: W4416869730
FWCI:
Cites: 29
Cited by:
Related to: