[Paper Review] CerviFormer: A Pap-smear based cervical cancer classification method using cross attention and latent transformer
CerviFormer proposes a cross-attention and latent Transformer-based method for cervical cancer classification in Pap smear images, reducing computational complexity by compressing high-dimensional inputs into a compact latent space. It achieves 93.70% accuracy on Sipakmed (3-class) and 94.57% on Herlev (2-class), outperforming state-of-the-art methods while enabling end-to-end slide-level classification without segmentation.
Purpose: Cervical cancer is one of the primary causes of death in women. It should be diagnosed early and treated according to the best medical advice, as with other diseases, to ensure that its effects are as minimal as possible. Pap smear images are one of the most constructive ways for identifying this type of cancer. This study proposes a cross-attention-based Transfomer approach for the reliable classification of cervical cancer in Pap smear images. Methods: In this study, we propose the CerviFormer -- a model that depends on the Transformers and thereby requires minimal architectural assumptions about the size of the input data. The model uses a cross-attention technique to repeatedly consolidate the input data into a compact latent Transformer module, which enables it to manage very large-scale inputs. We evaluated our model on two publicly available Pap smear datasets. Results: For 3-state classification on the Sipakmed data, the model achieved an accuracy of 93.70%. For 2-state classification on the Herlev data, the model achieved an accuracy of 94.57%. Conclusion: Experimental results on two publicly accessible datasets demonstrate that the proposed method achieves competitive results when compared to contemporary approaches. The proposed method brings forth a comprehensive classification model to detect cervical cancer in Pap smear images. This may aid medical professionals in providing better cervical cancer treatment, consequently, enhancing the overall effectiveness of the entire testing process.
Motivation & Objective
- To develop an automated, accurate, and robust classification system for cervical cancer in Pap smear images to reduce diagnostic variability and improve early detection.
- To address the high computational cost of standard Transformers by introducing a latent bottleneck via cross-attention, enabling efficient processing of large-scale inputs.
- To eliminate reliance on manual segmentation by enabling end-to-end classification of whole-slide images using attention mechanisms.
- To improve model interpretability and generalization across diverse Pap smear image configurations without strong architectural assumptions.
- To provide a decision-support tool for pathologists that enhances diagnostic consistency and reduces observer bias.
Proposed method
- The model processes Pap smear images by dividing them into patches and applying a cross-attention mechanism to map high-dimensional input patches into a smaller latent representation of size N ≪ M.
- A latent Transformer module is used to iteratively refine the compressed representation, reducing quadratic complexity from O(M²) to O(N²) while preserving critical features.
- Positional and modality-specific embeddings are introduced to preserve spatial and structural information in the absence of explicit grid or sequential structure.
- The method employs iterative cross-attention between input patches and the latent tokens, focusing limited attention capacity on the most salient features across the image.
- Data augmentation techniques are applied during preprocessing to improve robustness and generalization across diverse image qualities and staining variations.
- The final classification head outputs probabilities for normal, benign, and abnormal classes based on the refined latent representation.
Experimental results
Research questions
- RQ1Can a Transformer-based model achieve high accuracy in classifying cervical cancer from Pap smear images while minimizing computational complexity?
- RQ2How does the use of a latent bottleneck with cross-attention improve performance and scalability on large-scale histopathological images?
- RQ3To what extent can the model classify whole-slide images without requiring prior segmentation or region-of-interest extraction?
- RQ4How does the proposed method compare to existing state-of-the-art models in terms of accuracy, precision, and recall across multiple datasets?
- RQ5Can the model generalize across different Pap smear datasets with varying staining, resolution, and cellular morphology?
Key findings
- CerviFormer achieved 93.70% classification accuracy on the Sipakmed dataset for 3-class classification (normal, benign, abnormal).
- On the Herlev dataset, the model reached 94.57% accuracy for 2-class classification (normal vs. abnormal), outperforming previous state-of-the-art methods.
- The model demonstrated high specificity (96.81% on Sipakmed, 97.06% on Herlev), indicating strong ability to correctly identify normal cases.
- Sensitivity was 92.99% on Sipakmed and 87.50% on Herlev, showing strong detection capability for abnormal cases despite class imbalance.
- The F1-scores for all classes were above 0.89 on Sipakmed and 0.89 on Herlev, indicating balanced precision and recall across categories.
- The confusion matrices for both datasets show minimal misclassification, with the majority of predictions falling on the correct class, confirming model robustness.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.