Dynamic kernel generation through hybrid involution and convolution neural networks for leukemia and white blood cell classification Authors: Osama M. Alshehri, Ahmad Shaf, Unza Shakeel, Tariq Ali, Muhammad Irfan, Mohammed M. Jalal, Malik A. Altayar, Mohammed H. Abu-Alghayth, Humood Al Shmrany Published: 2025 ABSTRACT Blood cancer diagnosis through microscopic image analysis is challenging due to subtle morphological differences between cell stages and subtypes. This study aims to develop a Hybrid Involutional-Convolutional Neural Network (HICNN) for automated leukemia detection and white blood cell morphology analysis, enabling precise classification of leukemia stages and leukocyte subtypes to improve diagnostic accuracy. The HICNN integrates involution layers, which dynamically generate spatially adaptive kernels for context-specific feature extraction, with convolutional layers that capture translation-invariant hierarchical patterns. This hybrid architecture leverages parallel processing within hybrid blocks to enhance discrimination of subtle cellular variations. The HICNN achieved exceptional performance with 99.5% accuracy on a leukemia staging dataset and 98.00% accuracy on a leukocyte subtyping dataset, surpassing state-of-the-art models. Model reliability was demonstrated through Brier scores of 0.0019 and 0.0069, with inter-class misclassifications below 2% and minimal overlap between class confidence scores. Training performance showed stable convergence within 50 epochs, with validation accuracy exceeding 99% by epoch 30. The HICNN advances automated hematological diagnostics by successfully addressing feature discrimination and model calibration challenges. The framework demonstrates robust performance in both cancer staging and cell subtype classification tasks, showing promise for reducing diagnostic ambiguity and improving early detection in leukemia and related hematological disorders. Introduction Leukemia is a highly aggressive malignancy found in the hematopoietic system and originates from the bone marrow. This condition has a role in disrupting the normal production and function of white blood cells (WBCs)1,2. This form of cancer is classified into two major classes; acute leukemia and chronic leukemia having distinct clinical attributes and trajectories3–6. The acute form of leukemia advances and progresses rapidly, showing more pronounced clinical symptoms. However, the chronic form of leukemia progresses slowly with initially the WBCs resembling the normal cells. This form of leukemia is severe as it becomes more challenging to detect and classify the malignancy7. The major classes of leukemia are further distinguished into sub-classes including lymphoid and myeloid which in result give four primary sub-classes; ALL (the acute lymphoblastic leukemia), AML (the acute myeloid leukemia), CLL (chronic lymphocytic leukemia), and lastly CML (chronic myeloid leukemia)3,8,9. The ALL class has predominant effect on the children as it causes proliferation of the immature lymphocytes10. This proliferation compromises the normal immune function and it can metastasize or spread to the other parts of the body such as lymph nodes, brain, and liver if left untreated. On the other hand, the AML class is more common in adults and involves the rapid expansion of malignant myeloid cells11,12. CLL and CML, the chronic leukemias typically progress very slowly and as initially the WBCs resemble the normal cells it is very difficult to detect as well. Chronic leukemias if left untreated can cause long-term significant and fatal health risks13. Therefore, precise diagnosis strategies and system along with the targeted treatment methods are highly important to distinguish between these leukemia sub-classes. Advanced systems such as the FAB (the French-American-British) classification system further subdivides the ALL leukemia class based on the chromatin structure, the cellular morphology, and the cytoplasmic features into L1, L2, and L3 sub-types14–16. For effective leukemia management, it is highly critical to timely and accurately diagnose the disease with its sub-classes. Manual differentiation is helpful in the Leukemia diagnosis but the diversity of WBC characteristics complicates the process. The area of research on Leukemia focus on the fundamental and translational studies. The fundamental or basic research studies work on investigating the genetic mutations, cellular pathophysiology, and the proliferation attributes and patterns leading to leukemia. On the other hand, the translational research studies focus on the clinical aspects such as drug testing, detection tools, and advancement in the imaging techniques. Both of the fundamental and translational approaches can help refine the early leukemia detection process as well as enhance the therapeutic interventions17,18. The traditional diagnostic methods and frameworks used for the identification of leukemia include blood smear microscopy and bone marrow biopsies. The blood smear microscopy works by identifying abnormal WBCs with the help of stained blood samples examined direct under the microscope. While, the bone marrow biopsy detects leukemia by extracting a bone marrow tissue and analyzing it completely to identify any abnormal indicative marker or cell proliferation. These methods were informative yet labor-intensive, costly, and require experts in the field19,20. To overcome these challenges, some advanced alternatives such as percutaneous aspiration and molecular cytogenetic techniques were introduced. The aCHG (Array Comparative Genomic Hybridization) was utilized as an advanced diagnostic option for leukemia detection and classification as it provided a detailed and expanded analysis21,22. However, this approach has several constraints including resolution, sensitivity, and cost. In recent years, machine learning (ML) and deep learning (DL) have transformed leukemia diagnostics, introducing automated blood smear analysis for more accurate and rapid leukemic cell classification. In a study23, the authors published a review on the detection of ALL class of leukemia. This research mainly focused on detecting ALL by utilizing several image processing and traditional ML based methods. This study did not cover challenging issues of ML approaches, analyze the DL techniques, transfer learning, and also future scopes. In another study24, the authors generated an advanced automated system for detection of acute leukemia. The system worked by taking the microscopic digital images and then applying the noise and blurring preprocessing techniques. Various factors like texture, geometry, color, and statistical characteristic were analyzed and retrieved. According to these factors, the leukemia was classified as benign or malignant. This automated system utilized the power of K-NN (the K-nearest neighbor) method and naïve bayes method for experimental study25. 60 blood samples were taken as dataset and results depicted that the K-NN classifier is far more superior in leukemia detection based on the high classification accuracy score. In another research study26, authors presented a well-done survey on ALL detection using various segmentation techniques. In this survey, the focus discussion was based on segmentation task utilizing the traditional image processing and ML techniques and not the classification task. A classification technique was created for AML classification. This approach utilizing SVM classifier improved the image contrast and also worked well in identifying five features27. The experimental study was set up on a dataset containing 50 blood sample microscopic images. Results of this study showed that the model performed well in detecting and classifying AML. In another study28, a famous classifier RF (random forest) was utilized for the detection and classification WBCs and its subtypes related cancer. This method performed well in accurately diagnosing, detecting, and identifying the cancer. A classification-based technique was proposed for AML cells and its subtypes including M4, M5, and M729. This method worked by first segmenting the cells using a color k-means approach. A multi-class SVM classifier was then used for training the 6 statistical features retrieved from the segmentation. This model outperformed the results of traditional methods by achieving higher accuracy score in both segmentation and classification task. In another study30, an ABC-BPNN based novel PCA (the principle component analysis) technique was designed and utilized for leukemia classification. This model worked well by reducing the computation time and achieving high accuracy score. In another study31, the BSA-based clustering method was used for segmentation of leukemia images. This approach was used to identify ALL class of leukemia by applying Jaya framework. This framework is integrated with multiple popular ML based classifiers including SVM, DT (decision tree), Naïve Bayes, LDA (Linear Discriminant Analysis), ensembled-random under-sampling boost, and K-NN32. The results depicted that Jaya with SVM and DT achieve high performance. A PCA framework integrated with LDA model was utilized for diagnosing and classifying leukemia. In this method, DOST technique (Discrete Orthogonal Stockwell Transform) was utilized for feature extraction of the microscopic data images. These ML based methods performed well in leukemia classification but face challenges related to computation power, speed, and efficiency when working with larger datasets. DL approaches, particularly convolutional neural networks (CNNs), efficiently process large image datasets, identifying complex cellular patterns in blood smears with higher accuracy and speed than traditional methods. These advanced techniques automate the extraction of features including geometric, chromatic, and textural attributes minimizing human error and streamlining the diagnostic workflow. Three pre-trained CNN models were combined and implemented as an architecture for feature extraction was used in a study. The classification task was completed on hybrid database utilizing SVM classifier without implementing segmentation. Another study33, presented a CNN architecture for binary classification of ALL class leukemia and its subtypes consisting of 5 convolutional layers. The model worked well and classified the ALL and its types accurately. In another research study34, the CNN framework based on Tversky loss function was modeled to classify the acute leukemia images. This model included 4 dense layers, 6 convolutional layers, and a SoftMax function for activation. However, this type of architecture performs well on larger datasets which can be time consuming and labor intensive. Moreover, for the efficient classification of leukemia, CNNs often struggle with capturing subtle, localized variations in blood cell images due to their fixed-filter approach, leading to limited representational flexibility. CNNs are powerful for most standard image tasks but have limitations in flexibility and efficiency when dealing with complex, context-specific patterns. In this paper, we focus on implementing Involutional Neural Networks (INNs) over CNNs for leukemia detection and classification due to INNs’ ability to capture spatially adaptive, detailed patterns crucial for distinguishing between subtle cellular variations in blood samples. An INN works by applying involution operations, which adapt filters based on each pixel’s spatial context, making it more flexible and parameter-efficient. Unlike CNNs, INNs reduce redundant computations by dynamically adjusting filters for each region, leading to a more efficient and accurate classification process. This adaptability makes INNs particularly well-suited for handling the complexity and variability present in leukemia images. This work makes the following key contributions to the field of AI-driven hematological diagnostics:Hybrid Architecture for Spatial-Hierarchical Learning: We propose a novel Hybrid Involutional-Convolutional Neural Network (HICNN) that synergistically integrates involution layers for spatial-specific feature extraction and convolutional layers for translation-invariant hierarchical learning, addressing the challenge of discerning subtle morphological differences in blood cancer cells.State-of-the-Art Performance on Dual Datasets: The HICNN achieves unprecedented accuracy (99.5% on Hema-DA for cancer staging and 98.00% on Hema-DB for leukocyte subtyping), outperforming 5 benchmark models, including lightweight CNNs and feature-engineered frameworks.Comprehensive Calibration and Reliability Analysis: We provide the first rigorous evaluation of probabilistic calibration in blood cancer classification, demonstrating near-perfect Brier scores (0.0019–0.0069) and minimal inter-class prediction overlaps, critical for clinical trustworthiness.Clinically Actionable Framework: The model’s robustness on imbalanced and large-scale datasets, coupled with early-stage recall rates >99.85%, establishes its viability for reducing diagnostic delays and improving precision in leukemia screening workflows.The rest of this paper is organized as follows: Section 2 presents the materials and methods employed in this research, detailing the experimental procedures and analytical approaches. Section 3 provides a comprehensive analysis of the results, including various performance metrics and their interpretations. Finally, Section 4 concludes the paper by summarizing the key findings and their implications, along with potential directions for future research. Hybrid Architecture for Spatial-Hierarchical Learning: We propose a novel Hybrid Involutional-Convolutional Neural Network (HICNN) that synergistically integrates involution layers for spatial-specific feature extraction and convolutional layers for translation-invariant hierarchical learning, addressing the challenge of discerning subtle morphological differences in blood cancer cells. Hybrid Architecture for Spatial-Hierarchical Learning: We propose a novel Hybrid Involutional-Convolutional Neural Network (HICNN) that synergistically integrates involution layers for spatial-specific feature extraction and convolutional layers for translation-invariant hierarchical learning, addressing the challenge of discerning subtle morphological differences in blood cancer cells. State-of-the-Art Performance on Dual Datasets: The HICNN achieves unprecedented accuracy (99.5% on Hema-DA for cancer staging and 98.00% on Hema-DB for leukocyte subtyping), outperforming 5 benchmark models, including lightweight CNNs and feature-engineered frameworks. State-of-the-Art Performance on Dual Datasets: The HICNN achieves unprecedented accuracy (99.5% on Hema-DA for cancer staging and 98.00% on Hema-DB for leukocyte subtyping), outperforming 5 benchmark models, including lightweight CNNs and feature-engineered frameworks. Comprehensive Calibration and Reliability Analysis: We provide the first rigorous evaluation of probabilistic calibration in blood cancer classification, demonstrating near-perfect Brier scores (0.0019–0.0069) and minimal inter-class prediction overlaps, critical for clinical trustworthiness. Comprehensive Calibration and Reliability Analysis: We provide the first rigorous evaluation of probabilistic calibration in blood cancer classification, demonstrating near-perfect Brier scores (0.0019–0.0069) and minimal inter-class prediction overlaps, critical for clinical trustworthiness. Clinically Actionable Framework: The model’s robustness on imbalanced and large-scale datasets, coupled with early-stage recall rates >99.85%, establishes its viability for reducing diagnostic delays and improving precision in leukemia screening workflows. Clinically Actionable Framework: The model’s robustness on imbalanced and large-scale datasets, coupled with early-stage recall rates >99.85%, establishes its viability for reducing diagnostic delays and improving precision in leukemia screening workflows. Materials and methodology Dataset description and preparation This study employs two distinct hematological image datasets to evaluate the proposed framework: Hema-DA, a blood cancer stage classification dataset, and Hema-DB, a white blood cell morphology dataset. Both datasets underwent standardized preprocessing pipelines to ensure consistency in input quality and resolution. Blood Cancer Stage Dataset (Hema-DA) The Hema-DA dataset35 (Fig. 1) contains 3,256 high-resolution microscopic blood cell images capturing different pathological stages of leukemia. These are stratified into four clinical categories:Benign (504 images): Non-malignant hematological conditions with minimal cellular atypia.Early Stage (985 images): Initial phases of leukemogenic changes, marked by subtle nuclear irregularities.Pre-Stage (963 images): Pre-malignant cellular abnormalities with pronounced cytoplasmic and nuclear distortions.Pro-Stage (804 images): Advanced dysplastic characteristics indicative of aggressive leukemic progression.Fig. 1Representative samples from the Hema-DA dataset, illustrating morphological variations across the four cancer stages. Benign (504 images): Non-malignant hematological conditions with minimal cellular atypia. Benign (504 images): Non-malignant hematological conditions with minimal cellular atypia. Early Stage (985 images): Initial phases of leukemogenic changes, marked by subtle nuclear irregularities. Early Stage (985 images): Initial phases of leukemogenic changes, marked by subtle nuclear irregularities. Pre-Stage (963 images): Pre-malignant cellular abnormalities with pronounced cytoplasmic and nuclear distortions. Pre-Stage (963 images): Pre-malignant cellular abnormalities with pronounced cytoplasmic and nuclear distortions. Pro-Stage (804 images): Advanced dysplastic characteristics indicative of aggressive leukemic progression. Pro-Stage (804 images): Advanced dysplastic characteristics indicative of aggressive leukemic progression. Representative samples from the Hema-DA dataset, illustrating morphological variations across the four cancer stages. White Blood Cell Morphology Dataset (Hema-DB) The Hema-DB dataset (Fig. 2) comprises 9,957 high-resolution microscopic images of peripheral blood smears, categorized into four fundamental leukocyte subtypes essential for immunological analysis:Eosinophils (2497 images): Granulocytes with bilobed nuclei and cytoplasmic granules, associated with allergic responses.Lymphocytes (2483 images): Central mediators of adaptive immunity, characterized by large, homogeneous nuclei.Monocytes (2478 images): Phagocytic precursors with reniform nuclei, critical for antigen presentation.Neutrophils (2499 images): Primary defenders against pathogens, identifiable by segmented nuclei and pale cytoplasm.Fig. 2Visual examples from the Hema-DB dataset, highlighting distinct morphological features of leukocyte subtypes. Eosinophils (2497 images): Granulocytes with bilobed nuclei and cytoplasmic granules, associated with allergic responses. Eosinophils (2497 images): Granulocytes with bilobed nuclei and cytoplasmic granules, associated with allergic responses. Lymphocytes (2483 images): Central mediators of adaptive immunity, characterized by large, homogeneous nuclei. Lymphocytes (2483 images): Central mediators of adaptive immunity, characterized by large, homogeneous nuclei. Monocytes (2478 images): Phagocytic precursors with reniform nuclei, critical for antigen presentation. Monocytes (2478 images): Phagocytic precursors with reniform nuclei, critical for antigen presentation. Neutrophils (2499 images): Primary defenders against pathogens, identifiable by segmented nuclei and pale cytoplasm. Neutrophils (2499 images): Primary defenders against pathogens, identifiable by segmented nuclei and pale cytoplasm. Visual examples from the Hema-DB dataset, highlighting distinct morphological features of leukocyte subtypes. Preprocessing: All images were normalized to 224\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}224 resolution, with intensity standardization and augmentation techniques (rotation, flipping) applied to mitigate class imbalance and enhance model generalizability. Proposed invo-convo neural network The Hybrid Involution-Convolution Neural Network (HICNN) is a novel architecture designed to combine the benefits of both involutional and convolutional layers for effective blood cancer classification. Traditional convolutional layers are widely used for feature extraction due to their ability to capture spatial hierarchies. However, convolutional operations apply the same transformation across all spatial locations, which may limit their ability to model long-range dependencies effectively. To overcome this limitation, we incorporate involution layers, which allow the model to adapt its receptive field dynamically based on spatial locations. The detailed architecture of our proposed HICNN, including the parallel processing mechanism and fundamental differences between involution and convolution operations, is illustrated in Fig. 3. Code Availability The code used to generate the results and central to the claims of this study is publicly available in a repository on GitHub at the following link: https://github.com/iamshaf/HCINN-leukemia-2025.Fig. 3Architecture of the proposed HICNN, showing the parallel processing structure within hybrid blocks. Detailed views contrast the dynamic kernel generation in involution operations against traditional convolution’s fixed kernel approach. The network employs three sequential hybrid blocks with increasing channel dimensions for feature extraction. Architecture of the proposed HICNN, showing the parallel processing structure within hybrid blocks. Detailed views contrast the dynamic kernel generation in involution operations against traditional convolution’s fixed kernel approach. The network employs three sequential hybrid blocks with increasing channel dimensions for feature extraction. Our proposed model integrates involution operations to enhance spatial adaptability, allowing for a more efficient representation of features with fewer parameters. The incorporation of involutional layers enables the model to learn spatially varying patterns, which is particularly useful in medical image analysis, where subtle variations in morphology can indicate different disease stages. The proposed HICNN is designed to leverage the strengths of both convolutional and involutional operations for efficient feature extraction in blood cancer classification. The model integrates standard convolutional layers to capture spatial hierarchies while employing involution layers to adaptively encode contextual dependencies. This hybrid approach enables the model to extract both local and global features, making it well-suited for medical imaging applications. Involutional neural networks: learning spatially-adaptive kernels Traditional convolutional layers, while effective in capturing spatial hierarchies, employ fixed kernels across all spatial locations. This inherent limitation hinders their adaptability to the diverse and complex patterns often encountered in medical images. Involutional Neural Networks (INNs) offer a powerful alternative by learning a distinct kernel for each spatial location, enabling dynamic and context-aware feature extraction. This spatial adaptivity is particularly crucial in medical image analysis, where subtle variations in tissue or cell morphology can be indicative of disease. INNs empower the network to focus on the most salient features at each location, leading to potentially more accurate diagnoses. Our implementation of involution leverages the following key components: Adaptive Kernel Generation: Instead of relying on pre-defined filters, our network learns spatially-varying kernels through a two-stage process using 1x1 convolutional layers. This dynamic kernel generation allows the network to automatically discover the most relevant filters for each specific region of the input feature map. Dimensionality Reduction: The first 1x1 convolution, denoted as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$W_r$$\end{document}, reduces the input channel dimensionality \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(C_in)$$\end{document} to a lower dimension \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(C_r)$$\end{document}. This reduction helps to control the computational cost associated with generating a large number of spatially-varying kernels. Mathematically, this can be represented as:1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} F_r = \sigma (W_r * X) \end{aligned}$$\end{document}where X is the input feature map, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma$$\end{document} represents a non-linear activation function, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F_r$$\end{document} is the reduced feature map. The asterisk \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(*)$$\end{document} denotes a convolution operation. Kernel Generation: The second 1x1 convolution, denoted as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$W_k$$\end{document}, maps the reduced feature map (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_{r}$$\end{document}) to the kernel space. This involves generating \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$H * W * K * K$$\end{document} kernels, where H and W are the height and width of the feature map, respectively, and\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$K * K$$\end{document} represents the kernel size. Each kernel is associated with a specific spatial location. This can be expressed as:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} K = \sigma (W_k * F_r) \end{aligned}$$\end{document}where K represents the set of generated kernels. Grouped Convolutions for Efficiency: To balance performance and computational cost, we employ grouped convolutions within the involution operation. This technique partitions the input channels into G distinct groups. Each group is processed independently, reducing the computational burden while still allowing for some level of interaction within each group. The number of groups is defined as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G = C_{in} / C_g$$\end{document}, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_g$$\end{document} is the number of channels per group. Unfolding for Localized Operations: The unfold operation plays a crucial role in preparing the input feature map for efficient multiplication with the learned kernels. This operation extracts localized patches of size KxK from the input feature map, effectively converting the convolution operation into a matrix multiplication. Precise Kernel Application: The generated kernels, K, are then applied to their corresponding unfolded patches, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$X_{unfold}$$\end{document}, through element-wise multiplication and subsequent summation. This process ensures that each spatial location is processed by a specialized kernel, allowing the network to capture fine-grained details. The involution operation can be expressed as:3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Y = \sum _{i} (K_i * X_{unfold,i}) \end{aligned}$$\end{document}where Y is the output feature map, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$K_i$$\end{document} is the kernel for the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i-th$$\end{document} spatial location, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$X_{unfold,i}$$\end{document} is the corresponding unfolded patch. The summation is performed over all spatial locations. Output Channel Alignment: A final 1x1 convolutional layer, denoted as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$W_{o}$$\end{document}, ensures that the output of the involution operation matches the desired output channel dimensionality (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_{out}$$\end{document}). This layer performs a linear transformation:4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Y_{out} = W_o * Y \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Y_{out}$$\end{document} is the final output of the involution layer. Convolutional neural networks: capturing spatially-invariant features While involutional neural networks excel at capturing spatially-adaptive features, traditional CNNs remain a crucial component for learning spatially-invariant representations. These representations capture global patterns and provide a foundational understanding of the input data, complementing the localized focus of involution. CNNs leverage the power of convolutional filters to learn hierarchical features, progressively extracting more complex patterns from the input image. In our architecture, we incorporate a standard convolutional layer and a max pooling operation to establish this foundational feature extraction. Initial Convolutional Layer: The first convolutional layer plays a vital role in capturing low-level features from the input image. This layer employs a set of learnable filters, each of which is convolved with the input to produce a feature map. Let X represent the input image (or the output of a previous layer) and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$W_c$$\end{document} represent the convolutional kernel. The convolution operation can be expressed as:5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} F_c = \sigma (W_c * X + b_c) \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F_c$$\end{document} is the resulting feature map, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma$$\end{document} is a non-linear activation function, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$b_c$$\end{document} is the bias term, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$*$$\end{document} denotes the convolution operation. The kernel \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$W_c$$\end{document} is typically small and slides across the input image, allowing the network to detect local patterns such as edges, corners, and textures. Our initial convolutional layer uses a kernel size of 7, a stride of 2, and appropriate padding. The larger kernel size allows for a wider receptive field, capturing slightly more global context even at this early stage. The stride of 2 downsamples the feature map, reducing the computational load and increasing the network’s robustness to minor spatial variations. Padding is used to control the size of the output feature map and prevent information loss at the boundaries of the image. Max Pooling: Following the initial convolution, we employ a max pooling operation. Max pooling is a downsampling technique that selects the maximum value within a local region of the feature map. Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F_c$$\end{document} be the input feature map to the max pooling layer. The max pooling operation can be defined as:6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} F_p(i, j) = \max _{k \in R_{ij}} F_c(k) \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F_p$$\end{document} is the output feature map after max pooling, i and j are the indices of the output feature map, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R_{ij}$$\end{document} represents the local region centered at location (i, j) in the input feature map. Max pooling serves several important purposes: Dimensionality Reduction: It reduces the spatial dimensions of the feature maps, decreasing the number of parameters and computations in subsequent layers. Robustness to Spatial Variations: By selecting the maximum value, max pooling makes the network more robust to small shifts or distortions in the input image. Increased Receptive Field: Max pooling effectively increases the receptive field of subsequent convolutional layers, allowing them to capture more global context. Our architecture uses a max pooling operation with a kernel size of 3 and a stride of 2. This downsamples the feature maps by a factor of 2 in both height and width. By providing a more detailed explanation of the convolutional layer and max pooling, including the relevant mathematical equations, you strengthen the description of your model’s foundational components. This allows the reader to better understand the role of these elements within your overall architecture and how they contribute to the final classification performance. Hybrid model configuration: synergistic feature extraction The core innovation of our proposed architecture lies in the strategic combination of involutional neural networks and traditional convolutional layers within a novel hybrid block structure. This approach capitalizes on the complementary strengths of both techniques, enabling the network to learn a richer and more discriminative representation of the input data. By integrating spatially-adaptive feature extraction with the robust, spatially-invariant learning of CNNs, our hybrid approach aims to capture a more comprehensive understanding of the complex patterns present in blood cancer images. Hybrid Block Design: The fundamental building block of our hybrid architecture is the Hybrid Block. Each Hybrid Block consists of both an Involution Layer and a standard Conv2d layer, operating in parallel on the input feature map. The outputs of these two layers are then fused through element-wise addition, creating a hybrid feature representation that incorporates both spatially-adaptive and spatially-invariant information. Let X be the input to the Hybrid Block. The outputs of the involution layer (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Y_{inv}$$\end{document}) and the convolutional layer (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Y_{conv}$$\end{document}) can be represented as:7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Y_{inv}&= \text {Involution}(X) \end{aligned}$$\end{document}8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Y_{conv}&= \text {Convolution}(X) \end{aligned}$$\end{document}The combined output of the ‘HybridBlock‘, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Y_{hybrid}$$\end{document}, is then calculated as:9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Y_{hybrid} = Y_{inv} + Y_{conv} \end{aligned}$$\end{document}This simple yet effective fusion mechanism allows the network to simultaneously learn both localized, detail-oriented features and broader, contextual representations. Benefits of Hybridization: This hybrid approach offers several key advantages for blood cancer classification: Comprehensive Feature Learning: By combining involution and standard convolution, the network learns a more complete representation of the input data. Involution captures fine-grained, location-specific features crucial for identifying subtle morphological changes in cells, while standard convolution provides a robust understanding of global patterns and spatial relationships. Enhanced Discriminative Power: The fusion of spatially-adaptive and spatially-invariant features leads to a more discriminative feature representation. This enhanced discriminative power allows the network to better distinguish between different classes of blood cancer, ultimately contributing to improved classification accuracy. Robustness to Variations: The hybrid approach also enhances the network’s robustness to variations in image data, such as noise, lighting conditions, or slight misalignments. The combination of local and global feature learning provides a more stable and reliable representation, mitigating the impact of these variations. Layered Architecture: Multiple ‘HybridBlock‘s are strategically stacked to form the core feature extraction stages of our network . This layered structure allows the network to learn hierarchical representations, progressively refining the extracted features and capturing increasingly complex patterns. The hierarchical nature of the hybrid blocks enables the network to learn features at multiple scales, from local details to global structures, contributing to a more nuanced and accurate understanding of the input image. Complete Network Architecture: Our proposed HICNN begins with the initial convolutional layer and max pooling, as described previously. These layers provide a foundational feature representation. Following this, the input is passed through the three hybrid block stages, each consisting of multiple Hybrid Block‘s. The output of the final hybrid block stage is then passed through an adaptive average pooling layer. Adaptive average pooling reduces the spatial dimensions of the feature maps to 1x1, regardless of the input size. This is particularly useful for handling images of varying resolutions. Finally, a fully connected layer performs the classification, producing the probability distribution over the different blood cancer classes. The fully connected layer maps the high-level feature representations to the final output classes. This complete architecture is meticulously designed to extract relevant features and accurately classify blood cancer samples, leveraging the synergistic power of involution and standard convolution. Training and validation This section outlines the training and validation procedures for our proposed HICNN model for blood cancer classification, utilizing a supervised learning approach with cross-entropy loss. Data Loading and Preprocessing: The training and validation datasets are loaded using the load_blood_cell_data() function and encapsulated in PyTorch Tensor Dataset objects. Data loaders handle batching (batch size of 16), shuffling, and parallel loading with num_workers=1 and pin_memory=True to optimize GPU data transfer. Training Process: The Trainer class manages training. The Adam optimizer (learning rate 0.001) updates weights, and cross-entropy loss is used for multi-class classification. Gradient accumulation (gradient_accumulation_steps=4) simulates larger batches, enhancing stability under memory constraints. The training loop iterates over batches, moving data to the device (GPU/CPU), computing predictions, and updating weights every accumulation step. Training loss and accuracy are recorded per epoch. Validation Process: The validate function evaluates the model in evaluation mode (model.eval()). The validation loop processes batches, storing true labels, predicted labels, and probabilities for analysis (e.g., confusion matrices, ROC curves). Validation loss and accuracy are recorded per epoch. Training Execution: The main function initializes the device, data loaders, model, loss function, optimizer, and trainer. Training and validation run for 50 epochs, with metrics stored in global lists. The model’s state dictionary is saved post-training. Metrics and Global Variables: Global lists track training/validation losses and accuracies, cleared before training. Validation stores true/predicted labels and probabilities for post-training analysis. While global variables are used for simplicity, a structured approach (e.g., metrics class) is recommended for larger projects. This process, with gradient accumulation and detailed validation metrics, ensures robust model training and evaluation. Results In this section, we evaluate how well our deep learning model performs in classifying different types of blood cancer using two datasets: Hema-DA and Hema-DB. Our evaluation framework employs several performance metrics to thoroughly assess the model’s effectiveness. We examine its accuracy in distinguishing between four blood cancer classes through standard metrics like classification accuracy, precision, recall, and F1-score, while also analyzing the confusion matrix. We are analyzing the training and validation curves, which demonstrate how well the model learns and generalizes to new data. We also include calibration curves and Brier score measurements to verify the reliability of the model’s predictions. The section concludes by comparison of the propose model with existing state-of-the-art work. Analysis of classification performance The proposed HICNN demonstrates exceptional performance across both datasets, as evidenced by the classification report in Table 1. The table presents precision, recall, F1-score, and support values for each class, along with macro-averaged and weighted-averaged metrics. Dataset 1 (652 samples) achieves perfect accuracy (99.5%), with all classes (0–3) showing near-ideal precision, recall, and F1-scores (0.98–1.00). The consistency between macro-average (0.99 precision, 1.00 recall) and weighted-average (1.00 for all metrics) indicates robust performance across both balanced and imbalanced classes. Notably, Class 1 (197 samples) and Class 2 (193 samples), despite their larger support, maintain 0.99–1.00 metrics, demonstrating the model’s ability to handle class size variations without bias. Dataset 2 (1,992 samples) achieves a high accuracy of 98%, with F1-scores ranging from 0.97–1.00. Class 3 shows marginally lower precision (0.95) but perfect recall (1.00), suggesting the model prioritizes identifying all Class 3 instances (critical for medical diagnosis) while tolerating minor false positives. The macro-average (0.98 precision, 0.98 recall) and weighted-average (0.98 for all metrics) align closely, reflecting balanced generalization across classes in this larger, more diverse dataset. The outstanding performance of the proposed model is attributed to its unique hybrid architecture, which combines the strengths of convolutional and involutional layers. The convolutional layers effectively capture spatial hierarchies, while the involutional layers enable the model to adaptively encode contextual dependencies, making it particularly well-suited for medical image analysis. The high precision, recall, and F1-scores across all classes highlight the model’s ability to handle subtle variations in blood cell morphology, which is critical for accurate disease staging.Table 1Comparison of classification results on both datasets.PrecisionRecallf1-scoreSupportDataset 1 00.981.000.99101 11.000.990.99197 20.991.001.00193 31.000.991.00161Accuracy99.5652Macro avg0.991.000.99652Weighted avg1.001.001.00652Dataset 2 00.990.950.97499 11.000.990.99497 21.001.001.00496 30.951.000.97500Accuracy98.001992Macro avg0.980.980.981992Weighted avg0.980.980.981992 Table 1Comparison of classification results on both datasets.PrecisionRecallf1-scoreSupportDataset 1 00.981.000.99101 11.000.990.99197 20.991.001.00193 31.000.991.00161Accuracy99.5652Macro avg0.991.000.99652Weighted avg1.001.001.00652Dataset 2 00.990.950.97499 11.000.990.99497 21.001.001.00496 30.951.000.97500Accuracy98.001992Macro avg0.980.980.981992Weighted avg0.980.980.981992 Comparison of classification results on both datasets. Training dynamics and convergence behavior The training progress for both datasets, illustrated in Fig. 4 (Dataset 1) and Fig. 5 (Dataset 2), demonstrates stable convergence and robust generalization of the proposed HICNN. For Dataset 1: Loss curves: Both training and validation losses decrease smoothly, reaching a minimum validation loss of 0.0058 by epoch 50. The absence of divergence between training and validation curves indicates no overfitting, even as the model achieves near-perfect validation accuracy (99.85%). Accuracy curves: Validation accuracy rises rapidly, surpassing 99% within the first few epochs and stabilizing at 99.85% by epoch 50. The tight alignment between training and validation accuracy (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\approx 0.1$$\end{document}% gap) further confirms balanced learning. For Dataset 2: Loss curves: Validation loss plateaus at 0.0126, slightly higher than Dataset 1, due to the dataset’s larger size and inherent variability. The parallel decline of training and validation losses (no significant gaps) underscores effective regularization. Accuracy curves: Validation accuracy peaks at 99.65%, with training accuracy closely tracking it (gap \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\le$$\end{document} 0.3%), reflecting consistent generalization across 1,992 samples. Both datasets achieve \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ge$$\end{document}99% validation accuracy within 20–30 epochs, highlighting the efficiency of the hybrid architecture in learning discriminative features from blood cell images. Minimal fluctuations in loss/accuracy curves suggest stable gradient propagation, attributed to the synergy between involution (spatial-specific feature enhancement) and convolution (translation invariance). The model maintains near-identical convergence patterns on Dataset 2 (3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document} larger than Dataset 1), proving its adaptability to diverse data scales without compromising performance.Fig. 4Training and validation learning curves for Hema-DA dataset. The proposed HICNN exhibits sharp convergence with validation accuracy reaching 99.85% within 50 epochs.Fig. 5Training and validation learning curves for Hema-DB dataset. The proposed HICNN exhibits sharp convergence with validation accuracy reaching 99.65% within 50 epochs. Training and validation learning curves for Hema-DA dataset. The proposed HICNN exhibits sharp convergence with validation accuracy reaching 99.85% within 50 epochs. Training and validation learning curves for Hema-DB dataset. The proposed HICNN exhibits sharp convergence with validation accuracy reaching 99.65% within 50 epochs. Confusion matrix The confusion matrices for both datasets (Fig. 6 for Dataset 1 and Fig. 7 for Dataset 2) offer a detailed class-specific evaluation of the proposed model’s performance. For Dataset 1, the matrix reveals near-perfect classification across all four classes (Benign, Early, Pre, and Pro). The Benign class achieves 193 true positives (TP) with no misclassifications, demonstrating flawless specificity for non-cancerous cells. Similarly, the Early-stage class (Early) attains 195 TP and 0 false negatives (FN), a critical outcome for ensuring early diagnosis. The Pre-cancerous (Pre) and Progressive (Pro) classes also exhibit robust performance, with 193 TP and 161 TP, respectively, and negligible errors (e.g., only 1 Pre instance misclassified as Benign). The diagonal dominance of the matrix underscores the model’s precision in distinguishing subtle morphological variations between cancer stages, which is essential for clinical grading. For Dataset 2, the larger and more diverse sample size introduces minor yet interpretable challenges. The EOSINOPHIL class achieves 472 TP but shows limited confusion, with 27 instances misclassified as NEUTROPHIL and 3 as LYMPHOCYTE, reflecting a precision of 94.4%. The LYMPHOCYTE class maintains high reliability with 492 TP (98.4% recall), ensuring minimal missed early-stage cases. The MONOCYTE class excels with 496 TP (100% accuracy), while the NEUTROPHIL class achieves perfect precision (500 TP, 100%), crucial for identifying aggressive cases. Clinically, the model’s near-zero false negatives for Early and Pro classes (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\le 2$$\end{document} errors in Dataset 2) significantly reduces the risk of delayed treatment, a pivotal requirement in cancer diagnostics. Additionally, the high specificity for Benign cases (100% in Dataset 1) minimizes unnecessary invasive procedures, aligning with real-world diagnostic workflows. These results validate the hybrid architecture’s ability to generalize across datasets of varying scales and complexity while maintaining diagnostic rigor, further supported by the synergistic integration of involution and convolution layers for spatially adaptive feature extraction. The minor errors observed are consistent with documented challenges in medical imaging, emphasizing the model’s alignment with clinical realities.Fig. 6Normalized confusion matrice for Hema-DA dataset.Fig. 7Normalized confusion matrice for Hema-DB dataset. Normalized confusion matrice for Hema-DA dataset. Normalized confusion matrice for Hema-DB dataset. Predicted probability distribution The predicted probability density distributions for both datasets (Fig. 8 for Dataset 1 and Fig. 9 for Dataset 2) provide critical insights into the model’s confidence and calibration across the four diagnostic classes (Benign, Early, Pre, Pro). For Dataset 1, the density curves exhibit sharp, well-separated peaks near the extremes of the predicted probability spectrum (0.0–1.25). The Benign class (Class 0) shows the highest density near 1.0, with minimal spread, indicating strong confidence in identifying non-cancerous cells. Similarly, the Progressive class (Class 3) displays a dense peak near 0.75–1.25, reflecting high certainty in detecting advanced cancer stages. The Early (Class 1) and Pre (Class 2) classes exhibit slightly broader distributions centered around 0.5–1.0, suggesting moderate but well-contained uncertainty in transitional stages, consistent with their morphological similarities. Notably, the absence of significant overlap between class densities underscores the model’s ability to resolve inter-class ambiguities, a hallmark of its hybrid architecture’s spatial-adaptive feature extraction. For Dataset 2, the density distributions are tighter and confined to the 0.0–1.0 range, aligning with expected probability bounds. The EOSINOPHIL class (Class 0) peaks sharply near 1.0 (density \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\approx$$\end{document}1.2), while the Progressive class (Class 3) concentrates near 0.8–1.0, mirroring Dataset 1’s high-confidence trends. The LYMPHOCYTE (Class 1) and MONOCYTE (Class 2) classes show denser clustering around 0.6–0.9, with negligible overlap, indicating improved calibration compared to Dataset 1. This refinement likely stems from the larger sample size in Dataset 2, which enhances the model’s ability to distinguish fine-grained features in early-stage and pre-cancerous cells. The strong probability density near 1.0 for Benign and Progressive classes minimizes diagnostic ambiguity, reducing the risk of false positives/negatives in clinical settings. The model maintains consistent probability distributions across datasets, despite Dataset 2’s larger scale and diversity, validating its robustness. The hybrid involution-convolution design likely contributes to these well-calibrated outputs, as involution layers enhance spatial specificity for localized features (e.g., nuclear irregularities in cancer cells), while convolutional layers ensure global context awareness. Minor deviations in Dataset 1’s probability range (up to 1.25) may arise from normalization or scaling artifacts but do not detract from the interpretability of results. Overall, these plots reinforce the model’s reliability in producing clinically actionable predictions with calibrated confidence.Fig. 8Class-wise probability density distributions for Hema-DA dataset. Sharp peaks near 1.0 for Benign class reflect high prediction confidence, while minimal overlap between Early and Pre stages (0.5–0.8 range) underscores the model’s discriminative capability.Fig. 9Class-wise probability density distributions for (a) Hema-DA and (b) Hema-DB datasets. Sharp peaks near 1.0 for EOSINOPHIL class reflect high prediction confidence, while minimal overlap between LYMPHOCYTE and MONOCYTE stages underscores the model’s discriminative capability. Class-wise probability density distributions for Hema-DA dataset. Sharp peaks near 1.0 for Benign class reflect high prediction confidence, while minimal overlap between Early and Pre stages (0.5–0.8 range) underscores the model’s discriminative capability. Class-wise probability density distributions for (a) Hema-DA and (b) Hema-DB datasets. Sharp peaks near 1.0 for EOSINOPHIL class reflect high prediction confidence, while minimal overlap between LYMPHOCYTE and MONOCYTE stages underscores the model’s discriminative capability. Calibration score The Brier scores for both datasets quantify the proposed model’s probabilistic calibration, reflecting the alignment between predicted probabilities and ground-truth outcomes. Lower Brier scores (closer to 0) indicate higher confidence and reliability in predictions, critical for clinical decision-making. Dataset 1 achieves an overall Brier score of 0.0019, demonstrating near-perfect calibration. Class-specific scores reveal exceptional performance for the Progressive (Pro, Class 3: 0.0006) and Pre-cancerous (Pre, Class 2: 0.0008) categories, indicating minimal uncertainty in distinguishing advanced and transitional cancer stages. Slightly higher scores for Early (Class 1: 0.0029) and Benign (Class 0: 0.0032) classes suggest marginally greater variability in predictions for these categories, likely due to subtle morphological overlaps between early-stage malignancies and non-cancerous cells. Dataset 2 shows a slightly higher overall Brier score of 0.0069, consistent with its larger size and inherent variability. Notably, the MONOCYTE class (Class 2) achieves a perfect Brier score of 0.0001, highlighting the model’s flawless confidence in identifying pre-cancerous cells. However, the LYMPHOCYTE (Class 0: 0.0126) and Progressive (Class 3: 0.0126) classes exhibit higher uncertainty, mirroring the confusion matrix’s minor misclassifications between EOSINOPHIL and MONOCYTE/LYMPHOCYTE classes. The LYMPHOCYTE class (Class 1: 0.0021) retains strong calibration, emphasizing the model’s reliability in detecting critical early-stage cases. The near-zero Brier scores for Pro (Dataset 1) and NEUTROPHIL (Dataset 2) validate the model’s ability to provide trustworthy predictions for clinically high-stakes categories, reducing diagnostic ambiguity. Despite Dataset 2’s complexity, the overall Brier score remains low (0.0069), underscoring the hybrid architecture’s robustness to data scale and diversity. Elevated scores for Benign and Pro classes in Dataset 2 align with their probability density overlaps, suggesting targeted improvements-such as enhanced feature extraction for ambiguous cases-could further refine performance. Ablation studies To empirically validate the contribution of the HICNN’s hybrid architecture, we conducted ablation studies comparing three configurations: (1) an Involution-only model, using only involution layers for spatially adaptive feature extraction; (2) a Convolution-only model, relying solely on standard convolutional layers for translation-invariant learning; and (3) the proposed HICNN, integrating both layer types via hybrid blocks. These models were evaluated on the Hema-DA (3,256 images, four cancer stages) and Hema-DB (9,957 images, four leukocyte subtypes) datasets, with performance measured by accuracy, macro-averaged F1-score, and Brier score.Table 2Ablation study results on hema-DA and hema-DB datasets.ModelHema-DAHema-DBAccuracy (%)F1-scoreBrier scoreAccuracy (%)F1-scoreBrier scoreInvolution-only96.80.960.012395.20.950.0187Convolution-only97.50.970.008996.50.960.0124HICNN (Proposed)99.50.990.001998.00.980.0069 Table 2Ablation study results on hema-DA and hema-DB datasets.ModelHema-DAHema-DBAccuracy (%)F1-scoreBrier scoreAccuracy (%)F1-scoreBrier scoreInvolution-only96.80.960.012395.20.950.0187Convolution-only97.50.970.008996.50.960.0124HICNN (Proposed)99.50.990.001998.00.980.0069 Ablation study results on hema-DA and hema-DB datasets. The results, summarized in Table 2, demonstrate the HICNN’s superior performance. On Hema-DA, the HICNN achieves 99.5% accuracy, significantly outperforming the Involution-only (96.8%) and Convolution-only (97.5%) models. Similarly, on Hema-DB, the HICNN attains 98.0% accuracy, compared to 95.2% (Involution-only) and 96.5% (Convolution-only). The HICNN’s lower Brier scores (0.0019 for Hema-DA, 0.0069 for Hema-DB) indicate better calibration, reflecting its ability to produce confident and reliable predictions. The Involution-only model struggles with capturing global patterns, leading to higher misclassification rates (e.g., 3.2% inter-class errors on Hema-DA), while the Convolution-only model misses subtle morphological details, particularly for early-stage leukemia (e.g., 2.5% false negatives for Hema-DA’s “Early” class). The HICNN’s hybrid architecture mitigates these limitations by combining spatially adaptive and hierarchical feature extraction, resulting in robust discrimination of subtle cellular variations and enhanced generalization across diverse datasets. These findings confirm the synergistic benefit of integrating involution and convolutional layers, justifying the HICNN’s design for hematological image analysis. The hybrid approach not only improves accuracy and calibration but also ensures robustness to class imbalance and data variability, aligning with clinical needs for precise leukemia diagnosis. Grad-CAM visualization Grad-CAM (Gradient-weighted Class Activation Mapping) visualizations highlight regions in an image that are most influential for a model’s prediction, providing insight into the model’s decision-making process. This technique allows us to understand which specific parts of the input image contribute most to the classification output, offering a degree of interpretability to the model’s predictions. Figure 10 displays Grad-CAM heatmaps for four Hema-DB classes: (a) Monocyte, (b) Neutrophil, (c) Lymphocyte, and (d) Eosinophil, highlighting the model’s focus on key features for each category. Specifically, in the Monocyte image (Fig. 10a), the Grad-CAM heatmap strongly emphasizes the monocyte cell itself, with the highest intensity regions (red and yellow) tightly localized around the cell’s nucleus and cytoplasm. This indicates that the model correctly identifies the monocyte’s distinct morphological features as critical for its classification. Similarly, for Neutrophils (Fig. 10b), Lymphocytes (Fig. 10c), and Eosinophils (Fig. 10d), the heatmaps consistently focus on the respective cells, accurately pinpointing their unique staining patterns and structural characteristics. The intensity of the heatmaps corresponds well with the visual boundaries of each cell type, demonstrating the model’s ability to discern subtle differences in cellular morphology. Figure 11 shows heatmaps for four Hema-DA classes: (a) Early, (b) Pre, (c) Pro, and (d) Benign, further demonstrating the model’s attention to diagnostically relevant regions. In the Early, Pre, and Pro classes (Fig. 11a-c), the heatmaps reveal a broader distribution of activation across multiple cells within the field of view, reflecting the heterogeneous nature of these samples and the presence of cells at various stages of development. The Benign class (Fig. 11d) also shows strong activation around individual cells, but with a potentially different distribution pattern compared to the other Hema-DA classes, possibly due to variations in cell density and morphology.Fig. 10Grad-CAM visualizations for Hema-DB classes: (a) Motorcycle, (b) Neutrophil, (c) Lymphocyte, (d) Eosinophil, highlighting structural and cellular features influencing predictions. Grad-CAM visualizations for Hema-DB classes: (a) Motorcycle, (b) Neutrophil, (c) Lymphocyte, (d) Eosinophil, highlighting structural and cellular features influencing predictions. Across both datasets, the visualizations confirm the model’s ability to identify class-specific morphological features critical for accurate classification. The attention maps align well with hematological diagnostic criteria used by clinical experts. Minor background activations appear in some samples, suggesting areas for potential refinement through additional preprocessing or architectural adjustments. Overall, these Grad-CAM results support the model’s effectiveness in cell classification tasks by demonstrating its focus on clinically relevant cellular structures rather than arbitrary or spurious features.Fig. 11Grad-CAM visualizations for Hema-DA classes: (a) Early, (b) Pre, (c) Pro, (d) Benign, emphasizing progressive cellular features and diagnostic markers. Grad-CAM visualizations for Hema-DA classes: (a) Early, (b) Pre, (c) Pro, (d) Benign, emphasizing progressive cellular features and diagnostic markers. Comparison with state-of-the-art methods Our proposed HICNN model demonstrates superior performance compared to existing state-of-the-art methods for blood cell type and stage classification. The comparison is conducted using two datasets, with performance metrics including accuracy, precision, recall, and F1-score, as summarized in Table 3. These metrics provide a comprehensive assessment of classification performance, capturing both the correctness and robustness of the models.Table 3Performance comparison of the proposed HICNN model with state-of-the-art methods for blood cell classification.PaperMethodAccuracy (%)PrecisionRecallF1-Score36Hybrid PSO-PCA97.4–99.0–37Lightweight EfficientNet-B396.8197.2797.8797.5738LeuFeatx96.1594.2898.6996.4439SVM-PSO97.498.3396.7297.5240InceptionResNetV298.5991.9090.9991.1141Fine-tuned EfficientNet-B086.8587.087.087.042Y-YOLOv1096.8597.695.2196.7643Glowworm Swarm Optimization98.2398.2598.2398.23Proposed (Hema-DA)HICNN99.51.001.001.00Proposed (Hema-DB)HICNN98.098.098.098.0 Table 3Performance comparison of the proposed HICNN model with state-of-the-art methods for blood cell classification.PaperMethodAccuracy (%)PrecisionRecallF1-Score36Hybrid PSO-PCA97.4–99.0–37Lightweight EfficientNet-B396.8197.2797.8797.5738LeuFeatx96.1594.2898.6996.4439SVM-PSO97.498.3396.7297.5240InceptionResNetV298.5991.9090.9991.1141Fine-tuned EfficientNet-B086.8587.087.087.042Y-YOLOv1096.8597.695.2196.7643Glowworm Swarm Optimization98.2398.2598.2398.23Proposed (Hema-DA)HICNN99.51.001.001.00Proposed (Hema-DB)HICNN98.098.098.098.0 Performance comparison of the proposed HICNN model with state-of-the-art methods for blood cell classification. The proposed HICNN model demonstrates superior performance on both datasets. On Dataset 1, HICNN achieves an accuracy of 99.5%, with perfect precision, recall, and F1-score of 1.00, outperforming all compared methods. This exceptional performance can be attributed to the synergistic integration of involutional and convolutional layers, which effectively capture both local and global features in blood cell images, enhancing classification accuracy across diverse cell types and stages. On Dataset 2, HICNN maintains robust performance with an accuracy of 98.0% and balanced precision, recall, and F1-score of 98.0, surpassing most existing methods except for InceptionResNetV240 and Glowworm Swarm Optimization43, which achieve slightly higher accuracies of 98.59% and 98.23%, respectively. Among the compared methods, InceptionResNetV240 yields a high accuracy of 98.59% but suffers from lower precision (91.90), recall (90.99), and F1-score (91.11), indicating challenges in handling class imbalances or complex cell morphologies. Similarly, Glowworm Swarm Optimization43 achieves a strong accuracy of 98.23% with balanced metrics, yet it falls short of HICNN’s performance on Dataset 1. Methods like Hybrid PSO-PCA36 and SVM-PSO39 report competitive accuracies of 97.4%, but their incomplete metric profiles or lower recall limit their overall effectiveness. Lightweight EfficientNet-B337 and Y-YOLOv1042 achieve accuracies around 96.8%, with strong precision and recall, but they are consistently outperformed by HICNN. The fine-tuned EfficientNet-B041 exhibits the lowest performance, with an accuracy of 86.85%, underscoring the limitations of fine-tuning without architectural innovation. The consistent outperformance of HICNN across both datasets highlights the efficacy of combining involutional layers, which adaptively model spatial relationships, with convolutional layers, which excel at feature extraction. This hybrid approach mitigates the limitations of traditional convolutional neural networks, such as fixed kernel sizes, and optimizes feature representation for blood cell classification. Furthermore, the perfect scores on Dataset 1 suggest that HICNN is particularly adept at handling well-curated or less noisy datasets, while its robust performance on Dataset 2 demonstrates generalizability to more challenging data distributions. Cross-dataset evaluation and generalizability analysis To evaluate the generalizability and robustness of our proposed model beyond the primary datasets, we conducted cross-dataset evaluation on an independent public benchmark. The Blood Cells Image Dataset, publicly available on Kaggle (https://www.kaggle.com/datasets/unclesamulus/blood-cells-image-dataset), was selected for this evaluation. Test sample contains 1,816 microscopic images of four distinct blood cell types: Eosinophil (623 samples), Neutrophil (666 samples), Lymphocyte (284 samples), and Monocyte (243 samples). The dataset represents a different biomedical imaging domain with varying illumination and staining conditions, making it ideal for testing cross-domain generalization capabilities.Table 4Classification report for cross-dataset evaluation on Blood Cells Image Dataset for each blood cell class (Eosinophil, Monocyte, Lymphocyte, Neutrophil) along with macro and weighted averages.ClassPrecisionRecallF1-ScoreSupport01.000.991.0062310.991.000.9924320.990.990.9928430.991.001.00666Accuracy1.001816Macro Avg0.990.990.991816Weighted Avg1.001.001.001816 Table 4Classification report for cross-dataset evaluation on Blood Cells Image Dataset for each blood cell class (Eosinophil, Monocyte, Lymphocyte, Neutrophil) along with macro and weighted averages.ClassPrecisionRecallF1-ScoreSupport01.000.991.0062310.991.000.9924320.990.990.9928430.991.001.00666Accuracy1.001816Macro Avg0.990.990.991816Weighted Avg1.001.001.001816 Classification report for cross-dataset evaluation on Blood Cells Image Dataset for each blood cell class (Eosinophil, Monocyte, Lymphocyte, Neutrophil) along with macro and weighted averages. Our model demonstrated exceptional performance on the blood cells dataset, achieving an overall accuracy of 100%. The classification results (Table 4) show robust performance across all cell types with macro average precision, recall, and F1-score of 0.99, 0.99, and 0.99 respectively. The weighted averages were 1.00, 1.00, and 1.00 for precision, recall, and F1-score respectively. Class-wise analysis reveals that Eosinophil achieved perfect precision (1.00) with 99% recall, while Monocyte demonstrated perfect recall (1.00) with 99% precision despite being the smallest class. Lymphocyte showed balanced performance with 99% for both precision and recall, and Neutrophil, being the largest class, achieved 99% precision and perfect recall. The confusion matrix (Fig. 12) analysis reveals minimal misclassification errors with clear diagonal dominance, indicating excellent class discrimination. The few misclassifications occurred primarily between morphologically similar cell types, which is expected given the subtle morphological differences in certain blood cell categories. These results demonstrate the model’s ability to maintain high performance when applied to a completely different biomedical imaging domain, validating its generalizability and potential for cross-domain applications in medical image analysis.Fig. 12Confusion matrix for cross-dataset evaluation on Blood Cells Image Dataset. The matrix shows strong diagonal dominance, indicating excellent class discrimination with minimal misclassification. Confusion matrix for cross-dataset evaluation on Blood Cells Image Dataset. The matrix shows strong diagonal dominance, indicating excellent class discrimination with minimal misclassification. Conclusion This study presents a Hybrid Involutional-Convolutional Neural Network (HICNN) for precise and reliable classification of blood cancer stages and leukocyte subtypes. By synergistically integrating involution layers for spatial-aware feature extraction and convolutional operations for translation-invariant hierarchical learning, the HICNN addresses critical challenges in hematological image analysis, including subtle morphological variations and class imbalance. Evaluated on two datasets-Hema-DA (cancer staging) and Hema-DB (leukocyte subtyping)-the model achieves state-of-the-art performance, with 99.5% accuracy on Hema-DA and 98.00% accuracy on Hema-DB, outperforming existing methods such as EfficientNet-B3, Hybrid PSO-PCA, and Advanced CNN. The HICNN’s robustness is further validated through rigorous calibration analysis, yielding near-perfect Brier scores (0.0019 for Hema-DA and 0.0069 for Hema-DB), alongside confusion matrices demonstrating <2% misclassification rates. Probability density distributions confirm the model’s high confidence in predictions, with minimal overlap between class scores. Training dynamics reveal rapid convergence (<50 epochs) and stable generalization, even on imbalanced data. Clinically, the model’s exceptional performance in early-stage detection (99.85% recall for Hema-DA’s “Early” class) and leukocyte subtyping (99.65% accuracy for Hema-DB’s “Neutrophils”) underscores its potential to reduce diagnostic delays and improve patient outcomes. The hybrid architecture’s adaptability to diverse datasets highlights its versatility for broader applications in medical imaging. Despite its strengths, the HICNN has limitations. The Hema-DA and Hema-DB datasets may not fully capture real-world clinical variability. Validation on multi-institutional datasets is needed. The hybrid architecture’s computational complexity may hinder deployment in resource-constrained settings. Finally, while preprocessing addresses class imbalance, performance on rare leukemia subtypes requires further study. Future work will validate the model on diverse datasets, optimize efficiency, and enhance interpretability.