# Automated Early Detection of Skin Cancer Using a CNN-ViT-Attention-Based Hybrid Model

**Authors:** Zekiye Kanat, Merve Kesim Onal, Harun Bingol, Serpil Sener, Engin Avci, Muhammed Yildirim

PMC · DOI: 10.3390/biomedicines14030583 · Biomedicines · 2026-03-05

## TL;DR

This paper introduces a new hybrid model combining CNNs and ViT with attention mechanisms to improve early detection of skin cancer.

## Contribution

A novel CNN-ViT-attention-based hybrid model for skin cancer diagnosis with high accuracy is proposed.

## Key findings

- The proposed model achieved 95.1% accuracy in skin cancer diagnosis.
- The model outperformed existing CNN and ViT architectures in the experiments.
- Attention mechanisms improved the model's performance and diagnosis capability.

## Abstract

Background/Objectives: Skin cancer is a very serious disease. There is a risk that the cancer will spread to other parts of the body as the cancerous tissue deepens. For this reason, early diagnosis is important because it allows for early initiation of treatment. This study proposes a hybrid model for the early diagnosis of skin cancer. Methods: The proposed model was developed using Convolutional Neural Networks (CNNs), Vision Transformer (ViT) architectures, and the k-Nearest Neighbors (KNN), Support Vector Machine (SVM), Naive Bayes (NB), Neural Network Classifiers, Decision Tree (DT), and Logistic Regression (LR) classifiers. Furthermore, the proposed model was fine-tuned to improve its disease diagnosis. Two attention mechanisms, channel and spatial, were used together in the proposed model. The HAM10000 dataset was used during the experiments. Class weighting was performed to ensure class-based balance in the dataset. Results: The proposed model was also compared with the CNN and ViT architectures frequently used in the literature. Among these models, the highest accuracy value of 95.1% was obtained with the proposed model. Conclusions: It is considered that the proposed model can be used as a decision support system for dermatologists in the diagnosis of skin cancer.

## Linked entities

- **Diseases:** skin cancer (MONDO:0002898)

## Full-text entities

- **Diseases:** cancer (MESH:D009369), Skin Cancer (MESH:D012878)

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC13023899/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/PMC13023899/full.md

## References

54 references — full list in the complete paper: https://tomesphere.com/paper/PMC13023899/full.md

---
Source: https://tomesphere.com/paper/PMC13023899