Machine learning · cardiology research

Detecting Wolff-Parkinson-White from a 12-lead ECG

A machine learning research project, trained on 53,540 real hospital recordings. Tested on 6,713 ECGs it had never seen.

The challenge

A needle in a haystack

Machine learning needs examples to learn from, and the more the better. But WPW is rare. In the two public hospital datasets this project uses, there are 142 confirmed cases among 66,951 ECGs. That is one in every 471. In the heart, one dot in 471 is orange.

1 in 471the ratio of people living with WPW
The tool

See what it does

Upload an ECG. The tool returns a suspicion level from 1 to 100, shows which features pushed the score, and says plainly what the number means.

Runs the same model validated in the paper. A research tool, not a diagnosis.

Result
Suspicion level94/100
High suspicion
What drove the score
Delta wave / pre-excitation
44%
QRS-localized patterns
33%
Repolarization (ST/T)
18%
Other features
5%

The surprising result: the bottleneck was never the algorithm. It was the data.

How we proved it, in the paper

The proof

Tested where it had never looked

The honest test of a model is data it has never seen. The deployed detector, an equal-weight vote between M3 and M4, was scored once, at the very end, on a held-out fold kept untouched throughout. It reached an AUC of 0.95: show it one real WPW tracing and one healthy one at random, and it ranks the WPW higher about 95 times out of 100.

0ECGs it had never seen, used for the final test
The full held-out results
0.00AUC
The why

Why I built this

I was diagnosed with Wolff-Parkinson-White as a child. In 2024, a catheter ablation at the Montreal Children's Hospital removed that extra pathway, and I am healthy today because of it.Years later, I took a machine learning class and fell for it. This project sits exactly where the two met: the condition I had lived with, and the thing I had just discovered I loved doing. I wanted to know whether a machine could learn to detect WPW on an ECG, and help doctors catch a condition that is genuinely hard to see...

Read the full story