AWS for Industries

Bayer Improves Patient Safety through an AI-Powered Adverse Event Detection System Using Amazon SageMaker

See how life science company Bayer built a quick, innovative, and secure adverse event detection platform using Amazon SageMaker to significantly streamline manual review processes

This blog is guest-authored by: Marian Klug, Head of Systems Management and Analytics, Bayer; Anton Boger, PV Platform Specialist, Bayer; and Theresa Schmitt, Data Scientist, Bayer


Humans vary in their biological reactions to medicines. Sometimes, drugs can cause unintended outcomes, or adverse events (AE). The ability to capture and report AEs is paramount to drug safety and patient health.

As a leading global life science company, Bayer holds patient safety as one of its core values, and it adheres to stringent regulations for pharmacovigilance (PV)—monitoring the safety profile of a drug and detecting, assessing, understanding, and preventing AEs. This process of AE reporting can be challenging, time-consuming, and labor intensive. PV teams at Bayer comb through enormous pools of information in search of potentially harmful drug reactions, which they then report to appropriate authorities to help improve health and keep patients safe.

To support efficient post-marketing drug-safety surveillance, Bayer built an AE-detection engine on Amazon Web Services (AWS), using state-of-the-art technologies as part of its ongoing journey to modernize operations. The AE solution uses Amazon SageMaker, which lets organizations build, train, and deploy machine learning (ML) models for any use case with fully managed infrastructure, tools, and workflows. By using artificial intelligence to streamline and standardize AE reporting, Bayer hopes to reduce the manual effort needed for AE reporting while protecting patient information and helping to meet the larger goal of improving patient safety.

Using Amazon SageMaker to Automate Adverse Event Detection for Bayer

Bayer is responsible for monitoring its products once they enter the market and reporting AEs—often within 24 hours of discovery—to regulatory bodies worldwide. Each year, the company handles hundreds of thousands of AE reports through telephone, email, its customer relationship management system, and other channels. Often, the data is in free-text format, lacks structure, and comes through channels that are not specifically designated for AE reporting. “We’re obligated to scan all inflowing data in case there’s an adverse event,” says Marian Klug, head of systems management for Bayer’s PV team. “The process of combing through this inflowing data is time-consuming and labor intensive—it’s the challenge of finding the needle in the haystack.”

While traditional methods of AE reporting can be effective, they typically rely on a high level of manual involvement. Additionally, traditional rule-based approaches such as keyword searches tend to result in false positives. For example, one group scanned 10,000 records daily for keywords that might indicate an AE, from which up to 800 instances required a deeper dive. “We wanted to automate the process and address these very labor-intensive activities in an intelligent way,” says Klug.

Demonstrating Promise in Reducing Manual Efforts Involved with Adverse Event Detection

Using AWS, the preferred cloud provider of Bayer’s pharmaceuticals division, Bayer’s cross-functional team built a centralized, harmonized AE-detection engine that uses ML to streamline the process of identifying a possible AE, understanding relevant information for that AE, and using the results to fulfill reporting requirements. The engine funnels data from disparate sources, scaling to accommodate variable influxes as needed, to provide help and support with decision-making for consumers, healthcare professionals, and Bayer’s PV team. It uses Amazon SageMaker to train ML models on high-quality internal data, adjusting to the specific requirements around compliance with good practice guidelines and regulations (GxP).

The solution securely stores protected health data for training and validation using Amazon Simple Storage Service (Amazon S3), an object storage service offering industry-leading scalability, data availability, security, and performance. Bayer benefits from Amazon S3 features such as data encryption at rest and in transit, access control mechanisms, and data life cycle management.

“AWS gives us the flexibility we need for developing, hosting, and maintaining applications of this scale,” says Anton Boger, PV platform specialist and IT lead for AE detection engine. “Its very clear positioning and expertise in compliance and GxP-relevant systems makes a difference. On AWS, our servers are GxP compliant, so we just have to validate the application on top.”

The AE-reporting engine features two endpoints: one that runs batch inference with high throughput and a client system that focuses on low latency. The client system runs near real-time inference through APIs that can be called by multiple systems without custom integration. It responds on average within 170 milliseconds to situations that require immediate feedback, such as chatbots. The batch inference option processes many files synchronously at significantly reduced processing time, eliminating undifferentiated heavy lifting so that users focus only on what’s relevant. Users visualize retrieved data through a dashboard powered by Amazon QuickSight, which empowers data-driven organizations with unified business intelligence at hyperscale.

The AE-detection engine uses Amazon Elastic Container Service (Amazon ECS), a service for running highly secure, reliable, and scalable containers. Amazon ECS container images are stored and accessed through Amazon Elastic Container Registry (Amazon ECR), a fully managed container registry offering high-performance hosting.

“What makes this use case unique is that we’re experimenting with machine learning and artificial intelligence on a GxP-validated system to pioneer care, meeting all compliance requirements for data processing and storage,” says Theresa Schmitt, data scientist at Bayer.

Today, the engine is helping the company reduce the number of false positives and save significant time that had been spent on manual processes such as the review of individual cases. It is also helping Bayer standardize and optimize PV processes across multiple channels and geographies, driving consistency. “This is the big change,” says Klug. “Compared with many, many people involved in the manual process, it’s much more harmonized with one centralized engine.”

Reimagining Adverse Event Reporting on AWS

Bayer continues to improve the accuracy of its model through training on Amazon SageMaker, add more use cases to the engine, and simplify its integration with client systems to streamline reporting. “We’re building brand value by detecting AEs in a scalable way,” says Schmitt. “Using our automatized solution on AWS, we’re paving the way for new channels to be integrated for better patient safety.” For example, Bayer is looking to add image recognition, speech detection, and social media channels to the AE-detection engine.

“We are pioneers,” says Boger. “We’re bringing two worlds together: the cloud and pharmaceuticals. This project shows what’s possible. It will lead to more initiatives that take advantage of the scalability, availability, and robustness of AWS.”


Visit our website to learn more about AWS, the cloud for life sciences.

Oiendrilla Das

Oiendrilla Das

Oiendrilla Das is Customer Advocacy Lead for Life Sciences and Genomics Marketing for AWS. She comes from a background in life sciences marketing, with a specialty focus on life sciences and cloud computing. Oiendrilla holds an MBA degree in marketing and completed her engineering in Biotechnology prior to her MBA degree.

Anton Boger

Anton Boger

Anton Boger is the PV Platform Specialist and IT lead for AE Detection Engine at Bayer.

Marian Klug

Marian Klug

Marian Klug is the Head of Systems and Analytics for Bayer’s Pharmacovigilance team.

Theresa Schmitt

Theresa Schmitt

Theresa Schmitt is a Data Scientist at Bayer.