Authors: Abdulazeez Danjuma, M. S. Aliyu, Zaharradeen S. Iro, Usman Abdullahi Musa, Abdulrrazaq A Umar, Abdullahi Ahmed Talba
Abstract: Pneumonia is a prominent preventable cause of death in children, leading to 14% of all fatalities under five and over 700,000 paediatric deaths annually. Chest radiography is the principal diagnostic tool, but interpretation depends on radiologist availability and inter-observer variability, causing severe bottlenecks in low- and middle-income countries.A hybrid CNN–Transformer architecture with convolutional local feature extraction and multi-head self-attention for binary pneumonia classification on chest radiographs was designed, implemented, and evaluated. Studies used a publicly available chest radiograph dataset of 5,856 pictures (4,273 pneumonia, 1,583 normal). Five convolutional blocks (32→64→64→128→256 filters) with batch normalisation and dropout (0.3–0.5) generate a 6,400-dimensional feature vector, which is reshaped into a token sequence using positional encoding and passed through two Transformer encoder layers (8 attention heads, feed-forward dimension 512 The hybrid model had 92.0% accuracy, 96.1% precision, 92.8% recall, 94.4% F1-score, and 0.998 AUC. Confusion-matrix analysis on the held-out test partition (n = 879; 641 pneumonia, 238 normal) gave 595 true positives, 214 true negatives, 24 false positives, and 46 false negatives Self-attention and convolutional feature extraction increase discriminative performance over CNN-only baselines, with precision outperforming accuracy. External multi-institutional validation, multi-class subtyping, and attention-based interpretability are needed before clinical application.