A One-class variational autoencoder for smart contract vulnerability detection

Shaowei Guan, Ngai Fong Law

Research output: Journal article publicationJournal articleAcademic researchpeer-review

Abstract

Smart contracts and blockchain technology have revolutionized our transactions and interactions with digital systems, yet their vulnerabilities can lead to devastating consequences such as financial losses, data breaches, and compromised system integrity. Existing detection methods, including static analysis, dynamic analysis, and machine learning-based approaches, have their limitations, such as requiring large amounts of labeled data or being computationally expensive. To address these limitations, we propose a novel approach that leverages a One-Class Variational Autoencoder (VAE) with CodeBERT for data pre-processing to detect vulnerabilities in smart contracts. Our approach achieved a higher F1 score (88.93%) compared to the baselines evaluated, even when labeled data is limited. This paper contributes to the development of effective and efficient vulnerability detection methods, ultimately enhancing the security and reliability of smart contracts and blockchain-based systems. By demonstrating superior performance in imbalanced data scenarios, our method offers a practical solution for real-world applications in blockchain security
Original languageEnglish
Article number183
Pages (from-to)1-13
Number of pages13
JournalInternational Journal of Information Security
Volume24
Issue number4
DOIs
Publication statusPublished - Jul 2025

Keywords

  • Blockchain
  • Blockchain Security
  • Smart Contracts
  • Transformer
  • Variational Autoencoder
  • Vulnerability Detection

ASJC Scopus subject areas

  • Software
  • Information Systems
  • Safety, Risk, Reliability and Quality
  • Computer Networks and Communications

Fingerprint

Dive into the research topics of 'A One-class variational autoencoder for smart contract vulnerability detection'. Together they form a unique fingerprint.

Cite this