The project

About this project

1.Opening

1.1The project in one sentence. Then a few more.

This project asks one narrow question and tries to answer it as carefully as I could: can a machine learn to recognize Wolff-Parkinson-White syndrome on a standard 12-lead electrocardiogram, when the condition appears in one recording out of 471, and what is the real ceiling on how well that can be done?

Wolff-Parkinson-White, or WPW, is a congenital heart condition in which an extra electrical connection lets the heartbeat bypass the heart's one natural checkpoint. On an ECG it leaves a quiet signature: a short PR interval and a slurred, sloping start to the heartbeat's main spike, called a delta wave. Most of the time it causes no trouble at all. Occasionally it is the first sign of something dangerous. And often, because the signature can be faint, it slips past both automated readers and trained clinicians. If you want the full clinical picture, from the mechanism to the treatment, there is a dedicated page for that. I care about this particular condition for a reason I will come to, but the technical problem it poses would be interesting on its own, because it sits at the hard edge of what machine learning is good at.

The difficulty is rarity. In the two public hospital datasets this project uses, PTB-XL and Chapman-Shaoxing-Ningbo, there are 142 confirmed WPW recordings among 66,951 ECGs. That is a prevalence of 0.21 percent, roughly one case in every 471. At that imbalance, a model that simply answers "no" to every ECG is right 99.8 percent of the time, so ordinary accuracy is meaningless, and the whole task becomes a question of finding the rare signal without drowning in false alarms.

I did not build one detector. I built seven, each reading the same heartbeat through a different lens, from the intervals a cardiologist measures by hand to a deep neural network trained on the raw signal, and I compared them all under a single, strict, pre-registered protocol so that only the representation changed. The point of building seven was not to crown a winner. It was to find out whether any amount of modeling ingenuity could push past the limit set by the data. The answer, reached five separate times across the study, was no. The bottleneck was never the algorithm. It was the number of real, well-labeled examples. That finding is the spine of everything on this page.

The system I ultimately deploy is a two-member rank vote of the two strongest detectors, one that localizes the delta wave with wavelets and one that reads the shape of an averaged heartbeat. It reaches an out-of-fold average precision of 0.717 and an area under the ROC curve of 0.972, and on a held-out test set that I touched exactly once, with every choice frozen in advance, it reaches an average precision of 0.595 and an area under the curve of 0.950, at or above the 0.855 figure reported in prior 12-lead work. What it produces is not a yes-or-no verdict. It is a suspicion rank on a scale from 1 to 100, a screening aid meant to flag the tracings that deserve a closer human look, not a diagnosis.

1.2What this page covers

This is the long version. The home page gives you the shape of the project in a few scrolls, the demo lets you run the tool on real ECGs, and the paper gives you the complete technical account with every table and control. This page is the story in between: detailed enough that nothing important is hidden, written to be read rather than decoded.

It moves in a deliberate order. It starts with why this project exists at all, which is personal, and with who I am. Then it lays out the problem in plain terms, why rarity makes WPW statistically hard and why the usual scoreboard numbers lie here. From there it walks through how the thing was actually made: the two datasets and the batch effect that comes with pooling them, the leakage-controlled protocol that keeps the evaluation honest, the frozen signal filter, the disciplined way features were chosen, and the seven representations themselves, one by one, with the exact numbers each reached.

The center of gravity of the page is the part about rigor, and the part about the central result. I spend real space on the controls that separate a genuine finding from wishful thinking: the patient-disjoint split, the sacred test fold, the label-permutation control that collapses to chance, the multi-seed spreads, the confidence intervals, and the public decision log where every choice is recorded against the alternative it beat. Then I show what the honest tests revealed: that a detector trained on one hospital still ranks WPW correctly in another but that its score scale does not transfer, that on more than ten thousand unseen external ECGs it raises a false alarm on fewer than one in a thousand, and that the ceiling is set by data rather than by cleverness.

I also spend space on what the system gets wrong, because that matters as much as what it gets right. There is a full section on the cases it misses and why, the minimal pre-excitation and the tracings masked by other heart disease, and a frank section on what this project is not: it is a retrospective study on curated public data, not a clinical validation, and I say so clearly. Throughout, the deliverable is framed as a rank of suspicion rather than a probability, for reasons that turn out to be central to the science rather than a matter of wording.

A note on tone before you go further. I have tried to make this readable without softening any of the numbers, and to name the limits out loud instead of burying them, because a claim is only worth as much as the honesty behind it. Where a section only sketches something, the full paper carries the complete version. Everything here is meant to be checkable against it.

2.Why I built this

2.1From patient to researcher

I did not choose this condition from a list of interesting problems. It chose me first.

When I was a child, I was diagnosed with Wolff-Parkinson-White syndrome. For years afterward I was followed in cardiology at the Montreal Children's Hospital. I knew the feel of electrodes on my chest long before I understood what they were measuring. For a long time the condition stayed in the background, with just a few episodes a month. Then, in 2024, it stopped staying quiet: it progressed into atrial fibrillation, the fast, chaotic rhythm that is the dangerous face of WPW. The team at the Children's performed a catheter ablation, threading a wire into my heart to find the extra pathway and destroy it. It worked. The delta wave that had been on my ECGs for as long as I had ECGs is gone. I am healthy today because of the care I received in that building.

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.

I am not a neutral observer of this problem, and I would rather say that than pretend otherwise. It is the reason I started, and the reason I chose to raise funds for the Montreal Children's Hospital alongside the work.

If this project ever helps flag a single tracing that would otherwise have been missed, in a child sitting where I once sat, then it will have closed a loop that started long before I could have understood it.

2.2Who I am

I am a student at Collège Jean-de-Brébeuf in Montréal, and I built this project on my own.

I say that plainly because it should frame how you read everything else. There was no lab behind me, no research group, no advisor assigning me a well-posed problem with a clean dataset already prepared. I taught myself most of the machine learning as I went, the way you learn a language by being dropped into a country where it is the only one spoken. Some of what I know now I know because I did the wrong version first and had to understand why it was wrong, which you will see explicitly in the next section, where I describe the earlier attempt that failed.

The practical constraints were real, and they shaped the work in ways worth being honest about. Everything was computed on a single laptop, on the processor alone, with no dedicated graphics hardware, which is one reason the study leans on carefully engineered features and disciplined statistics rather than on brute-force deep learning at scale. That constraint turned out to be productive: when you cannot throw compute at a problem, you are forced to think about what the signal actually is, and much of the physiological reasoning in this project came out of not having the option to be lazy. The whole thing is public, every model, every out-of-fold score, every line of evaluation code, and a decision log that records each choice against the alternative it beat, so that nothing rests on my word alone. You can read the complete technical version in the paper.

I am not a cardiologist, and I have been careful never to write as if I were. Where this project makes a clinical-sounding statement, it is either drawn from the literature or flagged as a hypothesis for a cardiologist to confirm, and the harder interpretive calls, like which uncertain labels are real, are exactly the ones I have left for expert review rather than settling myself. What I can claim is the engineering and the statistics: that the pipeline is clean, that the evaluation is honest, and that every number here can be reproduced from the code.

2.3What it does not claim

Because the story is personal and the ambitions are real, it matters that I am equally clear about what this project is not.

It is not a medical device. It is a research demonstration, built to study a question, and it says so everywhere it can. Nothing on this site should be used to make a decision about anyone's heart. The tool does not diagnose WPW, and it is careful never to present itself as if it does. What it produces is a suspicion rank, a number on a scale from 1 to 100 that says, in effect, this tracing looks more or less suspicious than most, at a level where a known fraction of similarly flagged reference ECGs turn out to be real. That is a screening aid, meant to point a human toward the tracings worth a second, closer look. It is not a verdict, and it is not a probability of disease, for reasons that turn out to be central to the science and that I explain in full later on.

It is also not a claim of state-of-the-art performance, and I want to disarm that expectation now rather than let you infer it. The contribution here is not a detector that beats everyone else's. It is a controlled, fully reproducible account of what the achievable ceiling is at this data scale, and why. The most important sentence in the whole project is not "the model works well," it is "the model cannot do much better than this until there are more real, well-labeled cases, and here is the evidence for that claim, arrived at five separate ways." A better-sounding number would have been easy to manufacture by relaxing the protocol. The honest number is the one worth having.

This project is also not finished in the sense that clinical tools are finished. This is a retrospective study on curated public datasets, not a prospective validation in a real screening setting, and the difference is not a technicality. The batch effect between hospitals is reduced but not completely erased, and the confidence intervals on the headline results are honestly wide because 142 positive cases is a small number no matter how carefully you handle them.

3.The problem

3.1WPW in brief

Before the statistics, a short orientation, kept deliberately light because there is a whole page devoted to the clinical side.

Wolff-Parkinson-White is a problem of wiring. In a normal heart, the electrical impulse that triggers each beat can only pass from the upper chambers to the lower ones through a single gatekeeper, the atrioventricular node, which deliberately slows the signal down. In WPW there is an extra strand of muscle, an accessory pathway, that bridges the chambers and bypasses that gate entirely, so part of the ventricle fires early. On the surface ECG this early firing leaves three linked marks: a short PR interval, because the signal arrives sooner than it should; a delta wave, the slurred, sloping start of the main spike that is the fingerprint of the early activation; and a somewhat widened complex, because the beat is a blend of the fast abnormal route and the normal one.

What makes this a hard target for detection, rather than a tidy one, is that the delta wave is small, short, and inconstant. It can be striking in one lead and nearly flat in the next on the same tracing, it can fade in and out from beat to beat, and it can be buried under other heart conditions that deform the complex in their own way. The signature that the textbook draws so cleanly is, in real recordings, often a whisper. Holding onto that image, a whisper in a place where you almost never expect to hear anything, is the right way to read the rest of this section.

3.2A needle in a haystack

The defining fact of this task is rarity, and it is worth stating as a raw count before dressing it in any statistics. Across the two pooled public corpora this project uses, there are 66,951 ECG recordings. Of those, 142 carry a WPW label. That is a prevalence of 0.21 percent, a class imbalance of about 471 to one. For every genuine case, there are 471 ordinary recordings that are not WPW.

It is hard to feel that number until you picture it. If each ECG were a single dot, the 142 positives would be a scattering of specks lost in a field of nearly sixty-seven thousand, and if you shaded the field you would struggle to find them by eye. That is not a flaw in the data; it is the actual epidemiology of the condition, and it is the whole reason automated detection is worth studying here rather than on some balanced toy problem. A rare-disease detector has to work at the real base rate, not a convenient one, and the real base rate is brutal.

This rarity also explains a design decision that runs through the project: the two corpora were pooled precisely to double the count of positives, from about 70 to 142, and an earlier single-corpus version failed largely because 70 cases was too few to select a model reliably. Even at 142, the positive class is small enough that every estimate carries real uncertainty, which is why so much of the rest of this page is about not fooling myself. When the thing you are trying to find appears once in every 471 tries, the danger is never that you miss it. The danger is that you convince yourself you have found it when you have not.

Figure 1

The rarity, made visible

142 confirmed WPW cases among 66,951 ECGs. Each faint dot is one recording, the orange dots are the WPW cases. That is one in every 471.

PTB-XL contributes 70 cases in 21,799 ECGs, Chapman-Shaoxing-Ningbo contributes 72 in 45,152. A model that always answered "no" would be right 99.8 percent of the time, which is why raw accuracy is meaningless here.

3.3Why raw accuracy lies

The first casualty of this imbalance is the most familiar metric of all. At 471 to one, a model that does nothing, that answers "not WPW" to every single ECG it is ever shown, is correct 99.8 percent of the time. It would score higher on accuracy than most serious detectors, while being completely useless, because it never finds a single case. Accuracy rewards agreeing with the majority, and here the majority is overwhelming and boring.

The same trap catches several intuitive cousins of accuracy. Any metric that mixes the huge pool of true negatives into its denominator gets swamped by them, and starts reporting the base rate back to you dressed as performance. This is not a subtle statistical footnote. It is the single most common way that results on imbalanced medical data are quietly inflated, and avoiding it is the first thing a serious protocol has to do. So on this project, accuracy is not used as a judge at all. Neither is any threshold-based score reported in isolation, because a threshold that looks good on one hospital's scale may be meaningless on another's, a point that becomes important later. The question is never "how often is it right." The question is "how well does it sort the rare cases toward the top, and how much does it cost to catch them."

3.4How we judge instead

Two metrics survive the imbalance, and the project leans on both for different reasons.

Two numbers do the work here, and they are worth defining plainly. Precision is the share of the ECGs the model flags that really are WPW: the true positives divided by everything it flagged. Recall is the share of the real WPW cases the model manages to flag: the true positives divided by all the WPW that were actually there. The two pull against each other. Flag more tracings and you catch more real cases, so recall rises, but you also let in more false alarms, so precision falls. Flag fewer and the opposite happens. The precision-recall curve is simply the picture of that trade-off, traced out as you tighten or loosen the threshold, and the average precision is the area under it, a single number summarizing how well the model holds precision as it reaches for recall.

The primary judge is average precision, the area under the precision-recall curve. Precision-recall looks only at the interplay between the positives you flag and the positives you catch, and it ignores the vast pool of easy negatives entirely, which is exactly why it stays informative when positives are scarce. It is also unforgiving: at 471 to one, precision falls steeply as you push for higher recall, because the negatives outnumber the positives by three orders of magnitude, so even a detector that ranks cases very well shows a modest average precision. That harshness is a feature. It means the number is sensitive to the very top of the ranked list, which is precisely where a screening tool operates, and it is much harder to inflate than accuracy. As has long been argued for imbalanced settings, the precision-recall view is the more honest one when positives are rare, and so average precision is the metric on which models are selected.

The headline summary is the area under the ROC curve. Unlike average precision, it measures pure ranking quality independent of the base rate, so it answers a cleaner question: does the detector sort true positives ahead of negatives, regardless of how rare they are. That property is what makes it the right number to report when a tool is deployed at a shifted base rate, and it is why you will see both figures throughout, an average precision that looks modest and an area under the curve that looks strong, describing the same detector without contradiction. The full reasoning, with the curves themselves, is in the paper.

3.5Direct detection versus a conduction superclass

There is one more choice worth surfacing here, because it is the kind of decision that quietly determines what a result means. Some work in this area sidesteps the imbalance by not facing it directly: instead of training on WPW against everything else, it trains on a broad superclass of conduction disorders, where positives are far more common and the problem is much easier, and then reads out the WPW subgroup at the end.

I chose not to do that, deliberately. The entire object of this study is the behavior of detection at extreme imbalance, and what the achievable ceiling is at that operating point. A superclass framing changes the task and hides the very thing I set out to measure, because it dilutes the 471-to-one rarity into something gentler and then borrows the easier problem's numbers. The two approaches answer different questions. Mine is the one relevant to a screening tool that has to work at the true base rate of the disease, which means accepting the hard version of the problem on purpose and reporting what happens. It would have been easy to make the results look better by softening the task. Keeping the task honest is the point.

4.The data

4.1Two hospitals, two corpora

Every claim on this page rests on two collections of electrocardiograms, both public, both large, and both assembled far from each other. Understanding what they are, and how they differ, is the foundation for everything that follows, because in a data-limited study the data is not the backdrop. It is the subject.

The first is PTB-XL, a large German corpus, one of the most widely used ECG datasets in the field and the basis for many published benchmarks. The second is Chapman-Shaoxing-Ningbo, a large Chinese corpus assembled across Chapman University, Shaoxing People's Hospital, and Ningbo First Hospital. Both record the standard 12-lead, 10-second ECG, the same clinical format, which is what makes pooling them conceivable at all. Together they contain 66,951 recordings. Of those, 142 carry a WPW label: 70 from PTB-XL and 72 from Chapman-Shaoxing-Ningbo, an almost even split. Seventy positives from either corpus alone would have been a fragile foundation. A hundred and forty-two from the pair is merely a small one.

4.2Why pool them, and the failure that forced it

Pooling two corpora was a deliberate decision, and it came out of a failure, so let me tell that part straight rather than presenting the final design as if it arrived fully formed.

An earlier version of this project, the one I now call V1, used only PTB-XL, with its roughly 70 WPW cases. On paper that seemed like enough to begin. In practice it was not, and the way it fell apart was instructive. The modeling phase collapsed under its own ambition: I ran grid searches so oversized that some were estimating dozens or even thousands of hours of runtime, tuning a model with far more freedom than 70 positives could ever constrain. Model selection was done on a validation fold that contained about 6 WPW cases, a number so small that any ranking of models on it was essentially noise dressed as a decision. And at the end of that chain of small errors, the wrong model was carried through to the held-out test set, where it scored an F1 of 0.075 (the harmonic mean of the precision and recall defined earlier). That is not a near miss. That is a result indistinguishable from failure.

The lesson was not that I had used the wrong algorithm. It was that I had too few positive examples to support any reliable choice, and no amount of cleverness downstream could manufacture what the data did not contain. That diagnosis is the reason V2 exists, and it is also, in miniature, the entire thesis of the project: at this scale, the binding constraint is data, not modeling. Adding the second corpus roughly doubles the positive count, from about 70 to 142, which is the single most valuable thing I could do for the study. It does not solve the problem, because 142 is still small, but it moves the whole enterprise from statistically hopeless to merely difficult.

4.3The batch effect

Doubling the positives came at a price, and I want to state it plainly instead of pretending the pooling was free. The two corpora were recorded on different hardware, with different analog filtering at acquisition, on different patient populations, with different electrode-labeling conventions. Those differences leave a fingerprint on the signal, and that fingerprint is called the batch effect: a naively trained classifier can learn to tell the German hospital from the Chinese one instead of learning to tell WPW from normal, and it can score well by doing so, for entirely the wrong reason.

I did not assume this away. I measured it, and the measurement is stark. If you train a classifier just to distinguish the source hospital, using non-WPW recordings so that the disease cannot be a confound, it separates the two corpora with an area under the curve of about 0.95 (meaning that, shown one recording from each hospital at random, it can tell which is which about 95 times out of 100). The batch signature is enormous, far stronger than the WPW signal the models are actually after. That single number reframes the whole task: any detector built on the pooled data has to be prevented from quietly exploiting the hospital identity, or its performance is a mirage that will evaporate the moment it meets a third dataset.

So the batch effect is not treated as a nuisance to be filtered out and forgotten. It is treated as a central methodological adversary, measured, tracked, and controlled by design at several points in the pipeline. The feature-selection stage requires that a feature behave consistently across both corpora before it is admitted, which is the mechanism that keeps the models from learning the batch. The evaluation includes explicit cross-hospital tests, training on one corpus and testing on the other, to see what actually transfers. And the final deployed output is expressed in a form, a rank rather than an absolute score, that is robust to the batch effect by construction, for reasons I develop later. The negative result behind all of this, that a shared filter reduces but does not remove the batch effect, gets its own place in the next section, because it is a case where the intuitive fix does not work and I would rather show that than imply it does. The full quantification is in the paper.

Figure 2

Two hospitals, two spectral signatures

The batch effect at its source. Mean spectral power per frequency band, on non-WPW recordings only, for each hospital. The two corpora differ, especially above 40 Hz where acquisition hardware and mains environment leave their mark.

The bandpass filter (0.5 to 40 Hz) removes most of the right-side gap, the mains and high-frequency noise. But a residual difference remains inside the kept band (left), which the filter reduces but cannot harmonize. That residue is the batch effect the model must survive.

4.4Provenance, licensing, and ethics

A word on where the data comes from and what using it responsibly means, because this project is public, is attached to a hospital fundraiser, and should hold itself to a standard it can defend.

Both corpora are openly published for research. PTB-XL is available under a Creative Commons Attribution license, and the Chapman-Shaoxing-Ningbo corpus is available through PhysioNet, the long-running public repository for physiological data. Neither is scraped, private, or repurposed against its terms; both are datasets whose entire reason for existing is to let researchers do exactly this kind of work. The recordings are de-identified at source, containing the ECG signal and clinical labels but not the identities of the patients behind them, and nothing in this project attempts to re-identify anyone or to link a tracing back to a person.

There is one component that is not redistributed, and I flag it rather than blur it: a commercial on-machine measurement set used only as an external reference baseline is proprietary to the acquisition system, so it is used for comparison and not released. Everything else that the project depends on is either public data under its own license or my own code and model artifacts, which I release in full. This is also, I should be clear, a retrospective study on curated public corpora, not a study involving new patients, new recordings, or any clinical contact, which is a meaningful ethical simplification: no one was recruited, consented, or put at risk to build this, because the data already existed and was already cleared for research use. That does not exempt the work from care, and the care shows up as honesty about the labels, the limits, and the fact that a real clinical use would require a prospective study this one deliberately is not. The complete data citations and license details are in the paper.

5.The leakage-controlled protocol

5.1Patient-disjoint split

Everything a study like this claims depends on one boring-sounding guarantee: that the model is tested on data it has never, in any form, seen during training. Get that wrong and every number afterward is fiction, no matter how careful the rest of the pipeline is. Most inflated results in medical machine learning trace back to some version of this failure, where information leaks from the test set into training and the model appears to generalize when it has really just memorized. So the first thing the protocol fixes, before any modeling, is the split.

The subtle trap here is the patient, not the recording. A single person can contribute more than one ECG, and if two recordings from the same patient land on opposite sides of the split, the model can learn that individual's particular heart in training and then recognize it in testing, scoring well for a reason that has nothing to do with detecting WPW in someone new. The dataset contains 64,021 unique patients, and the split is built so that no patient ever straddles the boundary: every recording a person contributes stays together, entirely inside one fold. This is not left to chance or good intentions. It is enforced by a blocking assertion in the data pipeline that refuses to proceed if a patient is found on both sides, so the guarantee is mechanical rather than a promise I am asking you to trust.

One honest caveat sits inside that guarantee, and I would rather surface it than let the clean word "patient-disjoint" imply more than it can. It holds only as strongly as the patient identifiers the corpora provide. PTB-XL supplies real ones: its recordings come from 18,869 distinct patients, and the split keeps each person's tracings together. The Chinese corpus, in the release I use, supplies no patient identifier at all, so I treated each of its recordings as a distinct patient, which is the standard way it is used but cannot be verified. Rather than leave that as an unquantified worry, I tested the thing that would actually matter: because the delta wave is a stable, patient-specific signature, a duplicated patient would show up as two near-identical WPW tracings. So I computed the pairwise similarity of all 142 WPW recordings, by maximum cross-correlation and by cosine similarity on the median beat and on the QRS-onset window, and no pair crosses a near-duplicate threshold, with in particular no held-out fold-10 WPW having a near-twin anywhere in the training folds. Patient-level leakage within the positive class is ruled out empirically, independent of the missing identifiers.

That distinction, patient-disjoint rather than merely recording-disjoint, is the difference between measuring whether the model generalizes to new people and measuring whether it can recognize people it has already met. Only the first is worth anything for a screening tool, because in deployment every patient is, by definition, someone the model has never seen.

5.2The ten folds

On top of that patient-disjoint foundation, the data is divided into ten fixed folds, and each is given a specific and unchanging job. The division is stratified so that the scarce WPW cases and the two source hospitals are spread sensibly across the folds rather than clumping, which you can see directly in the distribution figure below, where the positive counts per fold are laid out alongside their hospital of origin.

Folds 1 through 8 are the development set. They hold 115 of the 142 WPW cases, and they are where features are chosen and models are trained. Crucially, their performance is always reported as pooled out-of-fold: for each held-out development fold, the prediction comes from a model trained on the other seven, so that even within the development set no fold ever scores itself. This out-of-fold discipline is what makes the development numbers meaningful rather than optimistic, because a model is never asked how well it does on data it was just fit to.

Fold 9, with 13 WPW cases, is a validation fold. It is examined sparingly, used to corroborate that a model chosen on the development folds behaves sensibly on data held slightly further away, and never used as the primary judge, because at 13 positives its estimates are simply too noisy to trust as a decision-maker. It is a sanity check, not a scoreboard. And fold 10, with 14 WPW cases, is the one I treat as sacred, which the next section is entirely about. The point of this whole arrangement is that the roles are fixed in advance and never swapped when it would be convenient. A fold that is for validation stays for validation; a fold that is untouchable stays untouched.

Figure 3

How the cases fall across the ten folds

The 142 WPW cases split across ten patient-disjoint folds. Folds 1 to 8 train the models, fold 9 tunes them, fold 10 is the held-out test, touched once.

Each fold carries only a handful of positives. Fold 10, the held-out test, holds just 14. That scarcity is the whole difficulty of the problem.

5.3The sacred held-out fold

Fold 10 is the single most important disciplinary commitment in the project, and it is worth being precise about what "sacred" means, because the word is doing real work.

Fold 10 contains 14 WPW cases, and it is never touched during any development, selection, or tuning. Not to peek at a promising result, not to break a tie between two models, not to check whether a hunch is working. It sits sealed for the entire life of the project, and it is contacted exactly once, at the very end, in a single pre-registered evaluation of the fully frozen system, after every choice has already been made and locked. The composition of the ensemble, the fusion rule, the weights, the operating threshold, the feature sets: all of it is frozen on folds 1 through 9 before fold 10 is opened, so that the one look at it is a genuine test of a finished system rather than another round of tuning in disguise.

This matters because the most seductive form of leakage is the one you commit gradually and with good intentions. If you evaluate on your test set, adjust something, and evaluate again, you have quietly turned your test set into a training set, and its numbers stop meaning what you think they mean. The only defense is a rule you refuse to bend, and mine is that fold 10 is contacted once and never again for any new claim. It is the reason the headline held-out result, an average precision of 0.595 and an area under the curve of 0.950, can be reported as an honest estimate of generalization rather than as the best of many attempts. It also carries a cost I accept willingly: with only 14 positives, that one measurement has wide confidence intervals, and I report them wide rather than narrowing them by cheating.

5.4The label policy

The last piece of the protocol is not about splitting the data but about trusting it, and it required a rule I set before I could be tempted to break it.

On visual inspection, a small number of the WPW labels in PTB-XL look doubtful, tracings where the pre-excitation is not obvious and a reasonable reader might question whether the label is right. The tempting move, when a model fails to flag one of these, is to quietly decide the label was wrong and remove it, which conveniently improves the model's apparent performance. I made a rule against exactly this: no label is ever deleted on the basis of a machine-learning intuition. Keeping and flagging a questionable label, rather than silently dropping it, is the only way to avoid the circular trap of fitting the evaluation to the model, where you throw out precisely the cases your model happens to miss and then congratulate it for missing fewer.

So the doubtful labels stay in, counted against the model like any other, and they are flagged rather than removed. Deciding which of them are genuinely mislabeled is a clinical judgment, not a statistical one, and it is exactly the kind of call that requires a cardiologist rather than a curve. Where the error analysis later suggests that a chunk of the missed cases correspond to these non-validated labels, that suggestion is offered as a hypothesis for a clinician to confirm, not as an established fact I have decided on my own. This restraint costs the model some apparent performance, because it is held responsible for cases that may not be real. I consider that the correct price. A detector that looks worse because it was judged against honest labels is more trustworthy than one that looks better because it was allowed to grade its own exam. The full protocol, with the split figure and the fold-by-fold counts, is in the paper.

6.Signal preprocessing

6.1The frozen filter

Before any model sees an ECG, the signal is cleaned, and the way it is cleaned is fixed in advance and never varied again. Every recording, in training and at inference alike, passes through the same filter, imported from the same configuration file, so that no model ever gains or loses an advantage from a preprocessing difference. This sounds like a technicality. It is actually one of the load-bearing decisions in the project, because the thing these models are trying to see, the delta wave, lives in exactly the part of the signal that careless filtering distorts.

The filter is a fourth-order Butterworth band-pass, passing frequencies between 0.5 and 40 hertz, applied in a zero-phase, forward-backward manner. Each of those choices is deliberate, and I unpack them in the next subsection, but the shape of it is simple to state: it removes the slow baseline drift below half a hertz and the high-frequency muscle and electrical noise above forty, keeping the band where the meaningful cardiac morphology lives. It is implemented in the numerically stable second-order-sections form so that it behaves identically every time it runs, and it is frozen, meaning the exact same filter object is reloaded rather than reconstructed, so that a signal filtered today is bit-for-bit the signal filtered a year ago. In a study whose whole credibility rests on frozen, reproducible pipelines, the filter is where that discipline starts.

6.2Every choice justified

I did not inherit these settings from a tutorial. Each element was tested against alternatives, because assuming a preprocessing choice is exactly the kind of unexamined step that quietly decides a result.

Take the upper cutoff. The delta wave contains genuine spectral energy above 40 hertz, so cutting there does throw away some of the sharpest high-frequency content of the pre-excitation, which is an argument for a higher ceiling. But raising the ceiling also admits substantially more muscle and mains noise, which corrupts the very morphology the detectors read. I compared candidate cutoffs across several independent detectors, and the 0.5-to-40 band gave the most consistent downstream separation between WPW and normal: the noise it removed mattered more than the delta content it sacrificed. The lower cutoff at 0.5 hertz is the gentler call, removing baseline wander while preserving the low-frequency content of the ST segment that carries real information.

The filter order is a similar trade. A gentle second-order rolloff leaves too much residual noise in the passband, while a steep eighth-order one introduces ringing and numerical instability that distort the QRS onset, which is precisely where the delta wave sits. Fourth order is the middle that suppresses out-of-band noise without ringing into the part of the signal that matters most. The most important choice, though, is the phase. Zero-phase filtering, achieved by running the filter forward and then backward, introduces no phase shift at all, so it does not skew the timing or shape of the QRS. A conventional causal filter, run only forward, introduces a frequency-dependent phase shift that smears the onset of the complex, distorting exactly the slope, area, and polarity features that the strongest detectors depend on. I tested a causal variant to confirm this rather than take it on faith, and the expected onset distortion appeared. For a pipeline built on reading morphology, zero-phase filtering is not a preference. It is a requirement.

6.3An owned negative result

There is one result about the filter that I want to state loudly, because it runs against intuition and because the honest thing is to report the fix that did not work rather than imply that it did.

An early and comfortable hypothesis held that filtering would erase the batch effect. The reasoning seemed sound: if the difference between the German and Chinese corpora lived mostly in the high frequencies, in acquisition noise and hardware quirks, then a shared band-pass would strip that difference away and make the two datasets interchangeable. It would have been a tidy story, one shared filter quietly solving the hardest methodological problem in the project. It is not what happened.

I measured the batch effect directly, by training a classifier to distinguish the two hospitals from non-WPW recordings alone, under several filtering choices. Unfiltered, the two corpora separate with an area under the curve of about 0.9487 (meaning that, shown one recording from each hospital at random, it can tell which is which about 95 times out of 100), an enormous batch signature. Apply the frozen 0.5-to-40 band-pass and that separability falls only to about 0.8987, a reduction of roughly 0.05. Other reasonable bands did no better. The filter denoises; it does not harmonize. The hospitals remain almost as distinguishable after filtering as before, which means the batch effect is not a high-frequency artifact that a band-pass can wash out but a deep, distributed difference between the two acquisition environments.

I report this because it changes the strategy that follows. If the filter had erased the batch effect, the rest of the pipeline could have treated the pooled data as a single clean corpus. Since it does not, the batch effect has to be controlled by design instead, through the cross-dataset coherence requirement in feature selection and through a deployed output expressed as a rank rather than an absolute score, both of which I develop later. An early attempt to measure the effect a different way, through post-filter band energy, was discarded when I realized it was circular, because edge distortion from the filtering itself was inflating the baseline band and contaminating the measurement. Catching and throwing out my own contaminated measurement is exactly the kind of thing that belongs on this page rather than in a drawer. The full comparison across filter settings is in the paper.

7.Features and learning

7.1The feature gate

For every feature-based detector in this study, the raw material is a large pool of candidate descriptors, numbers computed from the signal that might carry information about WPW. Depending on the detector, that pool runs from the hundreds into the thousands. Against it stands a training set with 115 WPW cases. That ratio is a recipe for self-deception: with so many candidates and so few positives, some features will look predictive by pure chance, and an unfiltered search would confidently select noise. So before any model is trained, every candidate has to pass through a gate, and the gate is strict on purpose.

A feature is admitted only if it clears four hurdles at once. First, a standardized effect size, Cohen's d, above 0.3 in magnitude, so that the separation between WPW and normal is not merely real but meaningful. Second, statistical significance after correction for multiple testing, a false-discovery-rate-adjusted threshold below 0.05 under the Benjamini-Hochberg procedure applied over the entire candidate pool, which accounts for the fact that testing thousands of features guarantees some spurious hits. Third, a bootstrap 95 percent confidence interval on the effect size that excludes zero, so that the effect is stable under resampling rather than an artifact of a few influential recordings. And fourth, for the combined-corpus models, cross-dataset coherence: the feature must show the same sign and a meaningful magnitude within each hospital separately.

That fourth criterion is the quiet hero of the whole pipeline. It is the mechanism that stops a model from learning the batch effect, because a feature that only separates WPW in the German corpus, or only in the Chinese one, is refusing to behave like the disease and behaving like the hospital instead, and coherence throws it out. A feature that survives all four hurdles is one that is strong, significant, stable, and consistent across two independent acquisition environments. That is a high bar, and it is meant to be, because the cost of admitting a false feature is far higher here than the cost of missing a marginal true one.

7.2Correlation de-duplication

Passing the gate is necessary but not sufficient, because features can be individually valid and yet redundant with each other. Two descriptors that measure nearly the same thing add cost and instability without adding information, and a pool full of near-duplicates can fool the downstream model into overweighting whatever the crowd happens to agree on. So after the gate, surviving features are de-duplicated: within any pair whose rank correlation exceeds a threshold, one is dropped.

The threshold is not the same for every detector, and the reason is physiological rather than arbitrary. For the QRS-onset morphology and global-statistical detectors, whose features are relatively independent of one another, the threshold is a Spearman correlation of 0.9. For the wavelet, median-beat, and spatial detectors, whose feature pools are near-collinear by construction, the threshold is loosened to 0.95. This is deliberate: adjacent wavelet scales, neighboring samples of a median beat, and successive points along a vectorcardiographic trajectory are naturally highly correlated because they describe overlapping parts of the same physical thing, and pruning them at 0.9 would strip out informative descriptors along with the redundant ones. Matching the threshold to the structure of each feature family keeps de-duplication from becoming its own source of damage. A small computational detail sits underneath this, worth mentioning because it matters at scale: rank correlations across large feature matrices are computed with a vectorized approach on precomputed ranks rather than the naive pairwise method, which is the difference between a step that runs in seconds and one that does not run at all.

7.3Choosing how many features

The gate and the de-duplication decide which features are eligible. They do not decide how many to keep, and that number matters: too few and the model is starved, too many and it starts fitting noise it has no positives to constrain.

The features are ranked by the strength of their effect, largest standardized separation between WPW and normal first, and then a sweep trains a model on the top 1, the top 3, the top 5, and so on up the ranked list, recording the out-of-fold average precision at each step. The curve rises steeply, then flattens. That flattening gives a provisional number: the smallest count that already reaches within a few percent of the best score on the curve.

But that provisional number is a seed, not the answer. The final count is chosen jointly with the model's own settings, its tree depth and learning rate, in a small grid built around that seed, because the right number of features depends on how much freedom the model has to use them. The rule for picking the winner from that grid is deliberately conservative and differs by detector. For the first two, a count is accepted only if it is statistically tied with the best one, judged against the bootstrap noise of the best score itself, and among all the tied candidates the smallest is taken. For the wavelet and median-beat detectors, the count with the highest out-of-fold average precision wins, with the smaller count breaking any near-tie. For the spatial detector, an additional cap rejects any candidate whose training score runs too far ahead of its out-of-fold score, which is what overfitting looks like from the outside, and that cap alone pulled its final count down and its reported score with it.

None of this touched fold 10. The entire sweep, the grid, and every selection decision run on folds 1 through 8, with fold 9 visible only as a diagnostic.

7.4The owned selection optimism

Here is a place where I have to be careful and honest at the same time, because the clean version of this pipeline is not quite the version I ran, and the gap is small but real.

The correct textbook procedure would re-run the entire feature selection inside every cross-validation fold, so that no held-out fold ever contributes to choosing the features it is later scored on. I did not do that. The selection is computed once, on the pooled development folds 1 through 8, and then used across the cross-validation. The consequence is a mild, bounded optimism in the development numbers: because each held-out development fold contributed a small share of the univariate and correlation statistics used to pick the feature set, the out-of-fold estimates on folds 1 through 8 are very slightly rosier than a fully nested procedure would give.

I bound the effect rather than wave it away. It is limited because selection uses univariate effect sizes and correlation filters, not the model's own out-of-fold score, so the leakage is of weak summary statistics rather than of the quantity being optimized. And it is diluted because the 115 positives are pooled, so any single held-out fold contributes only about an eighth of the selection statistics. Most importantly, the selected feature sets were frozen before the single contact with fold 10, which means the headline held-out result carries none of this optimism at all: only the folds 1-through-8 numbers do.

7.5Why boosted trees

Every detector in the study uses the same learning algorithm, gradient-boosted decision trees, and holding it fixed across all seven representations is itself a methodological choice: it keeps the comparison clean, so that when one detector beats another it is the representation talking, not a difference in the learner. But the choice of trees specifically is not a default I reached for out of habit. It rests on one decisive property.

That property is native handling of missing values, and it turns out to be essential here for a reason that is almost poetic. For several of these detectors, a feature that cannot be computed on a given recording is not a gap to be papered over; it is itself a signal. Beat delineation, for instance, fails several times more often on a pre-excited beat than on a normal one, precisely because the delta wave destabilizes the algorithms that try to find the wave boundaries. In other words, the failure to measure something is diagnostic of the very condition being detected. A tree learner that routes missing values natively preserves that signal and can learn from it, whereas a linear model, or any method requiring imputation, would erase it by filling the gap with a guess.

I did not take this on faith either. Under the same protocol, I tuned a random forest and a logistic regression as challengers. The random forest reached a competitive development number but generalized worse on the validation fold. The logistic regression plateaued at a much lower average precision: it retained a high area under the curve, meaning it could still rank cases reasonably, but it failed to push WPW cases to the very top of the list, which is exactly the behavior a screening tool needs. Boosted trees won on the merits, not by assumption, and every reported number across the seven representations comes from the same learner so that nothing in the comparison is confounded by the choice.

7.6One shared evaluation routine

The final piece of discipline is that every model, all seven, is scored through a single shared evaluation routine, so that no two results are ever produced by subtly different procedures. This sounds mundane and is in fact one of the strongest guards against accidental cheating, because when each model is graded by its own bespoke code, small favorable differences creep in unnoticed and the comparison quietly loses its meaning.

The routine is fixed. It sets each detector's operating threshold at the value that maximizes the F1 score (the harmonic mean of precision and recall) on the out-of-fold training data, then reports, on held-out data, a consistent battery: average precision with a bootstrap confidence interval, area under the curve with a confidence interval, the full confusion matrix at that fixed threshold, the spread of performance across five random seeds, and the two overfitting gaps, the one between training and out-of-fold performance and the one between training and the validation fold. Because the raw scores from boosted trees are not probabilities and the base rate is extreme, each detector's score is also calibrated with a simple one-input logistic fit on its out-of-fold scores before these numbers are computed. Using one routine for everything guarantees that every figure on this page was produced identically, which is what makes the seven detectors genuinely comparable rather than seven separate stories told in seven different voices. The complete specification of the gate, the thresholds, and the evaluation battery is in the paper.

8.Seven ways to read a heartbeat

There is no single correct way to turn an ECG into numbers a model can learn from, so this project builds seven, each looking at the same heartbeat through a different lens and then compared under the one identical protocol described above.

The point of seven is not to crown a winner. It is to isolate the effect of representation: because the learning algorithm, the split, the feature gate, and the evaluation routine are all held fixed, the only thing that changes from one detector to the next is how the signal is described. Six of the seven are my own detectors; the seventh, the commercial baseline, is included only as an external reference bar. What follows is each one in turn, with the honest out-of-fold number it reached.

Figure 4

One heartbeat, seven ways to read it

There is no single right way to turn an ECG into numbers. This project builds seven representations, each looking at the same signal through a different lens, then keeps the ones that see best.

The five feature-based views (M1 to M5) plus a commercial reference (M6) and a neural network (M7). Only M3 and M4 end up deployed together, but every branch was built and tested.

8.1M1, QRS onset morphology

The first detector sets out to read what a cardiologist reads by hand: the PR interval, the QRS width, and descriptors of the delta slope and wave morphology, delineated beat by beat on leads II, V1, and V5. It is the natural starting point, since these are the very quantities in the clinical definition of WPW. But it taught an early lesson. A pool restricted to the textbook intervals alone comes up empty under the feature gate, because a core interval like QRS duration separates WPW in opposite directions in the two corpora and so fails the cross-dataset coherence test. The likely mechanism is that the delta wave itself destabilizes automated beat delineation, so the tool that measures the intervals fails most often on exactly the pathology it is meant to catch. The finding is worth stating plainly: in the end not one of the classic clinical intervals, not PR, not QRS width, not QT, survived the selection. All 35 features that remain describe the morphology of the QRS onset, the roughly 40-millisecond window just before the R peak where the delta wave sits, read on leads II, V1, and V5. The value lives in those delta and waveform-shape descriptors, with the delta slope anchored on the reliably detected R peak rather than the fragile QRS onset. The detector built to read what a cardiologist measures by hand ended up using none of those measurements, which is itself informative about where the exploitable signal actually lives. It reaches an out-of-fold average precision of 0.198.

8.2M2, global statistics

The second detector deliberately does the opposite of the first. It summarizes each lead over the full ten seconds using distributional moments, energy bands, and an autocorrelation-based heart-rate estimate, and it performs no peak or wave detection at all. Its identity is precisely this globality: it never tries to find a beat, so it has a completely different failure mode from any delineation-based detector, which makes it a candidate for later combination even though it is not strong on its own. It reaches an out-of-fold average precision of 0.299. That it works at all without ever locating a heartbeat is a small reminder that the WPW signature leaks into coarse statistical properties of the whole signal, not only into the fine morphology at the QRS onset.

8.3M3, wavelet localization

The third detector treats the delta wave as what it physically is: a transient localized at the QRS onset and spread across scales. Using a shift-invariant wavelet transform together with wavelet-packet descriptors, it went through five internal versions, each a hypothesis about what to extract, and the ablations along the way were the real story. The energy family turned out to be dead weight and was dropped; a localization family and then an onset-weighting-plus-delta-polarity family lifted it decisively. Its single strongest feature is also the strongest single feature in the entire project: a signed wavelet descriptor of QRS-onset polarity with a very large standardized effect size of about negative 2.155, whose sign flips across leads in a physiologically correct way, negative in the high-lateral leads I and aVL, strongly positive in III and aVR, and which replicates in both corpora independently.

That a single descriptor of the delta region carries this much separation, in the direction physiology predicts, across two unrelated hospitals, is strong evidence the detector has captured the pre-excitation itself rather than an artifact. Its feature gate even discards the finest high-frequency detail bands on its own, which is exactly where the batch effect concentrates, a quiet self-validation. Frozen at 500 features and depth 4, it reaches an out-of-fold average precision of 0.619.

Figure 5

The strongest single feature, lead by lead

The signed polarity of the QRS onset, measured by a wavelet, is the most discriminating feature in the whole project. Its sign flips from lead to lead in a consistent pattern, and the overall effect replicates in both hospitals.

Overall effect size Cohen's d -2.15, and it holds separately in each corpus (PTB-XL -2.20, Chapman-Shaoxing-Ningbo -1.69). Bars to the left are negative, to the right positive, and length reflects the strength in that lead.

8.4M4, median-beat morphology

The fourth detector forms a noise-averaged median beat and reads its shape, along with the shape of the most pre-excited beat in the record, which is how it captures intermittent pre-excitation. It does its own R-peak detection independently of the clinical detector, using a wavelet-envelope method chosen over a classic Pan-Tompkins approach in a head-to-head that it won on every criterion, including being more orthogonal to the wavelet detector rather than less. Its morphology is made calibration-invariant by normalizing against R amplitude, so it reads shape rather than absolute voltage. It is the strongest single detector in the study, reaching an out-of-fold average precision of 0.718, with a precision at 80 percent recall of 0.846. One of its three intended views, an inter-beat variability measure, ablated to essentially zero and was confirmed dead three separate times, which I keep in the record because a negative result about your own design is worth as much as a positive one.

8.5M5, spatial VCG

The fifth detector is the geometric one. It reconstructs a vectorcardiogram from the 12 leads using two standard transforms, Kors and inverse-Dower, and reads the geometry of the activation loop, which encodes the delta axis a clinician uses to localize the accessory pathway. By construction it is the most orthogonal detector in the study, with a score correlation to the median-beat detector of just 0.191, the lowest anywhere in the project. And it taught the most counterintuitive lesson of all: despite being the most different, it adds almost nothing to the committee, only about 0.007. Being different on the overall score distribution is not the same as recovering the specific hard cases the others miss. Even a densified second version plateaus around an out-of-fold average precision of 0.43, and it is honestly excluded from the deployed ensemble rather than forced in for the sake of diversity.

8.6M6, commercial baseline

The sixth is not one of my detectors at all. It uses the on-machine measurements produced by a widely deployed commercial ECG analysis package, the Marquette 12SL system, available only for the PTB-XL portion of the data. It exists purely as an external reference bar, a way to place the project against an industry-standard reading, and it is deliberately kept out of every detector and every ensemble. Trained under the same protocol on those on-machine measurements, restricted to the PTB-XL folds where they exist, it reaches an out-of-fold average precision of 0.583 and an area under the curve of 0.969 on the 57 positives available. That is a real and substantial signal, and worth stating plainly rather than dismissing: the device's own derived measurements do carry the pre-excitation, and my detectors reading the raw waveform do only modestly better on the same corpus, where the median-beat detector reaches 0.693. The value of the learned detectors is not that they see something the machine cannot; it is that they extract a little more of it, and that they do so on both corpora rather than the one where the proprietary numbers happen to exist. Because those measurements are proprietary to the acquisition hardware and cannot be computed from a raw signal, M6 never appears in the deployed tool. I include it for context and honesty, not as a component.

8.7M7, neural network

The seventh is the only representation-learning model in the study: a one-dimensional residual network of about 63,500 parameters, trained directly on the raw signal, built to answer the natural question of whether a learned representation adds anything at this data scale. Its whole methodology was pre-registered, with gates fixed in advance, precisely so it could not be tuned into looking useful. From scratch it reaches an out-of-fold average precision of 0.651, roughly the level of the wavelet detector and below the median-beat detector. I did not stop there: because modern deep ECG work often relies on self-supervised pretraining, I pretrained the network on the unlabeled data and tested transfer. It failed a pre-registered gate, a frozen encoder collapsing to 0.063 and full fine-tuning gaining only about 0.014, well under the bar. So the pretraining avenue is tested and closed rather than left as an untested "it might have helped." M7 is reported as a reference model, not part of the deployed system, and the reasons it does not help the committee come out clearly in the interpretability section. The complete per-model configuration and ablation record is in the paper.

9.What each model actually reads

9.1SHAP on the five detectors

A detector can reach a good number for the wrong reason. It can learn a quirk of the dataset, a hospital fingerprint, a labeling artifact, and ride it to a respectable score that will collapse the moment it meets data from somewhere else. So a number alone is never enough. You have to open the model and ask what, physiologically, it is actually keying on, and whether that thing is real. For the five feature-based detectors, I do this with Shapley additive explanations, a principled method for attributing a model's output to its individual features, computed on the training folds only so that the explanation itself never touches held-out data.

What the analysis shows is the single most reassuring result in the interpretability work: each detector is driven by a physiologically distinct facet of the signal, and, strikingly, by different leads. The QRS-onset morphology detector leans most heavily on a delta-region descriptor in lead V1, which is exactly the lead in which pre-excitation localization is classically read. The wavelet and median-beat detectors are driven by morphological descriptors of the QRS in the lateral and precordial leads. The spatial detector is driven by descriptors of the activation-loop geometry. The global-statistical detector is driven by a spectral descriptor, the least directly interpretable of the five, which is consistent with its design as a distributional summary rather than a morphological reader. Five detectors, five different physiological stories, five different regions of the heart's electrical picture. That they disagree about where to look, while agreeing on the answer, is the mechanistic basis for ever combining them.

The single strongest feature in the whole study deserves its own moment, because it is the clearest evidence that a model here has captured biology rather than an artifact. It is the signed wavelet descriptor of QRS-onset polarity from the wavelet detector, with a standardized effect size of about negative 2.155. Its sign flips across leads in a way that matches the physiology of ventricular pre-excitation, negative in the high-lateral leads and positive in others, tracing the direction in which the heartbeat's earliest activation actually travels. And that signed pattern replicates in both corpora independently, the German and the Chinese, with large effect sizes in each. A dataset artifact does not do that. An artifact lives in one acquisition environment and vanishes in another. A feature whose polarity follows the expected direction of early ventricular activation and reproduces across two unrelated hospitals is reading the delta wave itself. That is as close to a mechanistic guarantee as this kind of work offers.

Figure 6

What each detector looks at

The features that drive each of the five feature-based detectors, ranked by mean absolute SHAP value. Different representations lean on different parts of the signal.

M3 and M4, the two deployed detectors, rank onset and morphology features highest. The leads named most often, V5, aVR, V4, V1, are exactly where pre-excitation tends to show.

9.2Grad-CAM on the network

The neural network cannot be interrogated the same way, because it has no hand-engineered features to attribute importance to; it learns its own representation from the raw signal. So for it I use a different tool, Grad-CAM, which produces a saliency map showing which parts of the input the network actually attended to when it made its decision. I read this map against criteria fixed in advance, so that I could not rationalize whatever it showed after the fact: attention on the QRS onset and delta region would confirm the network reads the pre-excitation, while attention on the baseline, the ST-T segment, or the record edges would mean it had latched onto noise or an artifact instead.

The verdict is clean. Averaged over held-out true-positive cases, the network's saliency peaks on the QRS and the QRS-onset delta region, with markedly lower attention on the baseline and the ST-T segment. In the window-by-window breakdown, the QRS and its onset dominate while the flat and repolarization regions sit well below. The network, despite being a completely different modeling paradigm from the feature-based detectors, is reading the same physiological event, the delta wave, in the same place. It arrives there on its own, without being told where to look, which is a strong independent confirmation that the pre-excitation signature is genuinely present and learnable in the raw signal.

That result also quietly explains a puzzle from the results. If the network reads the same delta region as the wavelet and median-beat detectors, then it is not offering an orthogonal view, it is offering the same view through a different lens, and so it correlates with them and adds nothing to their combination. The interpretability does not just tell me the network is trustworthy. It tells me why the network, for all its sophistication, cannot lift the ceiling: there is only one delta wave to read, and everything competent ends up reading it.

Figure 7

Where the network looks

The neural network's Grad-CAM saliency, averaged over the true WPW cases, grouped by cardiac window. Higher means the network relied on that part of the beat more.

The network concentrates on the QRS and its onset, the delta region, not the P wave or the later ST-T segment. It learned, on its own, to look where the pre-excitation lives.

9.3Why this is credible

Step back and the two interpretability analyses do something more than reassure. They convert the whole project from a black-box performance claim into a mechanistic one, and that is a meaningful upgrade in what the results are allowed to mean.

The worry with any medical machine-learning result, and the reason so many of them fail to replicate, is that the model may have found a shortcut, some incidental correlate of the label that has nothing to do with the disease. The permutation control I describe later rules out one version of that, label leakage, statistically. The interpretability rules out another version, artifact learning, mechanistically. Each of the five feature detectors keys on a physiologically sensible and distinct facet of the signal; the strongest feature follows the known direction of pre-excitation and replicates across two hospitals; and the neural network, given total freedom, independently converges on the delta region. These are not the behaviors of models that learned the dataset. They are the behaviors of models that learned the condition.

This matters for exactly the audience this project is meant for. A cardiologist looking at these results can check them against physiology and find that the models are reading what a trained eye would read, in the leads a trained eye would use. That is what earns a detector the right to be taken seriously as more than a number, and it is why the interpretability sits here, in the middle of the page, rather than tucked into an appendix. A result you can explain in terms of the heart is a result you can trust further than one you cannot. The complete Shapley and saliency analyses, with every panel, are in the paper.

10.Choosing what to deploy

10.1An M3-plus-M4 rank vote

Out of seven representations, the deployed system uses two: the wavelet-localization detector and the median-beat morphology detector, combined by an equal-weight vote. Not a weighted blend tuned to squeeze out a decimal, not the full committee of everything I built, and not the single highest number on any given fold. Two members, equal weight, fused as a vote.

The composition was not chosen by trying combinations against the test set until one looked best, which would have been exactly the leakage the whole protocol exists to prevent. It was decided on the development folds, before fold 10 was ever opened, according to criteria fixed in advance. Committee membership was settled by analyzing where the detectors make complementary errors, and the vote form itself was chosen for a specific structural reason that the next two subsections unpack. What I want to establish first is simply the shape of the thing: the deployed detector is a small, deliberate, frozen committee of the two strongest readers of the delta wave, and its simplicity is a feature, not a compromise. In a study whose central lesson is that added complexity does not buy performance, deploying the smallest committee that captures the signal is the honest conclusion made concrete.

10.2Why ranks

The fusion happens at the level of ranks rather than raw scores, and that choice comes directly from the most important empirical finding about the two corpora, which I develop fully in the external-validation section. In short: when a detector trained on one hospital is tested on the other, its ability to rank cases holds up well, but the absolute numerical scale of its scores does not transfer. A score of, say, 0.9 might mean something quite different on the German scale than on the Chinese one, even when both detectors are sorting cases correctly.

That single fact has a direct design consequence. If absolute scores do not travel across hospitals but ranks do, then a system that fuses and communicates in ranks is robust to the batch effect by construction, while one that fuses in raw scores inherits the batch problem. So the two detectors are combined by rank vote, and the final output a user sees is expressed as a percentile within a fixed reference distribution rather than as an absolute score or a probability. A new recording is scored, and that score is placed as its rank within a frozen reference of training scores, which is a quantity that transfers across corpora even though the raw score does not. This is not a cosmetic decision about how to display a number. It is the mechanism that lets the tool behave sensibly on a hospital it has never seen, and it is why the deliverable is a suspicion rank in the first place rather than a calibrated probability that would silently lie the moment the base rate shifted.

10.3The honesty of the choice

Now the part that matters most, because it would be easy to oversell and I refuse to. The two-member ensemble does not beat the best single detector on the primary metric. On the pooled out-of-fold folds, the equal-weight vote reaches an average precision of 0.717, and the single best detector, the median-beat morphology reader on its own, reaches 0.718. Those numbers are statistically indistinguishable. The ensemble is not an average-precision improvement over its strongest member, and I will not pretend it is.

So why deploy the vote rather than the single detector? For two reasons that are independent of average precision and were both fixed before fold 10 was touched. The first is robustness to the batch effect: a rank vote transfers across hospitals in a way that a single detector's raw output does not, which is the whole argument of the previous subsection. The second is the shape of the two detectors' errors, and it is genuinely useful.

The two members miss many of the same hard cases, their false-negative overlap measured by Jaccard is 0.49, but they produce largely different false alarms, their false-positive overlap only 0.18. They are complementary in specificity, not in sensitivity. Combining them does not recover additional true positives, which is why the average precision does not rise, but it does suppress the idiosyncratic false alarms that either detector produces alone, because a case has to look suspicious to both to survive the vote. For a screening tool, where every false alarm costs a human a second look, that is a real and defensible benefit even though it does not move the headline number.

I state all of this plainly because the alternative is a common and quiet dishonesty: presenting an ensemble as if the act of combining models produced the performance, when in fact the best single detector was already there. The median-beat detector alone is an equally defensible deliverable on average precision, and I say so. The vote is deployed for batch-robustness and false-alarm suppression, a freeze-time judgment grounded in the cross-corpus and complementarity findings, not a claim of superior discrimination. And the neural network, which happens to post the single highest number on the held-out fold, is deliberately not selected. The decisive evidence sits on the development folds, where 115 positives give the comparison real power: there the network reaches only 0.651, below the vote's 0.717 and the median-beat detector's 0.718. Its apparent lead exists solely on the fourteen-positive held-out fold, where every interval overlaps and nothing is separable, so promoting it would mean selecting on a point estimate the data cannot support, which is the exact error this whole study warns against. Selecting the flashiest number would have contradicted the project's own thesis. The full complementarity analysis and the freeze-time criteria are in the paper.

Figure 8

The two detectors miss different cases

How M3 and M4 overlap in their errors. On false negatives (missed WPW) they largely agree, but on false positives (false alarms) they disagree, which is exactly why combining them helps.

False-negative overlap is high (Jaccard 0.4909), but false-positive overlap is low (Jaccard 0.1837). They raise false alarms on different records, so a vote cancels many of them.

11.The rigor controls

11.1The permutation control

Every claim in this project rests on the assumption that the models learned something real about WPW, and there is one nightmare that would invalidate all of it at once: label leakage. If some feature or quirk of the pipeline were secretly correlated with the label for a reason unrelated to the disease, the models could post good numbers while learning nothing, and no amount of interpretability would fully settle the worry, because a leak can hide behind a plausible-looking feature. So I ran a control designed to catch exactly this, and it is the single most decisive check in the study.

The idea is brutally simple. Take the labels, shuffle them at random so that each ECG is now paired with someone else's WPW status, and rebuild the entire out-of-fold pipeline from scratch, gate, de-duplication, training, evaluation, all of it, on the scrambled labels. If the pipeline were clean, there is nothing left to learn: the features no longer correspond to anything, and performance should collapse to the base rate. If instead the shuffled-label performance stayed elevated, that would be a smoking gun, proof that the pipeline was extracting signal from the labels through some channel other than genuine pattern-recognition.

The result is exactly what a clean pipeline should produce. For all five feature-based detectors, the real out-of-fold average precision sits far above the shuffled-label null, and the null collapses to approximately the prevalence, an average precision on the order of 0.002 to 0.003, which is chance. The detector that reaches 0.718 on real labels reaches roughly 0.002 on shuffled ones. Ranking cannot be reproduced from scrambled labels for any detector. There is no detectable label leakage anywhere in the pipeline, and I can say that not as a hope but as a measured fact. This is the control that lets every other number on the page be read as a real result rather than a possible artifact.

Figure 9

A control that proves the signal is real

For each detector, the real average precision compared to the same model trained on shuffled labels. If the signal were an artifact, the real bars would not tower over the shuffled ones.

Every shuffled control collapses to the prevalence baseline (about 0.0021), while the real detectors rise far above it. The detectors are learning WPW, not noise.

11.2Multi-seed and confidence intervals

The second control addresses a quieter danger than leakage: the danger of mistaking luck for skill. Every model here is stochastic. The boosted trees subsample their data, the neural network starts from random weights, and so any single training run lands at a slightly different place. If I reported the number from one lucky run, I would be reporting noise as if it were performance, and at 142 positive cases the noise is not small.

So no model is characterized by a single run. Every frozen detector is trained across five random seeds, and reported as a mean with a standard deviation, which separates a genuine improvement from initialization noise. When two configurations differ by less than the seed-to-seed spread, I treat them as tied rather than declaring a winner, because at this scale a difference smaller than the noise is not a difference. This discipline caught real mirages during development, configurations that looked better on a single run but whose apparent edge was pure seed dispersion, and rejecting them is why the deployed system does not rest on a fortunate roll of the dice.

Alongside the seed spread, every headline number carries a bootstrap confidence interval, and I report those intervals honestly wide when the data makes them wide. The held-out average precision of 0.595 comes with a 95 percent interval of roughly 0.35 to 0.85, which is a large range, and it is large because 14 positives cannot support a tighter one. Reporting that interval, rather than the point estimate alone, is the difference between a claim you can trust and a claim that merely sounds confident. When the differences between models on the held-out fold all have overlapping intervals, as they do, the honest reading is that they are not separable, and I say so rather than ranking them as if the point estimates were meaningful.

11.3Freeze and reproducibility

A study is only as trustworthy as its ability to be checked, and a "frozen" model that quietly changes when you rerun it is not frozen at all. This became a concrete lesson during the project rather than an abstract principle, and the lesson hardened into a rule.

At one point, a model's notebook was overwritten and the model had to be restored from backups. Refitting it from the data, rather than reloading the saved artifact, drifted the numbers: an average precision moved slightly, a confusion matrix shifted by a case or two, an area under the curve changed in the third decimal. The cause was not a bug and not floating-point imprecision; it was the ordinary run-to-run nondeterminism of the learning algorithm, the kind that a change in thread count or aggregation order produces. The fix became a permanent rule: if a frozen artifact exists, it is reloaded, never refit. A fit runs only when no frozen artifact is present. A truly frozen model must be bit-for-bit identical every time it is loaded, and reload-not-refit is what guarantees that.

That rule sits inside a broader commitment to reproducibility that is the reason this page can make strong claims at all. The full implementation is public: the frozen model artifacts, the out-of-fold and held-out scores, the per-model evaluation metrics, the interpretability outputs, and a detailed decision log that records every design choice against the alternative it was chosen over. The dependency stack is pinned to exact versions, and paths are repository-relative, so the pipeline runs the same on another machine as on mine. Nothing on this page rests on my word. Every number is inspectable, and every choice is traceable to the moment it was made and the reasoning behind it.

12.Tested where it had never looked

12.1Cross-corpus transfer

The honest test of any model is data it has never seen, and the two-corpus structure of this project makes an unusually decisive version of that test possible. Instead of only holding out folds, you can hold out an entire hospital: train a detector on one corpus and evaluate it on the other, which it has encountered in no form during training. If a detector has learned the disease, it should still work. If it has learned the hospital, it should fall apart. This is the experiment that separates a real WPW detector from a batch-effect detector wearing a costume.

The result is consistent across the feature-based detectors, and it is the most scientifically important pattern in the whole project, because it is not a simple pass or fail but a split verdict that reveals the structure of the problem. When a detector trained on one corpus is tested on the other, its area under the curve holds at roughly 0.87 to 0.92 in both directions. Ranking transfers. A detector trained in Germany still sorts WPW cases ahead of normal recordings in China, and the reverse. But the average precision collapses. The absolute score scale does not transfer, and any threshold calibrated on the first corpus is meaningless on the second.

Read carefully, that split says something precise. The detector genuinely learned the disease, because ranking, the base-rate-independent measure of whether it sorts cases correctly, survives the crossing. What does not survive is the calibration, the mapping from a raw score to an absolute number, because that mapping is entangled with the acquisition environment. In plainer terms: the model knows a WPW ECG when it sees one relative to the others in front of it, but the numerical value it assigns is spoken in a local dialect that the other hospital does not read. This is exactly the finding that forces the deployed system to communicate in ranks rather than raw scores, and it is why that design choice is science rather than styling. It also explains, cleanly, why single-corpus models trained on only about 57 positives show large but structurally unavoidable overfitting: they are reported honestly at their out-of-fold value and used to demonstrate the batch effect, never deployed.

Figure 10

The central result: AUC holds, AP collapses

When the wavelet detector is trained on one hospital and tested on the other, its AUC stays high but its average precision falls apart. The model still ranks WPW correctly, but the score scale does not transfer.

This is the batch effect made precise. Ranking transfers, calibration does not, which is exactly why the site shows a suspicion rank rather than a probability, and why the deployed model is trained on both hospitals at once.

12.2Ten thousand external ECGs

Cross-corpus transfer tests generalization between the two training hospitals. But the sterner question is what happens on a completely foreign dataset, one that played no role in building anything, from a third country and a different acquisition environment entirely. So the deployed engine was run against the Georgia G12EC corpus, a set of 10,344 ECGs that no model in this project ever saw during training, selection, or tuning.

The scan was clean end to end. All 10,344 external ECGs were scored with zero ingestion failures, the input guards holding across the entire dataset, which is itself a small proof that the pipeline is robust to real-world signal variation rather than only to its own tidy training data. And the specificity result is the one to sit with.

On these more than ten thousand unseen, overwhelmingly non-WPW recordings, the tool raised a false alarm at the high level or above, a score of 80 or more, on 0.09 percent of them, nine ECGs out of 10,342. More than 99 percent sat in the bottom two levels of the scale. Even on the genuine morphological trap, the bundle-branch blocks and other conduction abnormalities that most resemble pre-excitation, the median score stayed low and only a tiny handful reached the alarm range.

I want to frame this precisely, because it is easy to overclaim and I will not. This is a demonstration of specificity, of not over-firing on a large external population, and not a demonstration of sensitivity. Georgia contains only two labeled WPW cases, far too few to measure recall, so the external test says the tool does not cry wolf on a foreign dataset, not that it catches every foreign WPW. Of those two labeled cases, one was a subtle genuine WPW that the tool flagged at a moderate level, and the other, on inspection, was a mislabel, a narrow-QRS tracing with no delta wave, which the tool correctly scored near the bottom. That second case is a quiet bonus: the tool declined to confirm a bad label. But the honest headline is the specificity, stated as specificity, and nothing more.

Figure 11

Ten thousand external ECGs, few false alarms

The deployed model scored 10,344 ECGs from a Georgia hospital it had never seen. Almost all of them land in the two lowest suspicion levels.

Only 9 of 10,344 recordings reached the high level or above, a false-alarm rate of 0.09 percent. The model stays quiet on ordinary ECGs, which is what a screening aid must do.

12.3Fold 10, once

Finally, the moment the whole protocol was built to protect: the single contact with fold 10, the sacred held-out fold, with every choice frozen in advance. This is the one measurement in the project that carries no selection optimism at all, because the system that met fold 10 was finished before fold 10 was opened.

On its 14 WPW cases, the deployed ensemble reached an average precision of 0.595, with a 95 percent confidence interval of 0.346 to 0.854, and an area under the curve of 0.950. At its frozen operating threshold it flagged 11 recordings as suspect, of which 8 were true WPW, catching 8 of the 14 present, a recall of 0.571 at a precision of 0.727 at that single point. Its out-of-fold average precision on the development folds was 0.717, so the held-out estimate sits comfortably inside the confidence interval, consistent with an unbiased but noisy measurement at 14 positives. The average precision looks modest, and the confidence interval is wide, both for reasons already explained: at 471 to one, average precision is mechanically compressed, and 14 positives cannot support a tight interval. The area under the curve of 0.950 is the number that shows what the tool actually does well, sort WPW cases to the top of the list, which is the behavior a screening tool needs.

Figure 12

Tested once, on the held-out fold

The deployed M3 plus M4 vote, scored a single time on fold 10, which was never touched during development. Left, the ROC curve. Right, the precision-recall curve, the honest view under heavy imbalance.

AP 0.5952 with a wide 95 percent interval (0.35 to 0.85), from just 14 positives. The ROC looks strong, but precision-recall is the honest lens when positives are this scarce.

12.4Where we stand in prior work

For context, and only for context, it is worth placing that 0.950 against the published literature. A 12-lead WPW discrimination figure of approximately 0.855, drawn from the PTB-XL benchmark line of work and cited as a reference bar in a recent single-lead WPW study, is the closest available comparison point. The deployed ensemble reaches 0.950 on its held-out fold, and every individual detector in the study reaches at least about 0.897.

I offer this comparison carefully, not as a leaderboard victory, because the evaluation splits and label definitions differ across studies and a like-for-like contest is not really possible. The point is not that this project wins. The point is that the discriminative ceiling reached here is at or above the established reference, which strengthens rather than weakens the central claim of the whole project. If even a discrimination figure this strong cannot be pushed meaningfully higher by adding models or capacity, then the limitation is not the model's ability to tell WPW apart. It is the data. That is the thread the next section picks up and follows to its conclusion. The full external and held-out results, with every curve and interval, are in the paper.

Figure 13

Every model, with its uncertainty

Held-out average precision for each model, with 95 percent confidence intervals. From just 14 positives, the intervals are wide, and they all overlap.

The deployed vote sits in the middle of the pack, and no model is statistically distinguishable from its neighbors. With this few positives, the ranking between good models is uncertain, which is itself part of the honest story.

13.The real result: data, not model

13.1Five independent confirmations

If this project has one thing to say, it is this: at 142 WPW cases, the ceiling on performance is set by the amount of data, not by the choice or sophistication of the model. That is a strong claim, the kind that is easy to assert and hard to earn, so I did not rest it on a single experiment. I reached it five separate times, each from a different direction, and only a convergence like that deserves to be called a finding rather than a hunch.

The first four confirmations are attempts to beat the deployed two-member vote, each reported as a paired difference in average precision with a bootstrap confidence interval. Add the most orthogonal detector, the spatial one, to the committee: it does not help, it significantly hurts, a resolved loss of 0.049, because a weak member drags the vote down even when it is maximally different. Build a feature-union model that pools every detector's features into one: it does not beat the vote, the difference spanning zero. Add the classic clinical intervals, the hand-measured PR, QRS width and QT that the first detector's own selection had already rejected, on top of that union, on the theory that they carry complementary signal: again no significant gain, the interval spanning zero. Train the deep neural network from the raw signal, the one modeling paradigm that could in principle discover something the engineered features missed: it reaches the wavelet detector's level and no higher, the difference spanning zero. Four different ways of adding diversity or capacity, four failures to raise the ceiling, and the only one that resolves statistically resolves in the wrong direction.

The fifth confirmation is the self-supervised pretraining of that network, the current frontier technique for squeezing more out of limited labels: pretrain on the unlabeled data, then fine-tune on the WPW task. It failed a pre-registered transfer gate, the fine-tuned model gaining only about one standard deviation over training from scratch, well under the bar. Testing and closing that avenue with proof, rather than leaving it as an untested possibility a reader might assume would help, is the strongest form the negative result can take. Five attempts. Five confirmations that the door does not open by pushing harder on the model.

The most telling detail in the whole figure is not the ordering of the models but the width of their confidence intervals: at 14 held-out positives every interval overlaps every other, so none is separable from any other, which is precisely the empirical signature of a data-limited regime rather than a model-limited one.

Figure 14

Nothing reliably beats the simple vote

Five attempts to improve on the deployed M3 plus M4 rank vote (AP 0.7173). For each, the paired difference in average precision and its 95 percent confidence interval.

Every confidence interval that could be computed crosses zero, or the change was worse. No alternative significantly beat the simple vote, so the simplest robust option was deployed.

13.2The learning curve

Those five confirmations are convergent, but they are indirect. They show that adding model complexity does not raise the ceiling, from which I infer that data is the binding constraint. Inference is weaker than measurement, so I ran the direct test as well, and it is the cleanest single piece of evidence on the page.

The experiment is straightforward. Take the strongest single detector and retrain it on increasing random fractions of the training WPW positives, from 10 percent up to 100 percent, holding the negative class fixed and repeating each fraction over eight random seeds. Only the positive count is varied, deliberately, because at 471 to one the negatives number in the tens of thousands and are not the scarce resource; the informative question is what happens as the rare class grows. If the model were data-limited, more positives should keep helping, with no plateau. If it were model-limited, performance should flatten once the model has enough examples to learn what it can.

It does not flatten, and getting that answer honestly took one extra piece of care. The entire feature selection, the gate, the de-duplication, the count, is re-run from scratch on each random subsample of positives, so that a low-data point can never borrow a feature set chosen with information it did not have. Run that way, the strongest detector's out-of-fold average precision climbs from 0.317 at twelve positives to 0.715 at the full 115, and it is still rising at the very end: the paired difference between the 90-percent and 100-percent fractions, across the eight shared seeds, is +0.027, with a 95 percent interval of 0.019 to 0.033 that excludes zero. The seed-to-seed spread contracts from 0.092 at the smallest fraction to nothing at the full set, where there is no subsampling left to do, the signature of a model still stabilizing as it is fed more of the scarce class rather than one that has saturated. A fixed-feature version of the same experiment, which instead lets every low-data point keep the feature set chosen with all the data, sits below the leak-free curve at the smallest fractions, 0.225 against 0.317 at ten percent; the two protocols are biased in opposite directions at low counts, and the qualitative conclusion, a steep climb that has not turned over, survives both. The wavelet detector tells a more equivocal story, rising steeply and then flattening on its final segment, so I report it as inconclusive rather than pretend it confirms the same thing. What the paired test licenses is therefore a bounded claim, and I keep it bounded: the deployed system's strongest member is demonstrably still improving with more positives, and no member's saturation caps the committee, so the system as deployed has not been shown to have reached its ceiling. I do not claim more, and in particular I do not extrapolate the curve to guess a number at a thousand positives, because a range of twelve to 115 cannot pin down where an asymptote lies.

The corollary is sobering. If the single most effective intervention is more positive examples rather than a cleverer model, that intervention is also the hardest to make, because acquiring positives is exactly what the rarity forbids. At a prevalence near 471 to one, assembling on the order of a thousand labeled WPW cases would require expert review of roughly half a million recordings. The data bottleneck is not a matter of effort that simply has not been spent yet. It is structural, built into the epidemiology of the disease, and it is the reason rare-condition detection stays hard even as modeling tools keep improving.

Figure 15

Still climbing at the last data point

For the strongest single detector (M4, median-beat morphology), average precision as a function of how many of the 115 training WPW cases it is allowed to see. This is one detector, not the deployed ensemble. The curve is still rising when it runs out of cases, and the seed-to-seed spread narrows as data grows.

From 0.317 at one tenth of the cases to 0.715 at all of them, the slope has not flattened. The ceiling here is the number of real, well-labeled positives, not the model.

13.3Label validity

There is a refinement to the word "data" worth testing, because a natural hypothesis would sharpen the thesis if it held, and it is exactly the kind of comfortable idea that deserves a hard look precisely because it is convenient. The idea is that the binding constraint is not only the quantity of positive examples but their label validity: that the cases the system misses are disproportionately the ones whose labels were never confirmed by a human reader, so that part of the apparent ceiling is really noise in the positive labels rather than a limit on detection. If that were true, better-adjudicated positives would help in a way the raw count does not, and label quality would be a co-bottleneck alongside label quantity.

I tested it directly, and it does not hold. Among the PTB-XL positives, most WPW labels are non-validated to begin with, 77 percent of them, so the base rate of uncertainty is high everywhere, not only among the misses. Nine of the fourteen missed cases carry a non-validated label, which sounds like concentration until you set it against that base rate: 9 of 14 is 64 percent, which is below the 77 percent that holds across all the positives, not above it. A formal test agrees, an odds ratio of 0.41 and a p-value of 0.27, no enrichment in either direction, and if anything the validated cases are missed at a slightly higher rate. Label validity is not the co-bottleneck the hypothesis proposed, and I retract the comfortable version of the claim rather than keep it.

The way that hypothesis fails is a common trap, worth naming because it is easy to fall into: a proportion among the errors means nothing without the proportion among the whole, and 9 of 14 misses looks like a pattern only until the missing denominator, 77 percent of all positives, turns it into a non-event. Non-validated labels remain a genuine limitation of the corpus for a different reason, that a model trained on them partly learns to reproduce an existing automated reader rather than a purely human ground truth, and that limitation is real and disclosed. But they do not explain this system's misses, and the more consequential label problem, it turns out, is not in the positive class at all but in the negative one, which the next section reaches. The binding constraint remains the quantity of positive examples, exactly as the learning curve measured. The full five-way comparison, the learning curve, and the label test are laid out in the paper.

14.What it misses, and why

14.1The missed cases

A detector is only as trustworthy as its account of its own failures, so I looked hard at the cases the committee misses and tried to explain each one rather than let the misses sit as an anonymous error rate. The analysis is done on well-defined populations: the true positives caught by both members of the deployed vote, and the false negatives missed by both. Splitting the errors this way, rather than lumping together anything either member got wrong, turns out to matter, and it matters in a way I return to at the end of this section.

The first thing that separates the missed cases from the caught ones is QRS width, and the separation is both statistically clear and physiologically coherent. Measured with a delineation-derived proxy on the committee's own PTB-XL cases, the missed WPW have a markedly narrower QRS than the detected ones, a median of 76.5 milliseconds against 118.0 (a Mann-Whitney p-value of 0.0008). That is exactly what the mechanism predicts. The cases that get missed are those of minimal or latent pre-excitation, where conduction through the accessory pathway barely widens the complex, so the delta wave is small and the tracing approaches a normal-width beat. These are the hardest possible cases, the ones where there is genuinely almost nothing to see, and the fact that the misses cluster here rather than scattering randomly is evidence that the detector is failing gracefully, losing the faintest cases rather than missing at random.

But a narrow-QRS finding measured by a single automatic delineator cannot be trusted on its own, and establishing it took an independent instrument. PTB-XL ships an on-machine Marquette QRS duration, computed by the acquisition device entirely outside my pipeline, and on the same cases it confirms the narrowing: a median of 140 milliseconds for the detected WPW against 103 for the missed, again strongly significant. Two instruments agreeing on the direction is what lets me call the narrowing real rather than an artifact. The reason that confirmation matters is a cautionary one that reaches beyond this project. A widely used open-source delineator, run on the very same cases, reports the opposite, making the missed cases look wider rather than narrower, with no significance; and my own proxy is unreliable in its own way, returning physiologically impossible widths below 60 milliseconds on 9 of the 57 cases. When the pathology you are studying is the same thing that degrades the tool you measure it with, a morphological error analysis run through one delineator can hand you a conclusion of the wrong sign wrapped in a plausible mechanism. The narrow-QRS story stands here only because a device measured it independently; where no such instrument exists, that kind of finding should be treated as a hypothesis rather than a result.

Figure 16

A narrower QRS in the missed cases, if you measure it right

Median QRS width of the WPW cases the model caught versus the ones it missed, measured by three different delineators. The reference device and the lead-II proxy agree the missed cases are narrower; the open-source delineator reports the opposite.

Two of the three delineators find the missed cases narrower: the reference device (140 vs 103 ms) and the lead-II proxy (118 vs 76.5 ms). The open-source delineator inverts the sign (96 vs 136.5 ms) and is not significant. Where the pathology degrades the measuring instrument, a single delineator can hand you the wrong conclusion, so only an independent measurement settles it.

14.2Comorbidity masking

The second driver of missed cases is other heart disease. Among the PTB-XL cases, where the necessary annotations exist, the missed WPW recordings are more likely than the detected ones to co-occur with a comorbidity that itself deforms the QRS, such as a prior infarction or a bundle-branch block: five of the fourteen misses against two of the forty-three detections, a Fisher exact p-value of 0.0073 and an odds ratio of about 11. I report it as the most promising signal in the error analysis rather than an established mechanism, and the reason is a discipline I hold myself to. This section runs a dozen hypothesis tests on the same small set of misses, and once you correct for that multiplicity honestly, with the Holm-Bonferroni procedure over the whole family, no single test survives at the 0.05 level, the comorbidity result included, which adjusts to about 0.081. At fourteen decomposable misses the study is not powered to nail down a mechanism, only to rank candidates, and comorbidity masking is the leading one. Unlike the QRS-width result, it at least does not depend on a quantity the pathology corrupts, since the comorbidity codes are assigned independently of any delineation.

This too is physiologically coherent rather than mysterious. When another condition is already distorting the shape of the ventricular complex, it can bury the morphological signature of pre-excitation underneath its own, so the delta wave that a clean tracing would show is masked by the competing abnormality. The detector is not blind here so much as outvoted: the signal it reads is genuinely obscured by a louder one. This mechanism, comorbidity masking, is a real and expected limit of any morphology-based detector, because there is only so much a reader, human or machine, can recover from a complex that two different processes are reshaping at once. Naming it explicitly matters, because it tells a clinician exactly which population the tool is least reliable on, patients whose ECGs already carry a QRS-deforming condition, which is more useful than a generic disclaimer that the tool sometimes misses cases.

14.3The irreducible floor

Putting the two mechanisms together lets me attempt something more ambitious than a list of failures: an estimate of how many of the misses are genuinely irreducible, the cases where real pre-excitation is present, correctly labeled, and simply too faint for any method to catch. This is where the label policy from earlier pays off, because it lets me decompose the misses instead of taking them at face value.

Among the fourteen missed PTB-XL cases, the decomposition is descriptive rather than causal, and I keep it that way on purpose. Nine carry a non-validated label, three co-occur with a QRS-deforming comorbidity while carrying a validated label, and two are validated, comorbidity-free cases that the system simply missed. The nine non-validated ones are not, as the previous section showed, a concentration: against a 77 percent base rate of label uncertainty across all the positives, nine of fourteen is if anything a touch low, so I do not get to call them explained away by bad labels. The missed cases from the other corpus cannot be decomposed at all, because it lacks a label-validation field, which I state plainly as a limitation rather than paper over. What the part I can decompose does support is narrow and honest: the genuinely irreducible floor, real correctly labeled minimal pre-excitation that no method here catches, is small, on the order of two cases in PTB-XL, while a QRS-deforming comorbidity is present in a meaningful share of the rest and is the leading candidate explanation, subject to the multiplicity caveat above.

The false positives, oddly, turn out to be more informative than the false negatives, and they point the label problem in a direction almost no one looks. Of the 25 out-of-fold false alarms, six are not really the model's errors at all: five are Chinese-corpus recordings that carry an explicit ventricular-pre-excitation code that my strict WPW definition did not count as positive, and one is a PTB-XL recording coded WPW at a reduced likelihood that my full-likelihood definition excludes. In other words, the detector flagged pre-excitation that the source corpus itself documents, and was marked wrong for it. That relocates part of the label problem out of the positive class, where everyone audits, and into the negative class, where almost no one does, and it means my reported precision is conservative: under an inclusive definition those six would not count against it. Whether those recordings are genuinely pre-excited is a clinical determination I am not qualified to make, and it is exactly the kind of case I have flagged for expert review rather than settled on my own.

That reframing is the quiet payload of the whole error analysis. If most of the misses are doubtful labels and masked comorbidities rather than real pre-excitation the model failed to see, then the detector is closer to the achievable ceiling than the raw miss count suggests, and the achievable ceiling itself is partly a function of label quality rather than model quality. The decompositions are offered as clinically checkable hypotheses, the uncertain labels and the masking cases being exactly where a cardiologist's review would be most valuable, and where a real answer will come from expert adjudication rather than from anything I can settle on my own.

14.4A methodological lesson

The error analysis also produced a cautionary tale about its own method, and I keep it on the page because a project about rigor should show its rigor failing and recovering, not only succeeding.

An early version of the analysis appeared to show that heart rate separated the missed cases from the caught ones, a tidy result that would have added another explanatory factor. It was wrong, and the reason it was wrong is instructive. The apparent effect was an artifact of a diluted population definition: I had defined the false negatives as cases missed by at least one committee member, rather than by both, which mixed genuinely hard cases together with cases one member happened to catch. On the correct population, the ones missed by both members, the heart-rate effect vanished, its p-value climbing to 0.22, while the QRS-width effect became significant. The conclusion reversed entirely once the population was defined properly.

I document this reversal deliberately, as a methodological lesson rather than an embarrassment to bury: the definition of the population you analyze must be audited before any conclusion is drawn from it, because a loose definition can manufacture an effect that a tight one dissolves. Several other hypotheses about the missed cases were also tested and did not survive, intermittence of pre-excitation, a delta-slurring gradient, R-wave amplitude, per-lead localization, and an apparent enrichment of bundle-branch block among the false positives that was suggestive but not conclusive at the available count. I report these as negative results rather than omitting them, because the ones that did not pan out are part of the honest record, and because knowing what does not explain the misses is worth something too. The full error analysis, with every population definition and test, is in the paper.

15.The deliverable: a suspicion rank

15.1A rank, not a probability

Everything in the project converges on a single decision about what the tool should actually output, and it is not the obvious one. The obvious output would be a probability: this ECG has an X percent chance of being WPW. I deliberately do not produce that, and the reason is not caution or hedging. It is that a probability would be actively misleading here, for a reason baked into the imbalance.

At 471 to one, a calibrated probability is both crushed and unstable. Crushed, because with true positives so rare, the honest posterior probability of WPW for even a fairly suspicious tracing is a small number, and a user shown "3 percent" would dismiss a case that genuinely warrants a look, dramatically underestimating the concern for a real positive. Unstable, because that probability depends on the base rate, and the base rate is exactly what shifts when the tool moves from one hospital to another, which the cross-corpus experiments showed does not transfer. A number that is simultaneously too small to be actionable and too fragile to travel is worse than no number. So the tool reports a rank instead: where this ECG's score falls within a fixed reference distribution of training scores, expressed on a scale from 1 to 100. A rank answers the question that actually matters for screening, is this tracing more suspicious than most, and it answers it in a form that survives the batch effect, because ranks transfer across corpora even when absolute scores do not. The output is labeled a suspicion rank, never a probability, and the distinction is load-bearing rather than cosmetic.

15.2Five anchored levels

A raw percentile from 1 to 100 is precise but not meaningful on its own, so the scale is anchored to clinical reality by mapping it onto five named levels, each tied to a real point on the precision-recall curve measured on the development folds. The levels are very low, low, moderate, high, and very high, and the boundaries are not round numbers chosen for tidiness. They sit at the ensemble scores where the measured precision reaches meaningful thresholds.

The anchoring makes the levels honest. At the "moderate" boundary the local precision is around 0.30 at a recall of about 0.81; at "high" it is around 0.75 at a recall near 0.70; at "very high" it climbs to about 0.91 at a recall of 0.43. In plain terms, the levels get rarer and more trustworthy as you climb, and each one means something specific about how many similarly scored reference ECGs turn out to be real. There is a deliberate display rule layered on top: the local precision is only shown from the "moderate" level upward. Below that, at "low" and "very low," the tool shows a qualitative message rather than a number, because displaying a precision of 2 percent would alarm a user over a tracing that carries no notable sign of pre-excitation, which is the opposite of helpful. The scale is built to inform without frightening, and to be truthful at every level about what the number does and does not warrant.

Figure 17

The five-level suspicion gauge

The score from 1 to 100 is grouped into five levels. Each boundary sits on a real precision-recall trade-off, so the levels mean something concrete.

Below the moderate level, no precision is shown, the score is too low to be informative. At the highest level, about 91 percent of flagged reference ECGs are true WPW. The output is a suspicion rank, never a probability.

15.3The proven engine

Moving a model from research notebooks into a running application is a notorious place for silent drift, where a subtly different library call or data type shifts the outputs just enough to matter, and I treated that risk as something to measure, not trust. The extraction code for every deployed detector was rewritten from the frozen notebooks into importable modules, and each was then checked against its notebook on the held-out fold, the only unbiased place to check.

The wavelet detector reproduces the notebook to a maximum absolute difference of about 2.7 times ten to the negative eighth, effectively bit-exact. The median-beat detector reproduces its frozen behavior on the components that carry its signal. The three research detectors, the QRS-onset morphology, statistical, and spatial ones, are served alongside the deployed pair and reproduce their frozen feature matrices exactly.

The ensemble, reconstructed out-of-fold, reproduces the study's average precision to the fourth decimal and reproduces the exact confusion counts, which means the percentile recipe in the live tool is faithful to the one in the paper. The engine you run in the demo is, verifiably, the engine described on this page.

Figure 18

From raw signal to suspicion level

The end-to-end chain a single ECG travels through, from the raw twelve leads to the final suspicion level.

Every stage is frozen and reproducible. The same pipeline runs on the demo and produced every number on this page.

15.4The demo

The point of all this machinery is that you can use it, so the demo lets you run the real engine on real, held-out ECGs and see exactly what it does. You pick an example tracing, from a clear WPW case to a normal one to a deliberately minimal pre-excitation to an external case, and the tool reads it the way the model was trained to read it and returns three things, not just a score.

It returns the suspicion level on the 1-to-100 scale, placed on the anchored gauge so you can see where it falls. It returns the twelve-lead tracing itself, with the QRS-onset region, where the delta wave lives, highlighted, so the number is grounded in something you can look at. And it returns a short, plain-language account of what pushed the score, which features in which leads drove it up or down, along with a clear statement of what the number means and, just as importantly, what it does not. There is no jargon and no false certainty. A high score comes with the honest caveat that it is a rank, not a diagnosis, and a low score says so in words rather than in a frightening tiny percentage. The demo is not a separate showpiece bolted onto the research; it is the same frozen, conformity-tested engine from the study, made touchable, so that the claims on this page are something you can check for yourself rather than take on faith.

16.What this is not

16.1Retrospective, not prospective

The most important limitation is also the easiest to lose sight of amid all the numbers, so I put it first and state it flatly: this is a retrospective study on curated public datasets, and it is not a clinical validation. Every result on this page describes how the system behaves on recordings that were collected, labeled, and archived before this project existed. None of it describes how the system would behave deployed in a real screening setting, on live patients, in the flow of actual care.

That distinction is not a technicality, and I will not let the strength of the retrospective numbers blur it. A prospective validation would mean running the tool on a stream of new, unseen recordings in a clinical environment, measuring what it catches and misses in practice, and doing so with the recalibration each new site would require, since the cross-corpus experiments proved that score scales do not transfer between environments. That study has not been done here, and until it is, every clinical-sounding statement in this project is a hypothesis about the world rather than a demonstrated fact about it. The interpretations I offer throughout, about which cases are missed and why, about what the tool would flag, are framed as things a cardiologist could check, not things I have proven in the clinic. The honest word for what this project is remains "study," not "tool," and certainly not "device."

16.2The label source

A second limitation is intrinsic to the data itself, and it cuts deeper than a sample-size complaint. A fraction of the diagnostic labels in PTB-XL were produced by an automated on-machine interpretation and were never confirmed by a human reader. This means a model trained on that corpus is learning, in part, to reproduce an existing automated reader rather than a purely human-adjudicated ground truth. I tested the tempting corollary, that these unconfirmed labels concentrate among the cases the system misses, and it did not hold, so I do not lean on it; but the labels remain a limit on what the ground truth means, independent of whether they explain any particular error.

I want to be precise about the shape of this problem, because it is subtle. It is not that the labels are wrong; it is that some of them are unverified, and I cannot always tell which. This is a limitation of any work built on this corpus, not a flaw specific to my method, but it is mine to disclose because it bears directly on how the results should be read. It is exactly why the error analysis separates the non-validated labels from the rest rather than treating every miss as an equal failure, and it is why the planned next step is cardiological review of that non-validated subset, which would replace an automated label with a human judgment on precisely the cases where the distinction matters most. The other corpus compounds the issue in a different way: it lacks a label-validation field altogether, so the same decomposition of its missed cases simply cannot be performed, and I report that as an unavoidable gap rather than filling it with a guess.

16.3Residual batch effect

A third limitation is that the batch effect between the two corpora is reduced but not eliminated, and I control for it by design rather than claim to have removed it. The feature gate's cross-dataset coherence requirement keeps the models from learning the hospital instead of the disease, and the rank-based deployment sidesteps the untransferable score scales, but neither of these makes the two acquisition environments truly interchangeable. Residual confounding cannot be excluded, and I would be overstating the work to say otherwise.

There is a related and more specific worry that I flag because it is genuinely unresolved. My coherence criterion constrains the WPW-defining features to behave consistently across corpora, but I did not formally characterize whether the non-WPW populations, the negatives, are clinically comparable between the German and Chinese corpora. If the two hospitals differ in how common QRS-deforming comorbidities are among their negatives, then part of what a detector learns could reflect a difference between patient populations rather than the presence of pre-excitation. The percentile-rank deployment mitigates this, because ranks are more robust to such shifts than absolute scores, but it does not fully rule it out. A formal characterization of the negative-class composition across the two corpora is work I have not done, and I name it as an open question rather than assuming the negatives are equivalent.

16.4Method limitations

Two limitations live in the method itself, and both are the kind of honest imperfection that a careful reader deserves to know about. The first is in the feature de-duplication. It is applied greedily, in order of effect size, so when two features are too correlated, the stronger one is kept and the other dropped. That is reasonable, but it means a descriptor that is redundant with an already-selected feature gets removed even if it would have been more useful in combination with a third feature, and a slightly weaker but more complementary descriptor can be missed. A more exhaustive joint search over feature combinations would avoid this, but I did not run one, because at 115 positives it would itself overfit the selection, trading one bias for a worse one.

The second is the selection optimism I disclosed earlier and restate here so the limitations section is complete on its own. The feature selection was computed once on the pooled development folds rather than re-nested inside each cross-validation fold, which gives the development numbers a mild, bounded optimism. It is limited because selection uses univariate statistics rather than the model's own out-of-fold score, and because the frozen feature sets predate the single contact with fold 10, so the headline held-out result carries none of it. But it is real, and a fully nested procedure would be the cleaner design. I name both of these not because they change the conclusions, they do not, but because a limitations section that only listed the comfortable limitations would not be trustworthy.

16.5The concealed-pathway scope

The last item is not a flaw but a boundary, and stating it precisely protects the project from a claim it never made. This tool detects the manifest WPW pattern on a resting ECG, the short PR interval, the delta wave, the widened complex. It does not, and cannot, detect a concealed accessory pathway.

A concealed pathway is one that conducts only in the retrograde direction, so it produces no pre-excitation at rest and leaves an entirely normal resting ECG. Strictly, it is not the WPW pattern at all, because there is no delta wave to see, yet it can still cause dangerous re-entry tachycardias. The point is that a concealed pathway is invisible on the exact recording this tool reads. That is not a case the tool misses through some weakness; it is a case that leaves no trace on the input by definition, and so it sits outside the tool's scope entirely. I make this explicit because it would be easy for a reader to imagine that a "WPW detector" should catch every accessory pathway, and it cannot, any more than a smoke detector can sense a fire in a sealed room it has no sensor in. Naming the boundary is part of being honest about what the tool is for: it flags manifest pre-excitation on the resting tracing, no more and no less. The complete limitations, stated at full length, are in the paper.

17.What comes next

17.1More positive examples

The clearest next step follows directly from the central finding, and there is a certain satisfaction in that: a project whose main result is "data is the bottleneck" points, without ambiguity, at what would move it forward. More positive examples. The learning curve is still rising at 142 cases, with no plateau in sight, which means additional WPW recordings would still improve performance rather than merely confirming what is already there. That is not a guess about a nice-to-have; it is a measured prediction about the single most effective intervention available.

The concrete path is to incorporate additional public 12-lead corpora as they become usable, and, ideally, prospectively collected recordings, each one adding to the scarce positive class that governs the ceiling. But the same finding that makes this the right direction also makes it hard, and I would rather be honest about the difficulty than pretend the fix is easy. At a prevalence near 471 to one, gathering on the order of a thousand well-labeled WPW cases would mean expert review of roughly half a million recordings. The bottleneck is structural, written into the epidemiology of the disease, so progress here is a matter of sustained collective effort across many datasets rather than something a single student with a laptop resolves in a season. What this project can do is show precisely why the effort is worth it and exactly where the returns would come from, which is a contribution of a different and arguably more durable kind than a marginally higher number.

17.2Cardiological review

The second next step is the one I am most eager to see through, because there are specific clinical judgments this project has deliberately left open, and only a cardiologist can close them. Throughout, the uncertain PTB-XL labels have been kept and flagged rather than deleted, and two sets of tracings in particular are waiting for an expert eye: the recordings the system flags as suspect that the source corpus itself codes as pre-excited, which my strict definition counted as false alarms, and the missed cases that carry a QRS-deforming comorbidity. Whether a given doubtful tracing is a genuine pre-excitation, a mislabel, or a masked case is a clinical call, and it is not mine to make.

So the plan is cardiological review of those subsets, tracing by tracing, by someone qualified to adjudicate them. This is not a cosmetic step. It would settle whether the false alarms coded as pre-excitation are really positives my definition missed, which would raise the reported precision rather than lower it; it would tighten the estimate of the genuinely irreducible floor, which the current analysis places at only a couple of cases; and it would replace, on exactly the tracings where it matters, an automated label with a human judgment. I am careful here not to smuggle back a claim the data already rejected: the error analysis showed that uncertain labels are not concentrated among the misses, so the review's value is not to rescue that hypothesis but to adjudicate the specific cases the analysis surfaced. It is the difference between saying this is probably what is going on and being able to say a cardiologist reviewed these and here is what they found, and that difference is exactly the kind of rigor the rest of the project has tried to earn.

17.3Toward prospective

The furthest step, and the one that separates a study from a tool, is prospective evaluation. Everything on this page is retrospective, measured on data that already existed, and I have been careful to say so at every turn. The honest way to close the gap between what this project demonstrates and what a clinical instrument would require is to run the system forward, on new recordings, in a real screening setting, and measure what it actually catches and misses in practice rather than in archive.

That step carries requirements this project has deliberately not met, and naming them is part of taking the idea seriously rather than gesturing at it. A prospective evaluation would need per-site recalibration, because the cross-corpus experiments proved that score scales do not transfer between acquisition environments, so each new site would have to establish its own reference distribution before the ranks meant anything locally. It would need prospective labeling with clinical confirmation, so that the ground truth is not inherited from an automated reader. And it would need the oversight appropriate to anything that touches real patients, which is a threshold well beyond what a public research demonstration occupies. I list these not as a roadmap I am promising to complete alone, but as an honest statement of the distance between here and clinical use, so that no one mistakes a rigorous retrospective study for the thing it is a step toward. The full future-work discussion is in the paper.

18.Go deeper

18.1The interactive demo

If you have read this far, the most rewarding next click is the one that lets you see the whole thing work. The demo runs the exact frozen, conformity-tested engine described on this page against real, held-out ECGs, and returns the suspicion rank, the annotated twelve-lead tracing with the delta region marked, and a plain account of what drove the score. It is the claims of this page made touchable: not an illustration of the system, but the system itself, small enough to fit in a browser and honest enough to tell you when it is unsure.

18.2The full paper

Everything on this page is the readable version of a complete technical account, and where I have compressed, summarized, or pointed forward, the paper carries the full thing. Every table, every confidence interval, every control, every figure at full resolution, and the complete reasoning behind each choice lives there, written for a technical reader who wants to check the work rather than take it on trust. If a number on this page made you want to see how it was derived, that is where the derivation is.

18.3The repository and decision log

The strongest claim this project makes is that nothing rests on my word, and the repository is what backs that claim. It holds the frozen model artifacts, the out-of-fold and held-out scores, the per-model evaluation metrics, the interpretability outputs, and, most tellingly, a detailed decision log that records every design choice against the alternative it was chosen over. The dependency stack is pinned and the paths are repository-relative, so the pipeline runs the same on your machine as on mine. If you want to know not just what I decided but why, and what I rejected to get there, the decision log is the honest center of the whole project.

18.4Contact

I built this as a student, alone, and I am genuinely glad to hear from anyone it reaches, whether you are a clinician who can tell me where the physiology is off, a researcher with data that could grow the scarce positive class, or simply a person who found the story worth their time. Corrections make the work better, and collaborations make it possible to go further. The contact details are on the site, and the door is open.

18.5Conclusion

This project began with a delta wave on a child's electrocardiogram, mine, and it ends with a careful account of how hard that same delta wave is to catch in everyone else. Between those two points sits a single, stubborn finding, arrived at from five directions and confirmed by a rising learning curve: at this scale, the limit on detecting Wolff-Parkinson-White is not the cleverness of the model but the number of real, well-labeled examples the world has made available. Seven representations, a deep network, and the current frontier of transfer learning all ran into the same ceiling, and the ceiling turned out to be made of data, not algorithm.

I have tried to make that finding trustworthy rather than merely impressive, and the two are not the same. The value of this project, if it has any, is not that it detects WPW better than what came before, though its discrimination is at or above the published bar. It is that every number is honest: the split is patient-disjoint, the test fold was touched once, the null collapses to chance, the limitations are named at full length, and the output is a rank of suspicion rather than a false promise of certainty. The failures are documented beside the successes, the doubtful labels were kept rather than quietly deleted, and the one imperfection in the engine is measured to the tenth of a point rather than hidden.

What lifts it out of being only a technical exercise, for me, is where it points. The bottleneck is data, and behind the data are children, sitting where I once sat, whose hearts hide a pattern no one has caught yet. This tool will not replace the cardiologists who catch it, and it does not pretend to. But it can help flag the tracings that deserve a closer human look, and it can show, precisely and reproducibly, what it would take to do that better. If it does even that, and if the fundraiser attached to it returns something to the hospital that took care of me, then the loop that started before I could understand it will have closed in the best way I know how to close it. Thank you for reading.