IP Library Granted Patent US 12708314
Granted Patent B1
US 12708314 · App. 18/896,784 · Granted Aug 18, 2026

Methods and systems for analyzing ECG signals using neural networks

Inventors: John Paul Duffy (Toronto, CA); Esmatullah Naikyar (Edmonton, CA); Michael Feist (St. Albert, CA)
Assignee: NeuralCloud Solutions Inc.
A61B5/361A61B5/0245A61B5/366A61B5/7232G06N3/045G06N3/094
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12708314
App. No.
18/896,784
Granted
Aug 18, 2026
Kind
B1
Abstract

Methods and systems for automated electrocardiogram (ECG) analysis using neural networks, enhancing the accuracy of beat-by-beat cardiac monitoring. The system utilizes a Generative Adversarial Network (GAN) and beat classifiers to analyze ECG data and detect conditions various beast properties of an ECG at a discrete level. Additional neural networks may be trained to detect beat based conditions such as premature atrial contractions (PACs) and premature ventricular contractions (PVCs). The GAN generates realistic ECG beats, while classifiers detect abnormalities. Additional transformers may be trained to detect rhythm based conditions such as AFib and Aflutter. Methods and Systems support real-time cardiac health insights and integrates with ECG devices for continuous monitoring, offering a robust solution for improving diagnostic accuracy.

Claims (112)

1 . A method for classifying cardiac rhythms in electrocardiogram (ECG) data, the method comprising:

measuring a candidate ECG signal from a patient using a Holter monitor, wherein the Holter monitor is communicatively connected to one or more processors; and

using the one or more processors to perform:

receiving a dataset comprising ECG signals and corresponding labels, each of the ECG signals representing a respective sequence of beats, and the corresponding labels indicating cardiac rhythm types for the beats, the cardiac rhythm types including normal sinus rhythm, atrial fibrillation, and atrial flutter;

generating quantized vectors representing the ECG signals by applying a trained neural network encoder and a residual vector quantizer (RVQ) to the ECG signals, the residual vector quantizer trained to compress and encode data into a lower-dimensional space;

positionally encoding the quantized vectors to obtain positionally-encoded quantized vectors;

training a rhythm classifier to classify rhythms of ECG signal beats using the positionally-encoded quantized vectors, the training comprising:

processing the positionally-encoded quantized vectors using a multi-head self-attention mechanism to generate transformed representations of the positionally-encoded quantized vectors, the processing comprising:

computing, for each particular ECG signal of the ECG signals, attention scores between each beat and other beats of the respective sequence of beats represented by the particular ECG signal, wherein the multi-head self-attention mechanism utilizes Query, Key, and Value vectors to capture temporal dependencies among individual beats;

passing the transformed representations through a feed-forward neural network to obtain, for each particular ECG signal of the ECG signals, respective cardiac rhythm classifications for the respective sequence of beats represented by the particular ECG signal, each of the cardiac rhythm classifications indicating a respective one of the cardiac rhythm types; and

updating parameters of the rhythm classifier based on a comparison between the cardiac rhythm classifications and the labels in the dataset;

classifying cardiac rhythms of beats in the candidate ECG signal, measured for the patient using the Holter monitor, using the trained rhythm classifier, the classifying comprising:

receiving the candidate ECG signal measured for the patient using the Holter monitor, the candidate ECG signal comprising beats representing respective heartbeats of the patient;

generating candidate quantized vectors for the candidate ECG signal by applying the trained neural network encoder and the residual vector quantizer to the candidate ECG signal;

positionally encoding the candidate quantized vectors to obtain positionally-encoded candidate quantized vectors; and

classifying the rhythms of the beats in the candidate ECG signal into respective cardiac rhythm types selected from among the cardiac rhythm types, the classifying comprising:

generating transformed representations of the positionally-encoded candidate quantized vectors by processing the positionally-encoded candidate quantized vectors using the multi-head self-attention mechanism; and

passing the transformed representations through the feed-forward neural network to obtain cardiac rhythm classifications of the beats in the candidate ECG signal; and

generating an output indicating the cardiac rhythm classifications of the beats in the candidate ECG signal measured for the patient using the Holter monitor.

2 . The method of claim 1 , wherein the multi-head self-attention mechanism computes the attention scores between each beat and the other beats of the respective sequence of beats represented by the particular ECG signal by computing a dot product of the Query and Key vectors and scaling the dot product by an inverse square root of a dimension of the Key vector, as follows:

Attention

(

Q

,

K

,

V

)

=

soft

max

(

Q

K

T

sqrt

(

d

k

)

)

V

,

wherein, Q is the Query vector, K is the Key vector, V is the Value vector, and d k is the dimension of the Key vector.

3 . The method of claim 1 , wherein positionally encoding the candidate quantized vectors to obtain the positionally-encoded candidate quantized vectors comprises:

using sine and cosine functions of varying wavelengths to embed positional information of beats in the respective sequence of beats represented by the particular ECG signal.

4 . The method of claim 1 , further comprising one or more residual connection applied between an input of the multi-head self-attention mechanism and an output of the feed-forward neural network.

5 . The method of claim 1 , wherein updating the parameters of the rhythm classifier based on the comparison between the cardiac rhythm classifications and the labels in the dataset comprises updating the parameters using backpropagation based on a loss function that measures differences between the cardiac rhythm classifications and the labels.

6 . The method of claim 1 , further comprising, when one or more of the rhythms of the beats in the candidate ECG signal are classified into the atrial fibrillation or the atrial flutter cardiac rhythm, generating an alert indicating an abnormal cardiac rhythm.

7 . The method of claim 1 , further comprising, when one or more of the rhythms of the beats in the candidate ECG signal are classified into the atrial fibrillation or the atrial flutter cardiac rhythms, initiating a recommendation to administer one or more treatments selected from among: a beta-blocker, an antiarrhythmic, an anticoagulant, a cardioversion, a catheter ablation, a maze procedure, and a calcium channel blocker.

8 . The method of claim 1 , further comprising identifying wave properties of the beats in the candidate ECG signal by using a trained beat classifier to process the quantized vectors, the wave properties including one or more of P wave: onset, peak, and offset, Q wave: peak, R wave: peak, S wave: peak, T wave: onset, peak, and offset, U wave: peak and offset, and QRS complex: onset and offset.

9 . The method of claim 1 , further comprising processing the quantized vectors using a trained waveform classifier to obtain waveform labels for the candidate ECG signal.

10 . A method for classifying cardiac rhythms in an electrocardiogram (ECG) signal measured for a patient, the method comprising:

measuring the ECG signal for the patient using a Holter monitor, the ECG signal comprising a sequence of beats representing a corresponding sequence of heartbeats of the patient, wherein the Holter monitor is communicatively connected to one or more processors; and

using the one or more processors to perform:

receiving the ECG signal measured for the patient using the Holter monitor;

generating a set of quantized vectors by applying a trained neural network encoder and residual vector quantizer (RVQ) to the ECG signal measured for the patient using the Holter monitor, wherein the residual vector quantizer is trained to compress and encode the ECG signal into a lower-dimensional space;

positionally encoding the set of quantized vectors to obtain a set of positionally-encoded quantized vectors;

classifying rhythms of beats in the sequence of beats by processing the set of positionally-encoded quantized vectors using a trained rhythm classifier having a transformer architecture including multiple self-attention heads and a feed-forward neural network to generate classification results indicating, for each of the beats in the sequence of beats, a respective cardiac rhythm from among: normal sinus rhythm, atrial fibrillation, or atrial flutter; and

generating an output indicating the classification results indicating the respective cardiac rhythm for each of the beats in the sequence of beats of the ECG signal measured for the patient using the Holter monitor.

11 . The method of claim 10 , wherein positionally encoding the set of quantized vectors to obtain the set of positionally-encoded quantized vectors comprises:

using sine and cosine functions of varying wavelengths to embed positional information of the beats in the sequence of beats.

12 . The method of claim 10 , wherein the multiple self-attention heads compute attention scores between each beat and other beats in the sequence of beats by computing a dot product of Query and Key vectors and scaling the dot product by an inverse square root of a dimension of the Key vector, as follows:

Attention

(

Q

,

K

,

V

)

=

soft

max

(

Q

K

T

sqrt

(

d

k

)

)

V

,

wherein, Q is the Query vector, K is the Key vector, V is a Value vector, and d k is the dimension of the Key vector.

13 . The method of claim 10 , wherein the rhythm classifier is trained using backpropagation to update parameters of the rhythm classifier based on a loss function that measures differences between cardiac rhythm classifications for beats of ECG signals and corresponding labels, the corresponding labels indicating cardiac rhythm types for the beats of the ECG signals.

14 . The method of claim 10 , wherein the trained rhythm classifier utilizes residual connections applied between an input of the transformer architecture and an output of the transformer architecture.

15 . The method of claim 10 , further comprising, when one or more of the rhythms of the beats in the sequence of beats are classified into the atrial fibrillation or the atrial flutter cardiac rhythm, generating an alert indicating an abnormal cardiac rhythm.

16 . The method of claim 10 , further comprising, when one or more of the rhythms of the beats in the sequence of beats are classified into the atrial fibrillation or the atrial flutter cardiac rhythm, initiating a recommendation to administer one or more treatments selected from among: a beta-blocker, an antiarrhythmic, an anticoagulant, a cardioversion, a catheter ablation, a maze procedure, and a calcium channel blocker.

17 . The method of claim 10 , further comprising processing the set of quantized vectors using a trained decoder neural network to obtain a clean ECG signal.

18 . The method of claim 10 , further comprising identifying wave properties of the beats in the sequence of beats by using a trained beat classifier to process the set of quantized vectors, the wave properties including one or more of P wave: onset, peak, and offset, Q wave: peak, R wave: peak, S wave: peak, T wave: onset, peak, and offset, U wave: peak and offset, and QRS complex: onset and offset.

19 . A system, comprising:

a Holter monitor configured to measure an electrocardiogram (ECG) signal for a patient, the ECG signal comprising a sequence of beats representing a corresponding sequence of heartbeats of the patient;

one or more processors communicatively coupled to the Holter monitor; and

at least one non-transitory computer-readable storage medium storing processor-executable instructions that, when executed by the one or more processors, cause the one or more processors to perform a method for classifying cardiac rhythms in the ECG signal measured for the patient, the method comprising:

receiving the ECG signal, measured for the patient using the Holter monitor, the ECG signal comprising a sequence of beats representing a corresponding sequence of heartbeats of the patient;

generating a set of quantized vectors by applying a trained neural network encoder and residual vector quantizer (RVQ) to the ECG signal measured for the patient using the Holter monitor, wherein the residual vector quantizer is trained to compress and encode the ECG signal into a lower-dimensional space;

positionally encoding the set of quantized vectors to obtain a set of positionally-encoded quantized vectors;

classifying rhythms of beats in the sequence of beats by processing the set of positionally-encoded quantized vectors using a trained rhythm classifier having a transformer architecture including multiple self-attention heads and a feed-forward neural network to generate classification results indicating, for each of the beats in the sequence of beats, a respective cardiac rhythm from among: normal sinus rhythm, atrial fibrillation, or atrial flutter; and

generating an output indicating the classification results indicating the respective cardiac rhythm for each of the beats in the sequence of beats of the ECG signal measured for the patient using the Holter monitor.