Introduction
Cardiovascular diseases remain the leading cause of death globally, necessitating precise and timely identification of arrhythmias. Among these, Premature Ventricular Contractions (PVCs) are critical markers in cardiac care. While Deep Neural Networks (DNNs) have achieved high accuracy in detecting these anomalies within long-term ECG recordings, they are often criticized for their "black-box" nature. In clinical settings, transparency is paramount; practitioners require an understanding of the logic behind a diagnosis to ensure patient safety and trust.
This research addresses the transparency problem by introducing a model based on the Tsetlin Machine (TM). Unlike traditional neural networks that rely on complex calculus and millions of opaque weights, the TM utilizes propositional logic to provide inherently interpretable results that align with established medical knowledge.
Methodology
The proposed framework involves a multi-stage pipeline designed to transform raw physiological signals into actionable, logical insights. The process begins with data preprocessing, where ECG signals are denoised using wavelet transforms and segmented into individual heartbeats. These segments are then converted into 2D Boolean (binary) matrices, effectively creating high-contrast representations of the heartbeat's trajectory.
Logic-Based Learning with Tsetlin Automata
At the heart of the system is the Tsetlin Machine architecture. Instead of adjusting numerical weights, the model employs "Tsetlin Automata" to learn a series of conjunctive clauses (AND rules). For each classification category—Non-PVC (Normal), $PVC_R$ (right ventricle origin), and $PVC_L$ (left ventricle origin)—the model generates two types of rules:
- Positive Polarity Clauses: Patterns that confirm a heartbeat belongs to a specific category.
- Negative Polarity Clauses: Patterns that invalidate a category (e.g., "If a signal exhibits this specific wide QRS complex, it cannot be a normal beat").
Classification is ultimately determined by a majority vote among these logical rules, ensuring that the final decision is a direct product of human-readable logic.
Experimental Setup and Datasets
The study utilized the MIT-BIH Arrhythmia Database, a benchmark dataset containing 36 long-term ambulatory ECG recordings from 47 subjects. A total of 44,180 ECG beats were extracted and evaluated using 9-fold cross-validation to ensure the robustness of the findings.
Key Results and Discussion
The Tsetlin Machine demonstrated that high performance does not require a sacrifice in transparency. Key findings include:
- Competitive Accuracy: The TM achieved an overall accuracy of 94.2%, slightly outperforming a standard 1D CNN (93.8%) and matching the performance of the much larger VGG16 architecture.
- Superior Sensitivity: The model was particularly effective at identifying $PVC_L$, reaching 97.7% sensitivity, surpassing the 1D CNN's 96.1%.
- Medical Alignment: Remarkably, the patterns learned by the TM automatically matched textbook medical definitions. For instance, the model "discovered" that $PVC_L$ is characterized by a wide, negative R-wave followed by a positive ST-segment—the exact markers used by cardiologists.
- Granular Interpretability: While tools like Grad-CAM provide blurry "attention maps" for CNNs, the TM provides pixel-level logical rules. It identifies the exact points in time and amplitude that triggered a specific diagnosis, offering a level of precision previously unavailable in deep learning models.
Conclusion
This research proves that logic-based machine learning can rival the accuracy of deep learning while remaining fully transparent. By providing "if-then" explanations for its diagnoses, the Tsetlin Machine paves the way for more trustworthy AI in clinical environments. Future work will focus on scaling this approach to handle a broader range of arrhythmias and optimizing the architecture for energy-efficient edge devices in wearable cardiac monitors.
Summary updated