ECGWmark: A New Deep Watermarking Framework for Electrocardiogram Signals

ECGWmark embeds patient metadata in ECG signals without quantization loss, achieving strong robustness but uneven diagnostic impact.
ECGWmark is a fully convolutional, quantization-free deep watermarking framework designed for medical time-series signals, addressing the challenge of securely transmitting patient metadata in telecardiology. It operates in a continuous full-resolution latent space to avoid quantization-induced loss of diagnostic features, uses a frame-level localization mechanism to resist circular phase shifts, and introduces a differentiable physiological loss guided by a clinical classifier to explicitly preserve diagnostic semantics. On the MIT-BIH database, bit extraction accuracy exceeds 90% under circular temporal shift conditions, but inter-patient diagnostic evaluation shows mixed effects — Class-V sensitivity improves while Class-S sensitivity drops sharply from 8.89% to 1.39%, highlighting unresolved class-level balance issues before clinical deployment.
The secure transmission of electrocardiogram (ECG) signals in telecardiology has long been a challenging problem. How to embed patient metadata directly into the signal without compromising its clinical diagnostic value is a direction the field has been exploring for years. A study introducing ECGWmark proposes a fully convolutional, quantization-free deep watermarking framework that aims to bridge the gap between robustness and diagnostic fidelity in existing approaches.

The Classic Dilemma of Traditional Watermarking
Embedding patient information directly into ECG signals is not a new idea. Traditional mathematical watermarking methods can write patient metadata into a signal, binding the two for joint transmission. However, these methods share a critical weakness: they are extremely vulnerable to temporal desynchronization. Once the signal undergoes time-domain disturbances such as circular phase shifts, the embedded information often cannot be correctly extracted.
Another technical approach borrows deep watermarking methods from audio and other time-series signals. However, these schemes typically rely on lossy quantization, which sacrifices high-frequency micro-morphological details during compression. For ECG signals, these subtle high-frequency features are precisely the clinical basis for diagnosis — losing them undermines the signal's medical value.
In short, one path suffers from poor robustness against interference, while the other degrades diagnostic information. Neither existing approach can adequately balance security with clinical usability.
A note on circular phase shifts: A circular phase shift occurs when a signal is shifted along the time axis and the two ends are joined — for example, a heartbeat waveform that originally started at sample 100 now begins at sample 150 after transmission or storage. For traditional mathematical watermarks that rely on global frequency-domain features (such as Fourier transforms), this shift causes a complete mismatch between the embedding and extraction positions, making recovery impossible. In real-world telecardiology pipelines, signal compression, resampling, and network buffer splicing can all introduce such temporal disturbances, making desynchronization resistance the primary criterion for evaluating the practicality of any ECG watermarking scheme.
ECGWmark's Core Design Philosophy
ECGWmark is positioned as a fully convolutional, quantization-free deep watermarking framework for medical time-series signals. Several of its key design choices are worth unpacking.
Continuous, Full-Resolution Latent Space
Unlike quantization-dependent approaches, ECGWmark operates in a continuous, full-resolution latent space. By sidestepping quantization-induced information loss, it preserves the high-frequency micro-morphological details that are critical for diagnosis right from the source.
A note on latent space: In deep learning, the latent space refers to the intermediate representation space produced when an encoder compresses the raw input. Common practice in deep audio watermarking (e.g., AudioSeal, WavMark) involves encoding the signal into a lower-dimensional latent space, embedding the watermark, and then decoding back to the original length. To ensure latent values can be stored and transmitted by digital systems, quantization is typically applied — mapping continuous floating-point numbers to a finite set of discrete levels. Quantization inevitably introduces rounding errors. While this is acceptable for audio perception, diagnostic ECG features such as ST-segment elevation amplitude and QRS complex width operate at the millivolt or millisecond scale, making them highly susceptible to being obscured by quantization noise. ECGWmark's choice to operate directly in a continuous, full-resolution latent space is essentially a trade-off of higher computational cost for complete preservation of signal precision.
Frame-Level Localization Mechanism
To address severe temporal desynchronization, ECGWmark introduces a localized frame-level mechanism. This design directly targets the failure mode of traditional methods under circular phase shifts, improving desynchronization resistance by processing watermarks within local frames.
Differentiable Physiological Loss Function
The most distinctive feature is the introduction of a differentiable physiological loss guided by a clinical classifier. This loss term explicitly constrains the model to preserve the signal's diagnostic semantics during watermark embedding, rather than simply optimizing for signal-level similarity. It incorporates "correctness of diagnosis" into the optimization objective itself, rather than treating it as an afterthought.
Experimental Results: Strong Robustness, Mixed Diagnostic Impact
The research team validated their approach on the industry-standard MIT-BIH database, and the results present two sides of the story.
Robustness performance is impressive: Under the circular temporal shift conditions evaluated, ECGWmark maintained channel bit extraction accuracy above 90%. This demonstrates that the frame-level localization mechanism is genuinely effective at resisting temporal desynchronization — addressing the biggest weakness of traditional mathematical watermarking.
However, under the more stringent inter-patient diagnostic evaluation, the results show mixed effects:
- Class-V sensitivity improved from 71.97% to 76.50% (improvement)
- Macro-F1 slightly decreased from 35.25% to 34.71% (essentially stable with a minor drop)
- Class-S sensitivity dropped sharply from 8.89% to 1.39% (significant degradation)
The researchers honestly acknowledge that these numbers indicate the watermark embedding produces inconsistent effects across diagnostic categories. The recognition capability for some categories improves, while others — particularly Class-S — show significant sensitivity drops. This class-level disparity is a reality that cannot be ignored when evaluating the method's clinical practicality.
A note on MIT-BIH and evaluation methodology: The MIT-BIH Arrhythmia Database, jointly constructed by MIT and Boston's Beth Israel Hospital, contains 48 half-hour two-lead Holter ECG recordings at 360 Hz sampling rate, covering a variety of arrhythmia types, and is considered the "gold standard" benchmark for ECG algorithm research. The inter-patient evaluation scheme mentioned in the study means that training and test sets come from different patients. Compared to within-patient data splits, this scheme better reflects a model's generalization ability in real clinical deployment and is therefore considered a more rigorous evaluation. Class-S corresponds to supraventricular ectopic beats, and Class-V corresponds to ventricular ectopic beats — two categories that differ significantly in clinical significance and sample distribution. Class-S has relatively fewer samples in the database, which is one reason its sensitivity is more vulnerable to perturbations.
Value and Limitations
The significance of ECGWmark lies in being the first framework to combine "quantization-free deep watermarking" with "diagnostic semantic preservation" in a single unified approach, providing an engineering-ready implementation path through a differentiable physiological loss. The 90%+ desynchronization-resistant extraction accuracy demonstrates the viability of this technical direction for secure transmission.
However, the sharp drop in Class-S sensitivity under inter-patient diagnostic evaluation serves as a reminder: the impact of watermark embedding on clinical diagnosis is not uniformly positive. Before any real clinical deployment, ensuring that the watermarking process does not harm the recognition capability for any diagnostic category remains a problem that needs further work. For a technology targeting medical applications, this candid disclosure of negative results is precisely what gives it scientific value.
Overall, ECGWmark provides a valuable new paradigm for secure watermarking of medical time-series signals, but achieving clinical deployment will require more work on class-level balance.
Related articles

Chain of Thought Isn't Just for AI: How Humans Can Use CoT to Improve Thinking Quality
Chain of Thought isn't just a prompt trick for large models. Starting from a Hacker News discussion, this article analyzes why CoT works for human thinking too, breaks down actionable ways to transfer it, and highlights the key differences between human CoT and machine CoT.
Cloudflare Teams Up with OpenAI: Closi…
Cloudflare Teams Up with OpenAI: Closing the Loop from Vulnerability Discovery to Defense with AI
Cloudflare uses OpenAI Daybreak to investigate security vulnerabilities and generate reviewable remediation plans, while developers use Codex to boost coding efficiency and quality.

Orca Multi-Agent Orchestration in Practice: A Guide to Parallel Collaboration with Claude and Codex
Orca is Stable AI's free open-source agent workbench supporting 34 agents like Claude Code and Codex in parallel. Learn its Git worktree isolation, multi-model orchestration, and mobile management.