BIRALAB
Conference paper2025

A Hybrid 1D-CNN and Transformer Architecture for Differentiating Malignant Melanoma from Non-Melanoma Skin Cancers using Raman Spectroscopy

Authors

Chu Duc Hoang, Nguyen Thanh Tung

BIRALAB members are shown in bold and link to their profile page.

Abstract

Clinical differentiation between malignant melanoma (MM) and non-melanoma skin cancers (NMSCs) is critical for patient prognosis. Raman spectroscopy offers a noninvasive, molecule-sensitive approach, yet its complex spectral data requires sophisticated analytical tools. This paper proposes a novel hybrid deep learning architecture, combining a five-block 1D Convolutional Neural Network (1D-CNN) with a six-layer Transformer encoder, to leverage both local spectral features and their global contextual relationships. The 1D-CNN acts as a powerful local feature extractor, while the Transformer models long-range dependencies across the entire spectral range. Evaluated on a large clinical dataset of 1200 spectra (150 MM, 350 BCC, 350 SCC, 350 benign), our model demonstrates superior performance, achieving an overall accuracy of 96.8% and an AUC of 0.987. Notably, the sensitivity for detecting the most aggressive MM class reached 94.6%. These results significantly outperform baseline models, including a standalone 1D-CNN, highlighting the efficacy of the proposed hybrid architecture for robust, automated skin cancer classification.