Enhancing blood cell classification using an explainable transformers-based ensemble learning
摘要
Accurate classification of medical images, particularly for blood cell analysis, plays a crucial role in disease diagnosis and treatment planning. While transformer architectures have shown promising performance in medical image analysis, challenges related to generalization and robustness persist. To address these challenges, we present the first systematic study exploring the use of a pure ensemble of transformer architectures for blood cell classification. Specifically, we propose an explainable transformer-based ensemble framework that combines the complementary strengths of four distinct transformer models: Vanilla Vision Transformer (ViT), Shifted Window Transformer (Swin), Data-efficient image Transformer (DeiT), and Bidirectional Encoder Representation from Image Transformer (BEiT). We evaluate eight ensemble strategies, including weighted and unweighted hard and soft voting, along with boosting, bagging, and stacking methods using meta-learners such as Logistic Regression (LR) and Support Vector Machine (SVM). To improve computational efficiency, we adopted the Low-Rank Adaptation (LoRA) technique for model fine-tuning. Extensive experiments conducted on the BloodMNIST dataset show that our ensemble framework achieves an accuracy of 98.07%, outperforming both individual transformer models and existing state-of-the-art methods. In addition to performance evaluation, we conducted a statistical analysis to assess the reliability and robustness of the ensemble approach, with results further supporting its effectiveness. To enhance interpretability, we integrate Grad-CAM (Gradient-weighted Class Activation Mapping), an explainable AI (XAI) technique, to visualize the ensemble model’s decision-making process. Our findings highlight the potential of transformer-based ensembles to advance automated hematological diagnostics by combining high accuracy, efficiency, robustness, and interpretability.