CVM-Cervix: A hybrid cervical Pap-smear image classification framework using CNN, visual transformer and multilayer perceptron

Wanli Liu, Chen Li, Ning Xu, Tao Jiang, Md Mamunur Rahaman, Hongzan Sun, Xiangchen Wu, Weiming Hu, Haoyuan Chen, Changhao Sun, Yudong Yao, Marcin Grzegorzek

Abstract

Cervical cancer is the seventh most common cancer among all the cancers worldwide and the fourth most common cancer among women. Cervical cytopathology image classification is an important method to diagnose cervical cancer. Manual screening of cytopathology images is time-consuming and error-prone. The emergence of the automatic computer-aided diagnosis system solves this problem. This paper proposes a framework called CVM-Cervix based on deep learning to perform cervical cell classification tasks. It can analyze pap slides quickly and accurately. CVM-Cervix first proposes a Convolutional Neural Network module and a Visual Transformer module for local and global feature extraction respectively, then a Multilayer Perceptron module is designed to fuse the local and global features for the final classification. Experimental results show the effectiveness and potential of the proposed CVM-Cervix in the field of cervical Pap smear image classification. In addition, according to the practical needs of clinical work, we perform a lightweight post-processing to compress the model.

Introduction

Cervical cancer remains a significant global health challenge, particularly among women. While highly preventable through early detection via cytopathology (Pap-smear) screening, the current manual analysis process is a major bottleneck. Cytopathologists must meticulously examine thousands of cells per slide, a task that is labor-intensive and susceptible to human error.

Computer-Aided Diagnosis (CAD) systems offer a solution, but traditional methods often struggle with the morphological complexity of diverse cell types. While deep learning has advanced the field, standard Convolutional Neural Networks (CNNs) can miss global context, and pure Transformers often require vast amounts of data. CVM-Cervix addresses these limitations by combining local feature extraction with global contextual understanding in a robust 11-class classification system.

Methodology

The CVM-Cervix framework utilizes a hybrid architecture that processes images through two parallel streams to capture a comprehensive set of features.

The CVM-Cervix pipeline, illustrating preprocessing, the hybrid training process (VT and CNN fusion), classification, and evaluation.

Hybrid Feature Extraction

  1. CNN Module (Local Features): Utilizing the Xception network backbone, this module leverages the inductive bias of CNNs to identify local textures and patterns, such as nuclear grain. It outputs a 2048-dimensional feature vector.
  2. VT Module (Global Features): Simultaneously, a modified tiny DeiT (Data-efficient Image Transformer) processes the image. By removing distillation tokens and using self-attention mechanisms, it captures the global morphology and spatial relationships, producing a 192-dimensional vector.

Fusion and Classification

The local and global feature vectors are concatenated into a 2240-dimensional vector. This fused representation is then fed into a Multilayer Perceptron (MLP) with GELU activation functions to perform the final 11-class classification.

Model Optimization

To ensure clinical viability, the model underwent quantization, reducing weights from 32-bit to 16-bit. This process halved the model size from 120 MB to 60 MB with negligible impact on accuracy, facilitating deployment on standard medical hardware.

Data and Experimental Setup

The framework was trained and validated on a large, diverse dataset constructed from two major benchmarks: the CRIC dataset (11,534 cells across 6 categories) and the SIPaKMeD dataset (4,049 images across 5 categories).

Representative samples from the training dataset used for cervical cell classification.

The resulting combined dataset comprises 8,838 images spanning 11 distinct clinical categories, including complex cases like ASC-H, SCC, and HSIL. This represents one of the most challenging classification tasks in current literature. The model's robustness was further tested on the Herlev dataset and a peripheral blood cell dataset.

Results

CVM-Cervix achieved a state-of-the-art accuracy of 91.72% on the 11-class combined dataset. In comparative benchmarks, it outperformed 18 classic CNN architectures (e.g., DenseNet169 at 88.99%) and 4 pure Transformer models (e.g., ViT at 85.87%).

The model also demonstrated excellent generalization, reaching 92.35% accuracy on the Herlev dataset and 98.48% on blood cell classification. Efficiency is a key highlight, with an inference time of just 0.018 seconds per image, supporting real-time clinical applications.

Discussion

The success of CVM-Cervix stems from its "best of both worlds" approach. CNNs excel at fine-grained details of the cytoplasm and nucleus, while Transformers provide the necessary spatial context. By tackling 11 classes, the model proves capable of navigating the subtle "gray areas" of diagnosis, such as the distinction between ASC-US and LSIL, which often challenges human experts. Interestingly, the authors found that omitting the standard distillation module in DeiT improved performance for this specific fusion task.

Conclusion and Future Work

While CVM-Cervix shows great promise, challenges remain regarding the high inter-class similarity between certain categories like ASC-US and LSIL. Future research will focus on expanding the framework from cropped cell classification to full-slide image (WSI) analysis by integrating automated detection and segmentation. Additionally, the exploration of Capsule Networks may further enhance the preservation of spatial relationships in learned features.

Summary updated

BibTeX
@inproceedings{liu2022cvm,
  author = {Wanli Liu and Chen Li and Ning Xu and Tao Jiang and Md Mamunur Rahaman and Hongzan Sun and Xiangchen Wu and Weiming Hu and Haoyuan Chen and Changhao Sun and Yudong Yao and Marcin Grzegorzek},
  title = {{CVM-Cervix: A hybrid cervical Pap-smear image classification framework using CNN, visual transformer and multilayer perceptron}},
  booktitle = {Pattern},
  year = {2022},
  doi = {10.1016/j.patcog.2022.108829},
}
Figure