An Explainable Hybrid CNN-Attention-Transformer Framework For Early Detection of Knee Osteoarthritis From X-Ray Images
DOI:
https://doi.org/10.51483/IJAIML.2872Keywords:
Knee Osteoarthritis; X-Ray Imaging; Deep Learning; CNN-Attention-Transformer; Explainable Artificial Intelligence; Medical Image Classification.Abstract
Knee osteoarthritis (KOA) is a progressive joint disease that makes movement difficult, especially among older adults, and there is currently no cure—only treatments that manage pain. This makes early diagnosis essential. While X-ray and MRI imaging help doctors detect KOA, the process is often slow, and results can vary depending on the expertise of the clinician. Deep learning models, particularly CNNs, have shown promise in medical imaging, but they struggle to capture global contextual information and often operate as "black boxes," making their decisions hard to trust. To address these gaps, this study proposes an explainable hybrid framework that combines CNNs, Squeeze-and-Excitation attention, and Transformer encoders to detect early-stage KOA from X-ray images. The model was trained on a publicly available Kaggle dataset of 9,786 X-ray images across five KL grades, with careful preprocessing to handle class imbalance and image quality issues. The proposed model achieved strong performance, with an accuracy of 0.8885, precision of 0.8903, recall of 0.8885, and an F1-score of 0.8890, outperforming baseline models like CNN, CNN + Attention, and CNN + Transformer. Additionally, XAI techniques—Grad-CAM, Guided Grad-CAM, and GradientSHAP—were integrated to highlight regions influencing model decisions, improving transparency and supporting clinical trust.





