CerviTransX: Explainable Transformer - Based Cervical Cancer Classification

Neha Sharma, Kumar Gaurav, Tharun Kumar Reddy · 2025

Cervical cancer is a prevalent and critical disease affecting women, with rising incidence and mortality rates. Early detection is essential for improving patient outcomes. Recent advancements in computer vision, particularly the Shifted window Transformer, have demonstrated exceptional performance in image classification tasks, often outperforming traditional convolutional neural networks (CNNs). The Shifted Window Transformer employs a hierarchical architecture using shifted windows, enabling efficient capture of both local and global contextual information in images. In this paper, we propose a novel CerviTransX explainable transformer-based framework for cervical cancer classification which is a fine-tuned, on a pre-trained Shifted Window Base Transformer model with a Fully Connected Neural Network (FCNN). The framework applies the basic image preprocessing techniques which enhance the transfer learning and hierarchical feature extraction capabilities of the Shifted Window Transformer to classify cervical cancer images. The proposed method is validated on the publicly available SIPaKMeD dataset, which achieves superior performance in the multi-class classification task, with average accuracy, precision, recall, and F1-score of 97.71%, 97.72%, 97.12%, 97.69%, respectively using 5-fold cross-validation technique. The experimental results show that the proposed method out-performed the state-of-the-art deep learning model by approximately 1.5%. The explainability of the framework is facilitated through the Integrated Gradients method, which identified the important regions in the input images, such as abnormal tissue areas and cell structures, that contributed to the model's predictions for each class. These highlighted regions were consistent with expert annotations, demonstrating that the model's decision-making process is both explainable and reliable. The proposed framework achieved both high predictive accuracy and explainability, positioning it as a robust and reliable solution for medical diagnostics.

Read the paper · More papers on PaperTik