Enhanced TabNet with Entmax-Based Sparse Attention and Modified GLU for Interpretable Cardiovascular Risk Prediction Using an Edge-IoT Framework
Mehboob Zahedi, Dokhyl AlQahtani, Bader Alhasson, Emad A. Mohamed, Pradeep Kumar Dabla, Shyamalendu KandarCardiovascular diseases remain the leading global cause of mortality, necessitating continuous monitoring solutions that extend beyond clinical settings. This paper proposes a real-time, end-to-end Edge-IoT framework for cardiovascular risk assessment that integrates biomedical signal acquisition, edge processing, and interpretable deep learning. The system includes a three-tier architecture: (i) physiological signal acquisition using AD8232 ECG, MAX30102 photoplethysmography, DS18B20 temperature, and NEO-6M GPS sensors interfaced with an ESP32 microcontroller; (ii) real-time signal preprocessing, including digital filtering, normalisation, and PQRST feature extraction performed at the edge; and (iii) cloud-based analytics using an Enhanced TabNet classifier with modified attention mechanisms for cardiovascular risk prediction. The Enhanced TabNet architecture incorporates Entmax-based sparse attention and modified Gated Linear Units to improve predictive performance and clinical interpretability. Signal quality enhancement using Kalman filtering and class imbalance correction using SMOTE further support robust model performance. The Enhanced TabNet model achieves 97.43% accuracy, 96.18% precision, and 97.24% recall on the combined Cleveland, Hungarian, Switzerland, Long Beach VA, and Statlog heart disease datasets (n=1190). The developed Edge-IoT prototype maintains an end-to-end communication and processing latency below 200 ms. The framework also includes automated risk alert generation via SMS when the predicted cardiovascular risk probability exceeds a predefined threshold (e.g., 0.85), including the patient’s vital information and geolocation to support emergency response. The integrated edge-cloud architecture with attention-based feature selection provides interpretable cardiovascular risk predictions while maintaining the computational efficiency required for potential continuous patient monitoring outside hospital settings.