SlideShare a Scribd company logo
1 of 50
1
Usage of Generative Adversarial Networks
in Healthcare
Vladyslav Kolbasin
Lead Software Developer, Consultant
24.09.2017
2
Agenda
1. Introduction to generative adversarial network
2. GAN theory. How to train it?
3. Several words about healthcare
4. How GANs are used in healthcare. Examples.
1. Time-series data
2. Image processing/generating/segmentation
5. Lesion segmentation
6. Conclusion
3
Generative vs discriminative models
P(x|y)
P(y|x)
4
Generative adversarial network. Architecture
• GAN – two neural networks competing against
each other in a zero-sum game framework.
(Ian Goodfellow et al. in 2014)
• G tries to “trick” D by generating samples that
are hard for D to distinguish from data
• Some kind of unsupervised learning
• Networks try to:
• D(G(z)) => max
• D(x)(1 — D(G(z))) => max
=> Nash equilibrium:
Credit: https://www.slideshare.net/xavigiro/deep-learning-for-computer-vision-
generative-models-and-adversarial-training-upc-2016
5
GAN. Training Discriminator
Credit: https://www.slideshare.net/xavigiro/deep-learning-for-computer-vision-generative-models-and-adversarial-training-upc-2016
6
GAN. Training Generator
Credit: https://www.slideshare.net/xavigiro/deep-learning-for-computer-vision-generative-models-and-adversarial-training-upc-2016
7
GAN. Training algorithm
8
• Optimization criteria:
• We want to make distributions equal
• It is equivalent to maximizing log-likelihood or
• KL-divergence:
• We can use other divergence too
• Jensen-Shannon divergence
GAN. How to train?
True data Noise for generating data
9
KL-divergence
10
KL-divergence
1111
Demo. Mode-collapse.
Oscillations in GAN
12
• Introduced other metric: Wasserstein metric (earth mover's distance)
• Summary about wGAN:
• For mathematicians: it uses Wasserstein distance instead of Jensen-
Shannon divergence to compare distributions
• For engineers: it gets rid of a few unnecessary logarithms, and clips
weights
• For others: it employs an art critic instead of forgery expert
• More math details: https://www.cph-ai-lab.com/wasserstein-gan-wgan
Fixing mode collapse. wGAN(s)
Wasserstein GAN. https://arxiv.org/pdf/1701.07875.pdf
13
Fixing mode collapse. Improved wGAN.
• Penalize the norm of the gradient
of the critic with respect to its
input instead of clipping weights.
• This ‘gradient penalty’ is simply
added to the Wasserstein
distance for the total loss.
Improved training of Wasserstein GAN. https://arxiv.org/pdf/1704.00028.pdf
14
Improved WGAN: +gradient penalty
1515
Demo. Mode-collapse.
Fixing oscillations in GANs
16
GAN hacks
• https://github.com/soumith/ganhacks
• About 17 hacks:
• Normalize the inputs
• Use Soft and Noisy Labels
• Avoid Sparse Gradients: ReLU, MaxPool
• Use SGD for discriminator and ADAM for generator
• …
• Batch Normalization
17
• “Unsupervised Representation Learning with Deep Convolutional
Generative Adversarial Models”. https://arxiv.org/pdf/1511.06434.pdf
Vector Space Arithmetics
18
GANs Taxonomy
1919
Healthcare
20
• Deep learning can provide huge positive impact in Healthcare
• Healthcare is one of the most popular area in DL researches
• List of significant deep learning papers in healthcare:
https://github.com/albarqouni/Deep-Learning-for-Medical-Applications
• Main ideas:
• Improve the health of populations
• Lower the cost of care
• Improve the patient experience
Deep Learning in Healthcare, Pros
21
• Mining Medical Data
• There is huge amount of doctors’ reports, medical images and test results
• Better or earlier diagnostics
• Early diagnostics without complex hardware
(for example risk of heart attack)
• Predict next visit to a doctor
• Automatic MRI slides segmentation and so on
• Better, faster diagnoses
• More effective drug treatment
• Genomics for personalized medicine
• Creating new drugs
• And so on…
DL in Healthcare, Tasks
22
• Health data is highly regulated
• USA: FDA + HIPAA (http://ww.fda.gov)
• EU: Directives 95/46/EC, 98/79/EC and others
(http://ec.europa.eu/health/medical-devices/index_en.htm)
• Data labelling is challenging
• There are only tens of thousands people trained and licensed to
annotate all of those observable features
• Health data is highly multimodal
• There are dozens of kinds of medical imaging devices each producing
images according to their respective physical principles
Research issues with healthcare
23
Health Data
• Identifiable Health Data – any
information about health status,
provision of health care, or
payment for health care that can
be linked to an individual
• Privacy of Health Data allows a
person to keep their medical
records from being revealed to
others
Definitions
• The challenge in data privacy is
to share data while protecting
personally identifiable
information
The Main Challenge
• There are different requirements
to data protection depending on
what country citizens the data
belong to
USA & EU Regulations
24
What is HIPAA?
• Health
• Insurance
• Portability and
• Accountability
• Act of 1996
Abbreviation
• Congress passed the federal law to provide
consumers with greater access to health care
insurance, to protect the privacy of health
care data, and to promote more
standardization and efficiency in the
healthcare industry.
• HIPAA was designed to allow portability of
health insurance between jobs.
• HIPAA directed the Department of Health and
Human Services (DHHS) to issue federal
regulations. DHHS has issued HIPAA privacy
regulations as well as other regulations under
HIPAA.
Purpose
25
• Health Data Generation
• Medical Image Segmentation
• Anomaly Detection
Applications
26
• Types of data:
• Electronic Health Records (EHR)
• Medical Images
• Other data...
• Accessing to EHR is highly regulated (restricted)
• Need to do de-identification of EHR data
• HIPAA is watching you….
1. Health data generation
27
Electronic Health Records
28
• “Generating Multi-label Discrete Patient Records using Generative
Adversarial Network”. https://arxiv.org/pdf/1703.06490.pdf
• Medical Generative Adversarial Network (medGAN) generates realistic
synthetic patient records
• High-dimensional discrete variables
1.1 Health data generation. EHR
29
medGAN. Architecture
30
• GAN: the same architecture as medGAN with the standard training
strategy, but do not pre-train the autoencoder.
• GAN-P: pre-train the autoencoder (in addition to the GAN).
• GAN-PD: pre-train the autoencoder and use minibatch discrimination.
• GAN-PA: pre-train the autoencoder and use minibatch averaging.
• medGAN: pre-train the autoencoder and use minibatch averaging.
Also use batch normalization and a shortcut connection for the generator G.
medGAN. Models for comparison
31
Scatterplots of dimension-wise
probability results. Each dot represents
one of 615 codes. The diagonal line
indicates the ideal performance where
the real and synthetic data show
identical quality
1) The x-axis represents the Bernoulli
success probability for the real dataset
A, and y-axis the probability for the
synthetic counterpart generated by each
model.
2) The x-axis represents the F1-score of
the logistic regression classifier trained
on the real dataset A. The y-axis
represents the F1-score of the classifier
trained on the synthetic counterpart
generated by each model.
32
1.2. Image-to-Image translation using GANs
• “Towards Adversarial Retinal Image
Synthesis”
https://arxiv.org/pdf/1701.08974v1.pdf
• Mapping from a binary vessel tree to a new
retinal image
• Aims:
• Validating image analysis techniques
• Medical training
• Therapy planning
• Used ideas from “Image-to-Image Translation
with Conditional Adversarial Networks”
https://arxiv.org/pdf/1701.08974v1.pdf
https://phillipi.github.io/pix2pix/
Photo is
example for
placement and
max. size
33
• GAN with usual adversarial loss will not produce realistic images
• Modified loss: combine the adversarial loss with a global L1 loss:
• The L1 loss controls low-frequency information in images generated by
G in order to produce globally consistent results
• Adversarial loss promotes sharp results
Retinal GAN. Loss modification
34
Loss modification. Examples
Credit: “Image-to-Image Translation with Conditional Adversarial Networks” https://arxiv.org/pdf/1701.08974v1.pdf
35
• Evaluation done with retinal image quality metrics which have been employed
previously to assess the quality of retinal images
Retinal GAN. Results. Evaluation
36
2. Medical image segmentation
• Brain Tumor Segmentation Challenge
http://www.braintumorsegmentation.org/
• Each subject in BRATS 2015 dataset is a 3D
brain MRI volume with size 240×240×155
37
2. Medical image segmentation. SegAN
• “SegAN: Adversarial Network with
Multi-scale L1 Loss for Medical Image
Segmentation”
https://arxiv.org/pdf/1706.01805.pdf
• Semantic segmentation of images
38
SegAN. Main ideas
• Usual single scalar output of Discriminator doesn’t provide sufficient gradient
feedback to the networks
• Instead was used multi-scale feature loss to get more stable results:
39
Medical image segmentation. SegAN. Results
40
3. Anomaly detection
• “Unsupervised Anomaly Detection with Generative Adversarial Networks to
Guide Marker Discovery”. https://arxiv.org/pdf/1703.05921.pdf
41
• “Semantic Image Inpainting with Deep Generative Models”
https://arxiv.org/pdf/1607.07539.pdf
What about inverse mapping: image-latent space?
42
• Only the coefficients of z are adapted via backpropagation.
The trained parameters of the generator and discriminator are kept fixed.
• Overall loss or Anomaly score:
• Anomaly score consists of two parts:
• Residual Loss - visual similarity
• Discrimination Loss - enforces the generated image to lie on the
manifold
Mapping new images to the latent space
43
• f(.) – output of intermediate layer of the discriminator
• It is some statistics of an input image
• This approach utilizes the trained discriminator not as classifier but as a
feature extractor
Improved discrimination loss based on feature matching
44
Results for anomaly detection
45
• Competition Skin Lesion Analysis Towards Melanoma Detection
• Segment image - find lesion in the picture
• https://challenge.kitware.com/#challenge/560d7856cad3a57cfde481ba
• Solution: Analogue of pix2pix architecture
4. Lesion segmentation
46
47
48
Conclusions
• For now GANs in healthcare were used for:
• Generating new data
• De-identification
• Generating more data for further learning or other specific tasks
• Anomaly detection in data
• Feature extraction from images
• Mapping new images to the latent space
• Image segmentation
• GANs is an architecture that is rapidly developing
49
References
• Good tutorials from Ian Goodfellow:
• https://arxiv.org/pdf/1701.00160.pdf
• https://arxiv.org/pdf/1406.2661.pdf
• https://youtu.be/RvgYvHyT15E
• Training hacks:
• https://github.com/soumith/ganhacks
• GAN collections:
• https://github.com/wiseodd/generative-models
• https://github.com/hindupuravinash/the-gan-zoo
50
Vladyslav Kolbasin
Lead Software Developer, Consultant
vladyslav.kolbasin@globallogic.com
ва
Thank you!

More Related Content

What's hot

Introduction to Stream Processing
Introduction to Stream ProcessingIntroduction to Stream Processing
Introduction to Stream Processing
Guido Schmutz
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
Lukas Masuch
 

What's hot (20)

Generative Adversarial Networks
Generative Adversarial NetworksGenerative Adversarial Networks
Generative Adversarial Networks
 
Machine Learning Model Deployment: Strategy to Implementation
Machine Learning Model Deployment: Strategy to ImplementationMachine Learning Model Deployment: Strategy to Implementation
Machine Learning Model Deployment: Strategy to Implementation
 
Generative AI, WiDS 2023.pptx
Generative AI, WiDS 2023.pptxGenerative AI, WiDS 2023.pptx
Generative AI, WiDS 2023.pptx
 
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAIGenerative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
 
Distributed machine learning
Distributed machine learningDistributed machine learning
Distributed machine learning
 
Generative AI
Generative AIGenerative AI
Generative AI
 
Spark DataFrames and ML Pipelines
Spark DataFrames and ML PipelinesSpark DataFrames and ML Pipelines
Spark DataFrames and ML Pipelines
 
Knowledge Graph Embeddings for Recommender Systems
Knowledge Graph Embeddings for Recommender SystemsKnowledge Graph Embeddings for Recommender Systems
Knowledge Graph Embeddings for Recommender Systems
 
Graph Neural Network - Introduction
Graph Neural Network - IntroductionGraph Neural Network - Introduction
Graph Neural Network - Introduction
 
Graph Representation Learning
Graph Representation LearningGraph Representation Learning
Graph Representation Learning
 
Scaling Ride-Hailing with Machine Learning on MLflow
Scaling Ride-Hailing with Machine Learning on MLflowScaling Ride-Hailing with Machine Learning on MLflow
Scaling Ride-Hailing with Machine Learning on MLflow
 
Modern Convolutional Neural Network techniques for image segmentation
Modern Convolutional Neural Network techniques for image segmentationModern Convolutional Neural Network techniques for image segmentation
Modern Convolutional Neural Network techniques for image segmentation
 
Introduction of Knowledge Graphs
Introduction of Knowledge GraphsIntroduction of Knowledge Graphs
Introduction of Knowledge Graphs
 
Introduction to Diffusion Models
Introduction to Diffusion ModelsIntroduction to Diffusion Models
Introduction to Diffusion Models
 
Neo4j Graph Data Science - Webinar
Neo4j Graph Data Science - WebinarNeo4j Graph Data Science - Webinar
Neo4j Graph Data Science - Webinar
 
Introduction to Stream Processing
Introduction to Stream ProcessingIntroduction to Stream Processing
Introduction to Stream Processing
 
Introduction to Generative Adversarial Networks (GAN) with Apache MXNet
Introduction to Generative Adversarial Networks (GAN) with Apache MXNetIntroduction to Generative Adversarial Networks (GAN) with Apache MXNet
Introduction to Generative Adversarial Networks (GAN) with Apache MXNet
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
 
Object Detection with Transformers
Object Detection with TransformersObject Detection with Transformers
Object Detection with Transformers
 
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
 

Similar to Usage of Generative Adversarial Networks (GANs) in Healthcare

strata_ny_2016_version_final_no_animation
strata_ny_2016_version_final_no_animationstrata_ny_2016_version_final_no_animation
strata_ny_2016_version_final_no_animation
Taposh Dutta Roy
 

Similar to Usage of Generative Adversarial Networks (GANs) in Healthcare (20)

Big Data and Artificial Intelligence
Big Data and Artificial Intelligence Big Data and Artificial Intelligence
Big Data and Artificial Intelligence
 
Deep Conditional Adversarial learning for polyp Segmentation
Deep Conditional Adversarial learning for polyp SegmentationDeep Conditional Adversarial learning for polyp Segmentation
Deep Conditional Adversarial learning for polyp Segmentation
 
Pistoia Alliance USA Conference 2016
Pistoia Alliance USA Conference 2016Pistoia Alliance USA Conference 2016
Pistoia Alliance USA Conference 2016
 
Introduction to Big Data and its Potential for Dementia Research
Introduction to Big Data and its Potential for Dementia ResearchIntroduction to Big Data and its Potential for Dementia Research
Introduction to Big Data and its Potential for Dementia Research
 
Machine Learning in Modern Medicine with Erin LeDell at Stanford Med
Machine Learning in Modern Medicine with Erin LeDell at Stanford MedMachine Learning in Modern Medicine with Erin LeDell at Stanford Med
Machine Learning in Modern Medicine with Erin LeDell at Stanford Med
 
2. visualization in data mining
2. visualization in data mining2. visualization in data mining
2. visualization in data mining
 
Maximize Your Understanding of Operational Realities in Manufacturing with Pr...
Maximize Your Understanding of Operational Realities in Manufacturing with Pr...Maximize Your Understanding of Operational Realities in Manufacturing with Pr...
Maximize Your Understanding of Operational Realities in Manufacturing with Pr...
 
Massive-Scale Analytics Applied to Real-World Problems
Massive-Scale Analytics Applied to Real-World ProblemsMassive-Scale Analytics Applied to Real-World Problems
Massive-Scale Analytics Applied to Real-World Problems
 
Fast Parallel Similarity Calculations with FPGA Hardware
Fast Parallel Similarity Calculations with FPGA HardwareFast Parallel Similarity Calculations with FPGA Hardware
Fast Parallel Similarity Calculations with FPGA Hardware
 
Randy Goebel for the KIEF 2018. FROM DATA TO ECONOMIC VALUE
Randy Goebel for the KIEF 2018. FROM DATA TO ECONOMIC VALUERandy Goebel for the KIEF 2018. FROM DATA TO ECONOMIC VALUE
Randy Goebel for the KIEF 2018. FROM DATA TO ECONOMIC VALUE
 
H2O with Erin LeDell at Portland R User Group
H2O with Erin LeDell at Portland R User GroupH2O with Erin LeDell at Portland R User Group
H2O with Erin LeDell at Portland R User Group
 
Trustworthiness of AI based predictions Aachen 2024
Trustworthiness of AI based predictions Aachen 2024Trustworthiness of AI based predictions Aachen 2024
Trustworthiness of AI based predictions Aachen 2024
 
Anomaly Detection Using Generative Adversarial Network(GAN)
Anomaly Detection Using Generative Adversarial Network(GAN)Anomaly Detection Using Generative Adversarial Network(GAN)
Anomaly Detection Using Generative Adversarial Network(GAN)
 
strata_ny_2016_version_final_no_animation
strata_ny_2016_version_final_no_animationstrata_ny_2016_version_final_no_animation
strata_ny_2016_version_final_no_animation
 
Running Mixed Workloads on Kubernetes at IHME
Running Mixed Workloads on Kubernetes at IHMERunning Mixed Workloads on Kubernetes at IHME
Running Mixed Workloads on Kubernetes at IHME
 
CrowdInG_learning_from_crowds.pptx
CrowdInG_learning_from_crowds.pptxCrowdInG_learning_from_crowds.pptx
CrowdInG_learning_from_crowds.pptx
 
Generative Adversarial Networks 2
Generative Adversarial Networks 2Generative Adversarial Networks 2
Generative Adversarial Networks 2
 
Informatics in disease management: What will the future bring?
Informatics in disease management: What will the future bring?Informatics in disease management: What will the future bring?
Informatics in disease management: What will the future bring?
 
Bigdata and Hadoop with applications
Bigdata and Hadoop with applicationsBigdata and Hadoop with applications
Bigdata and Hadoop with applications
 
Generative Adversarial Networks and Their Applications in Medical Imaging
Generative Adversarial Networks  and Their Applications in Medical ImagingGenerative Adversarial Networks  and Their Applications in Medical Imaging
Generative Adversarial Networks and Their Applications in Medical Imaging
 

More from GlobalLogic Ukraine

GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Ukraine
 

More from GlobalLogic Ukraine (20)

GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
 
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
 
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
 
Штучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptxШтучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptx
 
Задачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptxЗадачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptx
 
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptxЩо треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
 
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
 
JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"
 
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
 
Страх і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic EducationСтрах і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic Education
 
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
 
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
 
“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?
 
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
 
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
 
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
 
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
 
GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"
 
C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"
 
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Usage of Generative Adversarial Networks (GANs) in Healthcare

  • 1. 1 Usage of Generative Adversarial Networks in Healthcare Vladyslav Kolbasin Lead Software Developer, Consultant 24.09.2017
  • 2. 2 Agenda 1. Introduction to generative adversarial network 2. GAN theory. How to train it? 3. Several words about healthcare 4. How GANs are used in healthcare. Examples. 1. Time-series data 2. Image processing/generating/segmentation 5. Lesion segmentation 6. Conclusion
  • 3. 3 Generative vs discriminative models P(x|y) P(y|x)
  • 4. 4 Generative adversarial network. Architecture • GAN – two neural networks competing against each other in a zero-sum game framework. (Ian Goodfellow et al. in 2014) • G tries to “trick” D by generating samples that are hard for D to distinguish from data • Some kind of unsupervised learning • Networks try to: • D(G(z)) => max • D(x)(1 — D(G(z))) => max => Nash equilibrium: Credit: https://www.slideshare.net/xavigiro/deep-learning-for-computer-vision- generative-models-and-adversarial-training-upc-2016
  • 5. 5 GAN. Training Discriminator Credit: https://www.slideshare.net/xavigiro/deep-learning-for-computer-vision-generative-models-and-adversarial-training-upc-2016
  • 6. 6 GAN. Training Generator Credit: https://www.slideshare.net/xavigiro/deep-learning-for-computer-vision-generative-models-and-adversarial-training-upc-2016
  • 8. 8 • Optimization criteria: • We want to make distributions equal • It is equivalent to maximizing log-likelihood or • KL-divergence: • We can use other divergence too • Jensen-Shannon divergence GAN. How to train? True data Noise for generating data
  • 12. 12 • Introduced other metric: Wasserstein metric (earth mover's distance) • Summary about wGAN: • For mathematicians: it uses Wasserstein distance instead of Jensen- Shannon divergence to compare distributions • For engineers: it gets rid of a few unnecessary logarithms, and clips weights • For others: it employs an art critic instead of forgery expert • More math details: https://www.cph-ai-lab.com/wasserstein-gan-wgan Fixing mode collapse. wGAN(s) Wasserstein GAN. https://arxiv.org/pdf/1701.07875.pdf
  • 13. 13 Fixing mode collapse. Improved wGAN. • Penalize the norm of the gradient of the critic with respect to its input instead of clipping weights. • This ‘gradient penalty’ is simply added to the Wasserstein distance for the total loss. Improved training of Wasserstein GAN. https://arxiv.org/pdf/1704.00028.pdf
  • 16. 16 GAN hacks • https://github.com/soumith/ganhacks • About 17 hacks: • Normalize the inputs • Use Soft and Noisy Labels • Avoid Sparse Gradients: ReLU, MaxPool • Use SGD for discriminator and ADAM for generator • … • Batch Normalization
  • 17. 17 • “Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Models”. https://arxiv.org/pdf/1511.06434.pdf Vector Space Arithmetics
  • 20. 20 • Deep learning can provide huge positive impact in Healthcare • Healthcare is one of the most popular area in DL researches • List of significant deep learning papers in healthcare: https://github.com/albarqouni/Deep-Learning-for-Medical-Applications • Main ideas: • Improve the health of populations • Lower the cost of care • Improve the patient experience Deep Learning in Healthcare, Pros
  • 21. 21 • Mining Medical Data • There is huge amount of doctors’ reports, medical images and test results • Better or earlier diagnostics • Early diagnostics without complex hardware (for example risk of heart attack) • Predict next visit to a doctor • Automatic MRI slides segmentation and so on • Better, faster diagnoses • More effective drug treatment • Genomics for personalized medicine • Creating new drugs • And so on… DL in Healthcare, Tasks
  • 22. 22 • Health data is highly regulated • USA: FDA + HIPAA (http://ww.fda.gov) • EU: Directives 95/46/EC, 98/79/EC and others (http://ec.europa.eu/health/medical-devices/index_en.htm) • Data labelling is challenging • There are only tens of thousands people trained and licensed to annotate all of those observable features • Health data is highly multimodal • There are dozens of kinds of medical imaging devices each producing images according to their respective physical principles Research issues with healthcare
  • 23. 23 Health Data • Identifiable Health Data – any information about health status, provision of health care, or payment for health care that can be linked to an individual • Privacy of Health Data allows a person to keep their medical records from being revealed to others Definitions • The challenge in data privacy is to share data while protecting personally identifiable information The Main Challenge • There are different requirements to data protection depending on what country citizens the data belong to USA & EU Regulations
  • 24. 24 What is HIPAA? • Health • Insurance • Portability and • Accountability • Act of 1996 Abbreviation • Congress passed the federal law to provide consumers with greater access to health care insurance, to protect the privacy of health care data, and to promote more standardization and efficiency in the healthcare industry. • HIPAA was designed to allow portability of health insurance between jobs. • HIPAA directed the Department of Health and Human Services (DHHS) to issue federal regulations. DHHS has issued HIPAA privacy regulations as well as other regulations under HIPAA. Purpose
  • 25. 25 • Health Data Generation • Medical Image Segmentation • Anomaly Detection Applications
  • 26. 26 • Types of data: • Electronic Health Records (EHR) • Medical Images • Other data... • Accessing to EHR is highly regulated (restricted) • Need to do de-identification of EHR data • HIPAA is watching you…. 1. Health data generation
  • 28. 28 • “Generating Multi-label Discrete Patient Records using Generative Adversarial Network”. https://arxiv.org/pdf/1703.06490.pdf • Medical Generative Adversarial Network (medGAN) generates realistic synthetic patient records • High-dimensional discrete variables 1.1 Health data generation. EHR
  • 30. 30 • GAN: the same architecture as medGAN with the standard training strategy, but do not pre-train the autoencoder. • GAN-P: pre-train the autoencoder (in addition to the GAN). • GAN-PD: pre-train the autoencoder and use minibatch discrimination. • GAN-PA: pre-train the autoencoder and use minibatch averaging. • medGAN: pre-train the autoencoder and use minibatch averaging. Also use batch normalization and a shortcut connection for the generator G. medGAN. Models for comparison
  • 31. 31 Scatterplots of dimension-wise probability results. Each dot represents one of 615 codes. The diagonal line indicates the ideal performance where the real and synthetic data show identical quality 1) The x-axis represents the Bernoulli success probability for the real dataset A, and y-axis the probability for the synthetic counterpart generated by each model. 2) The x-axis represents the F1-score of the logistic regression classifier trained on the real dataset A. The y-axis represents the F1-score of the classifier trained on the synthetic counterpart generated by each model.
  • 32. 32 1.2. Image-to-Image translation using GANs • “Towards Adversarial Retinal Image Synthesis” https://arxiv.org/pdf/1701.08974v1.pdf • Mapping from a binary vessel tree to a new retinal image • Aims: • Validating image analysis techniques • Medical training • Therapy planning • Used ideas from “Image-to-Image Translation with Conditional Adversarial Networks” https://arxiv.org/pdf/1701.08974v1.pdf https://phillipi.github.io/pix2pix/ Photo is example for placement and max. size
  • 33. 33 • GAN with usual adversarial loss will not produce realistic images • Modified loss: combine the adversarial loss with a global L1 loss: • The L1 loss controls low-frequency information in images generated by G in order to produce globally consistent results • Adversarial loss promotes sharp results Retinal GAN. Loss modification
  • 34. 34 Loss modification. Examples Credit: “Image-to-Image Translation with Conditional Adversarial Networks” https://arxiv.org/pdf/1701.08974v1.pdf
  • 35. 35 • Evaluation done with retinal image quality metrics which have been employed previously to assess the quality of retinal images Retinal GAN. Results. Evaluation
  • 36. 36 2. Medical image segmentation • Brain Tumor Segmentation Challenge http://www.braintumorsegmentation.org/ • Each subject in BRATS 2015 dataset is a 3D brain MRI volume with size 240×240×155
  • 37. 37 2. Medical image segmentation. SegAN • “SegAN: Adversarial Network with Multi-scale L1 Loss for Medical Image Segmentation” https://arxiv.org/pdf/1706.01805.pdf • Semantic segmentation of images
  • 38. 38 SegAN. Main ideas • Usual single scalar output of Discriminator doesn’t provide sufficient gradient feedback to the networks • Instead was used multi-scale feature loss to get more stable results:
  • 40. 40 3. Anomaly detection • “Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery”. https://arxiv.org/pdf/1703.05921.pdf
  • 41. 41 • “Semantic Image Inpainting with Deep Generative Models” https://arxiv.org/pdf/1607.07539.pdf What about inverse mapping: image-latent space?
  • 42. 42 • Only the coefficients of z are adapted via backpropagation. The trained parameters of the generator and discriminator are kept fixed. • Overall loss or Anomaly score: • Anomaly score consists of two parts: • Residual Loss - visual similarity • Discrimination Loss - enforces the generated image to lie on the manifold Mapping new images to the latent space
  • 43. 43 • f(.) – output of intermediate layer of the discriminator • It is some statistics of an input image • This approach utilizes the trained discriminator not as classifier but as a feature extractor Improved discrimination loss based on feature matching
  • 45. 45 • Competition Skin Lesion Analysis Towards Melanoma Detection • Segment image - find lesion in the picture • https://challenge.kitware.com/#challenge/560d7856cad3a57cfde481ba • Solution: Analogue of pix2pix architecture 4. Lesion segmentation
  • 46. 46
  • 47. 47
  • 48. 48 Conclusions • For now GANs in healthcare were used for: • Generating new data • De-identification • Generating more data for further learning or other specific tasks • Anomaly detection in data • Feature extraction from images • Mapping new images to the latent space • Image segmentation • GANs is an architecture that is rapidly developing
  • 49. 49 References • Good tutorials from Ian Goodfellow: • https://arxiv.org/pdf/1701.00160.pdf • https://arxiv.org/pdf/1406.2661.pdf • https://youtu.be/RvgYvHyT15E • Training hacks: • https://github.com/soumith/ganhacks • GAN collections: • https://github.com/wiseodd/generative-models • https://github.com/hindupuravinash/the-gan-zoo
  • 50. 50 Vladyslav Kolbasin Lead Software Developer, Consultant vladyslav.kolbasin@globallogic.com ва Thank you!