Long Short-Term Memory Networks
Dr. Dinesh K. Vishwakarma
PROFESSOR, DEPARTMENT OF INFORMATION TECHNOLOGY
DELHI TECHNOLOGICAL UNIVERSITY, DELHI.
Webpage: http://www.dtu.ac.in/Web/Departments/InformationTechnology/faculty/dkvishwakarma.php
Email: dinesh@dtu.ac.in
Outlines
Dinesh K. Vishwakarma, Ph.D.
2
4/29/26
Applications of LSTM includes:
What is LSTM?
Dinesh K. Vishwakarma, Ph.D.
3
4/29/26
RNN Cell
Dinesh K. Vishwakarma, Ph.D.
4
4/29/26
Problem with RNN
Dinesh K. Vishwakarma, Ph.D.
5
4/29/26
The colour of tree is “Green”
Performs Good
I live in Kashmir, India….where I like the weather and generally it is “cold”
Performs Poor
Distance between actual context and prediction is very less
LSTM Structure
Dinesh K. Vishwakarma, Ph.D.
6
4/29/26
LSTM Structure…
Dinesh K. Vishwakarma, Ph.D.
7
4/29/26
Forget Gate
Input Gate
Output Gate
LSTM Structure…
Dinesh K. Vishwakarma, Ph.D.
8
4/29/26
LSTM Structure…
Dinesh K. Vishwakarma, Ph.D.
9
4/29/26
LSTM Structure…
Dinesh K. Vishwakarma, Ph.D.
10
4/29/26
LSTM Structure…
Dinesh K. Vishwakarma, Ph.D.
11
4/29/26
LSTM WORKING (STEP BY STEP)
12
https://colah.github.io/posts/2015-08-Understanding-LSTMs/
1
What information we’re going to throw away from the cell state
Ex. Language Modelling
Want to add new Gender, then Forget the old one
2
What new information we’re going to store in the cell state
Ex. Language Modelling
Add the gender of new subject to the cell state
3
How much we decided to update each state value
Ex. Language Modelling
Drop old gender and add new Gender
4
Finally, we need to decide what we’re going to output
Ex. Language Modelling
Based on subject (singular or plural) a relevant verb may be added
LSTM
Dinesh K. Vishwakarma, Ph.D.
13
4/29/26
RNN & LSTM
Dinesh K. Vishwakarma, Ph.D.
14
4/29/26
Summary of LSTM
Dinesh K. Vishwakarma, Ph.D.
15
4/29/26
A case study: LSTM
Dinesh K. Vishwakarma, Ph.D.
16
4/29/26
Dataset
Dinesh K. Vishwakarma, Ph.D.
17
4/29/26
Training
Dinesh K. Vishwakarma, Ph.D.
18
4/29/26
Variants of LSTM
Dinesh K. Vishwakarma, Ph.D.
19
4/29/26
Variants of LSTM…
Dinesh K. Vishwakarma, Ph.D.
20
4/29/26
Variants of LSTM…GRU
Dinesh K. Vishwakarma, Ph.D.
21
4/29/26
GRU vs LSTM
Dinesh K. Vishwakarma, Ph.D.
22
4/29/26
GRU unit
Dinesh K. Vishwakarma, Ph.D.
23
4/29/26
Update Gate
Dinesh K. Vishwakarma, Ph.D.
24
4/29/26
The update gate helps the model to determine how much of the past information (from previous time steps) needs to be passed along to the future.
#2. Reset gate
Dinesh K. Vishwakarma, Ph.D.
25
4/29/26
#3. Current memory content
Dinesh K. Vishwakarma, Ph.D.
26
4/29/26
A new memory content which will use the reset gate to store the relevant information from the past.
#4. Final memory at current time step
Dinesh K. Vishwakarma, Ph.D.
27
4/29/26
Finally, h_t — blue line is a result of the summation of the outputs corresponding to the bright and dark red lines
GRU
Dinesh K. Vishwakarma, Ph.D.
28
4/29/26
LSTM and GRU
Dinesh K. Vishwakarma, Ph.D.
29
4/29/26
Amazing! This box of cereal gave me a perfectly balanced breakfast, as all things should be. I only eat half of it but will definitely be buying again!
Amazing! This box of cereal gave me a perfectly balanced breakfast, as all things should be. I only eat half of it but will definitely be buying again!
Summary of LSTM Variants
Dinesh K. Vishwakarma, Ph.D.
30
4/29/26
References
Dinesh K. Vishwakarma, Ph.D.
31
4/29/26
Thank You�Contact: dinesh@dtu.ac.in �Mobile: +91-9971339840
Dinesh K. Vishwakarma, Ph.D.
32
4/29/26