Pulmonary hypertension (PH) is a life-threatening disease that is typically detected after significant
pulmonary vascular remodeling has occurred. Longer diagnostic delays are associated with higher mortality and
there is a need for a simple, fast, non-invasive PH screening tool. Currently, electrocardiograms often only
identify abnormalities in severe PH. However, deep learning-based algorithms may enable detection of early,
subtle, disease-specific changes, and could allow this inexpensive and ubiquitous test to serve as a powerful
screening tool for PH. We used convolutional neural networks (CNN) to develop an algorithm for PH
using retrospective electrocardiogram voltage-time data from Mayo Clinic. Each standard 12-lead
electrocardiogram was paired with right heart catheterization to define patients as PH or non-PH, and the non-
PH group was supplemented with patients in whom PH was excluded by echocardiogram. PH was defined as
mean pulmonary arterial pressure (mPAP) ≥25 mmHg (at rest or during drug or exercise challenge), and non-PH
was defined as mPAP <21 mmHg or tricuspid regurgitation velocity ≤2.8 m/s, if mPAP was not available. All
patients were then randomly partitioned into training (48%), validation (12%) and test sets (40%) for building,
optimizing and testing the models, respectively. Models were trained using electrocardiograms performed within
1 month of PH diagnosis (diagnostic dataset) and performance was tested on the diagnostic dataset and on
electrocardiograms from 6-18 months (pre-emptive dataset) and 36-60 months before diagnosis. Model
performance was evaluated by calculating the area under the curve (AUC) of the receiver operating
characteristic curve, sensitivity, specificity, and diagnostic odds ratios. In total, 56,612 unique patients
were identified: 11,138 PH and 45,474 non-PH patients. Several model structures were tested, and the best
performing were CNNs with residual connections incorporating the 12-lead voltage-time electrocardiogram data.
The final model yielded an AUC, sensitivity and specificity, respectively, of 0.91, 83.5%, and 83.6% in the
diagnostic test set and 0.86, 77.8% and 78.3% in the pre-emptive dataset (Table). AUC remained above 0.81 for
detection of PH using electrocardiograms from 6-monthly intervals up to 5 years before diagnosis. Among the
PH patients, 2,134 patients had pre-capillary PH, which includes some progressive but potentially treatable forms
of PH, and AUC was 0.95 for detection of PH in this diagnostic dataset. The electrocardiogram
algorithm was able to detect PH up to 5 years prior to diagnosis. This type of algorithm has the potential to
accelerate diagnosis and management of PH.


