Personalized Heart Disease Detection via ECG Digital Twin Generation

Yaojun Hu, Jintai Chen, Lianting Hu, Dantong Li, Jiahuan Yan, Haochao Ying, Huiying Liang, Jian Wu

Abstract

Automated ECG diagnosis often struggles with individual physiological variations and data privacy constraints. This paper presents LAVQ-Editor, a framework that generates personalized "ECG Digital Twins" by editing a patient's healthy heart signals with disease-indicative features. By utilizing vector quantization to isolate pathological signatures from personal identity, LAVQ-Editor enables prospective learning on tailored "what-if" scenarios, improving diagnostic accuracy while enhancing data privacy.

Introduction

Traditional ECG models are typically trained on population-level data, frequently overlooking the unique physiological nuances of individual patients. Furthermore, the field faces a significant "data dilemma": high-quality annotated data is expensive to produce, and sharing real patient data raises privacy concerns. Existing generative models like GANs or VAEs produce generic signals that lack the specificity required for personalized medicine. This work introduces LAVQ-Editor to bridge this gap by moving from general synthesis toward personalized digital twin generation.

The LAVQ-Editor Framework

LAVQ-Editor is a location-aware model designed to separate and recombine ECG features. The architecture consists of several key components that facilitate the creation of high-fidelity digital twins:

  1. VQ Feature Separator: This module uses a 1D ResNet-34 for ECG encoding and ClinicalBERT for text report processing. Through cross-attention, it identifies which segments of the ECG correspond to disease symptoms versus normal rhythms.
  2. Disease Embedding Codebook (DEC): Disease-indicative features are mapped to a discrete latent space via vector quantization. This process effectively anonymizes the source patient's identity while preserving the pathological signature.
  3. Personalized Synthesis: The generator fuses "normal" features from a pre-diagnosis patient with "disease" features from a reference template to create the digital twin.
The LAVQ-Editor architecture for personalized ECG digital twin generation.

The model is optimized using a combination of reconstruction loss, adversarial loss, and a novel disease similarity loss to ensure that the synthetic symptoms are clinically accurate and structurally sound.

Experimental Results

The framework was evaluated using the PTB-XL dataset, focusing on five major heart disease superclasses. The researchers used single-label data to ensure clear differentiation during the feature separation process.

Diagnostic Performance and Fidelity

Integrating LAVQ-Editor generated twins into a ResNet-34 baseline improved patient-wise detection accuracy from 69.13% to 72.21%. In terms of signal quality, LAVQ-Editor achieved a Frechet ResNet Distance (FRD) of 1.6286, significantly outperforming StyleGAN (5.44) and PGANs (3.84).

Qualitative comparison of ECG signals generated by StyleGAN, PGANs, and LAVQ-Editor (Ours).

As shown in the figure above, LAVQ-Editor produces signals that are much closer to real clinical data, maintaining the structural integrity of the ECG leads (I, aVR, V3) compared to the noisy or distorted outputs of generic GAN architectures. This high fidelity is crucial for clinical utility.

Privacy and Causal Benefit

Membership inference risk tests confirmed that the VQ-Separator effectively anonymizes features, making LAVQ-Editor more resistant to privacy attacks than standard models. Additionally, the model achieved an Average Treatment Effect (ATE) of 5.13%, demonstrating a clear causal benefit to training on personalized digital twins for diagnostic improvement.

Conclusion

LAVQ-Editor represents a significant advancement in personalized cardiac diagnostics. By treating ECG signals as collections of local, editable features and employing vector quantization for privacy, the framework allows for the creation of high-fidelity, patient-specific training data. While currently focused on single-label scenarios, future work will address multi-label disease comorbidities and reduce dependency on high-quality clinical text reports.

Summary updated

BibTeX
@inproceedings{hu2024personalized,
  author = {Yaojun Hu and Jintai Chen and Lianting Hu and Dantong Li and Jiahuan Yan and Haochao Ying and Huiying Liang and Jian Wu},
  title = {{Personalized Heart Disease Detection via ECG Digital Twin Generation}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
}
Figure