# Anomaly Detection in Blockchain Networks Using Unsupervised Learning: A Survey
## 5 Data Mining Techniques Employed in Blockchain Anomaly Detection
### Perspectives on Supervised and Self-Supervised Approaches for Anomaly Detection  
In the context of blockchain, supervised approaches can be applied to detect specific anomaly patterns such as phishing attacks, double-spending, and Ponzi schemes. These methods typically involve training machine learning models on labeled datasets containing examples of normal behavior as well as known instances of anomalies [122]. For example, in phishing attack detection, a supervised approach might involve training a classification model using features extracted from email headers, website URLs, or message content. The model aims to distinguish between legitimate communications and phishing attempts based on labeled training data. Similarly, in double-spending detection, supervised learning algorithms can be trained to recognize patterns indicative of fraudulent transactions. By providing labeled examples of confirmed double-spending incidents, these models can learn to identify similar patterns in real-time transaction data [122]. On the other hand, self-supervised learning techniques leverage the inherent structure of the data to learn representations without explicit labeling. They are particularly well \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Algorithm** & \begin{tabular}{c} **Computational** \\ **Complexity** \\ \end{tabular} & **Category** & **Algorithm** & \begin{tabular}{c} **Computational** \\ **Complexity** \\ \end{tabular} & **Category** \\ \hline k-Means [37] & \(O(nk)\) & \begin{tabular}{c} Partitional \\ \end{tabular} & \begin{tabular}{c} Agglomerative hierarchical \\ clustering [37] \\ \end{tabular} & \(O(kn^{2})\) & \begin{tabular}{c} Partitional \\ \end{tabular} \\ \hline \begin{tabular}{c} Isolation forest \\ [120] \\ \end{tabular} & \(O(n\log n)\) & Tree-based & Local outlier factor [115] & \(O(n^{2})\) & Density-based \\ \hline DBSCAN [116] & \(O(n\log n)\) & Density-based & HDBSCAN [117] & \(O(n^{2})\) & Density-based \\ \hline \begin{tabular}{c} Spectral \\ clustering [113] \\ \end{tabular} & \(O(n^{3})\) & Graph-based & Louvain algorithm [114] & \(O(n\log n)\) & Graph-based \\ \hline t-SNE [121] & \(O(n^{2})\) & \begin{tabular}{c} Dimensionality \\ reduction \\ \end{tabular} & \begin{tabular}{c} Birch [38] \\ \end{tabular} & \(O(n\log n)\) & \begin{tabular}{c} Partitional \\ \end{tabular} \\ \hline Deepwalk [112] & \(O(m\log m)\) & Graph-based & \begin{tabular}{c} Expectation maximization \\ [37] \\ \end{tabular} & \(O(nd)\) & Probabilistic \\ \hline \begin{tabular}{c} Affinity \\ propagation [111] \\ \end{tabular} & \(O(n^{2})\) & \begin{tabular}{c} Partitional \\ \end{tabular} & \
\begin{tabular}{c} Variational autoencoder [118] \\ \end{tabular} & \(O(nmd)\) & Probabilistic \\ \hline GANs [119] & \(O(nmd)\) & Probabilistic & One-class SVM [41] & \(O(n^{2}d)\) &
\begin{tabular}{c} One-class \\ classification \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Common unsupervised learning algorithms employed in blockchain anomaly detection along with the respective computational complexity and categorization (where \(n\), \(k\), \(m\), and \(d\) stand for the number of data instances, clusters, nodes, and dimensions, respectively). suited for anomaly detection tasks where labeled data may be scarce or expensive to obtain. For instance, they can be used to reconstruct transaction sequences and identify deviations from expected patterns. For anomaly patterns like Sybil attack or 51% attack, self-supervised approaches enable the thorough analysis of the network's topology and transactions' history to identify unusual node behavioral patterns or mining activities [123]. Previous research has explored various supervised and self-supervised approaches for anomaly detection in blockchain networks. [PERSON] et al. [30] categorized them based on learning modes and techniques, including supervised, semi-supervised, and unsupervised mechanisms. [PERSON] et al. [31] provided several categories and discussed their pros and cons. [PERSON] et al.