Edge-Aware EEG/ECG Compression Using Dual VQ-Autoencoders with Cross-Modal Attention
Main Article Content
Abstract
Continuous remote monitoring of electroencephalogram (EEG) and electrocardiogram (ECG) signals using wearable Internet of Medical Things (IoMT) devices is challenged by the limited bandwidth of low-power wireless communication protocols and stringent power requirements of edge devices. We propose a dual-stream vector-quantized variational autoencoder (VQ-VAE) framework for joint compression of simultaneously collected EEG and ECG signals into compact discrete codebook indices for low-bandwidth transmission, and accurate reconstruction of diagnostic information using a modality-specific medical feature loss function. Separate lightweight one-dimensional convolutional encoders with residual blocks are optimized for edge devices, while separate transposed convolutional decoders are implemented on a cloud server. Each encoder maps 256sample signal windows into 32 codebook indices of a 1024-entry codebook, achieving a 16:1 compression ratio. A bidirectional 8-head cross-modal attention mechanism exploits brain-heart axis correlations for improved reconstruction of both modalities. A composite loss function with modality-specific weighting addresses morphological accuracy for ECG and spectral accuracy for EEG. Evaluated on the CAP Sleep Database, the framework achieves ECG PRD of 8.7% with 99.3% post-reconstruction QRS detection accuracy, and EEG PRD of 22.4% with 0.87 spectral coherence. Ablation experiments confirm that crossmodal attention reduces PRD by 3–5% for both modalities, and modality-specific loss weighting reduces EEG PRD from 84% to 22.4%.