cs.LGOct 25, 2026

QECGBERT: A Scalable ECG Foundation Model Based on Self-Supervised Language Learning via VQ-VAE Waveform Tokenization

Authors: Aruna Mohan, Burcu Ozek, Or Zilbershot, Fatemeh Afghah

Organizations: Walkky LLC, Boston, MA, USA · Clemson University, Clemson, SC, USA

Abstract

AI foundation models play a pivotal role in advancing heart disease diagnosis from electrocardiogram (ECG) data, particularly for rare diseases where the lack of sufficient labeled data hinders supervised learning. However, most self-supervised learning methods treat ECGs as generic sequence or image data without exploiting underlying physiological structure. To address this limitation, we propose QECGBERT, a self-supervised ECG language model that explicitly encodes physiological semantics by tokenizing the P, QRS, T, and isoelectric background waveforms. Vector-quantized variational autoencoder (VQ-VAE) tokenization is applied to each 12-lead ECG, with tokens enriched by continuous waveform features to preserve morphology lost during quantization without increasing sequence length. This design enables compact BERT masked language modeling with short sequences, improving scalability and reducing computational cost relative to long-sequence approaches. QECGBERT applies BERT pre-training to the MIMIC-IV dataset containing over 800,000 unlabeled ECG recordings, and fine-tuning on labeled PTB-XL, CPSC2018, and Chapman--Shaoxing--Ningbo datasets for evaluation. The results demonstrate that QECGBERT achieves comparable or superior performance to published benchmarks, offering a scalable, physiologically aware approach to ECG foundation modeling for cardiac diagnosis.

Figures & tables

Explore similar work

CardsList
  1. RhythmBERT: A Self-Supervised Language Model Based on Latent Representations of ECG Waveforms for Heart Disease Detection

    Feb 26, 2026Xin Wang, Burcu Ozek, Aruna Mohan +3Electrocardiogram Representation LearningElectrocardiogram Foundation Models

  2. Pretraining Strategies and Scaling for ECG Foundation Models: A Systematic Study

    May 12, 2026M A Al-Masud, Nils StrodthoffElectrocardiogram Foundation ModelsSelf-Supervised Time Series Representation Learning

  3. Foundation Model for Cardiac Time Series via Masked Latent Attention

    Mar 27, 2026Moritz Vandenhirtz, Samuel Ruipérez-Campillo, Simon Böhi +6Electrocardiogram Representation LearningElectrocardiogram Foundation Models