This article is co-authored by Mark Thompson, a Data Scientist at Genworth Mortgage Insurance Australia Limited. Genworth Mortgage Insurance Australia Limited is a prominent provider of lenders mortgage insurance (LMI) in Australia, listed on the Australian Stock Exchange under ASX: GMA. With over five decades of experience, Genworth has amassed extensive data, including insights into the relationships between mortgage repayment behaviors and insurance claims. The organization aimed to leverage this historical data to train machine learning (ML) models for Predictive Analytics for Loss Mitigation (PALM). By utilizing these ML models, Genworth could analyze recent repayment trends for each insurance policy, ranking them based on the likelihood of claims and the potential financial impact. The goal was to execute batch inference on the ML models in parallel and on a schedule, while minimizing operational efforts. Consequently, Genworth and AWS opted for Amazon SageMaker’s batch transform jobs alongside serverless components to ingest and transform data, conduct ML inference, and process the analytical results.
Genworth’s Advanced Analytics team participated in the AWS Data Lab program, collaborating with AWS engineers and solutions architects. During the pre-lab phase, they designed a solution architecture tailored to Genworth’s specific requirements, especially regarding security controls, reflective of the financial services sector. Following approval of the architecture and identification of AWS components, training needs were assessed. AWS Solutions Architects facilitated a series of hands-on workshops to equip Genworth’s builders with the skills necessary to construct the new solution. In a concentrated four-day effort, termed the build phase, the Advanced Analytics team utilized the agreed architecture and insights to create an ML pipeline tailored to their functional specifications. The resulting pipeline is fully automated and serverless, eliminating maintenance, scaling challenges, or downtime. Subsequent activities focused on productizing the pipeline, establishing it as a template for other ML applications.
In this article, we (the combined team from Genworth and AWS Architects) will detail our approach to designing and implementing this solution, the best practices we adhered to, the AWS services utilized, and the core components of the solution architecture.
Solution Overview
We adopted a contemporary ML pipeline framework to implement a PALM solution for Genworth. This framework enables data ingestion from diverse sources, followed by transformation, enrichment, and cleansing of the data, culminating in ML prediction steps, with results made accessible for use, whether or not data wrangling of the output is necessary.
In essence, the implemented solution comprises three primary components:
- Data ingestion and preparation
- ML batch inference utilizing three custom-developed ML models
- Data post-processing and publishing for consumption
Below is the architecture diagram of the executed solution.
Let’s delve deeper into the three components.
Component 1: Data Ingestion and Preparation
Genworth’s source data is published weekly to a staging table within their Oracle on-premises database. The ML pipeline initiates with an AWS Glue job (Step 1, Data Ingestion, in the diagram) that connects to the Oracle database via a secure AWS Direct Connect connection with VPN, ingesting raw data and storing it in an encrypted Amazon Simple Storage Service (Amazon S3) bucket. Subsequently, a Python shell job is executed using AWS Glue (Step 2, Data Preparation) to select, cleanse, and transform the features utilized in later ML inference steps. The results are saved in another encrypted S3 bucket designated for curated datasets prepared for ML use.
Component 2: ML Batch Inference
Genworth’s Advanced Analytics team had previously utilized ML on-premises and sought to repurpose pretrained model artifacts to establish a fully automated ML inference pipeline on AWS. Furthermore, the team aimed to create an architectural pattern for future ML experiments and implementations, facilitating rapid iteration and testing of ideas in a controlled setting.
The three existing ML artifacts forming the PALM model were constructed as a hierarchical TensorFlow neural network model using Keras. These models aim to predict the likelihood of an insurance policy filing a claim, the anticipated probability of a claim being paid, and the potential size of that claim.
As each ML model is trained on distinct datasets, the input data must be standardized accordingly. Individual AWS Glue Python shell jobs handle this data standardization for each model. The three ML models are invoked in parallel via SageMaker batch transform jobs (Step 3, ML Batch Prediction) to carry out the ML inference and save the prediction results in the model outputs S3 bucket. SageMaker batch transform oversees the computing resources, installs the ML model, manages data transfer between Amazon S3 and the ML model, and scales seamlessly to perform inference on the entire dataset.
Component 3: Data Post-Processing and Publishing
Prior to making the prediction results from the three ML models available for use, a series of post-processing steps are required, executed through AWS Glue Python shell jobs. The results are aggregated and scored (Step 4, PALM Scoring), business rules are applied (Step 5, Business Rules), files are generated (Step 6, User Files Generation), and the data within these files is validated (Step 7, Validation) before the output is published back to a table in the on-premises Oracle database (Step 8, Delivering the Results). The solution utilizes Amazon Simple Notification Service (Amazon SNS) and Amazon CloudWatch Events to alert users via email when new data is accessible or if issues arise (Step 10, Alerts & Notifications).
Each step in the ML pipeline is decoupled and orchestrated using AWS Step Functions, enabling Genworth to streamline implementation, focus on business logic instead of infrastructure, and maintain the flexibility needed for future experiments and additional ML applications. The following diagram illustrates the orchestration of the ML pipeline using a Step Functions state machine.
Business Benefits and Future Directions
By establishing a modern ML platform, Genworth successfully automated an end-to-end ML inference process that ingests data from an on-premises Oracle database, performs ML operations, and supports data-driven decision-making. Machine learning has enabled Genworth to simplify high-value manual tasks traditionally undertaken by the Loss Mitigation team.
This Data Lab engagement has underscored the significance of providing contemporary ML and analytics tools to organizational teams. Witnessing the rapid pilot of an idea, with the potential for successful production, has been a remarkable experience.
This blog demonstrates how straightforward it is to create a serverless ML pipeline at scale using AWS Data Analytics and ML services. As discussed, AWS Glue serves as a serverless, managed ETL processing job, while SageMaker addresses all your ML requirements. Explore more in another blog post to keep the reader engaged, found here. For authoritative insights on this topic, check out this resource as they are an authority on this topic. Additionally, if you’re curious about the onboarding process at Amazon, this resource is an excellent resource.
Location: Amazon IXD – VGT2, 6401 E Howdy Wells Ave, Las Vegas, NV 89115.
Leave a Reply