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 · DOI

Abstract

Automated electrocardiogram (ECG) diagnosis often struggles with the inherent physiological variability between individuals, as population-level models frequently overlook a patient's unique baseline. We present LAVQ-Editor, a framework designed to create "ECG Digital Twins" by editing a healthy individual's heart signal to simulate specific disease states. By employing a Vector Quantized (VQ) Feature Separator guided by ClinicalBERT, the model isolates disease-indicative features while preserving the patient's unique signal signature. Our results demonstrate that "prospective learning"—training models on these personalized simulations—significantly improves detection accuracy, raising the F1-score from 0.5259 to 0.5988, while simultaneously enhancing data privacy through feature quantization.

Introduction

Most contemporary AI models for automated ECG diagnosis are trained at the population level. While effective at identifying general patterns of cardiac distress, these models often fail to account for the "baseline" of the individual patient. Because every person’s heart signal is unique, a subtle waveform deviation that is normal for one individual might indicate a critical event for another.

Furthermore, the development of these models is hindered by a persistent "data dilemma." High-quality, annotated ECG data is expensive to acquire, and the sharing of real patient records is restricted by stringent privacy regulations. While generative AI, such as Generative Adversarial Networks (GANs), can produce synthetic ECGs, traditional methods typically generate signals from scratch. These "population-average" synthetic signals lack the specific physiological traits of a target patient, limiting their utility in personalized medicine. To bridge this gap, we introduce a method that focuses on editing existing signals rather than synthesizing them from noise.

Methodology: The LAVQ-Editor Framework

The LAVQ-Editor framework is designed to transform a healthy patient's ECG into a diseased "Digital Twin" by fusing their baseline signal with disease-specific characteristics. The architecture comprises three primary components:

1. VQ-Separator (Vector Quantized Feature Separator)

The VQ-Separator serves as the core of the editing process. It utilizes a pre-trained ClinicalBERT model to process medical reports, using a cross-attention mechanism to identify which segments of an ECG signal correspond to specific medical descriptions (e.g., "ST segment elevation"). To ensure privacy, the model uses Vector Quantization (VQ) to compress these disease features into a discrete codebook. This process effectively "anonymizes" the disease traits, capturing the pathological pattern without retaining the specific identity of the reference patient.

2. Generator

The Generator takes the "normal" features from a healthy patient and blends them with the quantized "disease" features extracted from a reference patient. By utilizing Adaptive Instance Normalization (AdaIN), the model smoothly integrates these features, creating a Digital Twin that maintains the healthy patient’s unique heart rhythm and morphology while manifesting the symptoms of the target disease.

3. Discriminator

A standard GAN discriminator is employed to ensure the generated signals are indistinguishable from real-world ECGs and accurately reflect the intended pathology.

Prospective Learning

The most significant application of this framework is Prospective Learning. By generating a suite of potential future disease states for a specific patient, researchers can "pre-train" detection models on that patient's own simulated data. This allows the model to learn the specific "delta" between a patient's healthy state and a diseased state, making it far more sensitive to individual symptoms than a general model.

Experimental Setup and Results

The study utilized the PTB-XL dataset, which contains 21,837 clinical 12-lead ECGs. The researchers focused on five overarching superclasses of heart conditions. To validate the model's ability to transition between states, a subset of 291 patients who had both "normal" and "diseased" records in the database was used for direct comparison.

Performance and Fidelity

  • Detection Accuracy: Augmenting training data with LAVQ-Editor simulations improved the F1-score of a ResNet-34 model from 0.5259 to 0.5988 and increased patient-wise accuracy to 72.21%.
  • Signal Realism: The model achieved a Frechet ResNet Distance (FRD) of 1.6286. This significantly outperformed competitors like StyleGAN (5.44) and PGANs (3.84), indicating that the generated signals are much closer to real-world distributions.
  • Privacy Preservation: In membership inference risk tests, LAVQ-Editor demonstrated a lower risk of data leakage than other generative methods, confirming that the VQ-Separator successfully safeguards patient identity.

Discussion and Future Work

LAVQ-Editor represents a shift from general synthetic data generation to personalized medical simulation. By preserving the "signal signature" of the individual, the framework provides a more nuanced tool for diagnostic AI.

However, limitations remain. The current iteration focuses on single-label disease classification, whereas real-world patients often present with multiple co-occurring conditions (comorbidities). Additionally, the model's performance is tied to the quality of the text-based medical reports used for guidance. Future research will explore the use of these digital twins for in silico clinical trials, potentially allowing clinicians to simulate how specific patients might respond to various cardiac treatments before a drug is ever administered.

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