Anomaly Detection in Blockchain Transactions Using Supervised Machine Learning
摘要
The concept of blockchain has changed the landscape of digital transactions by introducing the concept of a decentralized and secure architecture. Nevertheless, it is susceptible to the 51% attack in which a malicious user uses a majority part of the computer processing power of the network to manipulate transactions, either through fraud or through duplication. This paper suggests a supervised-based machine learning algorithm form of anomaly detection designed to detect such attacks. On an annotated Bitcoin transaction dataset with artificially added anomalies, we compare two de facto standard classifiers to each other, Support Vector Machine (SVM) and Random Forest (RF). Important blockchain attributes like confirmations, block height, transaction volume, and difficulty are applied when differentiating between normal and anomalous behavior. The measurement of performance is done by accuracy, precision, recall, and F1-score. RF showed complete scores in all scores (100% accuracy, precision, recall, and F1-score), which means that it is really powerful in consistently spotting a malicious activity. Conversely, SVM showed high values of accuracy and precision (98.96 and 97.56, respectively) but low recall and F1-score (90.91 and 94.12, respectively), indicating that it could not always identify some anomalies. The findings confirm the usefulness of ensemble models such as RF in real-time anomaly detection and improvement to blockchain security systems.