# Vulnerability Detection and Classification of Ethereum Smart Contracts Using Deep Learning
## 4 Results and Discussion
### Results of Multi-Label Classification
Figures 34-38 show the five confusion matrices for the best multi-label classification algorithm using the second approach. The figure shows that many vulnerabilities were detected correctly. The presence of the ARTHM vulnerability was accurately detected in 1282 images, compared to the 1295 present in the original test set. However, for the 'Others' vulnerability class, only 104 grayscale images were correctly identified out of the 378 that contained this vulnerability. Conversely, 917 of these images were classified as not containing 'Others' but might contain other vulnerabilities. There were also 318 misclassified images, as there were 274 images that contained the 'Others' vulnerability that were not detected. This is likely due to the limitation of resources, as the number of decision trees used ('n_estimators') was set to only 100. Figure 34: Random Forest-GRAY using Approach 2 for ARTHM class. Figure 33: Distribution of smart contract vulnerabilities in test set using Approach 2. Figure 35: Random Forest-GRAY using Approach 2 for RENT class. Figure 28:0 Random Forest-GRAY using Approach 2 for TimeM class. Figure 28:1 Random Forest-GRAY using Approach 2 for LE class. Finally, four of the classes with the least accuracy in previous approaches were combined into one 'Others' class for the third approach and the previous approach was combined into one 'Others' class. The distribution of these classes is represented in Figure 28:2 The 'Others' class contains 1761 smart contracts, and the remaining classes have the same distribution as their counterparts in the previous two approaches' test groups. Accordingly, the total performance of all the algorithms mentioned previously in Section 3 was measured. The confusion matrices presented in Figures 40-44 show how well the best multi-label classification algorithm (VGG19-RGB) in the third approach detects vulnerabilities in smart contracts. Each matrix details true positives, true negatives, false positives, and false negatives. Many vulnerabilities were correctly detected. Figure 44 shows that, for the 'Others' class, 1760 images (out of 1761) were correctly detected in TN, and 4 were correctly identified from the RGB images. There were only 21 misclassified images. Figure 28:3 Random Forest-GRAY using Approach 2 for the ‘Others’ class. Figure 28:4 Distribution of smart contracts vulnerabilities in test set using Approach 3. Figure 28:5 VGG19-RGB using Approach 3 for TimeM class. Figure 28:6 VGG19-RGB using Approach 3 for TimeO class. Figure 28:7 VGG19-RGB using Approach 3 for RENT class. Figure 40 shows that 814 out of 977 images were detected in TN of the RENT class, with 537 images correctly classified as not containing the RENT vulnerability. The rest of the images were incorrectly predicted. In the case of identifying the TX-Origin vulnerability (Figure 43), 23 images were classified as containing it, out of the 43 images present in the original test set. A total of 22 were classified incorrectly, and the rest did not contain this vulnerability. Figures 41 and 42 show that the prediction results for the TimeM and TimeO vulnerabilities in TN were 273 and 75, respectively, compared to 416 and 201 in the original test set. The VGG19-RGB matrices display a balanced distribution and a higher number of true  
In the binary classification test for this study, the RF-RGB algorithm achieved the best performance among all algorithms. Due to the lack of prior research on binary classification targeting vulnerabilities in smart contracts, to the best of the author's knowledge, and with respect to availability of the literature, there is no basis for comparison with other algorithms. Three approaches were applied to ensure the comprehensiveness of the results of this classification. The highest accuracy among all algorithms was for the VGG19-RGB algorithm, which achieved an accuracy rate of 89.14%; nevertheless, the accuracy rate alone cannot provide a trusted indicator of the algorithm's efficiency. The F1-score must be involved as well.