Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Vanishing and Exploding Gradients in Recurrent Neural Networks

Rating
-
Sold
-
Pages
4
Uploaded on
22-02-2025
Written in
2024/2025

The vanishing and exploding gradient problem are significant challenges in training Recurrent Neural Networks (RNNs), particularly when working with deep networks or with long sequences of data. This issue arises primarily due to the way backpropagation is conducted through time, and it significantly affects the learning process of RNNs. Let’s explore each of these problems in detail.

Show more Read less
Institution
Course

Content preview

Vanishing and Exploding Gradients in Recurrent
Neural Networks
Instructor: Jaskirat Singh
October 7, 2024


The vanishing and exploding gradient problem are significant challenges in training
Recurrent Neural Networks (RNNs), particularly when working with deep networks or with
long sequences of data. This issue arises primarily due to the way backpropagation is conducted
through time, and it significantly affects the learning process of RNNs. Let’s explore each of
these problems in detail.


1 The Backpropagation Through Time (BPTT) in RNNs
To understand the vanishing and exploding gradient problems, it’s helpful to briefly understand
Backpropagation Through Time (BPTT), which is the algorithm used to train RNNs.
During BPTT, the RNN unfolds over time, effectively forming a very deep network where each
layer represents the RNN’s state at a different timestep.
In BPTT, the gradients of the loss with respect to the weights are computed by propagating
errors back through each time step. However, this process involves repeated multiplication by the
derivative of the activation function and the weight matrix, which can cause gradients to either
shrink exponentially to near zero or grow exponentially to very large values. This phenomenon
is at the root of both the vanishing and exploding gradient problems.


2 The Vanishing Gradient Problem
• Definition: The vanishing gradient problem occurs when gradients become exceedingly
small as they are propagated back through time. As a result, the early layers (or time steps)
receive little to no updates during training. This makes it extremely difficult for the network to
learn dependencies that occur far back in time, hindering the model’s ability to learn long-term
relationships.

• Mathematical Perspective: During backpropagation, each partial derivative involves a
term that often depends on the weights and the activation function’s derivative. Typically,
activation functions like sigmoid or tanh have derivatives in the range (0, 1), meaning that



1

Written for

Institution
Course

Document information

Uploaded on
February 22, 2025
Number of pages
4
Written in
2024/2025
Type
Class notes
Professor(s)
Unknown
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
shreyanshkhandelwal

Get to know the seller

Seller avatar
shreyanshkhandelwal Poornima University
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
3
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions