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

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. • Presents a locatable ML repair model for long smart contracts: integrates BERT+BiLSTM to spot vulnerabilities, then uses T5 for repair. • Logical pipeline design: separates localization/repair tasks to boost performance via focused, smaller repair contexts. • Domain-relevant metrics: evaluates repair rate/time, gas consumption and code volume; outperforms existing methods. • Targets smart contract specifics: tailored for lengthy contract scenarios, addressing practical vulnerability repair needs.

Authors

Institutions

Publication Details

Journal
International Journal of Intelligent Networks
Published
2025-12-01
DOI
https://doi.org/10.1016/j.ijin.2025.11.005
Primary Topic
Blockchain Technology Applications and Security
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Jian Jiao, Han Cao, Jiao Shi, Li Yu
International Journal of Intelligent Networks
Blockchain Technology Applications and Security
article

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

Jian Jiao, Han Cao, Jiao Shi, Li Yu
article en

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. • Presents a locatable ML repair model for long smart contracts: integrates BERT+BiLSTM to spot vulnerabilities, then uses T5 for repair. • Logical pipeline design: separates localization/repair tasks to boost performance via focused, smaller repair contexts. • Domain-relevant metrics: evaluates repair rate/time, gas consumption and code volume; outperforms existing methods. • Targets smart contract specifics: tailored for lengthy contract scenarios, addressing practical vulnerability repair needs.

International Journal of Intelligent NetworksVol. 7
Beijing Founder Electronics (China) (CN), Shanxi Transportation Research Institute (CN), Beijing Information Science & Technology University (CN)
Openalex Percentile: Top 49%
Blockchain Technology Applications and Security
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.