A Lightweight and Interpretable Ensemble of CNN and Transformer Models for IDC Breast Cancer Classification
Faith Tobore Edafetanure-Ibeh, Sonachi Bukola Mogbogu, Ralchukwu Mogbogu · 2025
The human eye often struggles to interpret complex visual patterns found in medical images; tasks better handled by intelligent machines. Machine learning and deep learning techniques are widely used in medical applications, including detecting, and diagnosing tumors as benign or malignant. Histopathology plays a vital role in the diagnosis and management of breast cancer, particularly through image analysis obtained via needle biopsy techniques. This diagnostic method enables researchers and clinicians to assess the microscopic characteristics of breast tissue for early intervention. This study applies advanced deep learning techniques to classify invasive ductal carcinoma (IDC) in breast histological images. An ensemble model consisting of three lightweight yet robust architectures, EfficientNet-B3, ConvNeXt-Tiny, and SwinTiny Transformer, is built and evaluated. The model trains on the publicly available Kaggle Breast Histopathology Images dataset using focal loss to manage class imbalance and test-time augmentation (TTA) for robust inference. The images undergo processing and augmentation to enhance model performance, and predictions are combined using soft voting. Additionally, GradCAM visualizes regions of diagnostic importance within the images. According to the performance metrics, the proposed ensemble model achieves a validation accuracy of 92.94 % and an F1-score of 93.0 %, outperforming baseline models. With this level of performance, the model can help pathologists detect breast cancer in tissue samples more quickly and reliably.