LSTM by Bushra
LSTM by Bushra
Presentation on
❑ Introduction
❑ Sequence Modelling
❑ Features of LSTM
❑ Vanishing Gradient
❑ Long Short-Term Memory
❑ Difference between RNN and LSTM
❑ Working principle of LSTM
❑ Uses of LSTM
❑ Advantages & Disadvantages of LSTM
3
Introduction
⮚ Sequence modeling is the process of predicting the next word or character. It computes
the probability of words that will have a chance to occur subsequently in a particular
sequence.
⮚ This model will take a high probability value of word or character as output.
⮚ Unlike ANN, sequence modeling current output depends not only on current input but
also on the previous output.
What is sequential data?
There are several types of data such as- Time series, Speech data, Text data, Financial data,
Audio data, Video data.
5
Features of LSTM
1. Memory Cells: LSTM networks have special memory cells that allow them to
remember information over long sequences. They keep important information
while discarding irrelevant details.
2. Gates: LSTMs use three types of gates—forget gate, input gate, and output gate—
to control the flow of information:
⮚ Forget Gate: Decides what information to discard from the cell state.
⮚ Input Gate: Decides what new information to add to the cell state.
⮚ Output Gate: Controls what part of the cell state to output to the next
hidden state.
3. Cell State: This is the central piece of memory that carries information across time
steps, allowing the network to remember context over long sequences.
6
Vanishing Gradient
This combination of gates and cell state updates enables the LSTM Block Diagram of LSTM
to retain, forget, or add information over time, making it effective
for sequence data tasks like language modeling or time-series
forecasting.
11
Working principle of LSTM
12
Working principle of LSTM
13
Working principle of LSTM
14
Uses of LSTM
✔ Robot Control
✔ Human Action Recognition
✔ Time Series Prediction
✔ Speech Recognition
✔ Rhythm Learning
✔ Music Composition
✔ Handwriting Recognition
✔ End To End Translation
✔ Grammer Learning
✔ Microsoft
• End To End Speech Translation
✔ Google
• Speech Recognition On The Smartphone
• Smart Assistant Allo
15
Advantages & Disadvantages of LSTM
Advantages:
Longer-Term Memory:
LSTMs can capture longer dependencies, unlike traditional
RNNs.
Controlled Memory Flow:
The gating mechanisms allow selective memory updates.
Disadvantages:
Computationally Intensive:
LSTMs require more processing power and memory.
Training Complexity:
Longer training times due to the sequential nature and complexity of the
architecture.
16