Aims: Incorporation of sex in study design can lead to discoveries in medical research. Deep neural networks (DNNs) accurately predict sex based on the electrocardiogram (ECG) and we hypothesized that misclassification of sex is an important predictor for mortality. Therefore, we first developed and validated a DNN that classified sex based on the ECG and investigated the outcome. Second, we studied ECG drivers of DNN-classified sex and mortality.
Methods and results: A DNN was trained to classify sex based on 131 673 normal ECGs. The algorithm was validated on internal (68 500 ECGs) and external data sets (3303 and 4457 ECGs). The survival of sex (mis)classified groups was investigated using time-to-event analysis and sex-stratified mediation analysis of ECG features. The DNN successfully distinguished female from male ECGs {internal validation: area under the curve (AUC) 0.96 [95% confidence interval (CI): 0.96, 0.97]; external validations: AUC 0.89 (95% CI: 0.88, 0.90), 0.94 (95% CI: 0.93, 0.94)}. Sex-misclassified individuals (11%) had a 1.4 times higher mortality risk compared with correctly classified peers. The ventricular rate was the strongest mediating ECG variable (41%, 95% CI: 31%, 56%) in males, while the maximum amplitude of the ST segment was strongest in females (18%, 95% CI: 11%, 39%). Short QRS duration was associated with higher mortality risk.
Conclusion: Deep neural networks accurately classify sex based on ECGs. While the proportion of ECG-based sex misclassifications is low, it is an interesting biomarker. Investigation of the causal pathway between misclassification and mortality uncovered new ECG features that might be associated with mortality. Increased emphasis on sex as a biological variable in artificial intelligence is warranted.
Keywords: Artificial intelligence; Electrocardiography; Neural network; Sex differences.
© The Author(s) 2022. Published by Oxford University Press on behalf of European Society of Cardiology.