0% found this document useful (0 votes)
3 views13 pages

Uncertainty-Inspired Multi-Task Learning in

The document presents an uncertainty-inspired model called UI-Beat for ECG monitoring, which enhances heartbeat classification by addressing noise and ambiguous signals through uncertainty disentanglement. It integrates multi-task learning to improve performance in heartbeat localization and event diagnosis, achieving significant improvements in noise detection and classification accuracy. The proposed framework aims to provide reliable ECG analysis in diverse scenarios, making it a potential unified model for cardiovascular signal analysis.

Uploaded by

dudu bubu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views13 pages

Uncertainty-Inspired Multi-Task Learning in

The document presents an uncertainty-inspired model called UI-Beat for ECG monitoring, which enhances heartbeat classification by addressing noise and ambiguous signals through uncertainty disentanglement. It integrates multi-task learning to improve performance in heartbeat localization and event diagnosis, achieving significant improvements in noise detection and classification accuracy. The proposed framework aims to provide reliable ECG analysis in diverse scenarios, making it a potential unified model for cardiovascular signal analysis.

Uploaded by

dudu bubu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

4046 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 29, NO.

6, JUNE 2025

Uncertainty-Inspired Multi-Task Learning in


Arbitrary Scenarios of ECG Monitoring
Xingyao Wang , Hongxiang Gao , Caiyun Ma , Tingting Zhu , Feng Yang,
Chengyu Liu , Senior Member, IEEE, and Huazhu Fu , Senior Member, IEEE

Abstract—As the scenarios for electrocardiogram (ECG) database) and achieving a significant performance im-
monitoring become increasingly diverse, particularly with provement in heartbeat classification through uncertainty-
the development of wearable ECG, the influence of am- based cross-lead fusion compared to single-lead prediction
biguous factors in diagnosis has been amplified. Reliable and other state-of-the-art methods (an average improve-
ECG information must be extracted from abundant noises ment of 14.28% for detecting heartbeats of S and 3.37% for
and confusing artifacts. To address this issue, we suggest detecting heartbeats of V). Considering the characteristic of
an uncertainty-inspired model for beat-level diagnosis (UI- one-stage ECG analysis within one model, it is suggested
Beat). The base architecture of UI-Beat separates heart- that the proposed UI-Beat has the potential to be employed
beat localization and event diagnosis in two branches to as a general model for arbitrary scenarios of ECG monitor-
address the problem of heterogeneous data sources. To ing, with the capacity to remove unusable episodes, and
disentangle the epistemic and aleatoric uncertainty within realize heartbeat-level diagnosis with confidence provided.
one stage in a deterministic neural network, we propose
a new method derived from uncertainty formulation and Index Terms—ECG diagnosis, uncertainty disentangle-
realize it by introducing the class-biased transformation. ment, signal quality, ambiguous data, heartbeat localiza-
Then the disentangled uncertainty can be utilized to screen tion, heartbeat classification.
out noise and identify ambiguous heartbeat synchronously.
The results indicate that UI-Beat can significantly improve
the performance of noise detection (from 91.60% to 97.50%
for real-world noise detection and from 61.40% to 82.41% I. INTRODUCTION
for real-world artifact detection). For multi-lead ECG analy- EARTBEAT identification is the first and the most critical
sis, UI-Beat is approaching the performance upper bound
in heartbeat localization (only 15 false positives and 9 false
negatives out of the 175,907 heartbeats in the INCART
H stages for automatic electrocardiograph (ECG) analysis.
Unfortunately, the performance for automatic diagnosis of wear-
able ECGs has reached a bottleneck that the error accumulation
of heartbeat analysis will disturb the downstream tasks and is
not easily corrected. The recent researches have shown that the
Received 12 May 2024; revised 1 November 2024; accepted 17 classic methods, such as Pan-Tompkins and its variations [1],
February 2025. Date of publication 26 February 2025; date of current are no longer suitable for complex situations, while the deep
version 6 June 2025. This work was supported in part by the National learning (DL) approaches have brought significant improve-
Natural Science Foundation of China under Grant 62171123 and Grant
62211530112, in part by the National Key Research and Development ment in wearable ECG analysis [2], [3]. Despite improving the
Program of China under Grant 2023YFC3603600, in part by the Natural accuracy, the DL-based methods tend to make over-confident
Science Foundation of Jiangsu Province under Grant BK20241304, in predictions and not provide measures of confidence in their
part by the Jiangsu Funding Program for Excellent Postdoctoral Talent
2024ZB701, and in part by China Postdoctoral Science Foundation inference. Sufficient evidence is needed to help cardiologists
under Grant 2024M750444. (Xingyao Wang and Hongxiang Gao con- identify ambiguous signals and beats, especially for wearable
tributed equally to this work.) (Corresponding author: Chengyu Liu.) ECGs with limited lead(s) and noise contamination. As shown
Xingyao Wang is with the Institute of High Performance Comput-
ing (IHPC), Agency for Science, Technology and Research (A∗STAR),, in Fig. 1, the anomaly in long-term single-lead ECG is not only
Singapore 138632, and also with the School of Instrument Sci- caused by cardiac arrhythmia, but also misdirected by ambigu-
ence and Engineering and State Key Laboratory of Digital Medi- ous heartbeats and unusable episodes contaminated by random
cal Engineering, Southeast University, Nanjing 210096, China (e-mail:
wang_xingyao@[Link]). noise. Here, an ‘unusable’ ECG segment refers to a segment
Hongxiang Gao, Caiyun Ma, and Chengyu Liu are with the School of collected ECG data where no discernible ECG features are
of Instrument Science and Engineering and State Key Laboratory of detected, and no continuous three or more identifiable R-waves
Digital Medical Engineering, Southeast University, Nanjing 210096,
China (e-mail: hongxiang_seu@[Link]; caiyun@[Link]; is found. Such segments are deemed unusable due to insufficient
chengyu@[Link]). information for reliable analysis.
Tingting Zhu is with the Department of Engineering Science, The ambiguous heartbeats in ECG can be due to several
University of Oxford, OX1 3PJ Oxford, U.K. (e-mail: tingt-
[Link]@[Link]). reasons, including the poor quality in ECG, interference of al-
Feng Yang and Huazhu Fu are with the Institute of High Performance ternating current voltage, muscle tremor, baseline drift and even
Computing (IHPC), Agency for Science, Technology and Research pathological factors. They generally share similar morphology
(A∗STAR), Singapore 138632 (e-mail: yangf@[Link];
hzfu@[Link]). with QRS-complex so far as to confuse the cardiologists [4].
Digital Object Identifier 10.1109/JBHI.2025.3545927 In practice, the so-call artifacts in wearable ECGs with
2168-2194 © 2025 IEEE. All rights reserved, including rights for text and data mining, and training of artificial intelligence and similar technologies.
Personal use is permitted, but republication/redistribution requires IEEE permission. See [Link]
for more information.

Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: UNCERTAINTY-INSPIRED MULTI-TASK LEARNING IN ARBITRARY SCENARIOS OF ECG MONITORING 4047

ECG analysis tasks. For example, compared to tasks like heart-


beat classification and P wave localization, the identification
of R-peaks in ECG is relatively straightforward, resulting in
more comprehensive databases containing R-peak annotations.
On the other hand, databases related to abnormal heartbeat or
atrial anomaly detection are exceedingly scarce and often have
incomplete annotations. Furthermore, the blurring boundaries
between different categories results in severe inconsistencies in
annotations, even from the same expert at different times [10].
To address the aforementioned issues, we present an
uncertainty-inspired framework for beat-level analysis of arbi-
trary ECGs, including a multi-task learning module to address
Fig. 1. (a) is the Lorenz plot for a long-term single-lead ECG of a
the heterogeneity between heartbeat localization and classi-
patient with arrhythmia. Lorenz plot is a critical tool for comprehensively fication, an uncertainty disentanglement method to estimate
visualizing heart rate variability (HRV) using the plotting mode of beat- epistemic and aleatoric uncertainty for noise detection and
by-beat extraction of the RR intervals. The x-axis coordinate of the plot
represents the RR interval before the ith beat, while the y-axis coordi-
ambiguous heartbeat identification. The intuition of our work
nate represents the RR interval after. Based on the scatter in Lorenz is to accomplish the necessary modules for heartbeat analysis
plot, as well as the location and characteristics of the ectopic heartbeat, within one stage, so that substantial costs will not be required
cardiologists may recognize the arrhythmia pattern instinctively. (b.1-3)
show that the aberrant heartbeat cannot be separated from a QRS-like
when executing noise screening out, heartbeat localization and
artifact and ambiguous noise if one solely relies on the results of the heartbeat classification in a step-wise manner. For convenience,
R-peak localisation. The accumulation of such confusion may hinder we named our uncertainty-inspired heartbeat analysis method as
subsequent tasks in ECG analysis.
UI-Beat. The main contributions of this paper are summarized
as follows:
insufficient multi-lead reference could be ectopic heartbeats 1) For the first time we integrate uncertainty estimation
caused by exogenous or endogenous factors. Unfortunately, into the beat-wise analysis of ECG within one model,
both traditional and DL-based heartbeat analysis methods do and achieve the identification of noise and ambiguous
not possess reliable approaches to quantify the confidence heartbeat at the same time based on a new uncertainty
for these ambiguous waveform. This has indirectly led to a disentanglement method while ensuring the high preci-
deliberate focus on improving sensitivity in the deployment of sion in heartbeat localization and classification.
QRS-complex location module, shifting the workload to the 2) In order to address the issues of label incomplete and task
secondary checking stage, such as extra selection of heartbeat heterogeneity, we develop a cross-source learning method
templates. Similarly, noises are inevitable for wearable ECGs, to facilitate information interaction between heartbeat
causing extra signal quality assessment (SQA) [5], [6]. localization task and event detection task.
Interestingly, the two above scenarios correspond to the two 3) To address the inadequacy of current detection method
types of uncertainty, respectively - epistemic and aleatoric un- for artifact noise and ambiguous heartbeats, we construct
certainty. By definition, epistemic uncertainty is inherent to the the first database for ambiguous ECG signals. All the
model, caused by a lack of training data and aleatoric uncertainty annotated ambiguous ECG episodes are published as
originates from the inherent noise in data and hence irreducible AM-ECG database in [Link]
with more data [7]. Therefore, unusable signal episodes can be AM-ECG.
considered out-of-distribution (OoD) data relating to epistemic 4) We comprehensively validate the performance of the pro-
uncertainty, whereas ambiguous heartbeats can be considered to posed framework on noise detection, ambiguous heart-
be pertaining to aleatoric uncertainty. Hence disentangling these beat identification, heartbeat localization and classifica-
two uncertainties and reasoning about each independently is tion. According to the experimental results, it is indicated
crucial for wearable ECG analysis. The representative methods that UI-Beat can provide clinically trustworthy diagnostic
so far for uncertainty quantification are Monte-Carlo Dropout [8] conclusions, and be a potential unified model for multi-
and Deep Ensembles [9], which require multiple forward passes modal cardiovascular signal analysis.
in inference. Therefore, they are unsuitable for heartbeat analysis
in long-term ECGs, which should be a lightweight first step in II. RELATED WORKS
ECG analysis.
A. ECG Segmentation and Classification
Except for the interference from noise and ambiguous signal,
another bottleneck in DL-based diagnostic for ECGs is the lack So far, the majority of intelligent ECG analysis have been
of and inconsistency in annotations. In-hospital cardiovascular divided into two main areas: ECG segmentation and classifica-
examination predominantly rely on shot-term, 12-lead resting tion. ECG segmentation includes heartbeat localization based
ECGs. However, the annotation becomes exceedingly challeng- on the detection of R-peaks [11], ECG delineation containing
ing when it extends to dynamic monitoring scenarios, especially QRS-complex, P-waves and T-waves [12], and ECG feature
with non-standard ECG signals. The difficulty in annotation generation and clustering derived from subwave detection [13].
first leads to heterogeneity in data distribution across different The significance of segmentation lies in its ability to provide

Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
4048 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 29, NO. 6, JUNE 2025

physiological indicators for long-term ECG analysis. Current C. Uncertainty in Deterministic Models
research on ECG classification mainly focuses on end-to-end
The majority of uncertainty estimation approaches in deep
supervised learning [14], including the design of NNs tailored
learning are under Bayesian framework, that is to assume
for the extraction of pseudo-periodic features in ECGs [15], and
the posterior distribution of model parameters given training
studies on label distribution learning for multi-label issues for
data [7], [8], [9]. However, these methods are either unable to
ECG classification [16], [17]. Considering the variance in dif-
scale to large databases and model architectures, suffer from
ferent ECG collection approaches, self-supervised learning has
low-quality uncertainty measurement, or require expensive en-
been explored through pretraining on integrated ECG databases.
semble. Quantifying uncertainty in deterministic neural net-
Experiments have shown that pretrained AI models can enhance
works is more applicable since they own the lowest compu-
classification performance for downstream tasks, especially for
tational cost and not modify the inference procedure. Entropy
rare anomalies [18], [19]. Due to the inconsistent distribution of
measurement of predictive results is first attempted to estimate
annotations for ECG segmentation and diagnosis, most studies
uncertainty in deterministic models [33]. Unfortunately, entropy
still approach ECG analysis as a multi-step problem [20], [21].
measurement is often not indicative of OoD data [34]. Feature
However, ECG semantic delineation and diagnosis should be
space modeling offers a different approach [35]. The essence
interdependent. Recently, some research has considered how to
is to establish a constraint in the latent distribution induced by
integrate ECG segmentation and classification tasks within a sin-
iD and OoD data, so that once a previously unseen point with
gle model. For instance, Gao et al. adopted continual learning to
high distance (low density) added to the training data, the feature
implement ECG segmentation and abnormality detection within
space should be revealed with low distance (high density) [36].
a backbone network [22]. Moreover, a significant bottleneck in
Several related studies have already existed, like Kong et al. [37]
ECG analysis is to establish trustworthy AI models for clinic.
explicitly confuses the feature space referring to Brownian mo-
In fact, for diagnosis of 12-lead resting ECGs, there has been
tion using two independent Encoders, and Amersfoort et al. [35]
exploratory research on the impact of uncertainty estimation in
utilizes Radial Basis Function (RBF) network to exclude OoD
AI while deploying AI in clinic [23]. For fine-grained beat-level
data straying in feature-space.
ECG analysis, the uncertainty inherent in heartbeat variants
will cause the unstable diagnostic results, and contribute to
inconsistent data distributions and annotations. III. METHODS
A. ECG Analysis Framework
B. Multi-Source Multi-Task Learning The proposed model for ECG heartbeat analysis encompasses
Multi-task learning aims to learn multiple tasks simultane- two distinct tasks: heartbeat localization (R-peak localization)
ously through the interdependence between different tasks [24]. and heartbeat diagnosis. For heartbeat localization, the proposed
In multi-task learning, a prevalent approach involves utilizing method will first detects the coarse QRS-complex interval for
shared hidden layers within a single model to address various each heartbeat, then identifies the R-peak within that interval.
tasks, known as “hard-sharing”. Despite its popularity, this The nature of these two tasks is distinct: localization is to detect
technique often leads to diminished performance, especially in QRS-complex in ECG, while diagnosis requires an integrated
multi-source scenario [25], [26]. The key issue in multi-source decision considering the contextual information. Moreover, due
learning is the deficiency of shared samples among tasks induced to the difference in annotation difficulty, any publicly available
by data heterogeneity. For multi-task learning, the approach to ECG database that contains annotations for R-peaks can be
address multi-source problems can be summarized as establish- utilized for training in heartbeat localization task, and such
ing mechanisms for cross-task information transfer [24], and databases tend to own a more comprehensive ECG distribution.
evaluating the relationships among tasks is the most direct strat- In contrast, ECG databases with annotations for abnormal heart-
egy. For example, operating under the premise that tasks facing beats are rarer and mostly constructed by clean ECGs.
the same sample are not mutually independent, [27] proposes Consequently, as illustrated in Fig. 2, in order to achieve
a method to enhance the learning of cross-task consistency. the beat-level diagnosis, the proposed UI-Beat model employs
Zhou et al. [28] measures the similarity between tasks based structurally identical yet independent encoders and decoders for
on adversarial learning and utilize the information from similar the tasks of heartbeat and event detection, respectively. In ECG,
tasks to improve the performance of independent tasks. Beyond an event such as sinus rhythm (SR) and ventricular arrhythmia
directly measuring inter-task correlations, knowledge distilla- (VA) in Fig. 2, or atrial arrhythmia (AA), may contain multiple
tion and transfer are also employed to align representations of heartbeats. Ultimately, heartbeat diagnosis integrates the predi-
single-tasks with those of multi-task models, thereby mitigating cated probability sequence for heartbeat localization and event
training imbalances caused by task heterogeneity [29], [30]. detection, that is, assigning a diagnostic type to each localized
In recent years, researchers have also explored modeling the heartbeat within an event interval. Another aim of this design
inter-task correlations based on the theory of multivariate Gaus- is to do cross learning for the two tasks asynchronously owing
sian process, which has led to the design of training procedure to the heterogeneous data distribution in heartbeat localization
for neural networks (NNs) [31], [32]. In the context of ECG and classification. The details will be demonstrated in the next
diagnostics, tasks with simpler annotations typically have a more section.
comprehensive distribution, yet there is a lack of annotations for While synchronously localizing and diagnosing each heart-
more challenging tasks. beat, frame-level uncertainty estimation is conducted based on
Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: UNCERTAINTY-INSPIRED MULTI-TASK LEARNING IN ARBITRARY SCENARIOS OF ECG MONITORING 4049

Fig. 2. Overall ECG analysis pipeline based on the proposed UI-Beat model. An arbitrary ECG with any number of leads is segmented into
fragments for input to the UI-Beat model at first. (a) illustrates the basic architecture of UI-Beat model designed for the multi-task and multi-source
scenario in this work. The results of heartbeat classification are obtained by merging the outputs of heartbeat localization and event detection. In
(b), based on the proposed uncertainty disentanglement method, UI-Beat provides frame-level outputs including UE and UA . The outputs from the
lead with the highest confidence at each frame is selected as the ultimate output for that frame of the ECG. Meanwhile, UE and UA are respectively
responsible for detecting noise and ambiguous heartbeat.

a new proposed uncertainty disentanglement formulation. Here tasks are defined as fl and fe , gl and ge , respectively. Thus,
we utilize U represents the predictive uncertainty, and UE and UA for heartbeat localization task, we have zl = fl (xl ); ŷl = gl (zl ),
the epistemic and aleatoric uncertainty, respectively. In UI-Beat, and for event detection task, ze = fe (xe ); ŷe = ge (ze ). Before
the decoupled UE and UA respectively provide the capabilities entering the encoders, we uniformly performed embedding on
for noise filtration and the detection of ambiguous heartbeats. the input ECG episode. The reason for employing event detec-
Meanwhile, through uncertainty-based cross-lead fusion, the tion as a precursor task to heartbeat classification lies in the
output from the lead with the highest confidence is adopted as further compression of input ECG signals in latent space. Since
the final prediction, and UI-Beat will ultimately realize noise ECGs are non-stationary signals prone to noise interference,
detection, ambiguous beat identification, heartbeat localization more compression can mitigate the impact of noise on the output.
and diagnosis within one stage. In order to induce the utilization of contextual information
in heartbeat localization within this multi-task, multi-source
learning framework, and to introduce a broader data distribution
B. Cross-Source Learning of heartbeat for event detection, we design and implement the
As aforementioned, since the heartbeat localization task and inter-task interaction. This interaction is realized by transform-
heartbeat classification task are heterogeneous, we consider the ing and aligning fe (xl ) with zl and then adding them when input
heartbeat localization database as Dl = {Xl , Yl }, the heartbeat xl is provided. A similar approach is conducted with input xe .
classification database as Dc = {Xc , Yc }, and the event database While training, the supervision from Dl is exclusively linked to
De = {Xe , Ye }. The event database is constructed from Dc as the parameters updates for fl and gl , and the supervision from De
De = {Xe , Ye }, where Xe contains intervals, and Ye denotes is solely associated with the parameters of fe and ge . However,
labels associated with these intervals. While De was derived for the heartbeat classification task with database Dc , since
from Dc by grouping sequences of abnormal beats, it is also it is an intersection between heartbeat localization and event
possible to derive Dc from De . In this alternative process, each detection, we merge gl (fl (xc )) with ge (fe (xc )). Given that the
heartbeat within an abnormal interval in De would be assigned output for heartbeat localization is a probability sequence for
a label reflecting the specific abnormal rhythm type, thereby binary states (QRS-complex and non-QRS interval), we treat it
creating a heartbeat-level classification dataset. Accordingly, we as an attention tensor and utilize a channel-wise multiplication
have revised the description to accurately reflect the relationship method to integrate it with the output from event detection.
between Dc and De . The encoders and decoders of the two The formulas for cross-task information interaction and the

Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
4050 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 29, NO. 6, JUNE 2025

θ. Here we assume that UE can be regarded as the information


gain brought from the predictive label of x to the encoded
representations, z = fθ (x). That is to say, if to identify a new
data input x∗ as label y ∗ , how much more evidence can the model
capture from the data?
As a sequence-to-sequence task, the predicted result on each
frame ŷτ is considered to be determined by the representations
of this frame on the decision layer. Therefore, the inference
procedure obeys the Markov chain x → z → zτ → ŷτ . Thus
z = fθ (x) and ŷτ = gω (zτ ), then we have I between the z and
ŷ as follows:
I [ŷ, θ | x, D] = I [ŷ, z | D]
T

= I [ŷτ ; zτ | D]
Fig. 3. Illustration of the data flow during model’s forward propagation τ =1
in heartbeat localization, event detection, and heartbeat classification. T
 (6)
= (H [zτ | D] − H [zτ | ŷτ , D])
τ =1
probability output for heartbeat classification are as follows: ⎛ ⎞
T

zl = zl + τe (fe (xl )), (1) = DKL ⎝P (zτ | ŷτ , D)  P (zτ | D)⎠ ,
τ =1
  
ze = ze + τl (fl (xe )), (2) class-biased

ŷc = gl (fl (xc )) · ge (fe (xc )). (3) where T is the total number of the frames.
As Eqn.6 shows, UE can be deemed as the sum of the KL
To clarify cross-source learning in our proposed method, we divergence between the two distributions of zτ , the class-biased
have provided the data flow of the model’s forward propagation distribution and the ground truth distribution, which is learned
in the flowchart (Fig. 3). from the training set. We expect a feasible solution to estimate
For convenience, the parameters for fl and fe are defined as P (zτ | ŷτ , D) by producing discrepancy for the posterior dis-
θl and θe , while for decoders are ωl and ωe . In the following tribution belonging to a certain class c ∈ [1, K], p(zτ | ŷτc , D).
sections, the parameters of the combined encoder and decoder Thus we introduce φ to transform zτ into the class-biased
will be indicated as θ and ω. During training, the optimization representation:
objective function in our scenario can be defined as: 
min L(θ, ω, D) = loc (θl , ωl , (Xl , Yl )) P (zτ | ŷτ , D) = P (zτ , φc | ŷτc , D)
θ,ω c

+ evn (θe , ωe , (Xe , Ye )) (4) = P (zτ | ŷτc , φc , D)P (φc | ŷτc , D) (7)
c
+ cls (θ, ω, (Xc , Yc )),
1 
where loc , evn , and cls are the loss functions for heartbeat local- = P (zτ | ŷτc , φc , D),
K c
ization, event detection, and heartbeat classification respectively.
For UI-Beat training, we simply utilize cross entropy for the loss Here the φc is responsible for finding the evidence of the target
function of each task. class as far as possible, and the prior distribution, p(φc | ŷτc , D)
is set as the constant 1/K, which is under the assumption that
C. Frame-Wise Uncertainty Disentanglement the evidence distribution of the target class c is well determined
According to [38], given a data point {x, y} ∈ D and the by the model after learning from D.
prediction ŷ for x, the predictive uncertainty H[EP (θ|D) [p(Y | Recall and update the aforementioned Markov chain, and we
fθ φ gω
x, θ)]] upper-bounds the epistemic uncertainty, where epistemic can have x −→ z − → zτ −→ ŷτ . In a general sense, this Markov
uncertainty is quantified as the mutual information I[Y ; θ | x, D] chain can be utilized for image under pixel-level modeling, and
brought by θ on ŷ. The formulation is defined as follows: time series data under frame-level modeling. Thus we have
I [Y, θ | x, D] = H [Y | x, D]] − EP (θ|D) [H [Y | x, θ]] . (5) P (zτ | ŷτ , φc , D) = P (zτ | ŷτc , φc (z)). (8)
        
epistemic predictive aleatoric (for iD x)
In our thoughts, the transformation φc should be class-biased
The UE = I[Y ; θ | x, D] can be isolated from UA by sampling and preferentially capture features for the target class on each
θ from P (θ | D). This approach estimates UA as the expected frame. For iD data, φc (z) should be consistent with z since
entropy EP (θ|D) [H[Y | x, θ]], allowing UE to capture the un- the evidence distribution is well-determined, so that UE will be
certainty due to variability in θ itself. Therefore, the way is minimal. Conversely, we expect φc (z) to be inconsistent with
infeasible for a deterministic network with a solely-determined z when facing OoD data, inducing an increasing UE . Defining
Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: UNCERTAINTY-INSPIRED MULTI-TASK LEARNING IN ARBITRARY SCENARIOS OF ECG MONITORING 4051

Algorithm 1: Training Procedure of φc .


Require: M : number of training steps of one epoch
Require: α, β: step size hyperparameters
1: Randomly initialize θ, φc
2: while training do
3: for i ← 1 to M do Fig. 4. Scheme of training φc .
4: Input sample batch
5: Evaluate ∇θ L(fθ )
6: Update θ ← θ − α∇θ L(fθ ) Algorithm 2: Inference Procedure With Cross-Lead Fusion.
7: Calculate rci Require: L and T : number of lead(s) and frames
8: end for Require: Te and Ta : window size for screening noises and
1
9: rc = M c
i ri identifying ambiguous heartbeats
10: Update φ ← φc − β∇φc Lφc
c Require: Ve and Va : threshold for UE and UA
11: end while 1: Predict the probability sequence
ŷ = {ŷτ | τ = 0, . . . , T − 1}
2: Calculate {UEτ | τ = 0, . . . , T − 1} and
the frame-level representation after class-biased transformation {UAτ | τ = 0, . . . , T − 1} from Eqn. 9 and Eqn. 10
is zcτ , the UE of each frame can be derived from Eqn. 6 as: 3: UE ← T1e Tτ =0 e −1
UEτ
K−1 4: Reject the output from the lead with UE > Ve

UE = DKL (P (zτ | ŷτc , φc (z))P (zτ | z)) 5: Uτ ← UEτ + UAτ
c=0 6: for τ ← 1 to Te do
K−1
(9) 7: ŷτ ← ŷτl , UAτ ← UlAτ s.t. l = arg min{Ulτ }L l=1
 g(zcτ ) 8: end for
= g(zcτ ) log .
c=0
g(zτ ) 9: Calculate heartbeat locations {Ri }Si=1 from ŷ
10: for i ← 1 to S do
For estimation of UA , we utilize the expected entropy of τ =R +T /2
11: UA ← T1a τ =Rii −Taa/2 UAτ
ŷ, which is a straightforward approach referring to [38]. The 12: Accept the certain heartbeats with UA ≤ Va and
formulation is shown as follows: ambiguous ones with UA > Va
K−1
1  13: end for
UA = − E[log g(zτ )]. (10)
K c=1
where the M c is responsible for excluding frame-level represen-
D. Class-Biased Transformation tations not belonging to class c. The illustration of the training
After establishing the formulation for uncertainty estimation, scheme of φc is shown in Fig. 4. The average representation
the next question is how to obtain the aforementioned class- of all frames belonging to the target class c will be calculated
biased transformation φ. Since φc should maintain the feature on each sample batch. In the pursuit of an unbiased estimation
invariance of the target class, we need to train φc to generate of rc , the average representations of all the training steps will
representations approaching the marginal distribution of the be updated when the training epoch is ended. Assuming total
class, which is defined as rcτ ∼ P (zτ | yτ = c, D). Thus, we sample size is N and batch size is B, the number of training
have the objective function for φc as follows: steps is set as M = N/B. Given that rc is solely determined by
P (z | θ, D), it is imperative to segregate the gradient updating
T −1
1  of θ and φc while training. Otherwise, φ(z) and z will converge
L φc = {d (zcτ , rcτ | yτ = c) towards homogeneity, rendering φc incapable of effectuating a
T τ =0
class-biased transformation on z. The training procedure of φc
+ d (zcτ , zτ | yτ = c)}, (11) is provided in Algorithm 1.
Here the cosine distance is chosen here to measure the distance
E. Uncertainty-Based Cross-Lead Fusion
between representations, which is:
z1 z2 The main benefit of disentangling epistemic and aleatoric
d (z1 , z2 ) = − · , (12) uncertainty is to distinguish OoD and iD ambiguous data. This
z1 2 z2 2
is not trivial since an iD sample ought to cause a low epistemic
where  · 2 denotes l2 -norm. uncertainty regardless of whether it is ambiguous (with high
To estimate rc , we adopt the Monte-Carlo approximation, aleatoric uncertainty) or not [38]. Therefore, the aleatoric uncer-
which is shown as follows: tainty would be arbitrary for a noise episode, and on this account
N −1 the ambiguous heartbeats and unusable noises are confusing
1 
rc ≈ zi ⊗ M c , (13) when facing overall uncertainty quantification. We should firstly
N i=0 screen out the unusable noises according to the estimated UE and

Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
4052 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 29, NO. 6, JUNE 2025

then identify the ambiguous heartbeats within the effective ECG


episodes based on UA . Here the thresholds for UE and UA are
defined as Ve and Va , which will be set empirically according
to the statistical distributions of UE on ECG and noise signals,
and UA on certain heartbeats and ambiguous heartbeats in the
subsequent sections. In Algorithm 2, a scheme for cross-lead
information fusion based on the proposed uncertainty estimation
is provided, which is to select the output from the optimal
lead with the lowest uncertainty frame-by-frame. The minimum
window size is set as Te frames for screening out unusable noises Fig. 5. Simulation of ambiguous heartbeats.
with UE , and Ta frames centered on each predicted beat location
for identifying ambiguous heartbeats. Since the width of the
QRS-complex is typically between 60 and 100 ms, the average
aleatoric uncertainty of the time window with 100 ms centered
on each R-peak is utilized in this work to determine whether or
not the heartbeat is ambiguous.

IV. EXPERIMENTAL RESULTS


As a unified framework for wearable ECG analysis inspired
by uncertainty, UI-Beat should not only own the ability to locate
heartbeats and detect abnormal ones, but also to screen out noises
and identify ambiguous beats within one model. Synchronously,
the disentangled UE and UA should alert the ambiguous heart-
beats as well as their possible categories of abnormalities and
corresponding evidence. In this section, we comprehensively
conduct different experiments to investigate the feasibility and Fig. 6. (a) and (b) display the simulated and real-world instances of
performance of the proposed method for heartbeat analysis in the ECG episodes with artifacts, respectively.
wearable ECGs.

A. Noise and Ambiguous Beat Detection ambiguous beats outside the morphology and rhythm patterns of
normal beats (N), atrial (A), and ventricular (V) premature beats.
1) Database: For noise screening, 3,000 unusable 10-
Two physiologists then checked and annotated the candidate
second episodes (without any distinguishable heartbeat) were ambiguous heartbeats. In the end, we left the ambiguous beats on
extracted from a real-world wearable ECG database [39]. In which the two physiologists provided inconsistent annotations.
addition, to comprehensively illustrate the advantage of the Besides the annotations of ambiguous beats, we also annotated
proposed uncertainty estimation method for noise detection, we certain heartbeats to evaluate the specificity of UI-Beat recog-
also included two external test sets using different types of non- nizing ambiguous heartbeats. Fig. 7(a) and (b) list the classic
ECG signals, which are heart sounds and photoplethysmography instances of the simulated and manually annotated ambiguous
(PPG) signals, and utilized CPSC2019 database (10-second heartbeats. For convenience, we name the simulated and real-
ECG episodes with QRS-complex annotated) [40] as the iD world databases for ambiguous heartbeats as SIM-AM-ECG and
effective ECG set. RW-AM-ECG, respectively.
For identifying ambiguous heartbeats, two data sets are con- 2) Experimental Setup: For the evaluation of detecting am-
structed, including 2,000 ECG episodes with a simulated am- biguous heartbeats, the positive predictive value (P P V ), sensi-
biguous heartbeat, which is a randomly-inserted QRS-complex tivity (Se), and F1 score are computed over the cumulated true
from different patients and a real-world data set containing positive (T P ), false positive (F P ) and false negative (F N ). And
960 samples with 1,018 manually annotated QRS-like artifact for noise screening, accuracy (Acc) is utilized as an evaluation
heartbeats. To ensure the correctness of recognizing heartbeats index for classifying effective ECG and non-ECG episodes. True
in ECGs, we often need to refer to contextual information since negative (T N ) is additionally utilized in the Acc calculation.
the absolute morphology of the artifacts (derived from noise) These metrics are defined as follows:
is close to or even equal to the QRS-complex in most cases.
Therefore, the simulation will ensure a portion of ECG episodes TP
contain an ambiguous heartbeat that has general morphological Se = × 100%, (14)
TP + FN
characteristics while not conforming to the contextual pattern.
The visual description of generating the simulated ambiguous TP
PPV = × 100%, (15)
heartbeats is shown in Fig. 5. TP + FP
To capture the ambiguous heartbeats among real-world wear- 2 × Se × P+
F1 = × 100%, (16)
able ECGs, we first looked through the records for the candidate Se + P+

Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: UNCERTAINTY-INSPIRED MULTI-TASK LEARNING IN ARBITRARY SCENARIOS OF ECG MONITORING 4053

Fig. 7. Statistical histograms of UE and UA . (a) ∼ (d): Comparison of the distribution of UE for UI-Beat in the presence of effective ECG and
non-ECG episodes (real-world noise, Gaussian noise, PPG, and heart sound). (e) ∼ (f): Comparison of the distribution of UA for UI-Beat in the
presence of simulated and real-world ambiguous beats.

TABLE I
THE PERFORMANCE COMPARISON BETWEEN THE PROPOSED UI-BEAT AND THE TWO REPRESENTATIVE SQA METHODS FOR SCREENING NON-ECG
SIGNALS BASED ON EPISTEMIC UNCERTAINTY

TP + TN for testing on real-world noises, the proposed method achieves


Acc = × 100%. (17)
TP + TN + FP + FN a performance increase of nearly 6% over GbSQI. For heart
sounds and PPGs, the other two types of pseudo-periodic signals
We compare the noise detection results with two representative similar to ECGs, kSQI is incapable of distinguishing between
SQA methods, GbSQI [41] and kSQI [42]. GbSQI combines them. And while maintaining the performance on detecting
the features with consensus heartbeat detection. Unlike GbSQI, non-ECG episodes, UI-Beat owns over 10% performance gain
kSQI is developed based on the distribution characteristics of over the general SQA methods in identifying certain ECGs in
the candidate ECG episode. These two methods represent the CPSC2019-TEST.
two major directions for SQA. Similar to the experiments on noise screening, we compare
3) Results: We visually compare the value distributions of
the value distributions between UA on certain and ambiguous
the estimated UE from UI-Beat according to Eqn. 9 when facing heartbeats. From Fig. 6, we can see that the estimated UA can
ECG and non-ECG signals (Fig. 6). The window size Te for separate ambiguous beats from certain beats. According to the
screening out noise is set to 10 seconds. We can see that the esti- junction point of the two distributions, we set the threshold Va
mated UE is capable of separating certain ECGs from non-ECG in Algorithm 1 to 0.1 and the heartbeats with UA exceeding
noises properly. The threshold Ve in Algorithm 1 is set at 0.35, 0.1 will be accepted as possible artifacts. Table II shows the
referring to the junction point of the two distributions. Table I detection results of ambiguous heartbeats in the simulated and
shows the classification results of UI-Beat using epistemic un- real-world test sets. Due to the subjectivity of the annotation, the
certainty. Apparently, detection of non-ECG signals based on UE model does not necessarily respond within the intervals of the
is significantly superior to the current SQA methods. Especially annotated artifacts, and we exclude the samples with no response

Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
4054 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 29, NO. 6, JUNE 2025

TABLE II
THE PERFORMANCE OF DETECTING QRS-LIKE ARTIFACTS BASED ON ALEATORIC UNCERTAINTY

TABLE III
COMPARISON OF QRS-COMPLEX DETECTION PERFORMANCE ON MULTI-LEAD ECGS

at annotated artifacts according to ŷ. According to Table II, the and several classic uncertainty-aware methods, including MC-
results of Se on SIM-AM-QRS (75.36%) and on RW-AM-QRS Dropout [8] and Deep Ensemble [9], which we use an ensemble
(88.01%) for recognizing ambiguous heartbeats indicate that UA of five networks. To ensure an objective evaluation, we conduct
can be utilized as an auxiliary confidence for the outputs from the SQA method, GbSQI [41], as the preprocession for P&T in
UI-Beat. However, there is an obvious overlap between the am- a multi-lead setting. All the methods that take uncertainty into
biguous and certain beats, and such confusion brings down P P V account are trained with a multi-branch convolutional neural net-
for ambiguous beats. The confounding distributions are either work (MBCNN) [48], which is one of the optimal methods so far
embodied in the contextual disturbance or the noisy annotations. in R-peak detection. For each frame, the estimated uncertainty
is given, and the output sequence is made up of the frame-level
B. Heartbeat Localization for Multi-Lead ECGs likelihood that belongs to the lead with the most confidence.
Besides the general evaluation indicators (Se, PPV and F1 )
1) Database: So far, the key element for heartbeat local-
mentioned above, we complement the performance loss (%) in
ization in multi-lead ECGs lies in how to integrate cross-lead
FN and FP of a method M compared with the method with the
information well. In this experiment, we use the CPSC2019-
minimum FN and FP for a more direct display of performance
Train database [40] for training and five other independent
discrepancy, which is defined as follows:
databases with annotations of R-peaks, including CPSC2019-
Test for testing the baseline performance on the single-lead FN(M) − FNmin
FNLOSS (M) = × 100%, (18)
heartbeat localization, and four other databases to evaluate the FN(M)
performance of heartbeat localization on multi-lead ECGs, in-
FP(M) − FPmin
cluding MIT-BIH Arrhythmia Database (MIT-BIH) [43], QT FPLOSS (M) = × 100%. (19)
Database (QTDB) [44], INCART 12-lead Arrhythmia Database FP(M)
(INCART) [45] and LUDB 12-lead Database [46]. 3) Results: Table III gives a quantitative evaluation of heart-
2) Experimental Setup: The specific implementation is beat localization in multi-lead ECGs with uncertainty-based de-
shown in Algorithm 1 and a 2-second overlap is adopted cision. The results over CPSC2019-TEST indicate that the base-
for long-term ECGs. Also, we compare UI-Beat against the line performance of the three uncertainty-aware QRS-complex
rule-based R-peak detection method, Pan-Tompkins (P&T) [47], detection methods is equivalent and far superior than P&T,
Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: UNCERTAINTY-INSPIRED MULTI-TASK LEARNING IN ARBITRARY SCENARIOS OF ECG MONITORING 4055

TABLE IV 2) Experimental Setup: For heartbeat classification, we con-


THE MAPPING BETWEEN AAMI AND MIT-BIH CLASSES
tinue to use Se, P P V , and F 1 score as evaluation metrics. To
assess the performance of the proposed UI-Beat model in terms
of uncertainty estimation, similar to the multi-lead heartbeat
localization task, we evaluated the model’s performance using
a cross-lead fusion method while synchronously screening out
noise and identifying ambiguous heartbeats, as described in
Algorithm 2. If the uncertainty-based cross-lead fusion approach
significantly improves performance compared to single-lead
recognition, it indicates that the uncertainty estimation method
proposed in UI-Beat is effective. Furthermore, we also compared
the UI-Beat model with current state-of-the-art (SOTA) methods
in heartbeat classification, which are mainly divided into two
types: methods with known and unknown heartbeat positions,
where most belong to the methods with known heartbeat po-
of which Deep Ensemble is slightly better. According to the sition. Methods with known heartbeat positions include the
results over multi-lead ECG databases, it is clear that UI-Beat symbolic representation learning proposed by Niu et al. [21],
achieved a significant performance gap when compared with the Pyramid-like model proposed by He et al. [53], and the
MC-Dropout and is competitive with Deep Ensemble. Further- domain-adaptive heartbeat classification method proposed by
more, for MIT-BIH, UI-Beat reduces the F P s and F N s on Wang et al. [54]. Methods with unknown heartbeat positions
heartbeat localization by more than 20% and 52%, respectively, include the end-to-end model proposed by Yang et al. [55],
and for INCART, the database of Holter ECGs, F P s and F N s and the deep learning-based heartbeat classification method
are reduced by more than 50% and 40%, even 96.82% F P s are following ECG segmentation proposed by Mathews et al. [56].
reduced when compare with MC-Dropout. With the aid of the The UI-Beat model incorporates the heartbeat localization task
proposed uncertainty estimation method, the heartbeat localiza- during training but does not use heartbeat positions as a prior
tion performance of UI-Beat has been close to the limit on the while inference. Instead, it combines the results of heartbeat
long-term multi-lead ECG databases. For MIT-BIH, the F1 score localization to classify heartbeat types, thus UI-Beat belongs to
achieves 99.95%, which has exceeded the limits of the current the category of methods with unknown heartbeat positions. DS1
R-peak detection methods (99.86% in [49], 99.83% in [50] and derived from MIT-BIH database was utilized as the only training
99.91% in [48]) for this database. Similarly, the cumulative set.
errors, F P s and F N s, are only 15 and 9 for UI-Beat evaluated in 3) Results: Table V shows the comprehensive performance
INCART, approximating the limit of the performance of R-peak comparison for heartbeat classification, which contains two
detection for this database. main parts, comparison with SOTA methods and comparison
between scenarios of single-lead and uncertainty-based multi-
lead fusion. According to Table V, the UI-Beat model’s perfor-
C. Abnormal Heartbeat Classification mance in identifying N, S, and V types of heartbeats exceeds
1) Database: For heartbeat classification, we use the MIT- the current SOTA, including methods that incorporate known
BIH database [43] to construct the training and test set with heartbeat location information. It shows the most considerable
different types of heartbeats. In agreement with the American improvement in recognizing heartbeats of S. On the DS2 derived
Association of Medical Instrumentation (AAMI) [51] recom- from MIT-BIH, the F 1 score increased by over 10% compared
mended practice, the four recordings containing paced beats to the runner-up, and on the INCART database, it saw an increase
are removed from the analysis, and five types of heartbeats of more than 15%. Besides the UI-Beat model’s enhanced per-
are concluded. The details of the five heartbeat classes are formance in identifying N, S, and V, the effectiveness of the
described in Table IV. Since N, S, and V are the three main proposed uncertainty estimation is evident from the comparison
types of heartbeats in wearable ECG analysis with relatively results between single-lead and multi-lead scenarios. For 2-lead
comprehensive annotations among open-access ECG databases, MIT-BIH and 12-lead INCART, compared to single-lead ECG
the experiments are conducted on the three categories. diagnosis, the uncertainty-based cross-lead fusion (Algorithm 2)
Referring to the scheme introduced by De Chazal et al [52], achieved widespread performance improvements. Specifically,
MIT-BIH is divided into two datasets: the training set (DS1) and for recognizing heartbeats of S, the F 1 score improved by 4.50%
the test set (DS2). This dataset construction scheme is designed and 2.39%, respectively, and for heartbeats of V, it increased by
to separate the heartbeat data according to the different patients 1.52% and 3.17%, respectively.
and consider balancing the classes. The detailed information on To more directly demonstrate the role of uncertainty disen-
the heartbeat distribution and the recording division can be found tanglement and estimation in UI-Beat, we randomly selected an
in [52]. Except for MIT-BIH, another 12-lead ECG database with episode of single-lead ECG with unstable signal quality from
annotated heartbeats of N, S, and V, INCART [45], is utilized a wearable ECG database for testing. We then visualized the
in our experiments, which contains 153,676 N, 1,960 S, and diagnostic and confidence level results output by UI-Beat. The
20,013 V. visualization results is shown in Fig. 8. In Fig. 8, the confidence

Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
4056 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 29, NO. 6, JUNE 2025

TABLE V
COMPARISON OF HEARTBEAT CLASSIFICATION PERFORMANCE ON DS2 DERIVED FROM MIT-BIH AND INCART

Fig. 8. Visualization of heartbeat localization and diagnosis on a wearable single-lead ECG using UI-Beat. In addition to displaying the results of
heartbeat localization and classification, the figure also presents the judgement of noise and confidence level based on the disentangled UE and
UA . The gray line indicates the noise interval, and according to Algorithm 2, all diagnostic results within this interval are rejected. The frame-level
confidence is calculated by 1 − UA and transformed into heat maps to intuitively showcase the correspondence among ECG signals, diagnostic
outcomes, confidence levels. It is observable that when encountering noise interference or ambiguous heartbeats, the confidence is generally low,
whereas for clean heartbeats with distinct features, the confidence is notably high.

(Conf.) is represented by 1 − UA , and the noise is screened disentangle the epistemic and aleatoric uncertainty without
out based on UE . According to Fig. 8, UI-Beat is capable of ensemble learning. The proposed method is named as UI-Beat.
effectively eliminating noise while making reliable heartbeat According to the definition of uncertainty, the epistemic and
localization and diagnosis, and it offers confidence levels for aleatoric uncertainty can be utilized to identify OoD data
heartbeats with ambiguous characteristics among different cat- (non-ECG noise) and iD ambiguous data (ambiguous heart-
egories. beats).The experimental results suggest that UI-Beat possesses
the capability of realizing noises screening, artifactambiguous
heartbeat identification, high-precision heartbeat localization
V. DISCUSSION and heartbeat diagnosis within one-stage inference. Moreover,
For the first time we introduce uncertainty-inspired learning the proposed class-biased transformation for uncertainty disen-
into heartbeat-level ECG analysis with a deterministic neural tanglement in UI-Beat is easily implemented and plug-and-play
network. We develop the uncertainty paradigm into distance for arbitrary Encoders, which is consistent with a rapid and
measurement between class-biased representations and lightweight deployment for the initial stage of ECG analysis.

Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: UNCERTAINTY-INSPIRED MULTI-TASK LEARNING IN ARBITRARY SCENARIOS OF ECG MONITORING 4057

A. Noise Screening Certainly, several areas need to be completed for UI-Beat


in the future. First of all, UI-Beat focuses on class-biased
There are two main types of noise in ECG monitoring, non-
transformation for producing discrepant latent representations
ECG signals and QRS-like artifacts. The capability of depressing
in a deterministic neural network. As the number of abnormal
the influence brought by different noises is vital in ECG analysis,
types requiring diagnosis increases, the operation becomes more
especially for wearable ECG monitoring due to intense motion.
redundancy. In the future, in order to reduce the cost of learn-
In this work, we compare two classic SQA methods, kSQI and
ing, it is necessary to investigate unified learning paradigms or
GbSQI, which represent two technical routes of SQA that extract
integrable estimation of marginal distributions for class-biased
waveform distribution characteristics and incorporate R-peak
transformation. In addition, one of the most important applica-
information. According to Table I, kSQI is evidently unusable
tions of uncertainty estimation is in the field of active learning,
for non-ECG pseudo-periodic signals, such as heart sounds and
where it is used to strengthen the model by including data with
PPGs. This indicates that the SQA methods based on waveform
high epistemic uncertainty but low aleatoric uncertainty into the
distribution will be disturbed by periodic noises like breath and
training set. Therefore, we will continue to the proposed UI-Beat
muscle tremors. For GbSQI, the generalized version of bSQI,
in utilizing uncertainty to realize increment learning of heartbeat
ten QRS detectors are utilized to inform the intelligibility of
variations. Last but no least, since the efficiency of UI-Beat has
QRS-complex. This idea is similar to deep ensemble in essence
been validated on ECG analysis in arbitrary scenarios, the pro-
yet the performance is constrained by the R-peak detector.
posed frame-level uncertainty estimation and uncertainty-based
Therefore, applying uncertainty estimation in AI model for ECG
cross-lead fusion has the potential to be extended to multi-modal
diagnosis to filter out non-ECG episodes is more sensible from
cardiovascular diagnostics.
a performance and efficiency standpoint.
For QRS-like artifact identification, the limited research con-
centrates on heartbeat clustering. In 12-lead ECG monitoring, VI. CONCLUSION
the artifacts therein can be restricted due to the multi-lead
This paper proposes a unified heartbeat-level diagnosis
reference. However, for single-lead ECGs, the subsequent ECG
method for arbitrary ECG, UI-Beat, that can synchronously
analysis will be severely obstructed with plenty of suspected
output the confidence of the diagnostic decision. By disentan-
premature beats and long RR intervals if the frequent artifacts
gling epistemic and aleatoric uncertainties, this method unifies
are not appropriately handled. According to Table II, the artifacts
noise screening, artifact or ambiguous heartbeat identification,
appear to inherit the ambiguous characteristics, as evidenced
heartbeat localization, and classification as a one-stage frame-
by a low P P V when recognizing ambiguous heartbeats. The
work. It provides a feasible and deployable solution for heartbeat
identified QRS-like artifacts determined by the disentangled
analysis for ECGs, especially for wearable ECGs with limited
aleatoric uncertainty from UI-Beat and its derived indicators
and nonstandard lead(s). Furthermore, the uncertainty-based
can be retained as auxiliaries in the final diagnostic report. By
cross-lead fusion significantly improves the performance in
undertaking such actions, UI-Beat can significantly alleviate
heartbeat localization and classification, indicating that UI-Beat
the verification workload caused by artifacts and ensure the
can unify various forms of ECG monitoring into a core solution
reliability of subsequent ECG diagnosis tasks.
based on a general method for single-lead scenario. This presents
a fruitful area for further work in migrating the UI-Beat to
B. Heartbeat Diagnosis a broader application in long-term ECG diagnosis and other
The DL-based QRS-complex detection and heartbeat classi- wearable cardiovascular signal monitoring scenarios.
fication has been proved to exceed the traditional methods, es-
pecially for dynamic ECG. The unification of ECGs acquired in
REFERENCES
variational monitoring scenarios, that is to localize and identify
heartbeats in any lead, is essential for improving the efficiency [1] H. Chen and K. Maharatna, “An automatic R and T peak detection
method based on the combination of hierarchical clustering and discrete
of ECG analysis. Traditional approaches often employ average wavelet transform,” IEEE J. Biomed. Health Inform., vol. 24, no. 10,
lead and heartbeat to integrate ECG signals from different leads, pp. 2825–2832, Oct. 2020.
which proves remarkably efficacious for multi-lead scenario. [2] M. Gabbouj et al., “Robust peak detection for Holter ECGS by self-
organized operational neural networks,” IEEE Trans. Neural Netw. Learn.
However, such methods invariably encounter limitations inher- Syst., vol. 34, no. 11, pp. 9363–9374, Nov. 2023.
ent to the performance of the algorithm. In addition, the cost [3] N. Sabor, G. Gendy, H. Mohammed, G. Wang, and Y. Lian, “Robust
for changing amount of input channels is relatively high in arrhythmia classification based on QRS detection and a compact 1D-CNN
for wearable ECG devices,” IEEE J. Biomed. Health Inform., vol. 26,
DL-based method. In our work, on the basis of the proposed no. 12, pp. 5918–5929, Dec. 2022.
uncertainty estimation approach, we have successfully linked [4] X. Wang, Y. Li, H. Gao, X. Cheng, J. Li, and C. Liu, “A causal interven-
the heartbeat-level diagnosis on single- and multi-lead ECGs. tion scheme for semantic segmentation of quasi-periodic cardiovascular
signals,” IEEE J. Biomed. Health Inform., vol. 27, no. 7, pp. 3175–3186,
In fact, UI-Beat can convert single- or multi-lead, short- or Jul. 2023.
long-term ECGs into batches for parallel inference and its effi- [5] C. Orphanidou and I. Drobnjak, “Quality assessment of ambulatory ECG
ciency is comparable to that of traditional methods. Notably, for using wavelet entropy of the HRV signal,” IEEE J. Biomed. Health Inform.,
vol. 21, no. 5, pp. 1216–1223, May 2016.
multi-lead ECGs, UI-Beat can effectively integrate the cross- [6] U. Satija, B. Ramkumar, and M. S. Manikandan, “A review of signal
lead information and make decisions based on the frame-level processing techniques for electrocardiogram signal quality assessment,”
outputs from the most confident lead. IEEE Rev. Biomed. Eng., vol. 11, pp. 36–52, 2018.

Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.
4058 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 29, NO. 6, JUNE 2025

[7] A. Kendall and Y. Gal, “What uncertainties do we need in Bayesian deep [31] V. Aglietti, T. Damoulas, M. Álvarez, and J. González, “Multi-task causal
learning for computer vision,” in Proc. Neural Inf. Process. Syst., 2017, learning with Gaussian processes,” Adv. Neural Inf. Process. Syst., vol. 33,
pp. 5580–5590. pp. 6293–6304, 2020.
[8] Y. Gal and Z. Ghahramani, “Dropout as a Bayesian approximation: Rep- [32] J. Futoma, S. Hariharan, and K. Heller, “Learning to detect Sepsis with
resenting model uncertainty in deep learning,” in Proc. Int. Conf. Mach. a multitask Gaussian process RNN classifier,” in Proc. Int. Conf. Mach.
Learn., 2016, pp. 1050–1059. Learn., 2017, pp. 1174–1182.
[9] R. Rahaman and A. H. Thiery, “Uncertainty quantification and deep [33] J. Liu, Z. Lin, S. Padhy, D. Tran, T. Bedrax Weiss, and B. Lakshmi-
ensembles,” in Proc. Adv. Neural Inf. Process. Syst., 2021, vol. 34, narayanan, “Simple and principled uncertainty estimation with determin-
pp. 20063–20075. istic deep learning via distance awareness,” Adv. Neural Inf. Process. Syst.,
[10] T. Zhu, A. E. Johnson, J. Behar, and G. D. Clifford, “Crowd-sourced vol. 33, pp. 7498–7512, 2020.
annotation of ECG signals using contextual information,” Ann. Biomed. [34] L. Smith and Y. Gal, “Understanding measures of uncertainty for ad-
Eng., vol. 42, pp. 871–884, 2014. versarial example detection,” in Proc. Uncertainty Artif. Intell., 2018,
[11] R. He et al., “Automatic detection of QRS complexes using dual channels pp. 560–569.
based on U-Net and bidirectional long short-term memory,” IEEE J. [35] J. Van Amersfoort, L. Smith, Y. W. Teh, and Y. Gal, “Uncertainty estima-
Biomed. Health Inform., vol. 25, no. 4, pp. 1052–1061, Apr. 2020. tion using a single deep deterministic neural network,” in Proc. Int. Conf.
[12] R. V. Andreao, B. Dorizzi, and J. Boudy, “ECG signal analysis through Mach. Learn., 2020, pp. 9690–9700.
hidden Markov models,” IEEE Trans. Biomed. Eng., vol. 53, no. 8, [36] J. Mukhoti, A. Kirsch, J. van Amersfoort, P. H. Torr, and Y. Gal, “Determin-
pp. 1541–1549, Aug. 2006. istic neural networks with appropriate inductive biases capture epistemic
[13] K. Wang, G. Yang, Y. Huang, and Y. Yin, “Multi-scale differential feature and aleatoric uncertainty,” in Proc. ICML Workshop Uncertain. Robust.
for ECG biometrics with collective matrix factorization,” Pattern Recog- Deep Learn., 2021.
nit., vol. 102, 2020, Art. no. 107211. [37] L. Kong, J. Sun, and C. Zhang, “SDE-Net: Equipping deep neural net-
[14] A. Y. Hannun et al., “Cardiologist-level arrhythmia detection and classi- works with uncertainty estimates,” in Proc. Int. Conf. Mach. Learn., 2020,
fication in ambulatory electrocardiograms using a deep neural network,” pp. 5405–5415.
Nature Med., vol. 25, no. 1, pp. 65–69, 2019. [38] J. Mukhoti, A. Kirsch, J. van Amersfoort, P. H. Torr, and Y. Gal, “Deep
[15] J. Malik, O. C. Devecioglu, S. Kiranyaz, T. Ince, and M. Gabbouj, “Real- deterministic uncertainty: A new simple baseline,” in Proc. IEEE/CVF
time patient-specific ECG classification by 1 D self-operational neural Conf. Comput. Vis. Pattern Recognit., 2023, pp. 24384–24394.
networks,” IEEE Trans. Biomed. Eng., vol. 69, no. 5, pp. 1788–1801, [39] Z. Cai et al., “An open-access long-term wearable ECG database for
May 2021. premature ventricular contractions and supraventricular premature beat
[16] L. Sun, C. Li, Y. Ren, and Y. Zhang, “A multitask dynamic graph at- detection,” J. Med. Imag. Health Inform., vol. 10, no. 11, pp. 2663–2667,
tention autoencoder for imbalanced multilabel time series classification,” 2020.
IEEE Trans. Neural Netw. Learn. Syst., vol. 35, no. 9, pp. 11829–11842, [40] H. Gao et al., “An open-access ECG database for algorithm evaluation of
Sep. 2024. QRS detection and heart rate estimation,” J. Med. Imag. Health Inform.,
[17] S. Zhang, Y. Li, X. Wang, H. Gao, J. Li, and C. Liu, “Label decoupling vol. 9, no. 9, pp. 1853–1858, 2019.
strategy for 12-lead ECG classification,” Knowl.-Based Syst., vol. 263, [41] F. Liu et al., “Dynamic ECG signal quality evaluation based on the
2023, Art. no. 110298. generalized bSQI index,” IEEE Access, vol. 6, pp. 41892–41902, 2018.
[18] N. Wang, P. Feng, Z. Ge, Y. Zhou, B. Zhou, and Z. Wang, “Adversarial [42] Q. Li, R. G. Mark, and G. D. Clifford, “Robust heart rate estimation from
spatiotemporal contrastive learning for electrocardiogram signals,” IEEE multiple asynchronous noisy sources using signal quality indices and a
Trans. Neural Netw. Learn. Syst., vol. 35, no. 10, pp. 13845–13859, Kalman filter,” Physiol. Meas., vol. 29, no. 1, pp. 15–32, 2007.
Oct. 2024. [43] G. B. Moody and R. G. Mark, “The impact of the MIT-BIH arrhythmia
[19] W. Zhang, L. Yang, S. Geng, and S. Hong, “Self-supervised time se- database,” IEEE Eng. Med. Biol. Mag., vol. 20, no. 3, pp. 45–50, Mar. 2001.
ries representation learning via cross reconstruction transformer,” IEEE [44] P. Laguna, R. G. Mark, A. Goldberg, and G. B. Moody, “A database
Trans. Neural Netw. Learn. Syst., vol. 35, no. 11, pp. 16129–16138, for evaluation of algorithms for measurement of QT and other waveform
Nov. 2024. intervals in the ECG,” in Proc. Comput. Cardiol., 1997, pp. 673–676.
[20] Z. Zhao, X. Wang, Z. Cai, J. Li, and C. Liu, “PVC recognition for wearable [45] A. Taddei et al., “The European ST-T database: Standard for evaluating
ECGs using modified frequency slice wavelet transform and convolutional systems for the analysis of ST-T changes in ambulatory electrocardiogra-
neural network,” in Proc. Comput. in Cardiol. (CinC), 2019, pp. 1–4. phy,” Eur. Heart J., vol. 13, no. 9, pp. 1164–1172, 1992.
[21] J. Niu, Y. Tang, Z. Sun, and W. Zhang, “Inter-patient ECG classification [46] A. I. Kalyakulina et al., “LUDB: A new open-access validation tool
with symbolic representations and multi-perspective convolutional neural for electrocardiogram delineation algorithms,” IEEE Access, vol. 8,
networks,” IEEE J. Biomed. health Inform., vol. 24, no. 5, pp. 1321–1332, pp. 186181–186190, 2020.
May 2019. [47] J. Pan and W. J. Tompkins, “A real-time QRS detection algorithm,” IEEE
[22] H. Gao, X. Wang, Z. Chen, M. Wu, J. Li, and C. Liu, “ECG-CL: A com- Trans. Biomed. Eng., vol. 32, no. 3, pp. 230–236, Mar. 1985.
prehensive electrocardiogram interpretation method based on continual [48] W. Cai and D. Hu, “QRS complex detection using novel deep learning
learning,” IEEE J. Biomed. Health Inform., vol. 27, no. 11, pp. 5225–5236, neural networks,” IEEE Access, vol. 8, pp. 97082–97089, 2020.
Nov. 2023. [49] V. Kalidas and L. Tamil, “Real-time QRS detector using stationary wavelet
[23] J. F. Vranken et al., “Uncertainty estimation for deep learning-based transform for automated ECG analysis,” in Proc. IEEE 17th Int. Conf.
automated analysis of 12-lead electrocardiograms,” Eur. Heart J.- Digit. Bioinf. Bioeng. (BIBE), 2017, pp. 457–461.
Health, vol. 2, no. 3, pp. 401–415, 2021. [50] M. U. Zahid et al., “Robust R-Peak detection in low-quality holter ECG
[24] Y. Zhang and Q. Yang, “A survey on multi-task learning,” IEEE Trans. using 1 D convolutional neural network,” IEEE Trans. Biomed. Eng.,
Knowl. Data Eng., vol. 34, no. 12, pp. 5586–5609, Dec. 2021. vol. 69, no. 1, pp. 119–128, Jan. 2021.
[25] Y. Zhu et al., “Heterogeneous transfer learning for image classification,” [51] Association for the Advancement of Medical Instrumentation & American
in Proc. AAAI Conf. Artif. Intell., no. 1, 2011, pp. 1304–1309. National Standards Institute, Testing and reporting performance results of
[26] Y. Li, X. Tian, T. Liu, and D. Tao, “On better exploring and exploiting cardiac rhythm and ST segment measurement algorithms,” ANSI/AAMI
task relationships in multitask learning: Joint model and feature learning,” EC57:2012/(R)2020, 2012.
IEEE Trans. Neural Netw. Learn. Syst., vol. 29, no. 5, pp. 1975–1985, [52] P. De Chazal, M. O’Dwyer, and R. B. Reilly, “Automatic classification of
May 2017. heartbeats using ECG morphology and heartbeat interval features,” IEEE
[27] A. R. Zamir et al., “Robust learning through cross-task consistency,” in Trans. Biomed. Eng., vol. 51, no. 7, pp. 1196–1206, Jul. 2004.
Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit., 2020, pp. 11197– [53] J. He, L. Sun, J. Rong, H. Wang, and Y. Zhang, “A pyramid-like model for
11206. heartbeat classification from ECG recordings,” PLoS one, vol. 13, no. 11,
[28] F. Zhou, C. Shui, M. Abbasi, L.-É. Robitaille, B. Wang, and C. Gagné, 2018, Art. no. e0206593.
“Task similarity estimation through adversarial multitask neural network,” [54] G. Wang, M. Chen, Z. Ding, J. Li, H. Yang, and P. Zhang, “Inter-patient
IEEE Trans. Neural Netw. Learn. Syst., vol. 32, no. 2, pp. 466–480, ECG arrhythmia heartbeat classification based on unsupervised domain
Feb. 2020. adaptation,” Neurocomputing, vol. 454, pp. 339–349, 2021.
[29] W.-H. Li and H. Bilen, “Knowledge distillation for multi-task learning,” in [55] J. Yang, W. Cai, and M. Wang, “Premature beats detection based on a
Proc. Comput. Vision–ECCV Workshops Glasgow, U.K., 2020, pp. 163– novel convolutional neural network,” Physiol. Meas., vol. 42, no. 7, 2021,
176. Art. no. 0 75003.
[30] K. Li, J. Lu, H. Zuo, and G. Zhang, “Multi-source contribution learning [56] S. M. Mathews, C. Kambhamettu, and K. E. Barner, “A novel application
for domain adaptation,” IEEE Trans. Neural Netw. Learn. Syst., vol. 33, of deep learning for single-lead ECG classification,” Comput. Biol. Med.,
no. 10, pp. 5293–5307, Oct. 2021. vol. 99, pp. 53–62, 2018.
Authorized licensed use limited to: Universitatsbibliothek Erlangen Nurnberg. Downloaded on March 05,2026 at 11:02:17 UTC from IEEE Xplore. Restrictions apply.

You might also like