SlideShare a Scribd company logo
AUTO-ENCODERS
Autoencoders
● Supervised learning uses explicit labels/correct output in order to train a
network.
○ E.g., classification of images.
● Unsupervised learning relies on data only.
○ E.g., CBOW and skip-gram word embeddings: the output is determined
implicitly from word order in the input data.
○ Key point is to produce a useful embedding of words.
○ The embedding encodes structure such as word similarity and some
relationships.
○ Still need to define a loss – this is an implicit supervision.
Autoencoders
●Autoencoders are designed to reproduce their input, especially for
images.
○Key point is to reproduce the input from a learned encoding.
Autoencoders
●Compare PCA/SVD
○PCA takes a collection of vectors (images) and produces a usually smaller set of
vectors that can be used to approximate the input vectors via linear combination.
○Very efficient for certain applications.
○Fourier and wavelet compression is similar.
●Neural network autoencoders
○Can learn nonlinear dependencies
○Can use convolutional layers
○Can use transfer learning
Autoencoders: structure
● Encoder: compress input into a latent-space of usually smaller dimension. h = f(x)
● Decoder: reconstruct input from the latent space. r = g(f(x)) with r as close to x as possible
Autoencoders: applications
● Denoising: input clean image + noise and train to reproduce the clean image.
Autoencoders: Applications
● Image colorization: input black and white and train to produce color images
Autoencoders: Applications
● Watermark removal
Properties of Autoencoders
●Data-specific: Autoencoders are only able to
compress data similar to what they have been
trained on.
●Lossy: The decompressed outputs will be degraded
compared to the original inputs.
●Learned automatically from examples: It is easy
to train specialized instances of the algorithm that
will perform well on a specific type of input.
Capacity
●As with other NNs, overfitting is a problem when capacity is too large
for the data.
●Autoencoders address this through some combination of:
○Bottleneck layer – fewer degrees of freedom than in possible
outputs.
○Training to denoise.
○Sparsity through regularization.
○Contractive penalty.
Bottleneck layer (undercomplete)
● Suppose input images are nxn and the latent space is m < nxn.
● Then the latent space is not sufficient to reproduce all images.
● Needs to learn an encoding that captures the important features in training
data, sufficient for approximate reconstruction.
Simple bottleneck layer in Keras
○ input_img = Input(shape=(784,))
○ encoding_dim = 32
○ encoded = Dense(encoding_dim, activation='relu')(input_img)
○ decoded = Dense(784, activation='sigmoid')(encoded)
○ autoencoder = Model(input_img, decoded)
● Maps 28x28 images into a 32 dimensional vector.
● Can also use more layers and/or convolutions.
Denoising autoencoders
● Basic autoencoder trains to minimize the loss between x and the reconstruction g(f(x)).
● Denoising autoencoders train to minimize the loss between x and g(f(x+w)), where w is
random noise.
● Same possible architectures, different training data.
● Kaggle has a dataset on damaged documents.
Denoising autoencoders
●Denoising autoencoders can’t simply memorize the input output
relationship.
●Intuitively, a denoising autoencoder learns a projection from a
neighborhood of our training data back onto the training data.
Sparse autoencoders
●Construct a loss function to penalize activations within a layer.
●Usually regularize the weights of a network, not the
activations.
●Individual nodes of a trained model that activate are data-
dependent.
○Different inputs will result in activations of different nodes
through the network.
●Selectively activate regions of the network depending on the
input data.
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
Sparse autoencoders
● Construct a loss function to penalize activations the network.
○ L1 Regularization: Penalize the absolute value of the vector of activations a in layer
h for observation I
○ KL divergence: Use cross-entropy between average activation and desired
activation
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
AUTO ENCODERS (Deep Learning fundamentals)
Contractive autoencoders
●Arrange for similar inputs to have similar
activations.
○ I.e., the derivative of the hidden layer activations are small with respect to the input.
●Denoising autoencoders make the reconstruction
function (encoder+decoder) resist small
perturbations of the input
●Contractive autoencoders make the feature
extraction function (ie. encoder) resist infinitesimal
perturbations of the input.
Contractive autoencoders
● Contractive autoencoders make the feature extraction function (ie. encoder) resist infinitesimal
perturbations of the input.
Autoencoders
● Both the denoising and contractive autoencoder can perform well
○ Advantage of denoising autoencoder : simpler to implement-requires adding one or two lines of code to
regular autoencoder-no need to compute Jacobian of hidden layer
○ Advantage of contractive autoencoder : gradient is deterministic -can use second order optimizers
(conjugate gradient, LBFGS, etc.)-might be more stable than denoising autoencoder, which uses a sampled
gradient
● To learn more on contractive autoencoders:
○ Contractive Auto-Encoders: Explicit Invariance During Feature Extraction. Salah Rifai, Pascal Vincent, Xavier
Muller, Xavier Glorot et Yoshua Bengio, 2011.

More Related Content

Similar to AUTO ENCODERS (Deep Learning fundamentals) (20)

PDF
Autoencoder
Wataru Hirota
 
PPTX
Autoencoders in Computer Vision: A Deep Learning Approach for Image Denoising...
ShubhamMittal569818
 
PPTX
A Comprehensive Overview of Encoder and Decoder Architectures in Deep Learnin...
ShubhamMittal569818
 
PDF
Autoencoder
HARISH R
 
PDF
UNIT-4.pdf
NiharikaThakur32
 
PDF
UNIT-4.pdf
NiharikaThakur32
 
PPTX
Introduction to Autoencoders: Types and Applications
Amr Rashed
 
PDF
Introduction to Autoencoders
Yan Xu
 
PPTX
Piotr Mirowski - Review Autoencoders (Deep Learning) - CIUUK14
Daniel Lewis
 
PDF
Autoencoder.pdf
P78097082
 
PPTX
5707_10_auto-encoder.pptx
SidoriOne
 
PDF
Deep learning unsupervised learning diapo
Milton Paja
 
PDF
UNIT 2: Artificial Neural Networks (ANN)
Abhimanyu Sangale
 
PDF
Autoencoders Tutorial | Autoencoders In Deep Learning | Tensorflow Training |...
Edureka!
 
PDF
Autoencoders
CloudxLab
 
PPTX
Understanding Autoencoder (Deep Learning Book, Chapter 14)
Entrepreneur / Startup
 
PDF
Structure learning with Deep Autoencoders
Patrick Michl
 
PDF
autoencoder-190813145130.pdf
Sameer Gulshan
 
PDF
Autoencoders
Ashok Govindarajan
 
PPTX
Denoising autoencoder by Harish.R
HARISH R
 
Autoencoder
Wataru Hirota
 
Autoencoders in Computer Vision: A Deep Learning Approach for Image Denoising...
ShubhamMittal569818
 
A Comprehensive Overview of Encoder and Decoder Architectures in Deep Learnin...
ShubhamMittal569818
 
Autoencoder
HARISH R
 
UNIT-4.pdf
NiharikaThakur32
 
UNIT-4.pdf
NiharikaThakur32
 
Introduction to Autoencoders: Types and Applications
Amr Rashed
 
Introduction to Autoencoders
Yan Xu
 
Piotr Mirowski - Review Autoencoders (Deep Learning) - CIUUK14
Daniel Lewis
 
Autoencoder.pdf
P78097082
 
5707_10_auto-encoder.pptx
SidoriOne
 
Deep learning unsupervised learning diapo
Milton Paja
 
UNIT 2: Artificial Neural Networks (ANN)
Abhimanyu Sangale
 
Autoencoders Tutorial | Autoencoders In Deep Learning | Tensorflow Training |...
Edureka!
 
Autoencoders
CloudxLab
 
Understanding Autoencoder (Deep Learning Book, Chapter 14)
Entrepreneur / Startup
 
Structure learning with Deep Autoencoders
Patrick Michl
 
autoencoder-190813145130.pdf
Sameer Gulshan
 
Autoencoders
Ashok Govindarajan
 
Denoising autoencoder by Harish.R
HARISH R
 

Recently uploaded (20)

PPTX
西班牙武康大学毕业证书{UCAMOfferUCAM成绩单水印}原版制作
Taqyea
 
PPTX
PM200.pptxghjgfhjghjghjghjghjghjghjghjghjghj
breadpaan921
 
PPTX
一比一原版(LaTech毕业证)路易斯安那理工大学毕业证如何办理
Taqyea
 
PPTX
internet básico presentacion es una red global
70965857
 
PPTX
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
PPTX
PE introd.pptxfrgfgfdgfdgfgrtretrt44t444
nepmithibai2024
 
PPT
Computer Securityyyyyyyy - Chapter 2.ppt
SolomonSB
 
PPTX
sajflsajfljsdfljslfjslfsdfas;fdsfksadfjlsdflkjslgfs;lfjlsajfl;sajfasfd.pptx
theknightme
 
PDF
Apple_Environmental_Progress_Report_2025.pdf
yiukwong
 
PPTX
法国巴黎第二大学本科毕业证{Paris 2学费发票Paris 2成绩单}办理方法
Taqyea
 
PDF
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
PPT
Computer Securityyyyyyyy - Chapter 1.ppt
SolomonSB
 
PPTX
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
PPTX
04 Output 1 Instruments & Tools (3).pptx
GEDYIONGebre
 
PPT
introduction to networking with basics coverage
RamananMuthukrishnan
 
PDF
The-Hidden-Dangers-of-Skipping-Penetration-Testing.pdf.pdf
naksh4thra
 
PPTX
英国假毕业证诺森比亚大学成绩单GPA修改UNN学生卡网上可查学历成绩单
Taqyea
 
PPTX
Optimization_Techniques_ML_Presentation.pptx
farispalayi
 
PPTX
一比一原版(SUNY-Albany毕业证)纽约州立大学奥尔巴尼分校毕业证如何办理
Taqyea
 
PPT
introductio to computers by arthur janry
RamananMuthukrishnan
 
西班牙武康大学毕业证书{UCAMOfferUCAM成绩单水印}原版制作
Taqyea
 
PM200.pptxghjgfhjghjghjghjghjghjghjghjghjghj
breadpaan921
 
一比一原版(LaTech毕业证)路易斯安那理工大学毕业证如何办理
Taqyea
 
internet básico presentacion es una red global
70965857
 
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
PE introd.pptxfrgfgfdgfdgfgrtretrt44t444
nepmithibai2024
 
Computer Securityyyyyyyy - Chapter 2.ppt
SolomonSB
 
sajflsajfljsdfljslfjslfsdfas;fdsfksadfjlsdflkjslgfs;lfjlsajfl;sajfasfd.pptx
theknightme
 
Apple_Environmental_Progress_Report_2025.pdf
yiukwong
 
法国巴黎第二大学本科毕业证{Paris 2学费发票Paris 2成绩单}办理方法
Taqyea
 
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
Computer Securityyyyyyyy - Chapter 1.ppt
SolomonSB
 
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
04 Output 1 Instruments & Tools (3).pptx
GEDYIONGebre
 
introduction to networking with basics coverage
RamananMuthukrishnan
 
The-Hidden-Dangers-of-Skipping-Penetration-Testing.pdf.pdf
naksh4thra
 
英国假毕业证诺森比亚大学成绩单GPA修改UNN学生卡网上可查学历成绩单
Taqyea
 
Optimization_Techniques_ML_Presentation.pptx
farispalayi
 
一比一原版(SUNY-Albany毕业证)纽约州立大学奥尔巴尼分校毕业证如何办理
Taqyea
 
introductio to computers by arthur janry
RamananMuthukrishnan
 
Ad

AUTO ENCODERS (Deep Learning fundamentals)

  • 2. Autoencoders ● Supervised learning uses explicit labels/correct output in order to train a network. ○ E.g., classification of images. ● Unsupervised learning relies on data only. ○ E.g., CBOW and skip-gram word embeddings: the output is determined implicitly from word order in the input data. ○ Key point is to produce a useful embedding of words. ○ The embedding encodes structure such as word similarity and some relationships. ○ Still need to define a loss – this is an implicit supervision.
  • 3. Autoencoders ●Autoencoders are designed to reproduce their input, especially for images. ○Key point is to reproduce the input from a learned encoding.
  • 4. Autoencoders ●Compare PCA/SVD ○PCA takes a collection of vectors (images) and produces a usually smaller set of vectors that can be used to approximate the input vectors via linear combination. ○Very efficient for certain applications. ○Fourier and wavelet compression is similar. ●Neural network autoencoders ○Can learn nonlinear dependencies ○Can use convolutional layers ○Can use transfer learning
  • 5. Autoencoders: structure ● Encoder: compress input into a latent-space of usually smaller dimension. h = f(x) ● Decoder: reconstruct input from the latent space. r = g(f(x)) with r as close to x as possible
  • 6. Autoencoders: applications ● Denoising: input clean image + noise and train to reproduce the clean image.
  • 7. Autoencoders: Applications ● Image colorization: input black and white and train to produce color images
  • 9. Properties of Autoencoders ●Data-specific: Autoencoders are only able to compress data similar to what they have been trained on. ●Lossy: The decompressed outputs will be degraded compared to the original inputs. ●Learned automatically from examples: It is easy to train specialized instances of the algorithm that will perform well on a specific type of input.
  • 10. Capacity ●As with other NNs, overfitting is a problem when capacity is too large for the data. ●Autoencoders address this through some combination of: ○Bottleneck layer – fewer degrees of freedom than in possible outputs. ○Training to denoise. ○Sparsity through regularization. ○Contractive penalty.
  • 11. Bottleneck layer (undercomplete) ● Suppose input images are nxn and the latent space is m < nxn. ● Then the latent space is not sufficient to reproduce all images. ● Needs to learn an encoding that captures the important features in training data, sufficient for approximate reconstruction.
  • 12. Simple bottleneck layer in Keras ○ input_img = Input(shape=(784,)) ○ encoding_dim = 32 ○ encoded = Dense(encoding_dim, activation='relu')(input_img) ○ decoded = Dense(784, activation='sigmoid')(encoded) ○ autoencoder = Model(input_img, decoded) ● Maps 28x28 images into a 32 dimensional vector. ● Can also use more layers and/or convolutions.
  • 13. Denoising autoencoders ● Basic autoencoder trains to minimize the loss between x and the reconstruction g(f(x)). ● Denoising autoencoders train to minimize the loss between x and g(f(x+w)), where w is random noise. ● Same possible architectures, different training data. ● Kaggle has a dataset on damaged documents.
  • 14. Denoising autoencoders ●Denoising autoencoders can’t simply memorize the input output relationship. ●Intuitively, a denoising autoencoder learns a projection from a neighborhood of our training data back onto the training data.
  • 15. Sparse autoencoders ●Construct a loss function to penalize activations within a layer. ●Usually regularize the weights of a network, not the activations. ●Individual nodes of a trained model that activate are data- dependent. ○Different inputs will result in activations of different nodes through the network. ●Selectively activate regions of the network depending on the input data.
  • 22. Sparse autoencoders ● Construct a loss function to penalize activations the network. ○ L1 Regularization: Penalize the absolute value of the vector of activations a in layer h for observation I ○ KL divergence: Use cross-entropy between average activation and desired activation
  • 41. Contractive autoencoders ●Arrange for similar inputs to have similar activations. ○ I.e., the derivative of the hidden layer activations are small with respect to the input. ●Denoising autoencoders make the reconstruction function (encoder+decoder) resist small perturbations of the input ●Contractive autoencoders make the feature extraction function (ie. encoder) resist infinitesimal perturbations of the input.
  • 42. Contractive autoencoders ● Contractive autoencoders make the feature extraction function (ie. encoder) resist infinitesimal perturbations of the input.
  • 43. Autoencoders ● Both the denoising and contractive autoencoder can perform well ○ Advantage of denoising autoencoder : simpler to implement-requires adding one or two lines of code to regular autoencoder-no need to compute Jacobian of hidden layer ○ Advantage of contractive autoencoder : gradient is deterministic -can use second order optimizers (conjugate gradient, LBFGS, etc.)-might be more stable than denoising autoencoder, which uses a sampled gradient ● To learn more on contractive autoencoders: ○ Contractive Auto-Encoders: Explicit Invariance During Feature Extraction. Salah Rifai, Pascal Vincent, Xavier Muller, Xavier Glorot et Yoshua Bengio, 2011.