Lightweight and interpretable edge intelligence AI with intrusion detection for trustworthy cardiac arrhythmia in medical IoT
摘要
Medical Internet of Things (MIoT) systems enable continuous cardiac monitoring, but practical deployment is limited by three issues: heavy computation at the edge, limited interpretability, and vulnerability to cyber-attacks that can corrupt signals and degrade inference. We propose CLARITY-AI 2.0, a lightweight and trustworthy arrhythmia detection framework for MIoT that combines efficient ECG feature extraction, interpretable prediction, and security-aware trust assessment. The model performs arrhythmia inference using a compact feature-based learner and generates clinician-facing explanations via SHAP attributions, which are converted into structured natural-language reports using an LLM. To improve trust under hostile network conditions, an intrusion detection module outputs an attack probability and a trust score that flags unreliable inputs. On the MIT-BIH benchmark, CLARITY-AI 2.0 achieves an F1 score of 0.928 and an AUC of 0.985 for anomaly detection. It also generalizes under dataset shift with an AUC of 0.940 on PTB-XL and an AUC of 0.915 on Chapman (zero-shot evaluation). For edge feasibility, deployment on an ESP32 reduces the footprint to 350 KB, peak RAM to 120 KB, and inference latency to 8.1 ms, supporting real-time operation on resource-constrained devices. These results indicate that CLARITY-AI 2.0 is an interpretable, efficient, and security-aware approach toward scalable MIoT-based cardiac monitoring.