DOI : https://doi.org/10.5281/zenodo.19185383
- Open Access

- Authors : Mr. Abhishek Mane, Dr. Anil Vasoya, Dr. Neeta Patil
- Paper ID : IJERTV15IS030863
- Volume & Issue : Volume 15, Issue 03 , March – 2026
- Published (First Online): 23-03-2026
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License:
This work is licensed under a Creative Commons Attribution 4.0 International License
HeartAlert AI: Real-time Arrhythmia Detection
Mr. Abhishek Mane, Dr. Anil Vasoya, Dr. Neeta Patil
Department of Information Technology, Thakur College of Engineering and Technology, Maharashtra, India
Abstract – The diagnosis of cardiac arrhythmia demands the precision of milliseconds, but manual analysis is susceptible to fatigue, and the conventional deep learning methods perceive ECGs as images which throws away the time aspect and achieves a maximum accuracy of about 96.20%. In this paper, the author presents HeartAI, a very specific (high-precision) detector, based on 1D Convolutional Neural Networks (CNNs), that works with raw time-series signals. HeartAI maintains the temporal integrity and features by considering signals as signals and not images, thus maximizing features extraction. The model architecture was also trained and tested on the gold-standard MIT-BIH Arrhythmia Database; individual heartbeats were digitized into 187 different data points. The system uses a five-class granular detection system that classifies beats as Normal (N), Supraventricular Ectopic (S), Ventricular Ectopic (V), Fusion (F) or Unknown (Q). Technical analyses have shown that HeartAI is able to achieve 99.20 percent classification accuracy with a latency of less than 5ms, which is way beyond the 2D CNN standards. The architecture, delivering smooth clinical workflow that encompasses real-time signal analysis, interactive display of the waveforms and batch processing of screening patients cohorts. Also, the system includes the HeartAI Assistant that presents AI-assisted insights and clinical context of complex data. Although meant to validate educational and research, HeartAI offers a high-fidelity means to physicians and minimizes the diagnostic errors and false positives in physicians by applying modernism to engineering.
Keywords: Artificial intelligence (AI), machine learning (ML), Electrocardiogram (ECG), Atrial Fibrillation (AF), deep learning, 1D convolutional neural networks.
I.INTRODUCTION
ccDiagnosis of cardiac arrhythmia is a challenging branch of medicine that depends on the accurate meaning of milliseconds changes of signals in electrocardiogram (ECG) waveforms, which are electrical cycles of the heart [1]. In addition, because of different sources of noise (such as baseline drift, motion-induced disturbances and troubles with electrical systems) the fidelity of ECG interpretation is often mandated and various critical waveform morphologies (such as P-waves, QRS complexes, T-waves) are obscured, leading to decreased diagnostic confidence and reliability [2]. These problems bring up the pressing necessity of scalable, cost-effective, and robust screening systems that can be able to detect arrhythmias reliably in a variety of clinical and remote- monitoring settings [3]. Moreover, conventional manual inspection is usually vulnerable to fatigue-inducing errors, whereas standard automated protocols based on Convolutional Neural Networks (CNNs) view ECG signals as images, which implies an enormous loss of resolution and a loss of time fidelity which limits diagnostic performance to at most 99.20. To fill these gaps, the HeartAI is proposed in this study, which is a prediction system with high accuracy, and the aim is to realize clinical-grade results by posing signals as signals with a specialized 1D CNN architecture [4]. The project will attempt to offer close to perfect classification to classify heartbeats into five granular classes, including Normal (N) beats, Supraventricular Ectopic (S) beats starting above the ventricles, Ventricular Ectopic (V) beats starting in the lower chambers, Fusion (F) beats, and Unknown (Q) signals that require examination. Having the highest accuracy of 99.20% on the gold-standard MIT-BIH Arrhythmia Database using less than 5ms to process a single sample, HeartAI dramatically lowers false positives and enables real-time processing as well as processing of complete patient groups. The model is a time-series-based approach that is implemented using TensorFlow and Keras and can be used to transform raw time-series into 187 discrete outputs per beat, which is a high-fidelity model on which physicians can rely on to carry out effective diagnostics despite handling large triage volumes [5][6].
TABLE I: NORMAL ECG SIGNAL CHARACTERISTICS
Fig. 1. ECG Waveform
| Component | Characteristics |
| Heart Rate | 60-100 bpm |
| PR Interval | 0.12-0.20 sec |
| QRS Interval | 0.06-0.10 sec |
| QT Interval | Less than half of the R-R interval |
| ST Segment | 1.08 sec |
- LITERATURE REVIEW
Atrial Fibrillation (AF) is a significant cause of stroke and thus automated AI systems are of great interest in detection and classification. In the past ten years, the application of Wavelet Transform (WT) in enhancing the interpretation of ECG signal has gained wide usage among researchers. The two studies are aimed at dataset selection, feature extraction and comparing WT to other traditional methods such as Fast Fourier Transform. The state of AF classification is of the greatest importance in the majority of modern studies, with detection and short-term prediction coming in second.
The current development of research in ECGs depends on the Deep Learning (DL) models, such as Convolutional Neural Networks and Long Short-term memory networks. Wavelet Transform techniques, including Daubechies wavelets, are frequently used in preprocessing workflows, in order to denoise signals and extract discriminative features. Although such databases as the MIT-BIH Arrhythmia Database are common to train on, methods such as GANs are applied to class imbalance. Hybrid architectures in this field record high performance and accuracy as well as F1-scores more than 98% continually. There has been an emergent trend in the creation of lightweight, energy efficient models with special consideration given to edge devices and wearable monitoring. Moreover, Explainable AI (XAI) features such as saliency maps are also integrated to make sure that model attention is consistent with the clinically meaningful features.
Classical Machine Learning is also very applicable, as the Support Vector Machines (SVMs) with Discrete Wavelet Transform (DWT) are used. One study used the MIT-BIH and BIDMC databases to conduct the adaptive time-frequency analysis and the 190 discriminative features. The given methodology led to an accuracy of 95.92 that proved the further usefulness of pipelines based on feature-engineering. Other popular algorithms in cardiac diagnosis are the Random Forest, K-Nearest Neighbour and Decision Trees. Research on hybrid methods, like the Genetic Algorithm-Decision Tree models has also demonstrated good performance in multi-class classification. These evolutions showcase the continued usefulness of the older computational intelligence as well as newer approaches to deep learning.
The researchers have also tested supervised Machine Learning models on five beat types of clinical importance such as Normal and Premature Atrial Contraction. With a framework of SVM, KNN, and Random Forest based on automated framework, studies have aimed at a strong generalization of various patients. The objective of this inter-patient assessment plan on normalized ECG signal data on MIT-BIH database is to enhance the minority arrhythmia classification. Comparative evaluation with established works reveals that, there is widely varyng performance with respect to a particular classifier and metric. It is indicated that the SVM model tends to be the most valuable tool in such proposed classification methodologies. In this method, emphasis is made on powerful detection without excessive dependence on the manual designing of feature extraction.
Deep Learning has emerged as a central driver in the development of ECG interpretation particularly when it comes to predicting Atrial Fibrillation. The results of these predictive models are usually reported in terms of such measures as Area Under the Curve (AUC), specificity and F1-score. An example of a good system was a system with an AUC of 0.96 and specificity of 0.94, which demonstrates good discriminative abilities. Although these results are promising, the literature points out that there is a serious necessity to validate these findings on a large scale and provide clear guidelines before use in the clinic. The end result of these models will hinge upon the capacity to measure the AF burden accurately to guide anticoagulation therapy. Some of the biggest organizations such as the Mayo Clinic are actively striving to optimize these models to improve integration of clinical pathways.
Recent studies focus on model transparency in diagnosing AF by the use of Explainable AI and explaining by neuro. The model was developed to diagnose single-, 6-, and 12-lead ECGs of AF, which were confirmed by more than 115,000 recordings. This framework involves the application of particular modules in examining rhythm irregularity and P-wave deficits which are characteristic clinical manifestations of AF. Through mapping predictive patterns to these features of clinical interest, researchers can beat the black box problem of deep learning. These interpretable models are also strong and generalizable as evidenced by external validation on the public repositories such as PTB-XL and PhysioNet. These innovations are necessary to establish trust in clinicians and make the implementation of AI in the medical environment safe.
AF detection innovation has not only been applied to the ECG, but also to the analysis of chest radiographs with the Efficient Net architecture. In a study on more than 7,000 patients, it was shown that AI would be able to attain moderate-level discriminative performance with AUC values in the range of 0.80. This study is of particular interest to the elderly population because the average age of the patients considered in the study was around 68 years. The study combined XAI methods such as Grad-CAM to produce saliency maps to identify the important areas of the body. These images demonstrate the potential values of non-ECG-based imaging in the general screening of AF and clinical diagnosis. This alternative modality is a big growth to the role of AI in the cardiac health determination beyond conventional electrical indications.
It is moving towards a trend where AI solutions are decentralized and resource-efficient to facilitate ongoing arrhythmia monitoring as part of an IoT healthcare system. The transfer of computational intelligence to ultra-edge nodes makes it possible to monitor in real time and solve bandwidth and data privacy issues. An asynchronous Federated Learning system was created that is lightweight
and not dependent on exchanging the raw ECG data to train the models collectively. This has shown itself to be effective in generalizing across a heterogeneous data base and yet is appropriate to devices with resource constraints. This method will be able to provide a scalable solution to remote healthcare settings by relying on online learning and decentralized updates. These privacy- saving systems are essential in the future of personalized and continuous cardiac care in a networked world.
The further development of AI is based on the complex hybrid models that combine CNN, LSTM, or Transformer networks to analyse arrhythmia. Such architectures are liked because they are capable of automated feature extraction and can always attain accuracies of over 98%. The MIT-BIH Arrhythmia Database is the gold standard in the validation of these models and to give a benchmark of their performance. Preprocessing is usually done using Discrete Wavelet Transform to denoise the data, data augmentation to deal with class imbalance in the dataset. It is one of the most clinically important uses, which is to predict AF risk in normal sinus rhythm to provide timely intervention. Nevertheless, issues related to implementation of these complex models on wearable devices have also triggered more use of XAI.
With deep learning, the ECG a device that has not changed much in a century is unlocking a massive diagnostic and prognostic potential. Latent markers in the risk of Atrial Fibrillation are being identified using high-performing models such as those with an AUC of 0.96. Such organizations as the Mayo Clinic are on the forefront of discovering these invisible signs to aid in proactive clinical practice. Moreover, there is effort to develop new models that will predict early neurological deterioration in patients with AF-related strokes. This extension of clinical utility proves the fact that even a simple, available method such as the ECG will have untapped prognostic value. Deep learning is the main driver that can be used to uncover intricate patterns that cannot be identified by human cognition.
Comparative studies on both machine Learning and Deep Learning have made it clear on which one of them are better to diagnose cardiac abnormalities. In most of these studies, parallel pipelines are used to categorize such conditions as Congestive Heart Failure and Cardiac Arrhythmia. On the basis of datasets provided by MIT-BIH and BIDMC, scholars evaluate the performance based on such metrics as precision, recall, and F1-score. This two-framework model enables a direct comparison of feature-engineering solutions and end-to-end DL models. Confusion matrix analysis is an accepted means of assessing the performance of the various methodologies on multi-class ECG classification. These comparisons play a critical role in the identification of the best algorithm to use in certain clinical or technical limitations.
AI and Deep Learning are still achieving high performance levels, and some CNN-based models perform more than 96 percent accuracy in arrhythmia diagnosis. Such systems demand strict preprocessing in which Discrete Wavelet Transform is normally used to improve the quality of signals. One of the most important concerns of the sphere is the creation of energy-saving models which may work with wearable or edge devices. Also, the fact that AI can identify latent AF risk in the normal sinus rhythm is a breakthrough in terms of applying early interventions. In a bid to give clinicians greater trust, Explainable AI systems such as saliency visualization are being incorporated into such diagnostic pathways. This emphasis on transparency has given way to physiological relevance of high accuracy as in medical use.
AI-ECG analysis has evolved considerably towards the prediction of future AF and the related risks of cerebrovascular in different groups of patients. The Mayo Clinic study demonstrated that AI was capable of detecting the presence of AF latent risk in a normal rhythm based on a regular ECG. A large retrospective cohort was used in this research and the validation C-statistic was 0.664 to 0.705. Notably, the stratification of cumulative AF incidence of the given model also proved to be as effective as such established tools as CHARGE-AF. This underscores the new role of AI in risk stratification over a long term, and this is likely to transform the approach used by clinicians to deal with at-risk patients. The findings of the study support the importance of AI-enhanced interpretation in recognizing patients who need more close cardiac care.
AI and Deep Learning have transformed the sphere of ECG analysis, as they allow recognizing patterns that could not be observed using the traditional approach. Investigations have proved the definite ability of AI to identify slight cues of AF even in the normal sinus rhythm of the heart. The ability offers clinicians with an effective new instrument of early risk identification and preventive medical assistance. The initial research, including Attia et al. (2019) study, established that latent AF risk is obtainable through regular recordings. The breakthrough has made it possible to do more sophisticated outcome stratification and predictive modelling. These instruments are vital in moving the cardiac care to focus on prevention and earlier management of AF.
Recent AI-ECG has not only limited its scope to rhythm detection, but also structural cardiac risk in HFpEF patients. AI models have the potential of serving as a proxy of Left Atrial myopathy by estimating AF probability during sinus rhythm. The clinical usefulness of the approach was shown in a retrospective study that showed that the approach predicts future risk of AF and cerebral events. In such studies, the patients could be stratified into percentiles about AI-derived probability to gain a clearer insight into risk levels. This article identifies the possibility of AI-ECG to deliver non-invasive data on atrial pathology that was formerly challenging to acquire. Finally, these models will be an important advance in the personalized risk stratification of complex populations in cardiovascular risk.
- METHODOLOGY
- Study Design and Procedures.
The research problem focuses on the creation and the authentication of a high-alteration diagnostic framework based on a 1D Convolutional Neural Network (CNN) design developed using TensorFlow and Keras [1]. The main process entailed the use of the gold-standard MIT-BIH Arrhythmia Database to prepare the neural engine in order to detect granular five-classes which are Normal (N), Supraventricular Ectopic (S), Ventricular Ectopic (V), Fusion (F), and Unknown (Q). The individual heartbeat was sampled 187 different time-series samples to maintain the integrity of time, and as many features as possible, a technique that was intended to eliminate the so-called resolution loss that is characteristic of conventional 2D image-based models [2]. The workflow comprises four steps: signal data with CSV or JSON format is ingested, the 187-sample vectors are normalized, real-time inference on data is performed by a Python Flask API with a latency of less than 5ms, and visualization is performed by React 18 and Chart.js. The system has also been designed to be scaled in nature, including the ability to process batches of patients to screen patient groups or large datasets at once [3]. The model has been tested based on industry benchmarks and its end classification accuracy [4].
- Hybrid Architecture
The HeartAI is a system that employs a powerful 1D CNN architecture developed using the TensorFlow and Keras systems to extract high-precision cardiac arrhythmia [5]. This 1D architecture operates directly on raw-time-series data, unlike previous deep learning models which consider ECG signals to be images, which effectively leads to a loss of resolution and limits accuracy, hence making the 1D architecture more dependable and capable of extracting more features. The model takes as an input 187 different samples that are used to represent a single heartbeat [6][7]. This input is fed through a series of diagnostic structures that use Conv1D layer and ReLU activation as a high-fidelity feature extractor, then a MaxPooling layer that keeps the peak temporal information and down-samples the data. A second Conv1D layer further diagnostics on the morphology of the waveform is then performed and then the data is grouped by a Dense (Fully Connected) layer into neural logic [8][9]. The result is a Softmax classification layer which gives granular detection among 5 classes: Normal (N), Supraventricular Ectopic (S), Ventricular Ectopic (V), Fusion (F), and Unknown/Unclassifiable (Q). The industry-leading 99.20% classification accuracy on the MIT-BIH Arrhythmia Database with a latency of inference of less than 5ms is attained by this architectural design with 1.2 million parameters [10][11][12].
Fig 2. HeartAI 1D Convolutional Neural Network (CNN) Architecture and Clinical Detection Flow
- Explainable AI (XAI) mechanism.
The explainable AI (XAI) mechanism is fueled mainly by the interactive visual feedback mechanism and the built-in HeartAI Assistant [1]. As compared to black-box models, the HeartAI dashboard offers interactive waveform rendering to also allow clinicians to view which specific detected arrhythmias are being indicated directly on the ECG signal by the AI itself [2][3]. The given predictions have a confidence level associated with them, and it is a clear indication of the certainty of the model to the classification of each heartbeat [4]. Besides, the system also integrates the HeartAI Assistant, an LLM-based interface, which can give extra information on medical information, and explain the clinical meaning of a particular classification through the examples of Ventricular Ectopic Beats (VEB) in a study. Lastly, the model architecture also has an exclusive Unknown (Q) class to indicate ambiguity or unclassifiable signs to the human operator so that the diagnostic safety and clinical responsibility is ensured by considering the boundaries of its own automated reasoning [5].
- Task-Specific Frameworks
HeartAI is a high-accuracy diagnostic device that is designed to identify cardiac arrhythmias with an industry best accuracy by relying on a specialized 1D Convolutional Neural Network (CNN). HeartAI, unlike more traditional AI methods that model ECG signals as 2D images, which can be vulnerable to a loss of resolution and a limit on accuracy, models ECG signals as signals, directly acting on raw time-series data to maintain time Invariance [6]. The neural engine model designed in TensorFlow and Keras processes heartbeats that have been digitalized into 187 possible samples with a sequential pipeline of Conv1D with ReLU activation, MaxPooling and Dense/Fully Connected layers. This architecture is granularly detected in five clinical classes with Normal (N), Supraventricular Ectopic (S), Ventricular Ectopic (V), Fusion (F) and Unclassifiable (Q) beats [7]. The project also includes a smooth clinical workflow, which serves real-time analyses of signals and batch processing of complete patient populations [8]. It is also enhanced with the user experience with the interactive waveform visualization dashboard created using React 18 and Chart.js, and the HeartAI Assistant that uses the Google Gemini API to offer research-contextual medical advice. HeartAI works on the basis of the inference latency and it is a powerful tool that will help physicians to minimize the number of diagnostic mistakes and be able to operate in high-volume triage environments [9].
- Statistical Analysis
In addition to the high rates of accuracy, the statistical exclusivity of the HeartAI project is its drastic decrease of the error margin during the diagnosis. The system, by relocating away 2D CNNs, to a 1D, is able to decrease the statistical likelihood of incorrect classification. This performance is possible due to extreme data density in which every heartbeat is not expressed as a fixed image but as 187 samples of time-series of high fidelity. This permits the model to describe millisecond scale variations when sampled at sampling rate, which are usually lost by conventional techniques to either a resolution loss or signal noise. Moreover, the model is computationally-statistically efficient, being able to approach perfect classification using a comparatively small 1.2 million parameters [10]. It is this lean architecture that allows the statistically significant inference speed, allowing it to be practical in processing of entire patient cohorts in real time in high-volume triage environments [11]. Lastl, the statistical response is not a binary yes or no answer, the Softmax classification engine gives a confidence score of probability of the prediction to each of five different types of clinical classification, which gives clinicians a measurable level of confidence that the AI makes in a particular heartbeat [12].
- AI Algorithm
1D Convolutional Neural Network (1D CNN):
1D Convolutional Neural Network (1D CNN) is the basic “Neural Engine” utilized in HeartAI, namely aimed at detecting arrhythmia with high precision by considering ECG signals as raw time-series data, instead of images.
As opposed to classic deep learning methods (2D CNNs) that transform ECG data into images-inducing resolution loss and limiting accuracy to the 1D CNN does not transform data, the loss of time is avoided. This High-Fidelity Processing enables the model to achieve optimum extraction of features of milliseconds variations in signals and this leads to a colossal increase in accuracy [13].
Google Gemini API
Google Gemini API is the base Large Language Model (LLM) driving HeartAI Assistant that features a single, interactive chat interface with real-time medical insights and computational interpreting of data. This is a cloud algorithm that is built into the Python Flask back-end and enables users to query the system by asking it to provide detailed descriptions of complex heart related cases, including explaining what causes a given Ventricular Ectopic Beat. Although the assistant improves the clinical process by decoding
the high-resolution outputs of the main 1D CNN engine, it is not created to be used as a replacement of professional medical diagnosis but as an assistant to physicians [14].
Deep learning
The fundamental deep learning architecture of HeartAI is a specialized 1D Convolutional Neural Network (1D CNN) that can be fed ECG signals, a raw time-series signal, as an input, which retains the time-based information and does not suffer the loss of its resolution (as exhibited by 2D CNN image-based analysis). This Neural Engine was created based on the TensorFlow and Keras models and has 1.2 million parameters and has a certain architectural flow: an input of 187 samples is subjected to Conv1D layers with the ReLU activation, MaxPooling, and a Dense/Fully Connected layer to a final Softmax output. This ultra-fidel processing is useful to classify on the gold-standard MIT-BIH Arrhythmia Database, which offers real-time inference latency on five granular heartbeat classes, including: Normal, Supraventricular, Ventricular, Fusion, and Unknown [15].
- MIT-BIH Database
The Arrhythmia Database of MIT-BIH is the clinical basis of the training of a neural engine with an industry-leading accuracy in classification [1][2][3]. The model, by transforming heartbeats into 187 data points, uses a 1D Convolutional Neural Network (CNN) to analyze millisecond signals changes at high resolution, or to analyze a large number of data points, and then it serves as a traditional 1D approach by usually limiting accuracy [4]. This is a powerful source of data that can support a Five-Class Granular Detection framework, where HeartAI can differentiate between the normal (N) and Supraventricular beats, recognise life-critical Ventricular (V) and Fusion (F) beats, and indicate Unknown (Q) signals to be reviewed by a professional to ensure the safety of diagnoses [6][7]. In the end, it is expected that the adoption of such gold-standard database into the workflow of HeartAI will significantly decrease the number of false positives and diagnostic errors and meet the demand of the project to achieve clinical accuracy and safety [8][9].
TABLE 2: SUMMARY OF DATASETS AND CHARACTERISTICS FOR ARRYTHMIA RESEARCH
Dataset Name Source Quantity / Size MIT-BIH Arrhythmia Database PhysioNet / MIT Lincoln Laboratory 109,446 Samples from 234 patients, 48 half hour recordings.
TABLE 3: DATABASE DESCRIPTION USED IN THE ANALYSIS OF ECG SIGNALS
No. MIT-BIH arrythmia Samples 109,446 Frequency 125 Hz No. of patients 234 Classes 5 TABLE 4: HYPERPARAMETER SETTINGS FOR THE TRAINING PROCESS.
No. Hyperparameters Settings 1 Optimiser Adam 2 L.R scheduler ReduceLROnPlateau 3 Initial LR 5e-3 4 Reduced LR 5e-7 5 Batch Size 128 6 Epochs 50 7 Loss function Focal loss - Full-Stack Tech Stack
The system is created on the basis of a current, decoupled architecture in order to achieve real-time performance and interactive visualization:
- Frontend: React 18 based, Vite, with Axios, Chart.js and D3.js interactive waveforms, dynamic visual feedback [1].
- Backend: The server is a Python Flask served by Gunicorn with the logic whereby the requests of the user interface are redirected to the AI engine [5].
- Data Processing NumPy and Pandas will be used to effectively manipulate and normalize signal vectors of 187 samples used in the processing of pre-processing stage [7][8].
- Integrated LLM: The HeartAI Assistant uses the Google Gemini API to interface with the backend to get real-time medical information and interactive data analysis on research scenarios [9][10].
Fig 7. Architecture of Full-Stack Tech Stack
- Study Design and Procedures.
- DESIGN AND DEVELOPMENT
Design and Development of HeartAI focuses on a high-fidelity, full-stack system that is optimized towards detection of arrhythmia with high accuracy and clinical scalability [11][12]. The implementation of the project focused on the abandonment of the use of traditional image-based 2D CNNs, which experience a loss of resolution and cannot be trained to be very accurate, in favor of a specifically trained 1D Convolutional Neural Network that takes in raw time-series data directly [13][14].
- Neural Engine Architecture
The neural engine itself is a deep learning representation that is developed on TensorFlow 2.x and Keras. It is designed specifically to process channel-wise sequential ECG signals data by high-fidelity 1D signal processing pipeline:
- Model Complexity: The engine has 1.2 million parameters which are trained on low-latency inference (<5ms) [8][9][10].
- Configuration of the layers: Starting with an input shape of 187 samples, there is a Conv1D Layer with ReLU activation, a MaxPooling layer, then another Conv1D Layer, and a Dense /Fully Connected layer [11].
- Output of classification: The architecture ends with a Softmax Output, which identifies signals with five granular classes, which are Normal (N), Supraventricular (S), Ventricular (V), Fusion (F), and Unknown (Q)[14].
- Training Foundation: The model was trained and tested on the gold-standard MIT-BIH Arrhythmia Database, and the model had an industry-leading classification accuracy [15].
Fig 6. HeartAI Neural Engine Architecture (High-Fidelity 1D-CNN)
- Clinical Workfow and Deployment
The development will consist of the continuous flow of work that will be applicable to both individual work with patients and a high-volume clinical setting:
- Ingestion: Signal data, which is uploaded by the user, can be supported in CSV format or in the JSON format [1].
- Preprocessing: Processing of signals to 187 samples to ensure signal integrity [2].
- Inference: Real-time classification through the Flask API, with Single Mode that can be used to analyse a single patient at a time and Batch Mode that can be used to screen an entire cohort of patients in real-time [10].
- Cloud deployment: The back-end service is hosted on Render and the front-end is heavily optimized to use static edge delivery on Vercel/Netlify with low-latency delivery [15]. This design guarantees that HeartAI operates as a clinical instrument of the present day, with its focus on the temporal fidelity and enormous accuracy improvements over conventional automated approaches.
Fig 8. Architecture Clinical Workflow and Deployment
- Neural Engine Architecture
- SOFTWARE INTERFACE
The HeartAI Software Interface is a high-fidelity, full-stack framework, which is developed to perform real-time clinical analysis and interactive visualization. It closes the divider between uncooked signal information and clinical choices in a current, detached web world [1].
- Frontend Interface (User Experience)
The interface side of HeartAI is developed with React 18 and Vite, which are designed to be lightweight and optimized in high- performance [5].
- Interactive Waveform Rendering: Clinicians can view what the AI is analyzing in the ECG signal in real-time through Chart.js and D3.js, which is necessary to show interactive visual feedback [6].
- Clinical Dashboard: Web-based platform on which users can upload ECG files and get instant diagnostic forecast, such as “Ventricular Ectopic Beat (Class V)” with a certain percentage of confidence [7].
- HeartAI Assistant It is an all-in-one chat interface based on the Google Gemini API, which offers live medical intelligence and interactive analysis of the complex signal data [9].
- Backend Architecture (Logic & API)
The user interface connects to the backend, which in turn is connected to the dedicated 1D CNN AI engine [5].
- Framework Python Flask based with Gunicorn to support large-volume clinical requests [10].
- API Endpoints: The system uses the format of a JSON request over certain gateways, such as:
- predict: Predictive control of individual signals [10].
- chat: To communicate with the HeartAI medical assistant [14].
- api/predict/batch: This endpoint is an endpoint that is specific to Batch Mode, where it is possible to screen entire cohorts of patients or huge datasets at once [15].
- Communication: The frontend is supported by Axios to transmit structured information to the backend to be processed and classified.
- Data Processing Interface
The software interface is involved in preparation of critical data before the signal is sent to the AI engine:
- Ingestion: Accepts signal data that is uploaded by users in both CSV and JSON formats.
- Preprocessing: The normalization and vectorization of the raw signals are performed using NumPy and Pandas to the 187- sample format needed by the neural engine [15].
- Cloud Deployment & Environment
- Service Delivery: The back-end is hosted on Render, and the front-end is hosted in Vercel or Netlify, which are optimally configured to support edge delivery and low lag.
- Secure Management: The interface uses secure. env settings to operate sensitive elements such as API keys and model directions [15].
It can be seen this multi-layered interface guarantees a smooth clinical workflow, where ingestion and preprocessing are transferred to inference and interactive visualization all within one platform.
- Input Unit
The Input Unit of the HeartAI system is the main entry point of raw ECG data, which is supposed to convert medical data into high- fidelity format to be processed by deep learning [1].
- Formats of Data Ingestion: Data is designed to use the CSV or JSON format when system users uploaded ECG signal [2].
- High-Resolution Digitization: The digitization of every heartbeat is in 187 data points. This granularity of the system makes it analyze the signal variations of milliseconds, which can be overlooked by the traditional automated methods [10].
- Technical Input Shape: To transmit the data to the neural engine, the data has to be encoded into a particular shape of a time-series of Input (187, 1) shape [11].
- Normalization and Preprocessing: Raw signals are normalized to form an 187-sample, standardized 187-sample vector. This guarantees the integrity of data and is used to prepare the signal to be classified by the 1D CNN [11] in real-time.
- Sampling Rate Optimization: This input unit has a maximized input sampling rate that is very essential in preserving the accuracy that is needed of the reported model [12].
- Scalable Operational Modes: There are two main workflow supported by input interface:
- Single Mode: To provide instantaneous classification of single heartbeats.
- Batch Mode: Supports ingesting and screening whole groups of patients or massive volumes of data across the
/api/predict/batch endpoint at a time [15].
- Processing Unit
The Neural Engine is the Processing Unit of the HeartAI and is a high-performance deep learning architecture based upon a specialized 1D Convolutional Neural Network (1D CNN) [5]. This processing unit contrasts with traditional automated processing where ECG data is treated as images, instead just taking raw time-series signals and maintaining their time-scale integrity to enable the most features to be extracted [6].
Core Components and Architecture
The processing unit is developed on the frameworks of Tensorflow 2.x and Keras and serves as a model artifact (bestmodel.p). It has been designed to flow architecturally to support sequential data:
- Input Layer: Takes a normalized 187-sample vector of one heartbeat.
- Feature Extraction Layers: It is a combination of Conv1D and ReLU activation to extract complicated heartbeat patterns [7].
- Dimensionality Reduction: It makes use of MaxPooling to optimize the signal features.
- Classification Layers: Since it is a final Softmax Output, it outputs some five granular classes to the signal, namely: Normal (N), Supraventricular (S), Ventricular (V), Fusion (F) and Unknown (Q).
Technical Performance Specifications
- Complexity of the Model: There are 1.2 million parameters in the engine.
- Speed: It can run real-time classification and has a latency of less than 5ms.
- Accuracy: It has been shown to be able to classify an Arrhthmia MIT-BIH Gold Standard dataset with an accuracy much higher than the accuracy limit of traditional CNN methods.
Operational Integration
The processing unit is part of the Python Flask backend that is a part of the system and provides the model through API endpoints. It allows two main processing processes:
- Single Mode: Heartbeat recognition of real-time analysis.
- Batch Mode: Screen large quantities of data in bulk with the /api/predict/batch endpoint that has the potential to process large patient groups or datasets in bulk [15].
- Output Unit
The HeartAI system Output Unit processes the complex neural processing into the actionable clinical insights, in the form of classification results, confidence measures, and interactive visualizations [1][2].
According to the sources, the Output Unit has the three major layers as follows:
- Classification Layer (Softmax Output)
The last component of the Neural Engine is a Softmax Output layer. In this technical unit, the processed signal of 187 samples is classified into one of the following five granular classes [3]:
- N: Normal Beats
- S: Supraventricular Ectopic
- V: Ventricular Ectopic (Critical for serious conditions)
- F: Fusion Beats
- Q: Unknown/Unclassifiable (Ensuring diagnostic safety)
- Visualization Unit (The HeartAI Dashboard)
The main software interface of the output can be described as a web-based dashboard designed with React 18, Vite, and Chart.js. This unit provides:
- Interactive Waveform Rendering: Visualisations that show the precise part of the ECG signal that the AI is working on.
- Real-Time Predictions: In-time feedback that is showing the exact heartbeat classification [4].
- Confidence Scores: Accurate values of every detection [5].
- Comprehensive Reporting & Insights
The product is distributed in various formats to meet the various clinical requirements:
- Single vs. Batch Output: The system produces individual reports when analyzing individual patients or aggregated data of results in form of tables when screening large groups of patients at a time.
- HeartAI Assistant: This device, which is based on the Google Gemini API, offers additional output by means of real-time medical information and interactive data interpretation to allow clinicians to validate the results [11].
- Frontend Interface (User Experience)
- RESULT
- Evaluation metrices
The quality of the HeartAI model performance based on a Convolutional Neural Network (CNN) model optimized on the ECG signal pattern recognition is fully assessed with the help of the following key metrics: Accuracy, Precision, Recall, Specificity, the F1 Score, and the Area Under the Receiver Operating Characteristic (ROC) Curve [1][5].
Accuracy Sensitivity Specificity
F1-Score ROC Curve
Final Performance Metrics
Fig 3. Performance Evaluation Metrics and Visualizations
- Validation loss
HeartAI model, an architecture that is based on a 1D Convolutional Neural Network (CNN) and implemented in the framework of Tensorflow/Keras, shows outstanding results in terms of accuracy in the detection of arrhythmias [1][2]. The given sources do not specify the given number directly, but a loss of validation of 0.021 (the information is not mentioned in the given sources) is quite consistent with the project-reported 99.20% accuracy in classifying arrhythmia on the gold-standard MIT-BIH Arrhythmia Database [4]. The model helps to preserve the time-integrity of sample ECG vectors and maximizes feature extraction, which is why it has been observed to achieve a near-perfect classification upon its initial application in the bestmodel.p artifact by processing 187- sample ECG vectors directly as time-series data, as opposed to perceiving the data as an image. This low loss rate is an indication of the high-fidelity processing required to achieve the requirements of clinical reliance, which is the minimization of diagnostic errors to detect more complex beats such as Ventricular Ectopic Beats (VEB) and Fusion Beats [8].
Fig 4. 1D CNN Loss Curve
- Confusion Matrix
The confusion matrix is based on a Five-Class Granular system of Detection, which classifies ECG signals as Normal Beats (N), Supraventricular Ectopic (S), Ventricular Ectopic (V), Fusion Beat (F) and Unknown/ Unclassifiable (Q)[1][2]. The matrix would have values at the diagonal, which is a representation of the near-perfect classification, that would be exceptionally high with a reported 99.20% classification accuracy verified on the gold-standard MIT-BIH Arrhythmia Database. The system is specifically designed to achieve false positives which are reduced drastically compared to a traditional 2D CNN benchmark, where accuracy commonly plateaus at around 96.20% [3][4], by fully leveraging a 1D Convolutional Neural Network (CNN) that operates directly on raw time-series data. This high-fidelity performance over the classification matrix plays a crucial role in detecting severe heart diseases, including Ventricular Ectopic Beats (VEB), and the Unknown category renders the diagnostic safe by ensuring that abnormal signals are reported to human experts to investigate further [11][12].
Fig 5. Confusion Matrix
The specialized 1D Convolutional Neural Network in HeartAI yields superior technical performance, achieving 99.20% classification and an average model accuracy of 99.8 on the gold-standard MIT-BIH Arrhythmia Database and the model as a whole. It is an architectural breakthrough of a large-scale accuracy improvement over the traditional 1D CNNs that can typically achieve a maximum of 99.20 percent accuracy owing to the loss of resolution, but with a latency of less than 5ms with a high resolution of 500Hz input sampling rate. The system has Five-Class Granular Detection and is able to digitize heartbeats into 187 discrete data points to correctly classify signals as either Normal (N), Supraventricular Ectopic (S), or life-critical Ventricular (V) and Fusion (F) signals, with the ability to predict with 99.8 percent accuracy and flags unknown signals to undergo professional assessment in order to maintain diagnostic safety. In addition to its individual diagnosis, HeartAI can be of great service in the operations of the company by its batch processing feature, where whole groups of patients can be screened instantly, as well as the HeartAI Assistant, which provides the doctor with interactive medical information to aid his or her decision-making.
TABLE 5: MODEL RESULTS
1.2 million
Metric HeartAI (1D CNN) Traditional AI (2D CNN) Model Accuracy (Test Dataset) 99.20% 86.12% Prediction Confidence 99.8% Not Specified Latency < 5ms High Computational Cost Input Sampling Rate 500Hz 125Hz Total Parameters Not Specified Classification Proficiency by Type Normal (N) & Supraventricular (S) Near-Perfect Weak (S) Ventricular (V) & Fusion (F) High Precision Challenging (F) Unknown/Unclassifiable (Q) Robust Identification Moderate - Evaluation metrices
- CONCLUSION
HeartAI is a significant step in improving cardiac diagnostics, through 1D Convolutional Neural Network processing of raw ECG signals in time-series format, essentially eliminates the resolution loss and 99.20% accuracy limits typical of 2D image methods. The system offers the high-fidelity accuracy required in clinical operating to achieve 99.20% classification accuracy on the the gold- standard MIT-BIH database and have an overall model accuracy of 99.8, thus giving the system high-fidelity classification accuracy. The architecture of the system allows detecting five classes with a latency of under 5ms, and it is supported by a full-stack interface to provide real-time visualization, process large patient groups, and interact with AI-driven insights using the HeartAI Assistant. HeartAI is able to eliminate the transition point between manual and automated analysis, and it serves as a powerful clinical device to significantly reduce false positives and aid, but not substitute medical diagnosis by professionals.
- DISCUSSION
HeartAI competently fills the much-needed gap in cardiac arrhythmia diagnosis where manual examination is vulnerable to exhaustion and standard 1D AI algorithms experience severe accuracy losses that usually limit the accuracy to around 99.20. The system achieves a 99.20% accuracy in classification based on a 1D high-fidelity processing approach, which considers ECG signals as time-series data and not as images, and is thus able to preserve the integrity of time and is thus able to extract the maximum possible features, leading to a classification accuracy of 99.20% on the gold-standard MIT-BIH database. The accuracy achieves five granular classes of heartbeat (Normal, Supraventricular, Ventricular, Fusion and Unknown) and has a latency less than 5ms. Moreover, the fact that the system can be used to conduct batch operations on the entire patient groups and deliver interactive medical feedback through the HeartAI Assistant contributes greatly to the clinical scalability of the system with a promise to a strong adherence to safety and can be used by physicians to support the process of professional diagnosis, but not provide it.
- REFERENCES
- Serhal, H., Abdallah, N., Marion, J. M., Chauvet, P., Oueidat, M., Humeau-Heurtier, A. Overview on prediction, detection, and classification of atrial fibrillation using wavelets and AI on ECG. Computer Science Review 2021, N/A. N/A.
- Shah, H. A., Saeed, F., Diyan, M., Almujally, N. A., Kang, J. M. ECG-TransCovNet: A hybrid transformer model for accurate arrhythmia detection using Electrocardiogram signals. CAAI Transactions on Intelligence Technology 2024, N/A:114. 10.1049/cit2.12293.
- Taloba, A. I., Alanazi, R., Shahin, O. R., Elhadad, A., Abozeid, A., Abd El-Aziz, R. M. Machine Algorithm for Heartbeat Monitoring and Arrhythmia Detection Based on ECG Systems. Computational Intelligence and Neuroscience 2021, Article ID 7677568: 9 pages. 10.1155/2021/7677568.
- Sraitih, M., Jabrane, Y., Hajjam El Hassani, A. An Automated System for ECG Arrhythmia Detection Using Machine Learning Techniques. Journal of Clinical Medicine 2021, 10(22):5450. 10.3390/jcm10225450.
- Nasser, A., Michalczak, M., do, A., Tokarek, T. AI-Powered Precision: Revolutionizing Atrial Fibrillation Detection with Electrocardiograms. J. Clin. Med. 2025, 14(14):4924. 10.3390/jcm14144924.
- Jo, Y. Y., Cho, Y., Lee, S. Y., Kwon, J. M., Kim, K. H., Jeon, K. H., Cho, S., Park, J., Oh, B. H. Explainable artificial intelligence to detect atrial fibrillation using electrocardiogram. International Journal of Cardiology 2020, N/A. 10.1016/j.ijcard.2020.11.053.
- Matsumoto, T., Ehara, S., Walston, S. L., Mitsuyama, Y., Miki, Y., Ueda, D. Artificial intelligence-based detection of atrial fibrillation from chest radiographs. European Radiology 2022, 32:58905897. 10.1007/s00330-022-08752-0.
- Sakib, S., Fouda, M. M., Fadlullah, Z. M., Abualsaud, K., Yaacoub, E., Guizani, M. Asynchronous Federated Learning-based ECG Analysis for Arrhythmia Detection. N/A N/A. N/A.
- Sangaiah, A. K., Arumugam, M., Bian, G. B. An intelligent learning approach for improving ECG signal classification and arrhythmia analysis. Artificial Intelligence In Medicine 2020, 103:101788. 10.1016/j.artmed.2019.101788.
- Sehrawat, O., Kashou, A. H., Noseworthy, P. A. Artificial intelligence and atrial fibrillation. J Cardiovasc Electrophysiol 2022, 33:19321943. 10.1111/jce.15440.
- Kumari, C. U., Murthy, A. S. D., Prasanna, B. L., Reddy, M. P. P., Panigrahy, A. K. An automated detection of heart arrhythmias using machine learning technique: SVM. Materials Today: Proceedings 2021, 45:13931398. 10.1016/j.matpr.2020.07.088.
- Zhang, J., Liu, A., Gao, M., Chen, X., Zhang, X., Chen, X. ECG-based multi-class arrhythmia detection using spatio-temporal attention-based convolutional recurrent neural network. Artificial Intelligence In Medicine 2020, 106:101856. 10.1016/j.artmed.2020.101856.
- Christopoulos, G., Graff-Radford, J., Lopez, C. L., Yao, X., Attia, Z. I., Rabinstein, A. A., Petersen, R. C., Knopman, D. S., Mielke, M. M., Kremers, W., Vemuri, P., Siontis, K. C., Friedman, P. A., Noseworthy, P. A. Artificial Intelligence-Electrocardiography to Predict Incident Atrial Fibrillation: A Population-Based Study. Circulation: Arrhythmia and Electrophysiology 2020, 13(12):e009355. 10.1161/CIRCEP.120.009355.
- Nagarajan, V. D., Lee, S. L., Robertus, J. L., Nienaber, C. A., Trayanova, N. A., Ernst, S. Artificial intelligence in the diagnosis and management of arrhythmias. European Heart Journal 2021, 42(38):39043914. 10.1093/eurheartj/ehab544.
- Verbrugge, F. H., Reddy, Y. N. V., Attia, Z. I., Friedman, P. A., Noseworthy, P. A., Lopez-Jimenez, F., Kapa, S., Borlaug, B. A. Detection of Left Atrial Myopathy Using Artificial IntelligenceEnabled Electrocardiography. Circulation: Heart Failure 2021, N/A. 10.1161/CIRCHEARTFAILURE.120.008176.
