SlideShare a Scribd company logo
1 of 27
Auto Encoders
In the name of God
Mehrnaz Faraz
Faculty of Electrical Engineering
K. N. Toosi University of Technology
Milad Abbasi
Faculty of Electrical Engineering
Sharif University of Technology
1
Auto Encoders
• An unsupervised deep learning algorithm
• Are artificial neural networks
• Useful for dimensionality reduction and clustering
Unlabeled data
𝑧 = 𝑠 𝑤𝑥 + 𝑏
𝑥
^= 𝑠 𝑤′z + 𝑏′
𝑥
^is 𝑥’s reconstruction
𝑧 is some latent representation or code and 𝑠 is a non-linearity such
as the sigmoid
𝑧 𝑥
^
𝑥
2
Encoder Decoder
Auto Encoders
• Simple structure:
𝒙𝟏
𝒙𝟑
𝒙𝟐
𝒙˜𝟏
𝒙˜𝟑
𝒙˜𝟐
Input
Reconstructed
Output
Hidden
Encoder
3
Decoder
Undercomplete AE
• Hidden layer is Undercomplete if smaller than the input
layer
– Compresses the input
– Hidden nodes will be Good features for the training
𝑥
^
𝑤′
𝑧
𝑤
𝑥
4
Overcomplete AE
• Hidden layer is Overcomplete if greater than the input layer
– No compression in hidden layer.
– Each hidden unit could copy a different input component.
𝑥
^
𝑤′
𝑧
𝑤
𝑥
5
Deep Auto Encoders
• Deep Auto Encoders (DAE)
• Stacked Auto Encoders (SAE)
6
Training Deep Auto Encoder
• First layer:
𝒙𝟏
𝒙𝟒
𝒙𝟑
𝒙𝟐
𝒙^𝟏
𝒙^𝟒
𝒙^𝟑
𝒙^𝟐
𝒂𝟑
𝒂𝟐
𝒂𝟏
Encoder Decoder
7
Training Deep Auto Encoder
• Features of first layer:
𝒙𝟏
𝒙𝟒
𝒙𝟑
𝒙𝟐
𝒂𝟑
𝒂𝟐
𝒂𝟏
𝑎1
𝑎2
𝑎3
8
Training Deep Auto Encoder
• Second layer:
𝒂𝟑
𝒂𝟐
𝒂𝟏 𝒂^𝟏
𝒂^𝟑
𝒂^𝟐
𝒃𝟐
𝒃𝟏
9
Training Deep Auto Encoder
• Features of second layer:
𝒙𝟏
𝒙𝟒
𝒙𝟑
𝒙𝟐
𝒂𝟑
𝒂𝟐
𝒂𝟏
𝒃𝟐
𝒃𝟏
𝑏1
𝑏2
10
Using Deep Auto Encoder
𝒙𝟑
𝒙𝟐
𝒂𝟑
𝒂𝟐
• Feature extraction
• Dimensionality reduction
• Classification
𝒙𝟏
𝒂𝟏
𝒃𝟐
𝒃𝟏
Inputs Features
𝒙𝟒
Encoder
11
Using Deep Auto Encoder
• Reconstruction
𝒙𝟏
𝒙𝟒
𝒙𝟑
𝒙𝟐
𝒂𝟑
𝒂𝟐
𝒂𝟏
𝒃𝟐
𝒃𝟏
𝒂^𝟏
𝒂^𝟑
𝒂^𝟐
𝒙^𝟒
𝒙^𝟑
𝒙^𝟐
𝒙^𝟏
Encoder Decoder
12
Using AE
• Denoising
• Data compression
• Unsupervised learning
• Manifold learning
• Generative model
13
Types of Auto Encoder
• Stacked auto encoder (SAE)
• Denoising auto encoder (DAE)
• Sparse Auto Encoder (SAE)
• Contractive Auto Encoder (CAE)
• Convolutional Auto Encoder (CAE)
• Variational Auto Encoder (VAE)
14
Generative Models
• Given training data, generate new samples from same
distribution
– Variational Auto Encoder (VAE)
– Generative Adversarial Network (GAN)
15
Variational Auto Encoder
Encoder Decoder
Output
𝐱˜
∅
𝒒 𝒛|𝒙 𝒑𝜽 𝒙|𝒛
𝒙𝟏
16
𝒙𝟒
Input
x
𝒙𝟑
𝒙𝟐
𝒙˜𝟏
𝒙˜𝟒
𝒙˜𝟑
𝒙˜𝟐
𝒛𝟏
𝒛𝟐
Variational Auto Encoder
• Use probabilistic encoding and decoding
– Encoder:
– Decoder:
• x: Unknown probability distribution
• z: Gaussian probability distribution
𝑞∅ 𝑧|𝑥
𝑝𝜃 𝑥|𝑧
17
Training Variational Auto Encoder
• Latent space:
𝒙𝟏
𝒙𝟒
𝒙𝟑
𝒙𝟐
𝒉𝟏
𝒉𝟐
𝒉𝟑
𝝈
𝝁
𝒛 𝑞∅ 𝑧|𝑥
18
Mean
Variance
1 dimensional
Gaussian probability distribution
If we have n neurons for 𝝈 and 𝝁 then
we have n dimensional distribution
Training Variational Auto Encoder
• Generating new data:
– Example: MNIST Database
𝐱
Encoder
Latent space
Decoder
19
Generative Adversarial Network
• VAE:
• GAN:
– Can generate samples
– Trained by competing each other
– Use neural network
– Z is some random noise (Gaussian/Uniform).
– Z can be thought as the latent representation of the
image.
x Decoder 𝐱
˜
z
Encoder
z Generator 𝐱
˜
x
Discriminator
Fake or real?
20
Loss
GAN’s Architecture
Discriminator
Generated
fake
samples
Fine tune training
Latent space
Noise
Is D
correct?
Generator
• Overview:
Real samples
Using GAN
• Image generation:
22
Using GAN
• Data manipulation:
23
Denoising Auto Encoder
• Add noise to its input, and train it to recover this original.
24
Denoising Auto Encoder
Input
Output
Hidden 3
Hidden 2
Hidden 1
+
Noise
Input
Output
Hidden 3
Hidden 2
Hidden 1
Dropout
25
Randomly switched input
Gaussian noise
Sparse Auto Encoder
• Reduce the number of active neurons in the coding layer.
– Add sparsity loss into the cost function.
• Sparsity loss:
– Kullback-Leibler(KL) divergence is commonly used.
26
Sparse Auto Encoder
j
j j

ˆ
KL  ̂  log
  1  log
1  
1  ̂
Jsparse w,b J w,b
KL ̂j 
j1
27

More Related Content

Similar to autoencoder-190813144108.pptx

Similar to autoencoder-190813144108.pptx (20)

InfoGAN and Generative Adversarial Networks
InfoGAN and Generative Adversarial NetworksInfoGAN and Generative Adversarial Networks
InfoGAN and Generative Adversarial Networks
 
Autoencoders
AutoencodersAutoencoders
Autoencoders
 
Variational Autoencoders For Image Generation
Variational Autoencoders For Image GenerationVariational Autoencoders For Image Generation
Variational Autoencoders For Image Generation
 
Autoencoder
AutoencoderAutoencoder
Autoencoder
 
Hardware Acceleration for Machine Learning
Hardware Acceleration for Machine LearningHardware Acceleration for Machine Learning
Hardware Acceleration for Machine Learning
 
Autoencoder
AutoencoderAutoencoder
Autoencoder
 
201907 AutoML and Neural Architecture Search
201907 AutoML and Neural Architecture Search201907 AutoML and Neural Architecture Search
201907 AutoML and Neural Architecture Search
 
Anomaly Detection by ADGM / LVAE
Anomaly Detection by ADGM / LVAEAnomaly Detection by ADGM / LVAE
Anomaly Detection by ADGM / LVAE
 
Deep learning from a novice perspective
Deep learning from a novice perspectiveDeep learning from a novice perspective
Deep learning from a novice perspective
 
Seq2Seq (encoder decoder) model
Seq2Seq (encoder decoder) modelSeq2Seq (encoder decoder) model
Seq2Seq (encoder decoder) model
 
Tensorizing Neural Network
Tensorizing Neural NetworkTensorizing Neural Network
Tensorizing Neural Network
 
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
 
Piotr Mirowski - Review Autoencoders (Deep Learning) - CIUUK14
Piotr Mirowski - Review Autoencoders (Deep Learning) - CIUUK14Piotr Mirowski - Review Autoencoders (Deep Learning) - CIUUK14
Piotr Mirowski - Review Autoencoders (Deep Learning) - CIUUK14
 
Autoecoders.pptx
Autoecoders.pptxAutoecoders.pptx
Autoecoders.pptx
 
Evaluation of programs codes using machine learning
Evaluation of programs codes using machine learningEvaluation of programs codes using machine learning
Evaluation of programs codes using machine learning
 
Set Transfomer: A Framework for Attention-based Permutaion-Invariant Neural N...
Set Transfomer: A Framework for Attention-based Permutaion-Invariant Neural N...Set Transfomer: A Framework for Attention-based Permutaion-Invariant Neural N...
Set Transfomer: A Framework for Attention-based Permutaion-Invariant Neural N...
 
Rethinking Attention with Performers
Rethinking Attention with PerformersRethinking Attention with Performers
Rethinking Attention with Performers
 
Autoencoder Forest for Anomaly Detection from IoT Time Series
Autoencoder Forest for Anomaly Detection from IoT Time SeriesAutoencoder Forest for Anomaly Detection from IoT Time Series
Autoencoder Forest for Anomaly Detection from IoT Time Series
 
Gpu Join Presentation
Gpu Join PresentationGpu Join Presentation
Gpu Join Presentation
 
Differential Neural Computers
Differential Neural ComputersDifferential Neural Computers
Differential Neural Computers
 

More from kiran814572 (6)

seminar ppt blue eyes.pptx
seminar ppt blue eyes.pptxseminar ppt blue eyes.pptx
seminar ppt blue eyes.pptx
 
dokumen.tips_mind-reading-computer-ppt.pptx
dokumen.tips_mind-reading-computer-ppt.pptxdokumen.tips_mind-reading-computer-ppt.pptx
dokumen.tips_mind-reading-computer-ppt.pptx
 
brainchips-170420163645.pptx
brainchips-170420163645.pptxbrainchips-170420163645.pptx
brainchips-170420163645.pptx
 
gan-190318135433 (1).pptx
gan-190318135433 (1).pptxgan-190318135433 (1).pptx
gan-190318135433 (1).pptx
 
VIOLENCE.pptx
VIOLENCE.pptxVIOLENCE.pptx
VIOLENCE.pptx
 
Cognitive-approaches-to-learning-powerpoint.ppt
Cognitive-approaches-to-learning-powerpoint.pptCognitive-approaches-to-learning-powerpoint.ppt
Cognitive-approaches-to-learning-powerpoint.ppt
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
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...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 

autoencoder-190813144108.pptx

  • 1. Auto Encoders In the name of God Mehrnaz Faraz Faculty of Electrical Engineering K. N. Toosi University of Technology Milad Abbasi Faculty of Electrical Engineering Sharif University of Technology 1
  • 2. Auto Encoders • An unsupervised deep learning algorithm • Are artificial neural networks • Useful for dimensionality reduction and clustering Unlabeled data 𝑧 = 𝑠 𝑤𝑥 + 𝑏 𝑥 ^= 𝑠 𝑤′z + 𝑏′ 𝑥 ^is 𝑥’s reconstruction 𝑧 is some latent representation or code and 𝑠 is a non-linearity such as the sigmoid 𝑧 𝑥 ^ 𝑥 2 Encoder Decoder
  • 3. Auto Encoders • Simple structure: 𝒙𝟏 𝒙𝟑 𝒙𝟐 𝒙˜𝟏 𝒙˜𝟑 𝒙˜𝟐 Input Reconstructed Output Hidden Encoder 3 Decoder
  • 4. Undercomplete AE • Hidden layer is Undercomplete if smaller than the input layer – Compresses the input – Hidden nodes will be Good features for the training 𝑥 ^ 𝑤′ 𝑧 𝑤 𝑥 4
  • 5. Overcomplete AE • Hidden layer is Overcomplete if greater than the input layer – No compression in hidden layer. – Each hidden unit could copy a different input component. 𝑥 ^ 𝑤′ 𝑧 𝑤 𝑥 5
  • 6. Deep Auto Encoders • Deep Auto Encoders (DAE) • Stacked Auto Encoders (SAE) 6
  • 7. Training Deep Auto Encoder • First layer: 𝒙𝟏 𝒙𝟒 𝒙𝟑 𝒙𝟐 𝒙^𝟏 𝒙^𝟒 𝒙^𝟑 𝒙^𝟐 𝒂𝟑 𝒂𝟐 𝒂𝟏 Encoder Decoder 7
  • 8. Training Deep Auto Encoder • Features of first layer: 𝒙𝟏 𝒙𝟒 𝒙𝟑 𝒙𝟐 𝒂𝟑 𝒂𝟐 𝒂𝟏 𝑎1 𝑎2 𝑎3 8
  • 9. Training Deep Auto Encoder • Second layer: 𝒂𝟑 𝒂𝟐 𝒂𝟏 𝒂^𝟏 𝒂^𝟑 𝒂^𝟐 𝒃𝟐 𝒃𝟏 9
  • 10. Training Deep Auto Encoder • Features of second layer: 𝒙𝟏 𝒙𝟒 𝒙𝟑 𝒙𝟐 𝒂𝟑 𝒂𝟐 𝒂𝟏 𝒃𝟐 𝒃𝟏 𝑏1 𝑏2 10
  • 11. Using Deep Auto Encoder 𝒙𝟑 𝒙𝟐 𝒂𝟑 𝒂𝟐 • Feature extraction • Dimensionality reduction • Classification 𝒙𝟏 𝒂𝟏 𝒃𝟐 𝒃𝟏 Inputs Features 𝒙𝟒 Encoder 11
  • 12. Using Deep Auto Encoder • Reconstruction 𝒙𝟏 𝒙𝟒 𝒙𝟑 𝒙𝟐 𝒂𝟑 𝒂𝟐 𝒂𝟏 𝒃𝟐 𝒃𝟏 𝒂^𝟏 𝒂^𝟑 𝒂^𝟐 𝒙^𝟒 𝒙^𝟑 𝒙^𝟐 𝒙^𝟏 Encoder Decoder 12
  • 13. Using AE • Denoising • Data compression • Unsupervised learning • Manifold learning • Generative model 13
  • 14. Types of Auto Encoder • Stacked auto encoder (SAE) • Denoising auto encoder (DAE) • Sparse Auto Encoder (SAE) • Contractive Auto Encoder (CAE) • Convolutional Auto Encoder (CAE) • Variational Auto Encoder (VAE) 14
  • 15. Generative Models • Given training data, generate new samples from same distribution – Variational Auto Encoder (VAE) – Generative Adversarial Network (GAN) 15
  • 16. Variational Auto Encoder Encoder Decoder Output 𝐱˜ ∅ 𝒒 𝒛|𝒙 𝒑𝜽 𝒙|𝒛 𝒙𝟏 16 𝒙𝟒 Input x 𝒙𝟑 𝒙𝟐 𝒙˜𝟏 𝒙˜𝟒 𝒙˜𝟑 𝒙˜𝟐 𝒛𝟏 𝒛𝟐
  • 17. Variational Auto Encoder • Use probabilistic encoding and decoding – Encoder: – Decoder: • x: Unknown probability distribution • z: Gaussian probability distribution 𝑞∅ 𝑧|𝑥 𝑝𝜃 𝑥|𝑧 17
  • 18. Training Variational Auto Encoder • Latent space: 𝒙𝟏 𝒙𝟒 𝒙𝟑 𝒙𝟐 𝒉𝟏 𝒉𝟐 𝒉𝟑 𝝈 𝝁 𝒛 𝑞∅ 𝑧|𝑥 18 Mean Variance 1 dimensional Gaussian probability distribution If we have n neurons for 𝝈 and 𝝁 then we have n dimensional distribution
  • 19. Training Variational Auto Encoder • Generating new data: – Example: MNIST Database 𝐱 Encoder Latent space Decoder 19
  • 20. Generative Adversarial Network • VAE: • GAN: – Can generate samples – Trained by competing each other – Use neural network – Z is some random noise (Gaussian/Uniform). – Z can be thought as the latent representation of the image. x Decoder 𝐱 ˜ z Encoder z Generator 𝐱 ˜ x Discriminator Fake or real? 20 Loss
  • 21. GAN’s Architecture Discriminator Generated fake samples Fine tune training Latent space Noise Is D correct? Generator • Overview: Real samples
  • 22. Using GAN • Image generation: 22
  • 23. Using GAN • Data manipulation: 23
  • 24. Denoising Auto Encoder • Add noise to its input, and train it to recover this original. 24
  • 25. Denoising Auto Encoder Input Output Hidden 3 Hidden 2 Hidden 1 + Noise Input Output Hidden 3 Hidden 2 Hidden 1 Dropout 25 Randomly switched input Gaussian noise
  • 26. Sparse Auto Encoder • Reduce the number of active neurons in the coding layer. – Add sparsity loss into the cost function. • Sparsity loss: – Kullback-Leibler(KL) divergence is commonly used. 26
  • 27. Sparse Auto Encoder j j j  ˆ KL  ̂  log   1  log 1   1  ̂ Jsparse w,b J w,b KL ̂j  j1 27