GD Types
GD Types
dy = change in y
dx = change in x
• Advantages
1.Fewer model updates mean that this variant of the
steepest descent method is more computationally
efficient than the stochastic gradient descent
method.
2.Reducing the update frequency provides a more
stable error gradient and a more stable convergence
for some problems.
3.Separating forecast error calculations and model
updates provides a parallel processing-based
algorithm implementation.
. BATCH GRADIENT DESCENT:
• Disadvantages
1.A more stable error gradient can cause the model to
prematurely converge to a suboptimal set of parameters.
2.End-of-training epoch updates require the additional complexity
of accumulating prediction errors across all training examples.
3.The batch gradient descent method typically requires the entire
training dataset in memory and is implemented for use in the
algorithm.
4.Large datasets can result in very slow model updates or training
speeds.
5.Slow and require more computational power.
STOCHASTIC GRADIENT DESCENT:
• Keep small Hidden Layers: If the size of each hidden layer is kept
as small as possible, then the network will be forced to pick up only
the representative features of the data thus encoding the data.
• Regularization: In this method, a loss term is added to the cost
function which encourages the network to train in ways other than
copying the input.
• Denoising: Another way of constraining the network is to add noise to
the input and teach the network how to remove the noise from the
data.
• Tuning the Activation Functions: This method involves changing
the activation functions of various nodes so that a majority of the
nodes are dormant thus, effectively reducing the size of the hidden
layers.
Types of Autoencoders
There are diverse types of autoencoders and analyze the
advantages and disadvantages associated with different
variation:
• Denoising Autoencoder
Denoising autoencoder works on a partially corrupted input and trains to recover the
original undistorted image. As mentioned above, this method is an effective way to
constrain the network from simply copying the input and thus learn the underlying structure
and important features of the data.
• Advantages
1.This type of autoencoder can extract important features and reduce the noise or the useless
features.
2.Denoising autoencoders can be used as a form of data augmentation, the restored images
can be used as augmented data thus generating additional training samples.
• Disadvantages
1.Selecting the right type and level of noise to introduce can be challenging and may require
domain knowledge.
2.Denoising process can result into loss of some information that is needed from the
original input. This loss can impact accuracy of the output.
Sparse Autoencoder
This type of autoencoder typically contains more hidden units than the
input but only a few are allowed to be active at once. This property is
called the sparsity of the network. The sparsity of the network can be
controlled by either manually zeroing the required hidden units, tuning
the activation functions or by adding a loss term to the cost function.
• Advantages
1.The sparsity constraint in sparse autoencoders helps in filtering out
noise and irrelevant features during the encoding process.
2.These autoencoders often learn important and meaningful features
due to their emphasis on sparse activations.
• Disadvantages
1.The choice of hyperparameters play a significant role in the
performance of this autoencoder. Different inputs should result in the
activation of different nodes of the network.
2.The application of sparsity constraint increases computational
complexity.
Contractive Autoencoder (CAE)
i.e. the above penalty term is the Frobenius Norm of the encoder, the Frobenius norm
is just a generalization of the Euclidean norm.
In the above penalty term, we first need to calculate the Jacobian matrix of the
hidden layer, calculating a Jacobian of the hidden layer with respect to input is
similar to gradient calculation. Let’s first calculate the Jacobian of the hidden layer:
How Contractive Autoencoders Work