KPI Science News (Dec 2024)
TRANSFORMER VS. MAMBA AS SKIN CANCER CLASSIFIER: PRELIMINARY RESULTS
Abstract
Background: Skin cancer is a deadly disease that takes dozens of thousands of lives yearly. The key element of successful treatment of it is early detection. However, invasive detection methods are not always feasible. Meanwhile, Transformers, the most renowned and researched models keep being computationally heavy. In this paper we investigate Mamba model for such classification problem compared to Transformers. Objective: This paper compares the effectiveness of two machine learning architectures, Vision Transformer (ViT) and Mamba, for skin cancer classification using dermoscopy images. The goal is to determine if Mamba can provide a computationally efficient alternative to ViT without decrease in diagnostics accuracy. Methods: We used the HAM10000 dataset, a well-known benchmark in skin cancer classification, with 10015 dermoscopic images. We preprocessed the data to address issues like class imbalance and normalized the images. Both ViT and Mamba models were pretrained on the ImageNet dataset and fine-tuned for skin cancer classification. We evaluated the models based on overall accuracy and F1 scores for specific classes of skin cancer. Results: The results show that both ViT and Mamba models have similar overall accuracy, with Mamba models performing slightly better in classifying less represented classes like Bowen's Disease and Dermatofibroma. Both models demonstrated high F1 scores for Melanoma, indicating their effectiveness in identifying this severe form of skin cancer. Conclusions: Our findings suggest that Mamba is a viable alternative to ViT for skin cancer classification, offering similar accuracy while potentially reducing computational costs. This could make non-invasive skin cancer diagnostics more accessible and affordable. Further research is needed to explore other variations of the Mamba model and to fine-tune its performance on larger datasets.