# CausalFormer-HMC: a hybrid memory-driven transformer with causal reasoning and counterfactual explainability for leukemia diagnosis

**Authors:** Fares Jammal, Mohamed Dahab

PMC · DOI: 10.3389/fcell.2025.1674393 · 2025-10-13

## TL;DR

A new AI model called Causal-Former-HMC improves leukemia diagnosis accuracy and transparency using blood smear images and advanced explainability techniques.

## Contribution

Introduces Causal-Former-HMC, a hybrid AI model combining vision transformers and causal reasoning for accurate and interpretable leukemia diagnosis.

## Key findings

- Causal-Former-HMC achieved 100% accuracy on the ALL dataset and 98.5% accuracy on the C-NMC dataset.
- Explainable AI techniques highlighted clinically relevant features like nuclear contour irregularities and chromatin condensation.
- The model demonstrates superior generalization and potential for non-invasive, transparent diagnostics in clinical workflows.

## Abstract

Acute Lymphoblastic Leukemia (ALL) is a prevalent malignancy particularly among children. It poses diagnostic challenges due to its morphological similarities with normal cells and the limitations of conventional methods like bone marrow biopsies, which are invasive and resource-intensive. This study introduces Causal-Former-HMC, a novel hybrid AI architecture integrating convolutional neural networks, vision transformers, and a causal graph learner with counterfactual reasoning to enhance diagnostic precision and interpretability from peripheral blood smear (PBS) images. We utilized two robust datasets: the ALL Image collection, comprising 89 patients and 3,256 PBS images (504 benign, 2,752 malignant across Pro B, Pre B, and Early Pre B subtypes), and C-NMC dataset, containing 15,135 segmented cell images from 118 patients (7,272 leukemic, 3,389 normal). To address class imbalance, we implemented class-aware data augmentation, standardizing image counts across classes and resizing to 128 × 128 pixels for compatibility with our model. The proposed model is evaluated via stratified 5-fold cross-validation with Nadam, SGD, and Radam (fractional) optimizers, Causal-Former-HMC achieved perfect classification accuracy (100%) and macro-averaged F1-scores on the ALL dataset, and up to 98.5% accuracy with 0.9975 ROC-AUC on the C-NMC dataset hence demonstrating superior generalization. Interpretability was ensured through advanced explainable AI techniques, including Grad-CAM, LIME, Integrated Gradients, and SHAP, which consistently highlighted attention to clinically relevant features such as nuclear contour irregularities and chromatin condensation. These results underscore the potential of the model to deliver non-invasive, accurate and transparent diagnostics that pave the way for its integration into clinical hematology workflows and advancing AI-driven leukemia screening paradigms. Index Terms—Acute Lymphoblastic Leukemia (ALL); Causal-Former-HMC; Hybrid Deep Learning; Peripheral Blood Smear Classification; Explainable AI in Medical Imaging.

## Linked entities

- **Diseases:** Acute Lymphoblastic Leukemia (MONDO:0004967), leukemia (MONDO:0004355)

## Full-text entities

- **Diseases:** ALL (MESH:D054198), leukemia (MESH:D007938), malignancy (MESH:D009369)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Figures

23 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12554709/full.md

---
Source: https://tomesphere.com/paper/PMC12554709