AWS Public Sector Blog

Helping prevent sudden cardiac arrest in young athletes with AI

On the morning of November 30, 2007, Rafe Maccarone laid on the grass to catch his breath between warmup runs during school soccer practice. As the rest of his team stretched and recovered, Rafe stayed down. When the team realized Rafe was unconscious, they rushed to his side—but it was too late. Rafe had a deadly undetected heart condition and sudden cardiac arrest was his first symptom. Rafe passed away on December 1, 2007, only a few days before his 16th birthday.

Sudden cardiac arrest (SCA) is the number one cause of death for student athletes and the leading cause of death on school campuses. Each year, thousands of seemingly healthy students die unexpectedly from undetected heart conditions that increased their risk for SCA.

To honor Rafe’s memory and to prevent this tragedy from occurring for other young athletes, a group of Rafe’s teammates founded the nonprofit Who We Play For (WWPF). WWPF advocates for SCA prevention through automated external defibrillator (AED) placement, cardiopulmonary resuscitation (CPR) training, and heart screenings, which include low-cost electrocardiogram (ECG) screenings from physicians that are experts in pediatric ECG interpretation. ECGs are the most effective tool to identify youth at risk for SCA, identifying up to 95% of deadly heart conditions. To date, WWPF has partnered with over 500 athletic programs across the US, resulting in over 200,000 young athletes being screened for SCA and saving hundreds of lives.

Despite this success, the WWPF team identified a limitation in their ability to scale this program further. While ECGs have proven effective for identifying SCA and are widely used in other countries for that purpose, only a small number of medical professionals are comfortable interpreting pediatric screening ECGs in the US; even fewer are experts at identifying underlying conditions that could result in SCA for pediatric patients. This lack of availability to interpret ECG results means fewer young people can get the life saving information they may need. But could a machine learning (ML) model be trained to interpret these results instead?

That was the question WWPF wanted to answer. WWPF collaborated with Amazon Web Services (AWS) to build a scalable ML solution to help extend the chance to get screened for SCA to every young person, scaling their efforts, and potentially saving many lives each year.

Working with AWS through the Health Equity Initiative

WWPF began collaborating with AWS through the Health Equity Initiative, a program through which AWS has committed $40 million to provide compute credits and technical expertise to enhance healthcare outcomes for underserved and underrepresented communities. As a part of the program, AWS provided WWPF with AWS Promotional Credit and technical support from the AWS Professional Services (AWS ProServe) team to help them achieve their vision.

WWPF wanted to build a screening tool that could read standard ECG printed reports to help physicians unfamiliar with interpreting pediatric ECG’s to identify risk signs of SCA without requiring additional equipment or direct connection to ECG machines. AWS ProServe connected WWPF with a team of data scientists who collaborated with WWPF’s technologists and expert pediatric cardiologists to understand the ECG screening processes. This team created a first-of-its-kind ML solution capable of identifying SCA risk in pediatric screening ECGs.

Building a machine learning model for SCA risk prediction

AWS and WWPF worked to refine the idea and developed a novel two-stage ML solution leveraging the power of Amazon SageMaker. First, the ECG traces were “digitized” by extracting the traces from images of ECG reports using traditional computer vision approaches. Second, they built a deep learning model to process the extracted traces to identify the risk indicators of SCA. This solution allowed WWPF to maximize experimentation and model performance while minimizing cost, supporting them to achieve their mission of scaling this solution to as many young athletes as possible in the US and globally.

The following diagram (Figure 1) showcases the solution developed by the WWPF and the AWS team.

Figure 1. Architectural diagram for the pediatric SCA model development environment, explained in more detail in the following section.

The solution developed by the team started with a data lake for the ECG data for the full ECG images and digitized traces on Amazon Simple Storage Service (Amazon S3). The team used a SageMaker processing job to apply the digitization process in bulk to extract the ECG traces from the ECG documents. With the data in place, the team developed a SCA deep learning model by using the SageMaker PyTorch SDK and using AWS Deep Learning Containers to enable rapid experimentation with minimal overhead to manage. The team integrated this model with SageMaker Serverless Inference to support a cost-optimized and scalable solution when deployed. The team measured model performance with Sensitivity and Specificity metrics, measuring the model’s accuracy identifying high and low SCA risk ECGs respectively. Through their modelling efforts, the team produced a deep learning model with Sensitivity and Specificity of 78 and 90 percent respectively, approaching human skill level for pediatric ECG review.

To further improve the SCA ML model, the team created a pipeline for WWPF cardiologists to review predictions from the model with Amazon Augmented AI (Amazon A2I). With this tool, WWPF expert pediatric electrophysiologists and cardiologists reviewed the model’s predictions, providing critical feedback to the model development team. After leveraging Amazon A2I to review the predictions by the model and improving the model based on WWPF’s medical observations, the AWS and WWPF team achieved Sensitivity and Specificity of over 93 percent, exceeding human level performance. With these results, the WWPF team is one large step closer to providing every young athlete the chance to be screened for SCA using an ECG and prevent thousands of deaths a year in the US alone.

Looking ahead to next steps for WWPF and the SCA ML model

The results of the pediatric SCA interpretation model powered by ML exceeded expectations. WWPF is working to further improve the model’s performance to bring this tool to medical offices in the US and globally. The WWPF team is working with partner institutions to gather even more ECG data to expand their data lake to enable additional improvement of the risk prediction model and better represent various underlying heart conditions. The WWPF team is also looking to expand its use of Amazon A2I to further augment the capabilities of the model by fully leveraging the partnership between AI and human subject matter experts to achieve results at unprecedented scale and accuracy. Lastly, future work will leverage the two-stage design of the solution to explore how the direct trace feeds from ECG machines and the latest generation of FDA approved ECG sensors on some smart watches can be leveraged to detect risk signs of SCA more accurately and earlier.

Learn more about the AWS Health Equity Initiative

The AWS Health Equity Initiative supports applications that leverage the power of the cloud to develop culturally responsive solutions to increase access to health services; reduce disparities by addressing social determinants of health; leverage data to promote equitable and inclusive systems of care; and advance equity in diagnostics and screening. Learn more about how AWS supports nonprofits at the AWS for Nonprofits hub.

Read related resources and stories:


Subscribe to the AWS Public Sector Blog newsletter to get the latest in AWS tools, solutions, and innovations from the public sector delivered to your inbox, or contact us.

Please take a few minutes to share insights regarding your experience with the AWS Public Sector Blog in this survey, and we’ll use feedback from the survey to create more content aligned with the preferences of our readers.

Mason Inder

Mason Inder

Mason Inder is a senior data scientist and computer vision/remote sensing domain lead with Amazon Web Services (AWS) Professional Services. He specializes in developing machine learning solutions for customers' computer vision needs across a number of domains in the public sector. In his spare time, he enjoys building PCs and 3D printing.

Inchara B Diwakar

Inchara B Diwakar

Inchara B Diwakar is a senior data scientist at Amazon Web Services (AWS). She works in the public sector team on a range of healthcare problems with a focus on data and machine learning (ML). She has particular interest in ML that improves patient outcomes, addresses care gaps, and develops diagnostic solutions. Outside of work, she enjoys the outdoors, traveling, and a good read.