L6 · Live demo · ECG foundation model

Before the Labels: find similar ECGs

An ECG encoder pretrained with self-supervised learning (SimCLR) on 70,244 ECGs from Germany and China, with no diagnosis labels at all. Pick an ECG: your browser turns it into a 256-number embedding and finds the 5 most similar ECGs in a library of 336 held-out PTB-XL test records. Then switch to a smartwatch's single lead and search again.

Query ECG

Leads used for the search
Loading…

5 most similar ECGs

    Similarity: cosine between embeddings, searched over the other 335 library ECGs. Labels are the PTB-XL cardiologists' superclasses and are only used to colour the results, never by the encoder. Click a result to search from it.

    What the encoder learned, without labels

    Each dot is one of the 2,158 ECGs in PTB-XL's test fold, placed by its 12-lead embedding (t-SNE, computed offline). The colours are the cardiologists' labels, added only for this picture: the encoder never saw a label, but ECGs with the same diagnosis still partly group together. Larger dots are the 336 library ECGs; click one to search from it. The ring is your query, the lines join it to its 5 nearest matches.

    Query ECG, 10 s at 100 Hz