arXiv:2610.13357eess.SPOct 2026

Manuscript Offprint

arXiv:2610.13357

ECGWmark: Deep Watermarking for Electrocardiogram Signals

Kuan-Yu Chen, Kuan-Chen Wang, Yu Tsao, Jian-Jiun Ding

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Kuan-Yu Chen 1^{1}, Kuan-Chen Wang 1^{1}, Yu Tsao 2^{2}, and Jian-Jiun Ding 1^{1}

1^{1}National Taiwan University

2^{2}Academia Sinica

Abstract—Secure transmission of electrocardiogram (ECG) signals remains a major challenge in telecardiology. While traditional mathematical watermarking can embed patient metadata directly into ECG signals, it is highly fragile against temporal desynchronization such as circular phase shifts. In contrast, existing deep watermarking approaches for temporal signals, such as audio, typically rely on lossy quantization, which compromises the high-frequency micro-morphological details critical for clinical diagnosis. To bridge this gap, we propose ECGWmark, a fully convolutional and quantization-free deep watermarking framework for medical time-series. ECGWmark operates in a continuous, full-resolution latent space and utilizes a localized frame-level mechanism to improve the robustness to severe desynchronization. Crucially, we introduce a differentiable Physiological Loss guided by a clinical classifier to preserve diagnostic semantics. Experiments on the benchmark MIT-BIH database show that ECGWmark maintains channel-bit extraction accuracy above 90% under the evaluated circular temporal shifts. Furthermore, under a rigorous inter-patient diagnostic evaluation, Class-V sensitivity changes from 71.97% to 76.50%, whereas Macro-F1 changes from 35.25% to 34.71% and Class-S sensitivity from 8.89% to 1.39%; these results indicate mixed class-level effects.

Index Terms—Electrocardiogram (ECG), Deep Watermarking, Telecardiology, Diagnostic Fidelity, Information Security

I. INTRODUCTION

Wearable devices and the Internet of Medical Things (IoMT) enable continuous remote monitoring of vital biomedical signals [1], among which the electrocardiogram (ECG) is widely used for arrhythmia diagnosis. Consequently, safeguarding the security and morphological integrity of ECG data over public networks is important in telecardiology, as data modification can alter subtle physiological waveforms and affect automated analysis. Digital watermarking embeds metadata in the physiological signal, providing signal-layer integrity cues under a defined threat model [2].

Conventional techniques heavily rely on mathematical transforms to build the security layer. For instance, Least Significant Bit (LSB) substitution [3] offers standard reversible data hiding [4], while hybrid frequency-domain approaches combine the Discrete Cosine Transform with Singular Value Decomposition (DCT-SVD) [5], [6] or utilize the SchurMark framework [7] to embed watermarks in rigid 2-D orthogonal coefficient spaces. Collectively, these pioneering efforts have underscored the fundamental viability and the critical importance of digital watermarking as an indispensable paradigm for secure transmission of ECG signals.

However, these conventional paradigms suffer from two limitations when deployed in IoMT ecosystems. First, they are vulnerable to dynamic temporal distortions common at the public network edge, such as packet loss, time-shifting, or clipping. Because they rely on rigid 2-D matrix reshaping and require global structural synchronization, desynchronization can disrupt the aligned coefficient space needed for inversion [8]. Our baseline benchmark shows that a 30-sample shift reduces the traditional decoders to approximately 50% accuracy. Second, these techniques do not explicitly account for downstream diagnostic performance, motivating evaluation of ECG morphology and classifier metrics in addition to signal fidelity.

To systematically counter and resolve these dual vulnerabilities, we propose ECGWmark, a fully convolutional, quantization-free deep watermarking framework designed for medical signals. ECGWmark addresses the robustness bottleneck by replacing the fragile global alignment with a frame-level convolutional embedding and localized detection mechanism, inspired by resilient audio watermarking [9]. Concurrently, to reduce diagnostic perturbation without assuming universal transparency, we avoid lossy vector quantization. Instead, ECGWmark operates entirely within a continuous, full-resolution latent space, preserving the 1-D temporal characteristics of the ECG host signal.

Furthermore, traditional ECG watermarking relies heavily on standard metrics to evaluate imperceptibility [10]. However, signal fidelity does not guarantee clinical safety; minor mathematical perturbations can cause downstream cardiology models to misclassify the signal [11]. To bridge this methodological gap, we introduce a differentiable Diagnostic Loss ( LdiagL_{diag}) directly into the end-to-end joint training loop. By integrating a pre-trained clinical classifier, the framework applies a task-aware constraint, whose effect is evaluated with Macro-F1 and per-class metrics rather than interpreted as absolute diagnostic transparency.

This work introduces a deep ECG watermarking framework, termed ECGWmark, that decouples metadata embedding from global synchronization while measuring downstream diagnostic trade-offs. The main contributions are summarized as follows:

• Pioneering Neural ECG Watermarker: An end-to-end learning-based generative watermarking paradigm designed specifically for medical signals is introduced. By substituting fragile transform-domain invariants with

Figure

(a)

(b)

Fig. 1. ECGWmark operational phases: (a) Joint Training Pipeline: G and D are optimized end-to-end through a differentiable distortion layer A. Parameter updates are structurally isolated: G is updated by the losses of reconstruction ( LrecL_{rec}), auxiliary ( LauxL_{aux}), and physiology ( LdiagL_{diag}) to preserve clinical fidelity under a frozen classifier C, while the losses of extraction ( LmsgL_{msg}) and detection ( LdetL_{det}) directly update D and backpropagate through A to refine G. (b) Deployment and Inference: In practical telecardiology, an ECG signal (x) is processed by G to embed metadata represented by payload m. Upon reception, the watermarked signal (y) directly drives a dual-stream task: D estimates payload bits and watermark presence ( m^\hat{m}, pwmp_{wm}), while C evaluates morphology for clinical classification without temporal realignment.

a localized frame-level convolutional embedding mechanism, it reduces dependence on global synchronization under the evaluated circular shifts.

• Diagnostic Loss Optimization: We propose a differentiable Physiological Loss ( LdiagL_{diag}) that embeds a pretrained clinical classifier into the tripartite neural network training loop. We report Macro-F1 and per-class outcomes, including the adverse Class-S trade-off.

• Robust Evaluation and Feasibility: Evaluation on MIT-BIH [12] shows extraction accuracy above 90% under the evaluated circular shifts. A separate legacy-checkpoint ECC analysis maps 16 logical bits to 32 channels and obtains 90.41–99.86% exact recovery across clean and shift conditions at code rate 0.5 [13], [14].

References (25)