SlideShare a Scribd company logo
AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (December 2019)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Deep learning applications using TensorFlow,
featuring Fannie Mae
A I M 4 1 0 - R 1
Julien Simon
Global Evangelist AI/ML
Amazon Web Services
Bin Lu
Senior Director of Risk
Modeling & Analytics
Fannie Mae
Vindhan Sahayam
Lead Architect
Fannie Mae
Agenda
TensorFlow on AWS
Customer case study: Fannie Mae
Demo: TensorFlow on Amazon SageMaker
Getting started
TensorFlow
https://www.tensorflow.org
• Main API in Python, with support for Javascript, Java, C++
• TensorFlow 1.x: symbolic execution
• ‘Define then run’: build a graph, optimize it, feed data, and compute
• Low-level API: variables, placeholders, tensor operations
• High-level API: tf.estimator.*
• Keras library: Sequential and Functional API, predefined layers
• TensorFlow 2.0: imperative execution (aka eager execution)
• ‘Define by run’: normal Python code, similar to numpy
• Run it, inspect it, debug it
• Keras is the preferred API
AWS: The platform of choice for TensorFlow
https://aws.amazon.com/tensorflow/
85% of all
TensorFlow workloads
in the cloud run on
AWS
89% of all deep
learning workloads in
the cloud run on AWS
TensorFlow: a first-class citizen on Amazon SageMaker
• Built-in TensorFlow containers for training and prediction
• Code available on Github: https://github.com/aws/sagemaker-tensorflow-containers
• Build it, run it on your own machine, customize it, etc.
• Versions : 1.4.1  1.15 (2.0 coming soon)
• Not just TensorFlow
• Standard tools: TensorBoard, TensorFlow Serving
• SageMaker features: Local Mode, Script Mode, Model Tuning, Spot Training, Pipe Mode,
Amazon EFS & Amazon FSx for Lustre, Amazon Elastic Inference, etc.
• Performance optimizations: GPUs and CPUs (AWS, Intel MKL-DNN library)
• Distributed training: Parameter Server and Horovod
Amazon SageMaker
re:Invent 2019 announcements
SageMaker Studio
SageMaker Notebooks
(preview)
SageMaker Debugger
SageMaker Experiments
SageMaker
Model Monitor
SageMaker Autopilot
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Bin Lu
Senior Director of Risk Modeling and Analytics
Fannie Mae
Vindhan Sahayam
Lead Architect
Fannie Mae
Fannie Mae is a leading source of financing for
mortgage lenders
• Provide access to affordable mortgage financing in all markets at all times
• Effectively manage and reduce risk to our business, taxpayers, and the housing
finance system
Accurate property valuation reduces mortgage
risk
It is used in all stages of the loan lifecycle:
• Origination and underwriting, where a
lender determines whether a borrower's
loan application is an acceptable risk
• Post-purchase quality control
• Portfolio risk management, financial
reporting, and regulatory reporting
• Loss mitigation
Fannie Mae credit portfolio is ~$3 trillion
Mortgage lifecycle
Origination
Servicing
Securitization
Foreclosure
Machine learning example: Property valuation
Property appraisal by certified/licensed appraiser
• Quantitative valuation based on comparable property sale
prices and market trends
• Adjustments for unobservable inputs
Fannie Mae is leveraging machine learning
• Automated home price valuation model based on observables
(XGBoost, KNN)
• Automated review of the adjustment based on visual
inspection (TensorFlow – CNN)
Fannie Mae receives ~40,000 appraisal reports,
with 500,000+ property images every day
Technology challenges in machine learning
Limited
CPU/GPU
resources to
train and run
models
No streamlined
approach for
model
development
Process of
packaging and
hosting models is
complex and time
consuming
Difficult to
connect machine
learning and
analytics tools to
data
Amazon SageMaker fits our needs
• Flexible and self-
service machine
learning platform
• Easy access to
compute resources
and data
• Streamlined model
training and
deployment
• Built-in governance
procedure and audit
trail
Automated property image classification
Three multi-layer convolutional neural network
models with transferred learning
1st layer
fixes image
orientation
2nd layer
identifies
room type
3rd layer
predicts
marketability
score
Benefits of Amazon SageMaker
Effective cost management
• Never pay for idle; the cost is based on actual vCPU/GPU usage, not the
maximum processing capacity of the infrastructure
• Designed to enable performance improvement at zero cost
Rapid time to market
• Instant access to dedicated computing resources
• Ability to focus on business needs; no server to manage and no complex code
to write for distributed model training, hyperparameter tuning, or model
deployment
AWS breadth and depth
• Streamlined integration with big data analytics platform
• Automated version controls, governance, audit trails, and secured workload
• Business resiliency
Consideration for provisioning Amazon SageMaker
Implementation of governance is as important as developing business capabilities
• InfoSec risk management
• Data governance
• Model governance
• Technology risk management
Establish guiding principles at the start
• Technology and software
• Models and analytics
Consider data gravity
• Co-locate machine learning platform with data sources
We engaged with the Amazon SageMaker team early
A special shout-out to the Fannie Mae Digital Incubator team for
developing the property image classification machine learning model:
Hamid Reza Khakpour, Timur Fatykhov, and Felix Meale
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Three very important goals
Realistic to achieve all the above with a fully-managed service such as Amazon SageMaker?
+ Non-negotiable data security
+ Self-service access
+ End-to-end governance with traceability
Given these conditions …
• Amazon SageMaker infrastructure is deployed in AWS-managed, multi-
tenant VPCs and subnets
• Data scientists work with highly sensitive data using powerful dev tools
How do we keep data absolutely secure?
Private subnet
Keeping data secure: Harden network security
Fannie Mae VPC Amazon VPC
AWS Cloud
Amazon
SageMaker
notebook
Amazon S3
Security group
ENI
AWS KMS
AWS
CodeCommit
Amazon
ECR
Amazon
SageMaker
Amazon
SageMaker
training
Amazon
SageMaker
hosting
ENI
ENI
S3 gateway
endpoint
Endpoint subnet
Interface VPC endpoints
Security group
+ How do we prevent
data exfiltration?
+ How do we avoid
exposure to internet?
Interface endpoint enforcement: Example
{
"Effect": "Allow",
"Action": "sagemaker:CreatePresignedNotebookInstanceUrl",
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:SourceVpce": "vpce-x"
}
}
}
{
"Effect": ”Allow",
"Action": "sagemaker:CreatePresignedNotebookInstanceUrl",
"Resource": "*"
"Principal": "*",
"Condition": {
"IpAddress": {
"aws:VpcSourceIp": [
"x.x.x.x/a",
"y.y.y.y/b"
]
}
}
}
Interface endpoint policy
Identity policy
Keeping data secure: Encrypt everywhere
Use customer managed CMK for volumes and S3 encryption
Enable Amazon S3 default encryption. Additionally use deny policies to prevent unencrypted uploads
With the greater flexibility of self-service access …
• How do we ensure users comply with security controls?
• How do we ensure users do not step into each other?
Access controls enforcement: Examples
{
"Effect": "Allow",
"Action": "sagemaker:CreateTrainingJob" ,
"Resource": "arn:aws:sagemaker:x:x:*/app1-*",
"Condition": {
"StringEquals": {
"aws:RequestTag/CostCenter": "x",
"sagemaker:VolumeKmsKey": "arn:aws:kms:x:x:key/x"
},
"Bool": {
"sagemaker:InterContainerTrafficEncryption": "true",
"sagemaker:NetworkIsolation": "true"
},
"ForAllValues:StringEquals": {
"sagemaker:VpcSubnets": [
"subnet-a",
"subnet-b"
],
"sagemaker:VpcSecurityGroupIds": [
"sg-x",
"sg-y"
]
},
"Null": {
"sagemaker:VpcSubnets": "false"
}
}
}
{
"Effect": "Deny",
"Action": "sagemaker:CreatePresignedNotebookInstanceUrl",
"Resource": "*",
"Condition": {
"ForAllValues:StringNotEquals": {
"sagemaker:ResourceTag/creatorUserId": "${aws:userId}"
}
}
}
Network and encryption enforcement
Notebook access control
Enabling governance: Operating zones
Data
scientists
Train
&
test models
NPI
Amazon
SageMaker
notebooks
Non-NPI
Research zone
Controlled
code/model
migration
Production
Retrain
Deploy
Automated
process
Approve
models
Lambda
API Gateway
Application CI/CD
DevUATProd
Test
Deploy
API Gateway
Application
developers
AWS CodeCommit
Lambda
Application zone
Development
Create guardrails early: Establish zones to manage ML lifecycle
Machine learning orchestration with auditing: Example
Source
code
AWS
CodeCommit
Amazon S3
Dataset
Model
artifacts
AWS
CodeBuild
Lambda LambdaApproval
gate
Batch transformAWS
Lambda
AWS
CodePipeline
Deploy endpoint
AWS Cloud
Train
+ Reproducible and
reusable pipeline
+ Built-in audit
tracking capability
+ Other options:
AWS Step Functions,
Apache Airflow
Amazon DynamoDB
Model metadata for
audit tracking
Amazon
ECR
Create model
Fannie Mae’s Enterprise Data Lake (EDL) at a glance
Build machine learning capability with a fully functional data lake as a foundation
... and growing
100+ applications3,000+ datasets 500+ AWS Glue Data
Catalog databases
1,000+ users
Amazon SageMaker in EDL: Reference architecture
Amazon
QuickSight
Amazon ES
Amazon
Athena
Amazon S3
Encrypted
objects
Amazon EMR
Amazon
SageMaker
AWS Glue
metastore
Amazon
ECS
AWS Batch
AWS
Lambda
Corporate
data center
Data warehouses
RDBMS
File systems
Third-party data
ADFS
AWS Direct
Connect
Rest/CLI
Zscaler
Ingestion
AWS Step
Functions
Amazon
Redshift
Workflow ETL/Analytics/ML Data visualization
Enterprise data lake platform
Amazon
Kinesis
Auditing Security and governance Logging and monitoring
Platform built with 100% native AWS services => less integration challenges
Key takeaways
+ New IAM context keys are valuable
+ Restrict access to buckets, utilize S3 endpoint
policy
+ Amazon SageMaker has full support for
PrivateLink endpoints; Enabling and enforcing
those is crucial
+ Data is a first-class primitive in ML workflows;
keep track of data collection and preparation
+ Make predictions traceable to original training
record
+ Introduce segregation of duties; establish
operating zones
+ Leverage data lake pattern
Build a highly-secure, self-service & end-to-end traceable ML capability with Amazon SageMaker
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Bin Lu
Senior Director of Risk Modeling and Analytics
Fannie Mae
Vindhan Sahayam
Lead Architect
Fannie Mae
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
+ Script Mode
+ Managed Spot Training
+ Elastic Inference
Build, train, deploy machine learning models quickly at scale
SageMaker Studio IDE
Amazon SageMaker
Ground
Truth
Algorithms &
Frameworks
Quick-start
notebooks Experiments
Training &
Tuning
Deployment &
Hosting
Reinforcement
Learning
ML
Marketplace
Debugger Autopilot Monitoring
NEW!
NEW!
NEW!
NEW! NEW! NEW!
Neo
Amazon SageMaker
Getting started
http://aws.amazon.com/free
https://aws.amazon.com/tensorflow/
https://aws.amazon.com/sagemaker
https://github.com/aws/sagemaker-python-sdk
https://sagemaker.readthedocs.io/en/stable/using_tf.html
https://github.com/awslabs/amazon-sagemaker-examples
https://gitlab.com/juliensimon/dlnotebooks
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Julien Simon
Global Evangelist AI/ML
Amazon Web Services
Bin Lu
Senior Director of Risk
Modeling & Analytics
Fannie Mae
Vindhan Sahayam
Lead Architect
Fannie Mae
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

PDF
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
PDF
Building smart applications with AWS AI services (October 2019)
PPTX
Building Machine Learning Inference Pipelines at Scale (July 2019)
PPTX
Automate your Amazon SageMaker Workflows (July 2019)
PPTX
Scale Machine Learning from zero to millions of users (April 2020)
PPTX
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
PPTX
Build, train and deploy ML models with SageMaker (October 2019)
PDF
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
Building smart applications with AWS AI services (October 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)
Scale Machine Learning from zero to millions of users (April 2020)
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Build, train and deploy ML models with SageMaker (October 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)

What's hot (11)

PPTX
Deep Learning on Amazon Sagemaker (July 2019)
PPTX
Amazon SageMaker (December 2018)
PPTX
Building Machine Learning Models Automatically (June 2020)
PPTX
Optimize your Machine Learning Workloads on AWS (July 2019)
PDF
A pragmatic introduction to natural language processing models (October 2019)
PPTX
Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)
PDF
Speed up your Machine Learning workflows with build-in algorithms
PPTX
Adding Image and Video Analysis to your Applications (May 2018)
PDF
Machine Learning with Amazon SageMaker
PDF
Building serverless applications (April 2018)
PPTX
AWS re:Invent 2018 - AIM401 - Deep Learning using Tensorflow
Deep Learning on Amazon Sagemaker (July 2019)
Amazon SageMaker (December 2018)
Building Machine Learning Models Automatically (June 2020)
Optimize your Machine Learning Workloads on AWS (July 2019)
A pragmatic introduction to natural language processing models (October 2019)
Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)
Speed up your Machine Learning workflows with build-in algorithms
Adding Image and Video Analysis to your Applications (May 2018)
Machine Learning with Amazon SageMaker
Building serverless applications (April 2018)
AWS re:Invent 2018 - AIM401 - Deep Learning using Tensorflow
Ad

Similar to AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (December 2019) (20)

PDF
Ml ops on AWS
PPTX
AWS re:Invent 2018 - AIM401-R2 - Deep Learning Applications with Tensorflow
PDF
[AWS Techshift] Innovation and AI/ML Sagemaker Build-in 머신러닝 모델 활용 및 Marketpl...
PDF
Innovation Track AWS Cloud Experience Argentina - Democratizing Artificial In...
PDF
Amazon의 머신러닝 솔루션: Fraud Detection & Predictive Maintenance - 남궁영환 (AWS 데이터 사이...
PDF
20190206 AWS Black Belt Online Seminar Amazon SageMaker Basic Session
PPTX
Demystifying Machine Learning with AWS (ACD Mumbai)
PPTX
Where ml ai_heavy
PPTX
Uu 2019-05-08 - machine learning -alternative
PPTX
Intro to SageMaker
PDF
Mining Intelligent Insights: AI/ML for Financial Services
PPTX
WhereML a Serverless ML Powered Location Guessing Twitter Bot
PDF
Mcl345 re invent_sagemaker_dmbanga
PDF
Amazon SageMaker workshop
PDF
엔터프라이즈를 위한 머신러닝 그리고 AWS (김일호 솔루션즈 아키텍트, AWS) :: AWS Techforum 2018
PDF
AWS Cloud Experience CA: Democratizando la Inteligencia Artificial
PDF
Build, train and deploy ML models with Amazon SageMaker (May 2019)
PDF
AWS reinvent 2019 recap - Riyadh - AI And ML - Ahmed Raafat
PDF
Aws mining intelligent_insights_with_machine_learning_financial_services_e_book
PDF
Machine Learning Use Case - Agriculture
Ml ops on AWS
AWS re:Invent 2018 - AIM401-R2 - Deep Learning Applications with Tensorflow
[AWS Techshift] Innovation and AI/ML Sagemaker Build-in 머신러닝 모델 활용 및 Marketpl...
Innovation Track AWS Cloud Experience Argentina - Democratizing Artificial In...
Amazon의 머신러닝 솔루션: Fraud Detection & Predictive Maintenance - 남궁영환 (AWS 데이터 사이...
20190206 AWS Black Belt Online Seminar Amazon SageMaker Basic Session
Demystifying Machine Learning with AWS (ACD Mumbai)
Where ml ai_heavy
Uu 2019-05-08 - machine learning -alternative
Intro to SageMaker
Mining Intelligent Insights: AI/ML for Financial Services
WhereML a Serverless ML Powered Location Guessing Twitter Bot
Mcl345 re invent_sagemaker_dmbanga
Amazon SageMaker workshop
엔터프라이즈를 위한 머신러닝 그리고 AWS (김일호 솔루션즈 아키텍트, AWS) :: AWS Techforum 2018
AWS Cloud Experience CA: Democratizando la Inteligencia Artificial
Build, train and deploy ML models with Amazon SageMaker (May 2019)
AWS reinvent 2019 recap - Riyadh - AI And ML - Ahmed Raafat
Aws mining intelligent_insights_with_machine_learning_financial_services_e_book
Machine Learning Use Case - Agriculture
Ad

More from Julien SIMON (20)

PDF
Implementing high-quality and cost-effiient AI applications with small langua...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
PDF
Arcee AI - building and working with small language models (06/25)
PDF
deep_dive_multihead_latent_attention.pdf
PDF
Deep Dive: Model Distillation with DistillKit
PDF
Deep Dive: Parameter-Efficient Model Adaptation with LoRA and Spectrum
PDF
Building High-Quality Domain-Specific Models with Mergekit
PDF
Tailoring Small Language Models for Enterprise Use Cases
PDF
Tailoring Small Language Models for Enterprise Use Cases
PDF
Julien Simon - Deep Dive: Compiling Deep Learning Models
PDF
Tailoring Small Language Models for Enterprise Use Cases
PDF
Julien Simon - Deep Dive - Optimizing LLM Inference
PDF
Julien Simon - Deep Dive - Accelerating Models with Better Attention Layers
PDF
Julien Simon - Deep Dive - Quantizing LLMs
PDF
Julien Simon - Deep Dive - Model Merging
PDF
An introduction to computer vision with Hugging Face
PDF
Reinventing Deep Learning
 with Hugging Face Transformers
PDF
Building NLP applications with Transformers
PDF
Starting your AI/ML project right (May 2020)
Implementing high-quality and cost-effiient AI applications with small langua...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Trying to figure out MCP by actually building an app from scratch with open s...
Arcee AI - building and working with small language models (06/25)
deep_dive_multihead_latent_attention.pdf
Deep Dive: Model Distillation with DistillKit
Deep Dive: Parameter-Efficient Model Adaptation with LoRA and Spectrum
Building High-Quality Domain-Specific Models with Mergekit
Tailoring Small Language Models for Enterprise Use Cases
Tailoring Small Language Models for Enterprise Use Cases
Julien Simon - Deep Dive: Compiling Deep Learning Models
Tailoring Small Language Models for Enterprise Use Cases
Julien Simon - Deep Dive - Optimizing LLM Inference
Julien Simon - Deep Dive - Accelerating Models with Better Attention Layers
Julien Simon - Deep Dive - Quantizing LLMs
Julien Simon - Deep Dive - Model Merging
An introduction to computer vision with Hugging Face
Reinventing Deep Learning
 with Hugging Face Transformers
Building NLP applications with Transformers
Starting your AI/ML project right (May 2020)

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
Machine Learning_overview_presentation.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Mushroom cultivation and it's methods.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
SOPHOS-XG Firewall Administrator PPT.pptx
Machine Learning_overview_presentation.pptx
Network Security Unit 5.pdf for BCA BBA.
Diabetes mellitus diagnosis method based random forest with bat algorithm
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Mobile App Security Testing_ A Comprehensive Guide.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
Programs and apps: productivity, graphics, security and other tools
Spectral efficient network and resource selection model in 5G networks
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Group 1 Presentation -Planning and Decision Making .pptx
Unlocking AI with Model Context Protocol (MCP)
Per capita expenditure prediction using model stacking based on satellite ima...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Mushroom cultivation and it's methods.pdf

AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (December 2019)

  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Deep learning applications using TensorFlow, featuring Fannie Mae A I M 4 1 0 - R 1 Julien Simon Global Evangelist AI/ML Amazon Web Services Bin Lu Senior Director of Risk Modeling & Analytics Fannie Mae Vindhan Sahayam Lead Architect Fannie Mae
  • 3. Agenda TensorFlow on AWS Customer case study: Fannie Mae Demo: TensorFlow on Amazon SageMaker Getting started
  • 4. TensorFlow https://www.tensorflow.org • Main API in Python, with support for Javascript, Java, C++ • TensorFlow 1.x: symbolic execution • ‘Define then run’: build a graph, optimize it, feed data, and compute • Low-level API: variables, placeholders, tensor operations • High-level API: tf.estimator.* • Keras library: Sequential and Functional API, predefined layers • TensorFlow 2.0: imperative execution (aka eager execution) • ‘Define by run’: normal Python code, similar to numpy • Run it, inspect it, debug it • Keras is the preferred API
  • 5. AWS: The platform of choice for TensorFlow https://aws.amazon.com/tensorflow/ 85% of all TensorFlow workloads in the cloud run on AWS 89% of all deep learning workloads in the cloud run on AWS
  • 6. TensorFlow: a first-class citizen on Amazon SageMaker • Built-in TensorFlow containers for training and prediction • Code available on Github: https://github.com/aws/sagemaker-tensorflow-containers • Build it, run it on your own machine, customize it, etc. • Versions : 1.4.1  1.15 (2.0 coming soon) • Not just TensorFlow • Standard tools: TensorBoard, TensorFlow Serving • SageMaker features: Local Mode, Script Mode, Model Tuning, Spot Training, Pipe Mode, Amazon EFS & Amazon FSx for Lustre, Amazon Elastic Inference, etc. • Performance optimizations: GPUs and CPUs (AWS, Intel MKL-DNN library) • Distributed training: Parameter Server and Horovod
  • 7. Amazon SageMaker re:Invent 2019 announcements SageMaker Studio SageMaker Notebooks (preview) SageMaker Debugger SageMaker Experiments SageMaker Model Monitor SageMaker Autopilot
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Bin Lu Senior Director of Risk Modeling and Analytics Fannie Mae Vindhan Sahayam Lead Architect Fannie Mae
  • 9. Fannie Mae is a leading source of financing for mortgage lenders • Provide access to affordable mortgage financing in all markets at all times • Effectively manage and reduce risk to our business, taxpayers, and the housing finance system
  • 10. Accurate property valuation reduces mortgage risk It is used in all stages of the loan lifecycle: • Origination and underwriting, where a lender determines whether a borrower's loan application is an acceptable risk • Post-purchase quality control • Portfolio risk management, financial reporting, and regulatory reporting • Loss mitigation Fannie Mae credit portfolio is ~$3 trillion Mortgage lifecycle Origination Servicing Securitization Foreclosure
  • 11. Machine learning example: Property valuation Property appraisal by certified/licensed appraiser • Quantitative valuation based on comparable property sale prices and market trends • Adjustments for unobservable inputs Fannie Mae is leveraging machine learning • Automated home price valuation model based on observables (XGBoost, KNN) • Automated review of the adjustment based on visual inspection (TensorFlow – CNN) Fannie Mae receives ~40,000 appraisal reports, with 500,000+ property images every day
  • 12. Technology challenges in machine learning Limited CPU/GPU resources to train and run models No streamlined approach for model development Process of packaging and hosting models is complex and time consuming Difficult to connect machine learning and analytics tools to data
  • 13. Amazon SageMaker fits our needs • Flexible and self- service machine learning platform • Easy access to compute resources and data • Streamlined model training and deployment • Built-in governance procedure and audit trail
  • 14. Automated property image classification Three multi-layer convolutional neural network models with transferred learning 1st layer fixes image orientation 2nd layer identifies room type 3rd layer predicts marketability score
  • 15. Benefits of Amazon SageMaker Effective cost management • Never pay for idle; the cost is based on actual vCPU/GPU usage, not the maximum processing capacity of the infrastructure • Designed to enable performance improvement at zero cost Rapid time to market • Instant access to dedicated computing resources • Ability to focus on business needs; no server to manage and no complex code to write for distributed model training, hyperparameter tuning, or model deployment AWS breadth and depth • Streamlined integration with big data analytics platform • Automated version controls, governance, audit trails, and secured workload • Business resiliency
  • 16. Consideration for provisioning Amazon SageMaker Implementation of governance is as important as developing business capabilities • InfoSec risk management • Data governance • Model governance • Technology risk management Establish guiding principles at the start • Technology and software • Models and analytics Consider data gravity • Co-locate machine learning platform with data sources We engaged with the Amazon SageMaker team early
  • 17. A special shout-out to the Fannie Mae Digital Incubator team for developing the property image classification machine learning model: Hamid Reza Khakpour, Timur Fatykhov, and Felix Meale
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 19. Three very important goals Realistic to achieve all the above with a fully-managed service such as Amazon SageMaker? + Non-negotiable data security + Self-service access + End-to-end governance with traceability
  • 20. Given these conditions … • Amazon SageMaker infrastructure is deployed in AWS-managed, multi- tenant VPCs and subnets • Data scientists work with highly sensitive data using powerful dev tools How do we keep data absolutely secure?
  • 21. Private subnet Keeping data secure: Harden network security Fannie Mae VPC Amazon VPC AWS Cloud Amazon SageMaker notebook Amazon S3 Security group ENI AWS KMS AWS CodeCommit Amazon ECR Amazon SageMaker Amazon SageMaker training Amazon SageMaker hosting ENI ENI S3 gateway endpoint Endpoint subnet Interface VPC endpoints Security group + How do we prevent data exfiltration? + How do we avoid exposure to internet?
  • 22. Interface endpoint enforcement: Example { "Effect": "Allow", "Action": "sagemaker:CreatePresignedNotebookInstanceUrl", "Resource": "*", "Condition": { "StringEquals": { "aws:SourceVpce": "vpce-x" } } } { "Effect": ”Allow", "Action": "sagemaker:CreatePresignedNotebookInstanceUrl", "Resource": "*" "Principal": "*", "Condition": { "IpAddress": { "aws:VpcSourceIp": [ "x.x.x.x/a", "y.y.y.y/b" ] } } } Interface endpoint policy Identity policy
  • 23. Keeping data secure: Encrypt everywhere Use customer managed CMK for volumes and S3 encryption Enable Amazon S3 default encryption. Additionally use deny policies to prevent unencrypted uploads
  • 24. With the greater flexibility of self-service access … • How do we ensure users comply with security controls? • How do we ensure users do not step into each other?
  • 25. Access controls enforcement: Examples { "Effect": "Allow", "Action": "sagemaker:CreateTrainingJob" , "Resource": "arn:aws:sagemaker:x:x:*/app1-*", "Condition": { "StringEquals": { "aws:RequestTag/CostCenter": "x", "sagemaker:VolumeKmsKey": "arn:aws:kms:x:x:key/x" }, "Bool": { "sagemaker:InterContainerTrafficEncryption": "true", "sagemaker:NetworkIsolation": "true" }, "ForAllValues:StringEquals": { "sagemaker:VpcSubnets": [ "subnet-a", "subnet-b" ], "sagemaker:VpcSecurityGroupIds": [ "sg-x", "sg-y" ] }, "Null": { "sagemaker:VpcSubnets": "false" } } } { "Effect": "Deny", "Action": "sagemaker:CreatePresignedNotebookInstanceUrl", "Resource": "*", "Condition": { "ForAllValues:StringNotEquals": { "sagemaker:ResourceTag/creatorUserId": "${aws:userId}" } } } Network and encryption enforcement Notebook access control
  • 26. Enabling governance: Operating zones Data scientists Train & test models NPI Amazon SageMaker notebooks Non-NPI Research zone Controlled code/model migration Production Retrain Deploy Automated process Approve models Lambda API Gateway Application CI/CD DevUATProd Test Deploy API Gateway Application developers AWS CodeCommit Lambda Application zone Development Create guardrails early: Establish zones to manage ML lifecycle
  • 27. Machine learning orchestration with auditing: Example Source code AWS CodeCommit Amazon S3 Dataset Model artifacts AWS CodeBuild Lambda LambdaApproval gate Batch transformAWS Lambda AWS CodePipeline Deploy endpoint AWS Cloud Train + Reproducible and reusable pipeline + Built-in audit tracking capability + Other options: AWS Step Functions, Apache Airflow Amazon DynamoDB Model metadata for audit tracking Amazon ECR Create model
  • 28. Fannie Mae’s Enterprise Data Lake (EDL) at a glance Build machine learning capability with a fully functional data lake as a foundation ... and growing 100+ applications3,000+ datasets 500+ AWS Glue Data Catalog databases 1,000+ users
  • 29. Amazon SageMaker in EDL: Reference architecture Amazon QuickSight Amazon ES Amazon Athena Amazon S3 Encrypted objects Amazon EMR Amazon SageMaker AWS Glue metastore Amazon ECS AWS Batch AWS Lambda Corporate data center Data warehouses RDBMS File systems Third-party data ADFS AWS Direct Connect Rest/CLI Zscaler Ingestion AWS Step Functions Amazon Redshift Workflow ETL/Analytics/ML Data visualization Enterprise data lake platform Amazon Kinesis Auditing Security and governance Logging and monitoring Platform built with 100% native AWS services => less integration challenges
  • 30. Key takeaways + New IAM context keys are valuable + Restrict access to buckets, utilize S3 endpoint policy + Amazon SageMaker has full support for PrivateLink endpoints; Enabling and enforcing those is crucial + Data is a first-class primitive in ML workflows; keep track of data collection and preparation + Make predictions traceable to original training record + Introduce segregation of duties; establish operating zones + Leverage data lake pattern Build a highly-secure, self-service & end-to-end traceable ML capability with Amazon SageMaker
  • 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Bin Lu Senior Director of Risk Modeling and Analytics Fannie Mae Vindhan Sahayam Lead Architect Fannie Mae
  • 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. + Script Mode + Managed Spot Training + Elastic Inference
  • 33. Build, train, deploy machine learning models quickly at scale SageMaker Studio IDE Amazon SageMaker Ground Truth Algorithms & Frameworks Quick-start notebooks Experiments Training & Tuning Deployment & Hosting Reinforcement Learning ML Marketplace Debugger Autopilot Monitoring NEW! NEW! NEW! NEW! NEW! NEW! Neo Amazon SageMaker
  • 35. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Julien Simon Global Evangelist AI/ML Amazon Web Services Bin Lu Senior Director of Risk Modeling & Analytics Fannie Mae Vindhan Sahayam Lead Architect Fannie Mae
  • 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Editor's Notes

  • #7: *** UPDATE: added version 1.11.0
  • #34: With these new capabilities, Amazon SageMaker now covers the complete machine learning workflow to build, train, and deploy machine learning models quickly, at scale.