Graph neural networks improve and explain heartbeat classification accuracy

Accurate and Auditable ECG Classification via Visibility Graph Neural Networks

Machine LearningArtificial Intelligence

Summary

Reading heart signals called electrocardiograms (ECGs) to spot heart problems is tricky, and computer programs that do this often don’t show which parts of the signal they use. The authors created a new method called LYNX-ECG that turns each heartbeat into a simple graph, making it easier for the program to explain its decisions. This method not only classifies different heart problems better than other approaches but also allows doctors to check why the program made a certain call by removing parts of the waveform. This improves trust and understanding in automatic heart analysis.

What this means in practice

  • For medical device developers: Create ECG analysis tools that provide more accurate heartbeat diagnoses with explanations linked to exact waveform regions.$Commercial implications: Enables development of advanced ECG diagnostic software sold to healthcare providers needing interpretable AI tools.
  • For clinical data analysts: Audit automated ECG classifications by modifying waveform regions to verify which parts drive predictions in real patient data.

Authors

Artur Xavier, Guilherme Henrique Gomes Evangelista, Aitazaz Khan, Antonio Luiz Pinho Ribeiro, Mohammed J. Zaki, Srinivasan Parthasarathy, Wagner Meira

Abstract

Physicians read electrocardiograms (ECGs) from waveform shape and timing, yet accurate deep-learning classifiers rarely show which waveform regions drive their predictions. We introduce LYNX-ECG, a graph neural network that represents each heartbeat as a sparse visibility graph of timestamped turning points. On CODE-Test, LYNX-ECG reaches a macro F1 score of 0.889, outperforming five baselines including the ECGFounder foundation model, while its graphs need about 14% of the storage of graphs built from every sample. Because each node maps to a specific ECG time, we can delete clinically defined waveform regions and alter beat timing to audit predictions. For conduction disorders, the clinically expected region was the strongest evidence in more than 90% of correct predictions. Bradycardia and tachycardia calls follow heart rate with conduction intervals held fixed, and atrial fibrillation calls vanish when beat-to-beat variation is removed. Sparse visibility graphs thus pair accurate ECG classification with clinically grounded, testable explanations.