Domain Knowledge Based Temporal-Spatial Graph Convolution Network for ECG Recognition
Summary
This paper proposes a domain knowledge-based temporal-spatial graph convolution network for ECG recognition that uses PRQST landmarks and double-stream directed graphs to model intra- and inter-cycle dependencies, achieving state-of-the-art F1 scores on the First Chinese ECG Intelligent Competition dataset.
View Cached Full Text
Cached at: 07/03/26, 05:39 AM
# Domain Knowledge Based Temporal-spatial Graph Convolution Network for ECG Recognition
Source: [https://arxiv.org/html/2607.01282](https://arxiv.org/html/2607.01282)
11institutetext:China Mobile Research Institute, Beijing, China22institutetext:China Mobile GBA \(Greater Bay Area\) Innovation Institute, Guangzhou, China33institutetext:Beijing Jiaotong University, Beijing, China44institutetext:Institute of Microelectronics, Chinese Academy of Sciences, Beijing, China55institutetext:Purple Mountain Laboratory, Nanjing, China
55email:yaozhenjie@ime\.ac\.cnZhipeng ZhangXiaohang YuanNingwei XieYuxin XieXiaolin WangMeng GuoXingang ChaiZhenjie Yao
###### Abstract
In light of strides in Artificial Intelligence \(AI\) and its wide\-spread application, challenges persist in the interpretability of AI models, particularly within specialized domains like healthcare, such as electrocardiograph \(ECG\) recognition\. Rather than relying solely on end\-to\-end convolutional neural networks, this paper introduces a novel approach using a domain knowledge\-based graph convolution network for ECG recognition\. Key landmarks points of PRQST, vital to ECG interpretation, are incorporated as domain knowledge\. The double\-stream directed graph is employed to model both intra and inter ECG cycles\. Specifically, spatial directed graphs capture the positional relationships among key points, while temporal directed graphs delineate temporal dependencies between adjacent cycles in extended ECG sequences\. Experimental results on the First Chinese ECG Intelligent Competition dataset, which specifically classify ECG into nine categories, prove the efficacy of the proposed model\. The overall average F1 score is 88\.1%, the average F1 score of rare categories is 76\.3%, both outperform the state\-of\-the\-art models\. The introduction of domain knowledge did enhance the detection performance, especially for rare categories\.
###### Keywords:
Domain knowledge Graph convolution neural network Double\-stream directed graph ECG recognition\.
††∗Ma and Zhang contribute equally to this work\.
## 1Introduction
Recent advancements in artificial intelligence \(AI\) have led to its extensive adoption in various domains\[[18](https://arxiv.org/html/2607.01282#bib.bib3),[9](https://arxiv.org/html/2607.01282#bib.bib4)\]\. This adoption is being explored to enhance the quality and reduce the cost of healthcare\[[14](https://arxiv.org/html/2607.01282#bib.bib5)\]\. Clinicians stand to gain from computer\-aided treatment, as it helps mitigate the impact of subjective interpretations and discrepancies among observers during the diagnostic process\[[27](https://arxiv.org/html/2607.01282#bib.bib6)\]\.
Deep learning \(DL\) offers a promising approach to address these requirements\[[27](https://arxiv.org/html/2607.01282#bib.bib6)\]\. However, the notable improvement in performance often comes from the large dataset\. In traditional computer vision tasks, extensive and well\-annotated datasets like ImageNet \(with over 14 million labeled images from 20,000 categories\) are available\[[5](https://arxiv.org/html/2607.01282#bib.bib8)\]\. In healthcare applications, there are some rare cases where it is difficult to obtain corresponding data and annotations\. There is a growing suggestion that incorporating domain knowledge into machine learning models could prove helpful in many situations\[[23](https://arxiv.org/html/2607.01282#bib.bib10)\]\.
The domain knowledge of experts encompasses the specific regions they frequently focus on, the characteristics they prioritize, and their extensive anatomical knowledge\. The domain knowledge is accumulated, summarized, and validated based on a vast number of samples\. Despite the wealth of domain knowledge available, effectively integrating it into deep neural networks remains a challenging and as\-yet\-unresolved problem\.
Figure 1:The composition of each wave cycle of electrocardiogram, including P wave, PR interval, QRS wave group, ST segment, T wave, QT interval, etc\.The electrocardiogram \(ECG\) is widely utilized to identify a diverse range of cardiac issues\[[1](https://arxiv.org/html/2607.01282#bib.bib14),[10](https://arxiv.org/html/2607.01282#bib.bib15)\]\. ECG interpretation is pivotal in assessing cardiovascular diseases, relying on the expertise of cardiologists or computer\-aided diagnosis systems\. Deep Convolutional Neural Networks \(CNN\) extract features and recognize patterns directly from raw ECG data in an end\-to\-end manner\[[8](https://arxiv.org/html/2607.01282#bib.bib16)\]\. We posit that the integration of ECG domain knowledge into a deep neural network architecture can further enhance the diagnostic performance of ECG\-based assessments\. Figure[1](https://arxiv.org/html/2607.01282#S1.F1)illustrates the composition of each waveband of the electrocardiogram, which is the one cycle of the quasi\-periodicity ECG signal\. ECG abnormalities typically manifest as waveform abnormalities and rhythm abnormalities, including abnormalities within one cycle \(intra\-cycle abnormalities\) and across long\-term cycles \(inter\-cycle abnormalities\)\. The information contained in the wavebands represents crucial domain knowledge for ECG diagnosis\.
To capture the crucial domain knowledge in ECG signal, graph convolutional networks \(GCN\), which offers greater flexibility in data representation, is adopted to model both the time and voltage information associated with key points in the ECG\. GCNs conceptualize signals as nodes within a topological network and capture their relationships through the edges of the graph\. GCNs prove efficient in discovering and modeling the inherent connections between graph nodes\[[4](https://arxiv.org/html/2607.01282#bib.bib21)\]\.
Our main contributions are as follows:
- •A domain knowledge\-based graph structure is built for ECG, which represents the landmarks of the ECG and establish connections among them to effectively capture rhythm and morphology of an ECG\.
- •A double\-stream directed graph model, which involves both spatial directed graphs \(SDGs\) for intra\-cycle and temporal directed graphs \(TDGs\) for inter\-cycle information, is applied to model the graph structure constructed from the ECG\.
- •Validating the effectiveness of the method on a real\-world ECG dataset, especially for the detection of rare abnormal categories\.
The structure of the paper is outlined as follows: Section[2](https://arxiv.org/html/2607.01282#S2)provides a review of related works\. The proposed model is detailed in Section[3](https://arxiv.org/html/2607.01282#S3)\. Experimental results are shown and discussed in Section[4](https://arxiv.org/html/2607.01282#S4)\. Finally, the conclusion is drawn in Section[5](https://arxiv.org/html/2607.01282#S5)\.
## 2Related Works
### 2\.1Domain knowledge for Deep Learning
Complex deep learning models require a large amount of labeled data for training, which not only limits the interpretability of the models but also makes it difficult to effectively model rare categories\[[3](https://arxiv.org/html/2607.01282#bib.bib22),[30](https://arxiv.org/html/2607.01282#bib.bib23)\]\. Integrating domain knowledge has become a feasible strategy to address this challenge\. Domain knowledge can be summarized into the following categories: \(1\) Input data utilized by the deep network model, where the domain knowledge is represented in symbolic form; \(2\) Altering the loss function, which includes the penalty terms reflecting the incorporated domain\-knowledge constraints\. \(3\) Adapting the structure or parameters of the model, where domain knowledge can be integrated by imposing constraints on model parameters or by designing specific model structures\. For example, the training progress of medical students can be incorporated into the deep neural network training process through curriculum learning\[[19](https://arxiv.org/html/2607.01282#bib.bib26),[20](https://arxiv.org/html/2607.01282#bib.bib27)\], which dictates a sequence of training examples that become progressively more difficult as the learner advances\.
### 2\.2ECG Classification
Each heartbeat within the cardiac cycle illustrates the temporal evolution of the heart’s electrical activity, characterized by distinct patterns of electrical depolarization and repolarization\. Expert cardiologists can readily detect abnormalities in the heartbeat by identifying anomalies in the rhythm or changes in the morphological pattern of recorded ECG waveforms\. However, automating this task proves to be a formidable challenge for computer systems, leveraging signal processing techniques such as frequency analysis, wavelet transform, filter banks, heuristic approaches, and hidden Markov models\[[12](https://arxiv.org/html/2607.01282#bib.bib28)\]\. Despite these efforts, the inherent variability in ECG signals among patients poses a significant obstacle\. Several studies utilizing DNNs for the classification of ECG data have demonstrated notable success\. For instance, Yao\[[29](https://arxiv.org/html/2607.01282#bib.bib29)\]employed multi\-scale convolutional neural networks to detect Atrial fibrillation, while Yuan et al\.\[[31](https://arxiv.org/html/2607.01282#bib.bib20)\]proposed a deep neural network architecture enhanced with complex hand\-crafted features\. Additionally, attention\-based models, such as the Res\-BiLSTM\-Net\[[21](https://arxiv.org/html/2607.01282#bib.bib30)\]and a novel structure combining a deep residual network with an attention mechanism\[[13](https://arxiv.org/html/2607.01282#bib.bib31)\], have also yielded remarkable results\. In the work by Kiranyaz et al\.\[[10](https://arxiv.org/html/2607.01282#bib.bib15)\], 1\-D Convolutional Neural Networks \(CNNs\) were employed to construct a fast and accurate ECG classification and monitoring system\. Peng et al\.\[[17](https://arxiv.org/html/2607.01282#bib.bib7)\]constructed a deep learning framework that can simultaneously perform denoising and classification\.
### 2\.3Graph Convolutional Neural networks
Graph convolutional neural networks are widely used in various fields\[[7](https://arxiv.org/html/2607.01282#bib.bib37)\], such as molecular structures\[[15](https://arxiv.org/html/2607.01282#bib.bib32)\], transportation networks\[[2](https://arxiv.org/html/2607.01282#bib.bib33)\], backbone networks\[[28](https://arxiv.org/html/2607.01282#bib.bib34)\], social networks\[[24](https://arxiv.org/html/2607.01282#bib.bib35)\]\. It is worth noting that, the skeleton\-based approach for human action recognition has gained significant attention due to its robustness against changes in camera viewpoints, variations in human body scales, and interference from backgrounds\[[6](https://arxiv.org/html/2607.01282#bib.bib39)\]\. GCN have played an increasingly critical role in advancing skeleton\-based human action recognition\. Xie proposed a novel correlation\-driven joint\-bone fusion GCN for pose prediction\[[26](https://arxiv.org/html/2607.01282#bib.bib36)\]\. Given the success of GCNs in tasks like human action recognition, there is a belief that GCNs can enhance the classification of ECG signals, demonstrating the potential for these graph\-based neural networks across diverse applications\.
This paper extracts the skeleton of the ECG signal as the input to a graph convolutional neural network, thereby embedding and representing domain knowledge\. The graph information extracted from the key points of the ECG signal includes both morphological information of the waveform and rhythm, achieving a comprehensive modeling of the ECG signal\.
## 3Method
In this section, we present the proposed neural network model for ECG analysis, beginning with the preprocessing of ECG data\. Subsequently, we provide a detailed explanation of the double\-stream directed graph model\. The architecture of the proposed neural networks is illustrated in Figure[2](https://arxiv.org/html/2607.01282#S3.F2)\.
Figure 2:Architecture of the proposed method\.### 3\.1ECG Preprocessing
The ECG signal undergoes initial preprocessing through an analog band\-pass filter with a cutoff frequency of 50 Hz\. Following this, an analog\-to\-digital converter \(ADC\) samples the ECG signal at a rate of 500 Hz\. Subsequently, the digitized signal undergoes a series of processing stages, which include the implementation of three linear digital filters\. The first filter comprises cascaded low\-pass and high\-pass filters with integer coefficients, aiming to suppress noise from diverse sources such as muscle artifacts, electrode mobility, power\-line interference, baseline drift, and high\-frequency properties in T waves that may be comparable to those of QRS complexes\. The application of digital filters is integral to attenuate the impact of various noise sources, thereby enhancing the signal\-to\-noise ratio\.
To further enhance the quality of the QRS complexes, the signal undergoes a nonlinear transformation, such as differentiation or the square root operation\. Automatic ECG signal analysis heavily relies on the accurate identification of QRS complexes\. Once identified, further analyses of the ECG signal, such as heart rate and ST segment examination, can be conducted\. The identification of QRS complexes is a challenging task due to both the physiological variability of these complexes and the diverse forms of noise present in ECG data\.
Key points of the electrocardiogram are extracted using a dyadic wavelet transform\. The identification of significant fluctuations in the ECG signal is achieved by locating local maxima in the wavelet transform modulus at various scales\. This approach facilitates the extraction of key points in the signal, serving as a foundation for subsequent analysis\. For a comprehensive understanding of this methodology, please refer to\[[16](https://arxiv.org/html/2607.01282#bib.bib40)\]\.
### 3\.2Double\-Stream Directed Graph Feature
Double\-Stream Directed Graph Feature is a feature extraction method for image recognition and computer vision, which is built on the basis of directed graph, where each node represents a local region in an image and each directed edge represents the spatial relationship between two nodes\[[25](https://arxiv.org/html/2607.01282#bib.bib41)\]\.
In this approach, each stream represents a perspective or a feature representation\. For example, the first stream can extract color information, while the second stream can extract shape information\. The information from these graph streams is combined into a directed graph and the edge weights between the nodes in the graph are calculated\. Finally, classification or identification is made based on the characteristics of these nodes and edges\. This method can improve the accuracy and has good universality for different types of data\.
The heart generates electrical signals by alternating contraction and relaxation through the self\-motivating function of cardio myocytes\. A complete cycle of ECG signal waveform includes P wave, QRS wave and T wave\. When using ECG to diagnose heart diseases, doctors will make the final judgment according to the amplitude, duration and other indicators of P, Q, R, S and T\. In order to assist doctors in diagnosis, a directed acyclic graph is constructed to represent the waveform of the ECG signal, and use the spatial\-temporal variation of the directed acyclic graph to represent the changes of ECG signal\.
Figure 3:The key point displacement is defined by the temporal difference of coordinate vectors in two adjacent cycles\. We display examples of vertex P and edge P to Q\.For ease of expression, we first define graph and its related concepts:
Vertex: A point in a graph\.
Edge: An Edge between a vertexViV\_\{i\}andVjV\_\{j\}is an Undirected edge and is represented by an undirected paire\(Vi,Vj\)e\\left\(V\_\{i\},V\_\{j\}\\right\)\.
Graph: A graphGGconsists of a finite set of verticesVVand a multiset of edgesEE, denoted here asG=V∪EG=V\\cup\{E\}\.
Arc: If the edge from the vertexViV\_\{i\}toVjV\_\{j\}has a direction, then this edge is called a directed edge, also called Arc\.
Diagraph: A diagraphDDis represented by a multiset of verticesVVtogether with arcsAA, written asD=V∪AD=V\\cup\{A\}\.
Ring: We define open trial as a path where no vertices are traversed more than once \(all vertices are different\)\. In the pathε\(V0,Vn\)\\varepsilon\\left\(V\_\{0\},V\_\{n\}\\right\), the vertex\{V1,…,Vn−1\}\\left\\\{V\_\{1\},\\ldotp\\ldotp\\ldotp,V\_\{n\-1\}\\right\\\}is called the inner vertex ofε\(V0,Vn\)\\varepsilon\\left\(V\_\{0\},V\_\{n\}\\right\)\. If all vertices are different exceptV0=VnV\_\{0\}=V\_\{n\}and it contains at least one edge, then we call it a ring, which is the definition of a closed trail\.
Directed acyclic graph: A graphGGor a digraphDDthat contains no cycle is called an acyclic graph\.
Figure[3](https://arxiv.org/html/2607.01282#S3.F3)illustrates how to build the connections of intra and inter cycle, which constructs a directed acyclic graph from electrocardiogram\. The intra cycle connection is from the previous key point to the first key point following it, which results inPt→Qt→Rt→St→TtP^\{t\}\\rightarrow Q^\{t\}\\rightarrow R^\{t\}\\rightarrow S^\{t\}\\rightarrow T^\{t\}\. The inter cycle connections are one to one\. For example, the connections betweenttandt\+1t\+1cycles include:Pt→Pt\+1P^\{t\}\\rightarrow P^\{t\+1\},Qt→Qt\+1Q^\{t\}\\rightarrow Q^\{t\+1\},Rt→Rt\+1R^\{t\}\\rightarrow R^\{t\+1\},St→St\+1S^\{t\}\\rightarrow S^\{t\+1\},Tt→Tt\+1T^\{t\}\\rightarrow T^\{t\+1\}\.
Thus, in an electrocardiogram cycle, the key points and their connections can match the vertices and directed edges of the acyclic graph\. We use the graphG=\(V,E\)G=\\left\(V,E\\right\)to represent ECG\.
V=\{vm\},m=1,2,…,NvV=\\left\\\{v\_\{m\}\\right\\\},m=1,2,\\ldotp\\ldotp\\ldotp,N\_\{v\}\(1\)E=\{ek=vk\+1−vk\},k=1,2,…,NeE=\\left\\\{e\_\{k\}=v\_\{k\+1\}\-v\_\{k\}\\right\\\},k=1,2,\\ldotp\\ldotp\\ldotp,N\_\{e\}\(2\)M=\{Mm,k\},m=1,2,…,Nvandk=1,2,…,NeM=\\left\\\{M\_\{m,k\}\\right\\\},m=1,2,\\ldotp\\ldotp\\ldotp,N\_\{v\}\\,and\\,k=1,2,\\ldotp\\ldotp\\ldotp,N\_\{e\}\(3\)whereVVrepresents the set of vertices,EErepresents the set of directed edges,NvN\_\{v\}is the number of nodes,NeN\_\{e\}is the number of directed edges\. The directed edges always point from the previous key point to the next key point\. The initial graph topology is represented by a matrixMM\.
We then extract the spatial and temporal characteristics of the vertices and edges of the directed acyclic graph from the ECG\.ssandttindicates spatial and temporal, respectively\. We useGtG^\{t\}to represent the space digraph of cyclett\. Spatial flow consists of a series of spatial directed graphs, usingSs=\{G1,…,GT\}S^\{s\}=\\left\\\{G^\{1\},\\ldotp\\ldotp\\ldotp,G^\{T\}\\right\\\}\. The vertices and edges of a spatial digraph are represented byFs=\(fvs,fes\)F^\{s\}=\\left\(f\_\{v\}^\{s\},f\_\{e\}^\{s\}\\right\), and the temporal digraph can be denoted byFt=\(fvt,fet\)F^\{t\}=\\left\(f\_\{v\}^\{t\},f\_\{e\}^\{t\}\\right\)\. The space vertex attributefvsf\_\{v\}^\{s\}and the temporal vertex attributefvtf\_\{v\}^\{t\}are key point displacement matrices with sizeCin×T×NvC\_\{in\}\\times T\\times N\_\{v\}\. The spatial edge attributefes\{f\_\{e\}^\{s\}\}is composed of the changes of vertex in each cycle relative to the following one, and the temporal edge attributefet\{f\_\{e\}^\{t\}\}is composed of the changes of each vertex in the adjacent cycle\.fes\{f\_\{e\}^\{s\}\}andfet\{f\_\{e\}^\{t\}\}are matrices of sizeCin×T×NeC\_\{in\}\\times T\\times N\_\{e\}\. As shown in Figure[3](https://arxiv.org/html/2607.01282#S3.F3), the key point displacement is defined by the temporal difference of coordinate vectors between two adjacent cycles, i\.e\.,V^kt=Vkt\+1−Vkt\\hat\{V\}\_\{k\}^\{t\}=V\_\{k\}^\{t\+1\}\-V\_\{k\}^\{t\}, whereVktV\_\{k\}^\{t\}andVkt\+1V\_\{k\}^\{t\+1\}are the coordinate vectors ofVkV\_\{k\}at cyclettandt\+1t\+1, respectively\.
We can use the attributes of vertex and edge to calculate the spatial transformation and temporal transformation between each connected vertexes\. Specifically, we can calculate the time and amplitude difference of the vertexvkv\_\{k\}to its successorvk\+1v\_\{k\+1\}\. Or calculate the difference from the edgeeme\_\{m\}toem\+1e\_\{m\+1\}from thevkv\_\{k\}and the successor vertexvk\+1v\_\{k\+1\}, respectively\.
### 3\.3Double\-Stream Directed Graph Framework
Directed graph neural networks \(DGNN\) use the spatial and temporal characteristics of ECG signals for classification\. As shown in Figure[2](https://arxiv.org/html/2607.01282#S3.F2), the entire network consists of multiple layers, each of which has a graph containing vertex and edge attributes, and outputs the same graph with updated attributes\. At each level, vertex and edge properties are updated based on adjacent edges and vertices\. At the bottom level, each vertex or edge can only receive attributes from adjacent edges or vertices, and the model in these layers is designed to extract local information about vertices and edges when updating attributes\. At the top level, information from key points that are can propagated to each other by accumulate multi\-layer information aggregation\. DGNN models the data structure of the tree, directed acyclic graph\.
DGNN is composed of directed graph network \(DGN\) block\[[11](https://arxiv.org/html/2607.01282#bib.bib42)\], Each DGN contains two update functionhv,heh^\{v\},h^\{e\}, and two aggregate functionge−,ge\+g^\{e^\{\-\}\},g^\{e^\{\+\}\}\. The update function is used to update attributes of vertices and edges based on adjacent edges and vertices\. The aggregation function is used to aggregate properties contained in multiple edges connected to a vertex\. Finally, the spatial branch of DGNN outputs the encoded vertex featurefvs\{f\_\{v\}^\{s\}\}and encoded edge featurefes\{f\_\{e\}^\{s\}\}\[[26](https://arxiv.org/html/2607.01282#bib.bib36)\]\. Similarly, the temporal branch outputs the encoded vertex featurefvt\{f\_\{v\}^\{t\}\}and encoded edge featurefet\{f\_\{e\}^\{t\}\}\.
For each cycle, we form a graph by concatenating the temporal and spatial graphs, where each node contains all encoded spatial\-temporal features of its corresponding vertex and edge\. Therefore, four encoded feature tensors of the DGNN outputs are stacked along channel\-dimension to obtain the concatenated spatial\-temporal graphs feature\. In this way, the final feature encodes the spatial\-temporal characteristics of ECG sequence\. We use average\-pooling to reduce dimensions of the result feature and use fully\-connected to project it into a vector of size1×Ncls1\\times N\_\{cls\}\. Finally, SoftMax function was adopted to make the prediction for the ECG labels\.
## 4Experiments
This section begins with an introduction to the dataset, followed by the experimental setting, measurements, results and discussion\.
### 4\.1Dataset
Table 1:There are eight typical cardiovascular abnormalities in the dataset\.AbbreviationsCategoriesAFAtrial FibrillationTWCT\-wave ChangesEREarly RepolarizationLAFBLeft Anterior Fascicular BlockCRBBBComplete Right Bundle Branch BlockPVCPremature Ventricular ContractionsPACPremature Atrial ContractionsFDAVBFirst\-degree Atrioventricular HeartBlock Diagnosing Cardiac AbnormalitiesTo validate our approach, we conducted a series of experiments on the datasets from the First China ECG Intelligent competition\[[22](https://arxiv.org/html/2607.01282#bib.bib43)\]\. The ECG data were sampled at 500 Hz and captured using the standard 12\-lead format, encompassing six limb leads \(I, II, III, aVL, aVR, and aVF\) and six precordial leads \(V1, V2, V3, V4, V5, and V6\)\. These ECGs’ length ranges from 4,500 to 30,000, corresponding to a recording time of 9\.5s to 60s\. There are 6,500 ECGs in the dataset, trained and tested through 5\-fold cross validation\. The dataset have eight typical cardiovascular abnormalities as shown in Table[1](https://arxiv.org/html/2607.01282#S4.T1)\. It’s worth noting that the labels for these abnormalities are not mutually exclusive; an ECG recording can possess multiple labels\. The model should classify the ECG as normal if no abnormalities are detected\.
### 4\.2Evaluation Metric
In this paper, we use the averageF1F\_\{1\}score as the evaluation metric\. To be specific, the averageF1F\_\{1\}score is calculated by:
F1=19∑i=08F1i,F\_\{1\}=\\frac\{1\}\{9\}\\sum\\limits\_\{i=0\}^\{8\}F^\{i\}\_\{1\},\(4\)whereF1iF^\{i\}\_\{1\}is theF1F\_\{1\}score of theiith class, defined by
F1i=2Pi×RiPi\+Ri,F^\{i\}\_\{1\}=\\frac\{2P^\{i\}\\times R^\{i\}\}\{P^\{i\}\+R^\{i\}\},\(5\)in whichPiP^\{i\}is the precision of theiith class, given byTPiTPi\+FPi\\frac\{TP^\{i\}\}\{TP^\{i\}\+FP^\{i\}\}\(true positives divided by the sum of true positives and false positives\),RiR^\{i\}is the recalliith class, given byTPiTPi\+FNi\\frac\{TP^\{i\}\}\{TP^\{i\}\+FN^\{i\}\}\(true positives divided by the sum of true positives and false negatives\),TPiTP^\{i\}is the number of true positives,FPiFP^\{i\}is the number of false positives, andFNiFN^\{i\}is the number of false negatives\.
### 4\.3Implementation Details
In the Double\-Stream\-DGNN, one GTN and two residual GTN blocks constitute each DGNN branch\. Both the DGN and the TCN have a batch normalization \(BN\) layer and a Leaky ReLU layer behind them to make the network easier to converge\. The dimensions of three blocks’ output channels are set to 32, 64 and 64, respectively\. The size of the temporal convolution kernel of three blocks are 3, 5, 7, and the stride of the last GTN is 2\. We concatenated the output features extracted from the spatial\-temporal branches of DGNN\. To prevent over\-fitting, we used the dropout layers with a rate of 0\.2\. Finally, we added a fully connected layer and a softmax layer at the end for class prediction\. The Double\-Stream\-DGNN was trained to minimize the cross\-entropy loss function, the stochastic gradient descent \(SGD\) optimizer, initial learning rate 0\.001 and the batchsize is 32\. The Double\-Stream\-DGNN is trained for 200 epochs\.
### 4\.4Results and discussion
Table 2:F1F\_\{1\}score of the ECG abnormalities classification on the test setCategoriesNumberMethodsMethod1\[[31](https://arxiv.org/html/2607.01282#bib.bib20)\]Method2\[[21](https://arxiv.org/html/2607.01282#bib.bib30)\]Method3\[[13](https://arxiv.org/html/2607.01282#bib.bib31)\]OursNormal1,9530\.9140\.8960\.8750\.921AF4780\.9620\.9770\.9740\.958TWC2,0490\.8920\.7920\.7570\.848ER2220\.5000\.7330\.7360\.745LAFB1640\.9440\.7220\.7470\.780CRBBB9261\.0000\.9820\.9830\.963PVC6270\.9650\.9630\.9710\.965PAC6280\.8740\.8990\.9260\.938FDAVB4920\.8600\.9180\.9010\.813Average8380\.8790\.8760\.8750\.881LAFB & ER164\+2220\.7220\.7280\.7420\.763\*Bold marks 1st place in different categories\.In order to prove the superiority of the proposed method, we conducted a comparative study of previous state\-of\-the\-arts methods on the ECG recognition, the detailed scores shown in Table 1\. The compared methods include \(1\) deep convolutional neural networks enhanced with sophisticated hand crafted features\[[31](https://arxiv.org/html/2607.01282#bib.bib20)\], \(2\) an attention\-based Res\-BiLSTM\-Net model\[[21](https://arxiv.org/html/2607.01282#bib.bib30)\]and \(3\) a structure that combines a deep residual network with an attention mechanism\[[13](https://arxiv.org/html/2607.01282#bib.bib31)\]\. Test results \(F1 score\) of all the four methods on the test set are shown in Table[2](https://arxiv.org/html/2607.01282#S4.T2), the overall F1 score of the proposed classifier is 0\.881, which achieves the highest score among the four models\. For the Normal, premature ventricular contractions \(PAC\) and early repolarization \(ER\), the F1 score increased to 0\.921, 0\.938 and 0\.745, respectively\. The proposed method exhibited commendable overall performance on the dataset\.
In addition to overall performance, we pay particular attention to the performance of some rare abnormal categories\. As we known, deep learning models are purely data\-driven, and therefore, their performance often depends on the amount of data available\. As shown in Table[2](https://arxiv.org/html/2607.01282#S4.T2), the performance of LAFB and ER, which have the smallest data volume, is the poorest\. The introduction of domain knowledge can alleviate the performance degradation caused by limited data volume\. We separately calculated the average F1 scores of LAFB and ER, where the F1 score \(0\.763\) of our model is significantly higher than other deep neural network models \(0\.722, 0\.728, and 0\.742\) that do not incorporate domain knowledge\. The introduction of domain knowledge can significantly improve the detection performance of rare abnormal categories\.
Table 3:Precision,RecallandF1F\_\{1\}scoreof our ECG abnormalities classification method on the test setCategoriesNumberMetricsPrecisionRecallF1F\_\{1\}scoreNormal1,9530\.9150\.9270\.921AF4780\.9700\.9480\.958TWC2,0490\.8860\.8130\.848ER2220\.7940\.7020\.745LAFB1640\.8120\.7500\.780CRBBB9260\.9480\.9780\.963PVC6270\.9590\.9710\.965PAC6280\.9410\.9350\.938FDAVB4920\.8570\.7730\.813Average8380\.8840\.8690\.881From the Table[3](https://arxiv.org/html/2607.01282#S4.T3), it is evident that despite our best efforts to mitigate the impact of data imbalance, the Recall for disease types with small samples \(such as ER, LAFB and FDAVB\) are also lower\. This implies a higher likelihood of misclassification into other categories\. Conversely, the Recall rate for disease types with large sample sizes is relatively higher compared to Precision\. This observation aligns with our findings\. Based on the above indicators, it can be concluded that the method proposed in this paper exhibits good stability\.
It is accepted that trust comes from understanding of how decisions are made, and what are the determinants of these decisions\. One important advancement of domain knowledge fused method is that the models become more comprehensible\. Domain\-knowledge can be used in two different ways to assist this\. First, it can constrain the kinds of models that are deemed understandable\. Secondly, it can provide meaningful concepts to use in a model\. Figure[4](https://arxiv.org/html/2607.01282#S4.F4)displays 3 detected abnormal ECG results\. Figure[4](https://arxiv.org/html/2607.01282#S4.F4)demonstrates that the method is able to detect not only anomaly in a single cycle \(the last cycle on Fig\.[4](https://arxiv.org/html/2607.01282#S4.F4)\), but also the rhythm of the abnormal over several cycles \(Figure[4](https://arxiv.org/html/2607.01282#S4.F4)\)\. The performance of the detected abnormal ECG is straightforward to explain\. The misclassified ECG is shown in Figure[4](https://arxiv.org/html/2607.01282#S4.F4), The main reason for the failure is excessive noise, which leads to inaccurate detection of key points\.



Figure 4:\(a\) and \(b\) are the correctly classified ECG; \(c\) is a misclassified ECG \(misidentification of key points due to interference\)\.


Figure 5:\(a\) and \(b\) are the normal ECGs; \(c\) is an abnormal ECG with premature atrial contractions \(PAC\)\.Figure[5](https://arxiv.org/html/2607.01282#S4.F5)illustrates the ability of our algorithm to accurately identify normal and abnormal ECGs\. Specifically, Figure[5](https://arxiv.org/html/2607.01282#S4.F5)and Figure[5](https://arxiv.org/html/2607.01282#S4.F5)depict normal ECGs that exhibit noise and baseline drift, which would lead to misclassification with high probability using methods that focus solely on the whole ECG signal\. However, our algorithm preprocesses the ECG signal and extracts key points, thereby minimizing the negative effects of noise and baseline drift\. Furthermore, when dealing with abnormal ECG signals, our algorithm not only pays attention to waveforms but also to the temporal relationship between beats, resulting in a significant improvement in the classification accuracy of relatively rare anomalies\. Figure[5](https://arxiv.org/html/2607.01282#S4.F5)shows an abnormal ECG with premature atrial contractions \(PAC\), which is the ECG signal of an atrial premature beat, and the anomaly occurred on the fifth heart beat only\. As demonstrated in Table 1, our algorithm exhibits superior PAC classification accuracy compared to the other methods\.
## 5Conclusion
This paper introduces a graph convolution network based on domain knowledge for ECG recognition, incorporating the landmarks points of PRQST as the ECG’s domain knowledge\. A temporal\-spatial graph model is employed to depict both short\-term intra\-cycle abnormalities and long\-term inter\-cycle abnormalities\. The effectiveness of our approach is validated through experiments on a large real\-world dataset\. The introduction of domain knowledge can improve the detection performance, especially for rare categories\.
Further investigation is required to construct graph data with more intricate connections\. It is noteworthy that our method extends beyond ECG and can find broad applications in cyclic signals \(such as Photo Plethysmo Graphy, PPG\) across various healthcare domains\. Similarly, periodic signals in diverse fields like communications and meteorology can also be analyzed using this method\.
## References
- \[1\]M\. Carrara, L\. Carozzi, T\. J\. Moss, M\. De Pasquale, S\. Cerutti, M\. Ferrario, D\. E\. Lake, and J\. R\. Moorman\(2015\)Heart rate dynamics distinguish among atrial fibrillation, normal sinus rhythm and sinus rhythm with frequent ectopy\.Physiological measurement36\(9\),pp\. 1873\.Cited by:[§1](https://arxiv.org/html/2607.01282#S1.p4.1)\.
- \[2\]Z\. Cui, K\. Henrickson, R\. Ke, and Y\. Wang\(2019\)Traffic graph convolutional recurrent neural network: a deep learning framework for network\-scale traffic learning and forecasting\.IEEE Transactions on Intelligent Transportation Systems21\(11\),pp\. 4883–4894\.Cited by:[§2\.3](https://arxiv.org/html/2607.01282#S2.SS3.p1.1)\.
- \[3\]T\. Dash, S\. Chitlangia, A\. Ahuja, and A\. Srinivasan\(2022\)A review of some techniques for inclusion of domain\-knowledge into deep neural networks\.Scientific Reports12\(1\),pp\. 1040\.Cited by:[§2\.1](https://arxiv.org/html/2607.01282#S2.SS1.p1.1)\.
- \[4\]T\. Dash, A\. Srinivasan, and A\. Baskar\(2022\)Inclusion of domain\-knowledge into gnns using mode\-directed inverse entailment\.Machine Learning,pp\. 1–49\.Cited by:[§1](https://arxiv.org/html/2607.01282#S1.p5.1)\.
- \[5\]J\. Deng, W\. Dong, R\. Socher, L\. Li, K\. Li, and L\. Fei\-Fei\(2009\)Imagenet: a large\-scale hierarchical image database\.In2009 IEEE conference on computer vision and pattern recognition,pp\. 248–255\.Cited by:[§1](https://arxiv.org/html/2607.01282#S1.p2.1)\.
- \[6\]M\. Feng and J\. Meunier\(2022\)Skeleton graph\-neural\-network\-based human action recognition: a survey\.Sensors22\(6\),pp\. 2091\.Cited by:[§2\.3](https://arxiv.org/html/2607.01282#S2.SS3.p1.1)\.
- \[7\]S\. Georgousis, M\. P\. Kenning, and X\. Xie\(2021\)Graph deep learning: state of the art and challenges\.IEEE Access9,pp\. 22106–22140\.Cited by:[§2\.3](https://arxiv.org/html/2607.01282#S2.SS3.p1.1)\.
- \[8\]A\. Y\. Hannun, P\. Rajpurkar, M\. Haghpanahi, G\. H\. Tison, C\. Bourn, M\. P\. Turakhia, and A\. Y\. Ng\(2019\)Cardiologist\-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network\.Nature medicine25\(1\),pp\. 65–69\.Cited by:[§1](https://arxiv.org/html/2607.01282#S1.p4.1)\.
- \[9\]W\. Z\. Khan, M\. Rehman, H\. M\. Zangoti, M\. K\. Afzal, N\. Armi, and K\. Salah\(2020\)Industrial internet of things: recent advances, enabling technologies and open challenges\.Computers & electrical engineering81,pp\. 106522\.Cited by:[§1](https://arxiv.org/html/2607.01282#S1.p1.1)\.
- \[10\]S\. Kiranyaz, T\. Ince, and M\. Gabbouj\(2015\)Real\-time patient\-specific ecg classification by 1\-d convolutional neural networks\.IEEE Transactions on Biomedical Engineering63\(3\),pp\. 664–675\.Cited by:[§1](https://arxiv.org/html/2607.01282#S1.p4.1),[§2\.2](https://arxiv.org/html/2607.01282#S2.SS2.p1.1)\.
- \[11\]C\. Li, Q\. Zhong, D\. Xie, and S\. Pu\(2017\)Skeleton\-based action recognition with convolutional neural networks\.In2017 IEEE international conference on multimedia & expo workshops \(ICMEW\),pp\. 597–600\.Cited by:[§3\.3](https://arxiv.org/html/2607.01282#S3.SS3.p2.6)\.
- \[12\]C\. Li, C\. Zheng, and C\. Tai\(1995\)Detection of ecg characteristic points using wavelet transforms\.IEEE Transactions on biomedical Engineering42\(1\),pp\. 21–28\.Cited by:[§2\.2](https://arxiv.org/html/2607.01282#S2.SS2.p1.1)\.
- \[13\]Y\. Liu, R\. He, K\. Wang, Q\. Li, Q\. Sun, N\. Zhao, and H\. Zhang\(2019\)Automatic detection of ecg abnormalities by using an ensemble of deep residual networks with attention\.InMachine Learning and Medical Engineering for Cardiovascular Health and Intravascular Imaging and Computer Assisted Stenting: First International Workshop, MLMECH 2019, and 8th Joint International Workshop, CVII\-STENT 2019, Held in Conjunction with MICCAI 2019, Shenzhen, China, October 13, 2019, Proceedings 1,pp\. 88–95\.Cited by:[§2\.2](https://arxiv.org/html/2607.01282#S2.SS2.p1.1),[§4\.4](https://arxiv.org/html/2607.01282#S4.SS4.p1.1),[Table 2](https://arxiv.org/html/2607.01282#S4.T2.3.2.3.1)\.
- \[14\]K\. Muhammad, S\. Khan, J\. Del Ser, and V\. H\. C\. De Albuquerque\(2020\)Deep learning for multigrade brain tumor classification in smart healthcare systems: a prospective survey\.IEEE Transactions on Neural Networks and Learning Systems32\(2\),pp\. 507–522\.Cited by:[§1](https://arxiv.org/html/2607.01282#S1.p1.1)\.
- \[15\]G\. S\. Na, H\. W\. Kim, and H\. Chang\(2020\)Scale\-aware graph\-based machine learning for accurate molecular property prediction\.In2020 IEEE International Conference on Big Data \(Big Data\),pp\. 196–203\.Cited by:[§2\.3](https://arxiv.org/html/2607.01282#S2.SS3.p1.1)\.
- \[16\]J\. Pan and W\. J\. Tompkins\(1985\)A real\-time qrs detection algorithm\.IEEE transactions on biomedical engineering\(3\),pp\. 230–236\.Cited by:[§3\.1](https://arxiv.org/html/2607.01282#S3.SS1.p3.1)\.
- \[17\]H\. Peng, X\. Chang, Z\. Yao, D\. Shi, and Y\. Chen\(2024\)A deep learning framework for ecg denoising and classification\.Biomedical Signal Processing and Control94\(\),pp\. 106441\.Cited by:[§2\.2](https://arxiv.org/html/2607.01282#S2.SS2.p1.1)\.
- \[18\]C\. Perera, A\. Zaslavsky, P\. Christen, and D\. Georgakopoulos\(2014\)Sensing as a service model for smart cities supported by internet of things\.Transactions on emerging telecommunications technologies25\(1\),pp\. 81–93\.Cited by:[§1](https://arxiv.org/html/2607.01282#S1.p1.1)\.
- \[19\]M\. Raghu, C\. Zhang, J\. Kleinberg, and S\. Bengio\(2019\)Transfusion: understanding transfer learning for medical imaging\.Advances in neural information processing systems32\.Cited by:[§2\.1](https://arxiv.org/html/2607.01282#S2.SS1.p1.1)\.
- \[20\]H\. Ravishankar, P\. Sudhakar, R\. Venkataramani, S\. Thiruvenkadam, P\. Annangi, N\. Babu, and V\. Vaidya\(2016\)Understanding the mechanisms of deep transfer learning for medical images\.InDeep Learning and Data Labeling for Medical Applications: First International Workshop, LABELS 2016, and Second International Workshop, DLMIA 2016, Held in Conjunction with MICCAI 2016, Athens, Greece, October 21, 2016, Proceedings 1,pp\. 188–196\.Cited by:[§2\.1](https://arxiv.org/html/2607.01282#S2.SS1.p1.1)\.
- \[21\]A\. Res\-BiLSTM\-Net\(2019\)Arrhythmia classification with attention\-based res\-bilstm\-net\.InMachine Learning and Medical Engineering for Cardiovascular Health and Intravascular Imaging and Computer Assisted Stenting: First International Workshop, MLMECH 2019, and 8th Joint International Workshop, CVII\-STENT 2019, Held in Conjunction with MICCAI 2019, Shenzhen, China, October 13, 2019, Proceedings,Vol\.11794,pp\. 3\.Cited by:[§2\.2](https://arxiv.org/html/2607.01282#S2.SS2.p1.1),[§4\.4](https://arxiv.org/html/2607.01282#S4.SS4.p1.1),[Table 2](https://arxiv.org/html/2607.01282#S4.T2.3.2.2.1)\.
- \[22\]\(2019\)The first edition of the artificial intelligence competition of cardiovascular disease diagnosis\(Website\)Note:Accessed: July 14, 2019External Links:[Link](http://mdi.ids.tsinghua.edu.cn/)Cited by:[§4\.1](https://arxiv.org/html/2607.01282#S4.SS1.p1.1)\.
- \[23\]L\. Von Rueden, S\. Mayer, K\. Beckh, B\. Georgiev, S\. Giesselbach, R\. Heese, B\. Kirsch, J\. Pfrommer, A\. Pick, R\. Ramamurthy,et al\.\(2021\)Informed machine learning–a taxonomy and survey of integrating prior knowledge into learning systems\.IEEE Transactions on Knowledge and Data Engineering35\(1\),pp\. 614–633\.Cited by:[§1](https://arxiv.org/html/2607.01282#S1.p2.1)\.
- \[24\]P\. Wang, B\. Kong, C\. Bao, L\. Zhou, and C\. Wang\(2021\)Community detection based on graph neural network\.In2021 6th International Conference on Intelligent Computing and Signal Processing \(ICSP\),pp\. 89–93\.Cited by:[§2\.3](https://arxiv.org/html/2607.01282#S2.SS3.p1.1)\.
- \[25\]N\. Xie, Z\. Miao, X\. Zhang, W\. Xu, M\. Li, and J\. Wang\(2021\)Sequential gesture learning for continuous labanotation generation based on the fusion of graph neural networks\.IEEE Transactions on Circuits and Systems for Video Technology32\(6\),pp\. 3722–3734\.Cited by:[§3\.2](https://arxiv.org/html/2607.01282#S3.SS2.p1.1)\.
- \[26\]N\. Xie, W\. Yu, L\. Yang, M\. Guo, and J\. Li\(2022\)Attention\-based fusion of directed rotation graphs for skeleton\-based dynamic hand gesture recognition\.InChinese Conference on Pattern Recognition and Computer Vision \(PRCV\),pp\. 293–304\.Cited by:[§2\.3](https://arxiv.org/html/2607.01282#S2.SS3.p1.1),[§3\.3](https://arxiv.org/html/2607.01282#S3.SS3.p2.6)\.
- \[27\]Z\. Yao, J\. Bi, and Y\. Chen\(2018\)Applying deep learning to individual and community health monitoring data: a survey\.International Journal of Automation and Computing15\(6\),pp\. 643–655\.Cited by:[§1](https://arxiv.org/html/2607.01282#S1.p1.1),[§1](https://arxiv.org/html/2607.01282#S1.p2.1)\.
- \[28\]Z\. Yao, Q\. Xu, Y\. Chen, Y\. Tu, H\. Zhang, and Y\. Chen\(2021\)Internet traffic forecasting using temporal\-topological graph convolutional networks\.In2021 International Joint Conference on Neural Networks \(IJCNN\),pp\. 1–8\.Cited by:[§2\.3](https://arxiv.org/html/2607.01282#S2.SS3.p1.1)\.
- \[29\]Z\. Yao, Z\. Zhu, and Y\. Chen\(2017\)Atrial fibrillation detection by multi\-scale convolutional neural networks\.In2017 20th international conference on information fusion \(Fusion\),pp\. 1–6\.Cited by:[§2\.2](https://arxiv.org/html/2607.01282#S2.SS2.p1.1)\.
- \[30\]C\. Yin, R\. Zhao, B\. Qian, X\. Lv, and P\. Zhang\(2019\)Domain knowledge guided deep learning with electronic health records\.In2019 IEEE International Conference on Data Mining \(ICDM\),pp\. 738–747\.Cited by:[§2\.1](https://arxiv.org/html/2607.01282#S2.SS1.p1.1)\.
- \[31\]B\. Yuan and W\. Xing\(2019\)Diagnosing cardiac abnormalities from 12\-lead electrocardiograms using enhanced deep convolutional neural networks\.InMachine Learning and Medical Engineering for Cardiovascular Health and Intravascular Imaging and Computer Assisted Stenting: First International Workshop, MLMECH 2019, and 8th Joint International Workshop, CVII\-STENT 2019, Held in Conjunction with MICCAI 2019, Shenzhen, China, October 13, 2019, Proceedings 1,pp\. 36–44\.Cited by:[§2\.2](https://arxiv.org/html/2607.01282#S2.SS2.p1.1),[§4\.4](https://arxiv.org/html/2607.01282#S4.SS4.p1.1),[Table 2](https://arxiv.org/html/2607.01282#S4.T2.3.2.1.1)\.Similar Articles
A Temporally Augmented Graph Attention Network for Affordance Classification
EEG-tGAT is a temporally augmented Graph Attention Network that improves affordance classification from interaction sequences by incorporating temporal attention and dropout mechanisms. The model enhances GATv2 for sequential data where temporal dimensions are semantically non-uniform.
Separating Expert Retention from Autonomous Source Inference in Raw-ECG-Replay-Free Continual ECG Deployment
This paper introduces IRFE-ECG, a method for continual ECG deployment that separates expert retention from autonomous source inference using frozen features from ECGFounder, achieving strong performance without replaying raw ECGs.
Cross-Modal Contrastive Learning of ECG and Angiography Representations for Severe Stenosis Classification
This paper introduces StenCE, a pretraining framework that uses cross-modal contrastive learning between ECG and X-ray angiography representations to detect severe coronary stenosis from ECGs, achieving high performance and enabling early diagnosis even in asymptomatic patients.
DeepArrhythmia: Segment-Contextualized ECG Arrhythmia Classification via Selective Evidence Acquisition
DeepArrhythmia is a multimodal framework for beat-level ECG arrhythmia classification that combines raw ECG signals and waveform images, using segment-level confidence to selectively acquire physiological evidence for improved accuracy.
TCAR-Gen: Temporal Graph Retrieval with Evidence Fusion for Knowledge-Grounded Generation
TCAR-Gen proposes a framework combining query-conditioned graph neural networks, temporal evidence fusion, and chain-of-trees reasoning for temporal graph retrieval in knowledge-grounded generation. It achieves improved recall on the Victorian Crime Diaries benchmark across multiple query types.