Abstract
In recent years, the electrocardiogram (ECG) has seen a large diffusion in both medical and commercial applications, fueled by the rise of single-lead versions. Single-lead ECG can be embedded in medical devices and wearable products such as the injectable Medtronic Linq monitor, the iRhythm Ziopatch wearable monitor, and the Apple Watch Series 4. Recently, deep neural networks have been used to automatically analyze ECG tracings, outperforming even physicians specialized in cardiac electrophysiology in detecting certain rhythm irregularities. However, deep learning classifiers have been shown to be brittle to adversarial examples, which are examples created to look incontrovertibly belonging to a certain class to a human eye but contain subtle features that fool the classifier into misclassifying them into the wrong class. Very recently, adversarial examples have also been created for medical-related tasks. Yet, traditional attack methods to create adversarial examples, such as projected gradient descent (PGD) do not extend directly to ECG signals, as they generate examples that introduce square wave artifacts that are not physiologically plausible. Here, we developed a method to construct smoothed adversarial examples for single-lead ECG. First, we implemented a neural network model achieving state-of-the-art performance on the data from the 2017 PhysioNet/Computing-in-Cardiology Challenge for arrhythmia detection from single lead ECG classification. For this model, we utilized a new technique to generate smoothed examples to produce signals that are 1) indistinguishable to cardiologists from the original examples and 2) incorrectly classified by the neural network. Finally, we show that adversarial examples are not unique and provide a general technique to collate and perturb known adversarial examples to create new ones.
Introduction
The integration of electrocardiogram (ECG) monitoring into consumer wearables like the Apple Watch has transitioned cardiac diagnostics from clinical settings to continuous, real-world monitoring. To process this massive volume of data, deep neural networks (DNNs) have become the standard, often matching or exceeding the diagnostic accuracy of board-certified cardiologists. However, the inherent "brittleness" of DNNs poses a significant security risk. In other domains, adversarial examples—inputs modified by imperceptible perturbations—can cause models to fail catastrophically.
In the context of ECGs, standard adversarial attacks like Projected Gradient Descent (PGD) are insufficient. These methods typically introduce high-frequency "square wave" artifacts that are physiologically impossible, making them easily detectable by human experts. This research introduces a method for generating "smooth" adversarial perturbations that remain physiologically plausible while successfully deceiving state-of-the-art classifiers.
Methodology
The researchers utilized a 13-layer convolutional neural network (CNN) trained on the 2017 PhysioNet/Computing-in-Cardiology Challenge dataset, which contains over 8,500 single-lead ECG recordings. The model was trained to classify rhythms into four categories: Normal, Atrial Fibrillation (AF), Other, and Noise.
To attack this model, the authors developed Training Smooth Adversarial Perturbations (SAP). Unlike traditional noise, SAP utilizes convolution with Gaussian kernels to ensure that the added perturbations are smooth across time steps. By optimizing these perturbations within a defined "noise budget" ($\epsilon$-ball), the attack mimics natural biological variability rather than digital interference.
Results
Attack Success and Human Indistinguishability
The SAP method proved highly effective, successfully flipping the diagnosis of 74% of correctly classified test ECGs. More importantly, the attacks were nearly invisible to human experts. In a blinded study, board-certified cardiologists evaluated pairs of original and adversarial ECGs. The clinicians identified 98.6% of the pairs as belonging to the same diagnostic class, indicating that the adversarial changes did not alter the clinical features used by humans (such as R-R intervals or P-wave morphology).
Comparison to Traditional Attacks
When compared to traditional PGD attacks, the smooth attack was significantly more deceptive. Clinicians could identify traditional adversarial examples 95% of the time due to jagged artifacts. In contrast, they could only distinguish smooth adversarial examples 62% of the time—approaching the 50% threshold of a random guess.
Discussion and Conclusion
This study reveals that adversarial examples for ECGs are not isolated glitches but exist in "bands" or manifolds around original signals. The researchers demonstrated that adversarial examples can be combined or further perturbed with Gaussian noise while still maintaining their ability to fool the network.
This vulnerability highlights a critical gap between machine and human perception: while humans rely on coarse, robust features, DNNs often exploit subtle, high-frequency features that are easily manipulated. As AI becomes more prevalent in medical decision-making, developing "certified" robust models—those with mathematical guarantees against small perturbations—and incorporating biophysical constraints into training will be essential for ensuring patient safety and system security.
Summary updated