Introduction to Recurrent Neural Network

Knoldus Inc.
Knoldus Inc.CTO & Co-Founder at Knoldus Software em Knoldus Inc.
Presented By: Praanav Bhowmik
& Niraj Kumar
Introduction To RNN
Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
Punctuality
Join the session 5 minutes prior
to the session start time. We
start on time and conclude on
time!
Feedback
Make sure to submit a
constructive feedback for all
sessions as it is very helpful for
the presenter.
Silent Mode
Keep your mobile devices in
silent mode, feel free to move
out of session in case you need
to attend an urgent call.
Avoid Disturbance
Avoid unwanted chit chat during
the session.
Our Agenda
01 Introduction To Neural
Networks
02 What is Neural Network?
03
What is RNN?
04
Types of RNN
05
05
4
Feed Forward Neural
Network
Introduction To Neural
Network
What is Neural Network ?
Neural Networks used in Deep Learning, consists of different layers connected to each other and work on the
structure and functions of a human brain. It learns from huge volumes of data and uses complex algorithms to
train a neural network.
Popular Neural Networks
Introduction To RNN
Introduction to RNN
Do you know how Google’s autocomplete feature predicts the rest of the words a user is typing?
● In feed forward neural network, information always flows in one direction[forward], from the input nodes to
the hidden layers[if any], and then to output nodes. There are no cycles or loops in the network.
● Decisions are based on current input
● No memory about the past
● No future scope
Feed Forward Neural Network
● Feed forward Neural Network has several limitations due to architecture:
● Accepts a fixed-sized vector as input (e.g. an image)
● Produces a fixed-sized vector as output (e.g. probabilities of different classes)
● Performs such input-output mapping used a fixed amount of computational steps (e.g. the number of
layers)
● These limitations make it difficult to model time series problems when input and output are
real-valued sequences.
Feed Forward Neural Network : Limitations
What is Recurrent
Neural Network
● Recurrent Neural Network works on the principle of saving the output layer and feeding this back to the
input in order to predict the output of the layer.
Recurrent Neural Network
● Recurrent Neural Network is basically a generalization of feed-forward neural network that has
an internal memory. RNNs are a special kind of neural networks that are designed to effectively
deal with sequential data. This kind of data includes time series (a list of values of some
parameters over a certain period of time) text documents, which can be seen as a sequence of
words, or audio, which can be seen as a sequence of sound frequencies over time.
● RNN is recurrent in nature as it performs the same function for every input of data while the
output of the current input depends on the past one computation. For making a decision, it
considers the current input and the output that it has learned from the previous input.
● Cells that are a function of inputs from previous time steps are also known as memory cells.
● Unlike feed-forward neural networks, RNNs can use their internal state (memory) to process
sequences of inputs. In other neural networks, all the inputs are independent of each other. But in
RNN, all the inputs are related to each other.
● Recurrent Neural Network (RNN) is a neural network model proposed in the 80’s for modelling time series.
● The structure of the network is similar to feedforward neural network, with the distinction that it allows a
recurrent hidden state whose activation at each time is dependent on that of the previous time (cycle).
Recurrent Neural Network : Intuition
● The basic challenge of classic feed-forward neural network is that it has no memory, that is, each
training example given as input to the model is treated independent of each other. In order to
work with sequential data with such models we need to show them the entire sequence in one go
as one training example. This is problematic because number of words in a sentence could vary
and more importantly this is not how we tend to process a sentence in our head.
● When we read a sentence, we read it word by word, keep the prior words / context in memory
and then update our understanding based on the new words which we incrementally read to
understand the whole sentence. This is the basic idea behind the RNNs — they iterate through
the elements of input sequence while maintaining a internal “state”, which encodes everything
which it has seen so far. The “state” of the RNN is reset when processing two different and
independent sequences.
● Recurrent neural networks are a special type of neural network where the outputs from previous
time steps are fed as input to the current time step.
● Another distinguishing characteristic of recurrent networks is that they share parameters across
each layer of the network. While feed forward networks have different weights across each node,
recurrent neural networks share the same weight parameter within each layer of the network.
That said, these weights are still adjusted in the through the processes of backpropagation and
gradient descent to facilitate reinforcement learning.
Why RNN?
How does RNN look like?
How does RNN work?
● The way RNNs do this, is by taking the output of each neuron (input nodes are fed into a hidden layer
with sigmoid or tanh activations), and feeding it back to it as an input. By doing this, it does not only
receive new pieces of information in every time step, but it also adds to these new pieces of information
a w
̲ e̲ i̲g
̲ h
̲ t̲e̲ d
̲ ̲v
̲ e̲ r
̲ s̲ i̲o
̲ n
̲ of the previous output. As you can see the hidden layer outputs are passed through a
conceptual delay block to allow the input of h ᵗ⁻¹ into the hidden layer. What is the point of this? Simply,
the point is that we can now model time or sequence-dependent data.
● This makes these neurons have a kind of “memory” of the previous inputs it has had, as they are
somehow quantified by the output being fed back to the neuron.
● A particularly good example of this is in predicting text sequences. Consider the following text string:
“A girl walked into a bar, and she said ‘Can I have a drink please?’. The bartender said ‘Certainly { }”.
There are many options for what could fill in the { } symbol in the above string, for instance, “miss”,
“ma’am” and so on. However, other words could also fit, such as “sir”, “Mister” etc. In order to get the
correct gender of the noun, the neural network needs to “recall” that two previous words designating the
likely gender (i.e. “girl” and “she”) were used.
● A recurrent neural network can be thought of as multiple copies of the same network, each passing a
message to a successor. This type of flow of information through time (or sequence) in a recurrent
neural network is shown in the diagram below, which unrolls the sequence (loop unrolled):
● This unrolled network shows how we can supply a stream of data (intimately related to sequences, lists
and time-series data) to the recurrent neural network. For instance, first we supply the word vector for
“A” to the network F — the output of the nodes in F are fed into the “next” network and also act as a
stand-alone output ( h₀ ). The next network (though it’s the same network) F at time t=1 takes the next
word vector for “girl” and the previous output h₀ into its hidden nodes, producing the next output h₁ and
so on.
● NOTE: Although shown for easy explanation in Diagram, but the words themselves i.e. “A”, “girl” etc.
aren’t inputted directly into the neural network. Neither are their one-hot vector type representations —
rather, an embedding word vector (Word2Vec) is used for each word.
● One last thing to note — the weights of the connections between time steps are shared i.e. there isn’t a
different set of weights for each time step (it’s the same for all time steps BECAUSE we have the same
single RNN cell looped to itself)
Types of RNN
Introduction to Recurrent Neural Network
RNN Limitations
● The problem with RNNs is that as time passes by and they get fed more and more new data, they start to
“forget” about the previous data they have seen (vanishing gradient problem), as it gets diluted between
the new data, the transformation from activation function, and the weight multiplication. This means they
have a good short term memory, but a slight problem when trying to remember things that have
happened a while ago (data they have seen many time steps in the past).
● The more time steps we have, the more chance we have of back-propagation gradients either
accumulating and exploding or vanishing down to nothing.
● Consider the following representation of a recurrent neural network:
● Here, ht is the new state (current time stamp), ht₋₁is the previous state (previous time
stamp) while xₜ is the current input.
● Where U and V are the weight matrices connecting the inputs and the recurrent outputs
respectively. We then often will perform a softmax of all hₜ the outputs.
Notice, however, that if we go back three time steps in our recurrent neural network, we have the
following:
From the above you can see, as we work our way back in time, we are essentially adding deeper and deeper
layers to our network. This causes a problem — consider the gradient of the error with respect to the weight
matrix U during back-propagation through time, it looks something like this:
● The equation above is only a rough approximation of what is going on during back-propagation through time.
Each of these gradients will involve calculating the gradient of the sigmoid function. The problem with the
sigmoid function occurs when the input values are such that the output is close to either 0 or 1 — at this point, the
gradient is very small (saturating).
● For ex:- Lets say the value decreased like 0.863 →0.532 →0.356 →0.192 →0.117 →0.086 →0.023 →0.019..
● you can see that there is no much change in last 3 iterations.
● It means that when you multiply many sigmoid gradients together you are multiplying many values which are
potentially much less than zero — this leads to a vanishing gradient problem.
The mathematics that computes this change is multiplicative, which means that the gradient calculated in a step that is deep in the neural
network will be multiplied back through the weights earlier in the network. Said differently, the gradient calculated deep in the network is
"diluted" as it moves back through the net, which can cause the gradient to vanish - giving the name to the vanishing gradient problem!
The actual factor that is multiplied through a recurrent neural network in the backpropagation algorithm is referred to by the mathematical
variable Wrec. It poses two problems:
● When Wrec is small, we experience a vanishing gradient problem
● When Wrec is large, we experience an exploding gradient problem
Note that both of these problems are generally referred to by the simpler name of the "vanishing gradient problem".
Solving Vanishing Grandient Problem
Solving the Exploding Gradient Problem
● For exploding gradients, it is possible to use a modified version of the backpropagation algorithm called
truncated backpropagation. The truncated backpropagation algorithm limits that number of timesteps that
the backproporation will be performed on, stopping the algorithm before the exploding gradient problem
occurs.
● You can also introduce penalties, which are hard-coded techniques for reduces a backpropagation's
impact as it moves through shallower layers in a neural network.
● Lastly, you could introduce gradient clipping, which introduces an artificial ceiling that limits how large
the gradient can become in a backpropagation algorithm.
Solving the Vanishing Gradient Problem
● Weight initialization is one technique that can be used to solve the vanishing gradient problem. It involves
artificially creating an initial value for weights in a neural network to prevent the backpropagation algorithm
from assigning weights that are unrealistically small.
● You could also use echo state networks, which is a specific type of neural network designed to avoid the
vanishing gradient problem
● The most important solution to the vanishing gradient problem is a specific type of neural network called Long
Short-Term Memory Networks (LSTMs), which were pioneered by Sepp Hochreiter and Jürgen Schmidhuber.
Recall that Mr. Hochreiter was the scientist who originally discovered the vanishing gradient problem.
● LSTMs are used in problems primarily related to speech recognition, with one of the most notable examples
being Google using an LSTM for speech recognition in 2015 and experiencing a 49% decrease in transcription
errors.
● LSTMs are considered to be the go-to neural net for scientists interested in implementing recurrent neural
networks.
● MachineLearningMastery
● AnalyticsVidhya
● SlideShare
References
Thank You !
Get in touch with us:
Lorem Studio, Lord Building
D4456, LA, USA
1 de 28

Recomendados

Recurrent neural network por
Recurrent neural networkRecurrent neural network
Recurrent neural networkSyed Annus Ali SHah
1.3K visualizações13 slides
Recurrent Neural Networks, LSTM and GRU por
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRUananth
29.8K visualizações38 slides
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S... por
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Simplilearn
18.8K visualizações63 slides
Lstm por
LstmLstm
LstmMehrnaz Faraz
10.2K visualizações31 slides
Long Short Term Memory por
Long Short Term MemoryLong Short Term Memory
Long Short Term MemoryYan Xu
3K visualizações46 slides
Recurrent Neural Network por
Recurrent Neural NetworkRecurrent Neural Network
Recurrent Neural NetworkMohammad Sabouri
385 visualizações31 slides

Mais conteúdo relacionado

Mais procurados

RNN and its applications por
RNN and its applicationsRNN and its applications
RNN and its applicationsSungjoon Choi
8.1K visualizações108 slides
Recurrent Neural Networks por
Recurrent Neural NetworksRecurrent Neural Networks
Recurrent Neural NetworksSharath TS
895 visualizações35 slides
Rnn and lstm por
Rnn and lstmRnn and lstm
Rnn and lstmShreshth Saxena
1.1K visualizações15 slides
Understanding RNN and LSTM por
Understanding RNN and LSTMUnderstanding RNN and LSTM
Understanding RNN and LSTM健程 杨
3.3K visualizações15 slides
Introduction to Recurrent Neural Network por
Introduction to Recurrent Neural NetworkIntroduction to Recurrent Neural Network
Introduction to Recurrent Neural NetworkYan Xu
4.8K visualizações32 slides
rnn BASICS por
rnn BASICSrnn BASICS
rnn BASICSPriyanka Reddy
216 visualizações57 slides

Mais procurados(20)

RNN and its applications por Sungjoon Choi
RNN and its applicationsRNN and its applications
RNN and its applications
Sungjoon Choi8.1K visualizações
Recurrent Neural Networks por Sharath TS
Recurrent Neural NetworksRecurrent Neural Networks
Recurrent Neural Networks
Sharath TS895 visualizações
Rnn and lstm por Shreshth Saxena
Rnn and lstmRnn and lstm
Rnn and lstm
Shreshth Saxena1.1K visualizações
Understanding RNN and LSTM por 健程 杨
Understanding RNN and LSTMUnderstanding RNN and LSTM
Understanding RNN and LSTM
健程 杨3.3K visualizações
Introduction to Recurrent Neural Network por Yan Xu
Introduction to Recurrent Neural NetworkIntroduction to Recurrent Neural Network
Introduction to Recurrent Neural Network
Yan Xu4.8K visualizações
rnn BASICS por Priyanka Reddy
rnn BASICSrnn BASICS
rnn BASICS
Priyanka Reddy216 visualizações
Deep Learning: Recurrent Neural Network (Chapter 10) por Larry Guo
Deep Learning: Recurrent Neural Network (Chapter 10) Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10)
Larry Guo3.8K visualizações
Multilayer perceptron por omaraldabash
Multilayer perceptronMultilayer perceptron
Multilayer perceptron
omaraldabash1.9K visualizações
RNN & LSTM: Neural Network for Sequential Data por Yao-Chieh Hu
RNN & LSTM: Neural Network for Sequential DataRNN & LSTM: Neural Network for Sequential Data
RNN & LSTM: Neural Network for Sequential Data
Yao-Chieh Hu1K visualizações
Deep Learning - CNN and RNN por Ashray Bhandare
Deep Learning - CNN and RNNDeep Learning - CNN and RNN
Deep Learning - CNN and RNN
Ashray Bhandare5.9K visualizações
LSTM por 佳蓉 倪
LSTMLSTM
LSTM
佳蓉 倪1.4K visualizações
Recurrent Neural Networks. Part 1: Theory por Andrii Gakhov
Recurrent Neural Networks. Part 1: TheoryRecurrent Neural Networks. Part 1: Theory
Recurrent Neural Networks. Part 1: Theory
Andrii Gakhov14.2K visualizações
Time series predictions using LSTMs por Setu Chokshi
Time series predictions using LSTMsTime series predictions using LSTMs
Time series predictions using LSTMs
Setu Chokshi2K visualizações
Back propagation por Nagarajan
Back propagationBack propagation
Back propagation
Nagarajan66.7K visualizações
Perceptron & Neural Networks por NAGUR SHAREEF SHAIK
Perceptron & Neural NetworksPerceptron & Neural Networks
Perceptron & Neural Networks
NAGUR SHAREEF SHAIK3.6K visualizações
Sequence Modelling with Deep Learning por Natasha Latysheva
Sequence Modelling with Deep LearningSequence Modelling with Deep Learning
Sequence Modelling with Deep Learning
Natasha Latysheva617 visualizações
Introduction to CNN por Shuai Zhang
Introduction to CNNIntroduction to CNN
Introduction to CNN
Shuai Zhang8.9K visualizações
Recurrent Neural Networks por CloudxLab
Recurrent Neural NetworksRecurrent Neural Networks
Recurrent Neural Networks
CloudxLab914 visualizações
Neural Networks: Least Mean Square (LSM) Algorithm por Mostafa G. M. Mostafa
Neural Networks: Least Mean Square (LSM) AlgorithmNeural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) Algorithm
Mostafa G. M. Mostafa14.3K visualizações
Convolutional Neural Networks (CNN) por Gaurav Mittal
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)
Gaurav Mittal58.5K visualizações

Similar a Introduction to Recurrent Neural Network

An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML por
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIMLAn In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIMLVijaySharma802
26 visualizações9 slides
An Introduction to Long Short-term Memory (LSTMs) por
An Introduction to Long Short-term Memory (LSTMs)An Introduction to Long Short-term Memory (LSTMs)
An Introduction to Long Short-term Memory (LSTMs)EmmanuelJosterSsenjo
46 visualizações13 slides
EXPERIMENTS ON DIFFERENT RECURRENT NEURAL NETWORKS FOR ENGLISH-HINDI MACHINE ... por
EXPERIMENTS ON DIFFERENT RECURRENT NEURAL NETWORKS FOR ENGLISH-HINDI MACHINE ...EXPERIMENTS ON DIFFERENT RECURRENT NEURAL NETWORKS FOR ENGLISH-HINDI MACHINE ...
EXPERIMENTS ON DIFFERENT RECURRENT NEURAL NETWORKS FOR ENGLISH-HINDI MACHINE ...csandit
213 visualizações12 slides
Introduction to deep learning por
Introduction to deep learningIntroduction to deep learning
Introduction to deep learningJunaid Bhat
1.4K visualizações61 slides
Neuralnetwork 101222074552-phpapp02 por
Neuralnetwork 101222074552-phpapp02Neuralnetwork 101222074552-phpapp02
Neuralnetwork 101222074552-phpapp02Deepu Gupta
1.3K visualizações47 slides
Neural network final NWU 4.3 Graphics Course por
Neural network final NWU 4.3 Graphics CourseNeural network final NWU 4.3 Graphics Course
Neural network final NWU 4.3 Graphics CourseMohaiminur Rahman
941 visualizações41 slides

Similar a Introduction to Recurrent Neural Network(20)

An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML por VijaySharma802
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIMLAn In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
VijaySharma80226 visualizações
An Introduction to Long Short-term Memory (LSTMs) por EmmanuelJosterSsenjo
An Introduction to Long Short-term Memory (LSTMs)An Introduction to Long Short-term Memory (LSTMs)
An Introduction to Long Short-term Memory (LSTMs)
EmmanuelJosterSsenjo46 visualizações
EXPERIMENTS ON DIFFERENT RECURRENT NEURAL NETWORKS FOR ENGLISH-HINDI MACHINE ... por csandit
EXPERIMENTS ON DIFFERENT RECURRENT NEURAL NETWORKS FOR ENGLISH-HINDI MACHINE ...EXPERIMENTS ON DIFFERENT RECURRENT NEURAL NETWORKS FOR ENGLISH-HINDI MACHINE ...
EXPERIMENTS ON DIFFERENT RECURRENT NEURAL NETWORKS FOR ENGLISH-HINDI MACHINE ...
csandit213 visualizações
Introduction to deep learning por Junaid Bhat
Introduction to deep learningIntroduction to deep learning
Introduction to deep learning
Junaid Bhat1.4K visualizações
Neuralnetwork 101222074552-phpapp02 por Deepu Gupta
Neuralnetwork 101222074552-phpapp02Neuralnetwork 101222074552-phpapp02
Neuralnetwork 101222074552-phpapp02
Deepu Gupta1.3K visualizações
Neural network final NWU 4.3 Graphics Course por Mohaiminur Rahman
Neural network final NWU 4.3 Graphics CourseNeural network final NWU 4.3 Graphics Course
Neural network final NWU 4.3 Graphics Course
Mohaiminur Rahman941 visualizações
lepibwp74jd2rz.pdf por SajalTyagi6
lepibwp74jd2rz.pdflepibwp74jd2rz.pdf
lepibwp74jd2rz.pdf
SajalTyagi67 visualizações
Quantum neural network por surat murthy
Quantum neural networkQuantum neural network
Quantum neural network
surat murthy580 visualizações
Applying Deep Learning Machine Translation to Language Services por Yannis Flet-Berliac
Applying Deep Learning Machine Translation to Language ServicesApplying Deep Learning Machine Translation to Language Services
Applying Deep Learning Machine Translation to Language Services
Yannis Flet-Berliac320 visualizações
Artificial Neural Network in Medical Diagnosis por Adityendra Kumar Singh
Artificial Neural Network in Medical DiagnosisArtificial Neural Network in Medical Diagnosis
Artificial Neural Network in Medical Diagnosis
Adityendra Kumar Singh747 visualizações
Terminology Machine Learning por DataminingTools Inc
Terminology Machine LearningTerminology Machine Learning
Terminology Machine Learning
DataminingTools Inc2.5K visualizações
Neural networks are parallel computing devices.docx.pdf por neelamsanjeevkumar
Neural networks are parallel computing devices.docx.pdfNeural networks are parallel computing devices.docx.pdf
Neural networks are parallel computing devices.docx.pdf
neelamsanjeevkumar11 visualizações
Rnn presentation 2 por Shubhangi Tandon
Rnn presentation 2Rnn presentation 2
Rnn presentation 2
Shubhangi Tandon249 visualizações
Neural Networks Ver1 por ncct
Neural  Networks  Ver1Neural  Networks  Ver1
Neural Networks Ver1
ncct2.2K visualizações
Deep Learning - RNN and CNN por Pradnya Saval
Deep Learning - RNN and CNNDeep Learning - RNN and CNN
Deep Learning - RNN and CNN
Pradnya Saval377 visualizações
Neural networks and deep learning por RADO7900
Neural networks and deep learningNeural networks and deep learning
Neural networks and deep learning
RADO790095 visualizações
Artificial Neural Network por Mhd Khaled Alhalai
Artificial Neural NetworkArtificial Neural Network
Artificial Neural Network
Mhd Khaled Alhalai67 visualizações
Tamil Character Recognition based on Back Propagation Neural Networks por DR.P.S.JAGADEESH KUMAR
Tamil Character Recognition based on Back Propagation Neural NetworksTamil Character Recognition based on Back Propagation Neural Networks
Tamil Character Recognition based on Back Propagation Neural Networks
DR.P.S.JAGADEESH KUMAR213 visualizações
MaLAI_Hyderabad presentation por Gurram Poorna Prudhvi
MaLAI_Hyderabad presentationMaLAI_Hyderabad presentation
MaLAI_Hyderabad presentation
Gurram Poorna Prudhvi238 visualizações
Understanding Deep Learning & Parameter Tuning with MXnet, H2o Package in R por Manish Saraswat
Understanding Deep Learning & Parameter Tuning with MXnet, H2o Package in RUnderstanding Deep Learning & Parameter Tuning with MXnet, H2o Package in R
Understanding Deep Learning & Parameter Tuning with MXnet, H2o Package in R
Manish Saraswat483 visualizações

Mais de Knoldus Inc.

Graylog por
GraylogGraylog
GraylogKnoldus Inc.
103 visualizações13 slides
Getting Started with Delta Lake on Databricks por
Getting Started with Delta Lake on DatabricksGetting Started with Delta Lake on Databricks
Getting Started with Delta Lake on DatabricksKnoldus Inc.
285 visualizações15 slides
Design Thinking in Project Management por
Design Thinking in Project ManagementDesign Thinking in Project Management
Design Thinking in Project ManagementKnoldus Inc.
48 visualizações12 slides
SpringBoot 3 Observability por
SpringBoot 3 ObservabilitySpringBoot 3 Observability
SpringBoot 3 ObservabilityKnoldus Inc.
221 visualizações10 slides
Cypress Best Pratices for Test Automation por
Cypress Best Pratices for Test AutomationCypress Best Pratices for Test Automation
Cypress Best Pratices for Test AutomationKnoldus Inc.
46 visualizações22 slides
Business Process Automation A Productivity Lever por
Business Process Automation A Productivity LeverBusiness Process Automation A Productivity Lever
Business Process Automation A Productivity LeverKnoldus Inc.
118 visualizações17 slides

Mais de Knoldus Inc.(20)

Graylog por Knoldus Inc.
GraylogGraylog
Graylog
Knoldus Inc.103 visualizações
Getting Started with Delta Lake on Databricks por Knoldus Inc.
Getting Started with Delta Lake on DatabricksGetting Started with Delta Lake on Databricks
Getting Started with Delta Lake on Databricks
Knoldus Inc.285 visualizações
Design Thinking in Project Management por Knoldus Inc.
Design Thinking in Project ManagementDesign Thinking in Project Management
Design Thinking in Project Management
Knoldus Inc.48 visualizações
SpringBoot 3 Observability por Knoldus Inc.
SpringBoot 3 ObservabilitySpringBoot 3 Observability
SpringBoot 3 Observability
Knoldus Inc.221 visualizações
Cypress Best Pratices for Test Automation por Knoldus Inc.
Cypress Best Pratices for Test AutomationCypress Best Pratices for Test Automation
Cypress Best Pratices for Test Automation
Knoldus Inc.46 visualizações
Business Process Automation A Productivity Lever por Knoldus Inc.
Business Process Automation A Productivity LeverBusiness Process Automation A Productivity Lever
Business Process Automation A Productivity Lever
Knoldus Inc.118 visualizações
Resilience4j with Spring Boot por Knoldus Inc.
Resilience4j with Spring BootResilience4j with Spring Boot
Resilience4j with Spring Boot
Knoldus Inc.162 visualizações
KnolX-K9S por Knoldus Inc.
KnolX-K9SKnolX-K9S
KnolX-K9S
Knoldus Inc.13 visualizações
Dig Deeper With http4s por Knoldus Inc.
Dig Deeper With http4sDig Deeper With http4s
Dig Deeper With http4s
Knoldus Inc.22 visualizações
Ansible Tower por Knoldus Inc.
Ansible TowerAnsible Tower
Ansible Tower
Knoldus Inc.192 visualizações
Scaled Agile Framework por Knoldus Inc.
Scaled Agile FrameworkScaled Agile Framework
Scaled Agile Framework
Knoldus Inc.237 visualizações
Twitter Finagle por Knoldus Inc.
Twitter FinagleTwitter Finagle
Twitter Finagle
Knoldus Inc.43 visualizações
Why Should we use Microsoft's Playwright por Knoldus Inc.
Why Should we use Microsoft's PlaywrightWhy Should we use Microsoft's Playwright
Why Should we use Microsoft's Playwright
Knoldus Inc.823 visualizações
Navigation and Routing in Ionic Apps por Knoldus Inc.
Navigation and Routing in Ionic AppsNavigation and Routing in Ionic Apps
Navigation and Routing in Ionic Apps
Knoldus Inc.95 visualizações
Methods of Optimization in Machine Learning por Knoldus Inc.
Methods of Optimization in Machine LearningMethods of Optimization in Machine Learning
Methods of Optimization in Machine Learning
Knoldus Inc.376 visualizações
Vertex AI Presentation por Knoldus Inc.
Vertex AI PresentationVertex AI Presentation
Vertex AI Presentation
Knoldus Inc.126 visualizações
Reactive Programming por Knoldus Inc.
Reactive ProgrammingReactive Programming
Reactive Programming
Knoldus Inc.31 visualizações
KnolX AWS Tech. Stack por Knoldus Inc.
KnolX AWS Tech. StackKnolX AWS Tech. Stack
KnolX AWS Tech. Stack
Knoldus Inc.91 visualizações
Introduction to Amazon Kinesis Data Streams por Knoldus Inc.
Introduction to Amazon Kinesis Data StreamsIntroduction to Amazon Kinesis Data Streams
Introduction to Amazon Kinesis Data Streams
Knoldus Inc.24 visualizações
Getting started with FP IO por Knoldus Inc.
Getting started with FP IOGetting started with FP IO
Getting started with FP IO
Knoldus Inc.12 visualizações

Último

Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue por
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueShapeBlue
147 visualizações20 slides
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... por
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...ShapeBlue
113 visualizações18 slides
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT por
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITShapeBlue
138 visualizações8 slides
Business Analyst Series 2023 - Week 4 Session 7 por
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7DianaGray10
110 visualizações31 slides
State of the Union - Rohit Yadav - Apache CloudStack por
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStackShapeBlue
218 visualizações53 slides
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O... por
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...ShapeBlue
59 visualizações13 slides

Último(20)

Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue por ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue147 visualizações
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... por ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue113 visualizações
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT por ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue138 visualizações
Business Analyst Series 2023 - Week 4 Session 7 por DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10110 visualizações
State of the Union - Rohit Yadav - Apache CloudStack por ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue218 visualizações
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O... por ShapeBlue
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
ShapeBlue59 visualizações
DRBD Deep Dive - Philipp Reisner - LINBIT por ShapeBlue
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBIT
ShapeBlue110 visualizações
Uni Systems for Power Platform.pptx por Uni Systems S.M.S.A.
Uni Systems for Power Platform.pptxUni Systems for Power Platform.pptx
Uni Systems for Power Platform.pptx
Uni Systems S.M.S.A.60 visualizações
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool por ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue56 visualizações
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue por ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue68 visualizações
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... por ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue69 visualizações
The Power of Heat Decarbonisation Plans in the Built Environment por IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE67 visualizações
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue por ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue134 visualizações
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue por ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue149 visualizações
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... por ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue114 visualizações
Future of AR - Facebook Presentation por Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty54 visualizações
Ransomware is Knocking your Door_Final.pdf por Security Bootcamp
Ransomware is Knocking your Door_Final.pdfRansomware is Knocking your Door_Final.pdf
Ransomware is Knocking your Door_Final.pdf
Security Bootcamp81 visualizações
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... por ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue52 visualizações
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... por ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue97 visualizações

Introduction to Recurrent Neural Network

  • 1. Presented By: Praanav Bhowmik & Niraj Kumar Introduction To RNN
  • 2. Lack of etiquette and manners is a huge turn off. KnolX Etiquettes Punctuality Join the session 5 minutes prior to the session start time. We start on time and conclude on time! Feedback Make sure to submit a constructive feedback for all sessions as it is very helpful for the presenter. Silent Mode Keep your mobile devices in silent mode, feel free to move out of session in case you need to attend an urgent call. Avoid Disturbance Avoid unwanted chit chat during the session.
  • 3. Our Agenda 01 Introduction To Neural Networks 02 What is Neural Network? 03 What is RNN? 04 Types of RNN 05 05 4 Feed Forward Neural Network
  • 5. What is Neural Network ? Neural Networks used in Deep Learning, consists of different layers connected to each other and work on the structure and functions of a human brain. It learns from huge volumes of data and uses complex algorithms to train a neural network.
  • 8. Introduction to RNN Do you know how Google’s autocomplete feature predicts the rest of the words a user is typing?
  • 9. ● In feed forward neural network, information always flows in one direction[forward], from the input nodes to the hidden layers[if any], and then to output nodes. There are no cycles or loops in the network. ● Decisions are based on current input ● No memory about the past ● No future scope Feed Forward Neural Network
  • 10. ● Feed forward Neural Network has several limitations due to architecture: ● Accepts a fixed-sized vector as input (e.g. an image) ● Produces a fixed-sized vector as output (e.g. probabilities of different classes) ● Performs such input-output mapping used a fixed amount of computational steps (e.g. the number of layers) ● These limitations make it difficult to model time series problems when input and output are real-valued sequences. Feed Forward Neural Network : Limitations
  • 12. ● Recurrent Neural Network works on the principle of saving the output layer and feeding this back to the input in order to predict the output of the layer. Recurrent Neural Network
  • 13. ● Recurrent Neural Network is basically a generalization of feed-forward neural network that has an internal memory. RNNs are a special kind of neural networks that are designed to effectively deal with sequential data. This kind of data includes time series (a list of values of some parameters over a certain period of time) text documents, which can be seen as a sequence of words, or audio, which can be seen as a sequence of sound frequencies over time. ● RNN is recurrent in nature as it performs the same function for every input of data while the output of the current input depends on the past one computation. For making a decision, it considers the current input and the output that it has learned from the previous input. ● Cells that are a function of inputs from previous time steps are also known as memory cells. ● Unlike feed-forward neural networks, RNNs can use their internal state (memory) to process sequences of inputs. In other neural networks, all the inputs are independent of each other. But in RNN, all the inputs are related to each other.
  • 14. ● Recurrent Neural Network (RNN) is a neural network model proposed in the 80’s for modelling time series. ● The structure of the network is similar to feedforward neural network, with the distinction that it allows a recurrent hidden state whose activation at each time is dependent on that of the previous time (cycle). Recurrent Neural Network : Intuition
  • 15. ● The basic challenge of classic feed-forward neural network is that it has no memory, that is, each training example given as input to the model is treated independent of each other. In order to work with sequential data with such models we need to show them the entire sequence in one go as one training example. This is problematic because number of words in a sentence could vary and more importantly this is not how we tend to process a sentence in our head. ● When we read a sentence, we read it word by word, keep the prior words / context in memory and then update our understanding based on the new words which we incrementally read to understand the whole sentence. This is the basic idea behind the RNNs — they iterate through the elements of input sequence while maintaining a internal “state”, which encodes everything which it has seen so far. The “state” of the RNN is reset when processing two different and independent sequences. ● Recurrent neural networks are a special type of neural network where the outputs from previous time steps are fed as input to the current time step. ● Another distinguishing characteristic of recurrent networks is that they share parameters across each layer of the network. While feed forward networks have different weights across each node, recurrent neural networks share the same weight parameter within each layer of the network. That said, these weights are still adjusted in the through the processes of backpropagation and gradient descent to facilitate reinforcement learning. Why RNN?
  • 16. How does RNN look like?
  • 17. How does RNN work?
  • 18. ● The way RNNs do this, is by taking the output of each neuron (input nodes are fed into a hidden layer with sigmoid or tanh activations), and feeding it back to it as an input. By doing this, it does not only receive new pieces of information in every time step, but it also adds to these new pieces of information a w ̲ e̲ i̲g ̲ h ̲ t̲e̲ d ̲ ̲v ̲ e̲ r ̲ s̲ i̲o ̲ n ̲ of the previous output. As you can see the hidden layer outputs are passed through a conceptual delay block to allow the input of h ᵗ⁻¹ into the hidden layer. What is the point of this? Simply, the point is that we can now model time or sequence-dependent data. ● This makes these neurons have a kind of “memory” of the previous inputs it has had, as they are somehow quantified by the output being fed back to the neuron. ● A particularly good example of this is in predicting text sequences. Consider the following text string: “A girl walked into a bar, and she said ‘Can I have a drink please?’. The bartender said ‘Certainly { }”. There are many options for what could fill in the { } symbol in the above string, for instance, “miss”, “ma’am” and so on. However, other words could also fit, such as “sir”, “Mister” etc. In order to get the correct gender of the noun, the neural network needs to “recall” that two previous words designating the likely gender (i.e. “girl” and “she”) were used. ● A recurrent neural network can be thought of as multiple copies of the same network, each passing a message to a successor. This type of flow of information through time (or sequence) in a recurrent neural network is shown in the diagram below, which unrolls the sequence (loop unrolled):
  • 19. ● This unrolled network shows how we can supply a stream of data (intimately related to sequences, lists and time-series data) to the recurrent neural network. For instance, first we supply the word vector for “A” to the network F — the output of the nodes in F are fed into the “next” network and also act as a stand-alone output ( h₀ ). The next network (though it’s the same network) F at time t=1 takes the next word vector for “girl” and the previous output h₀ into its hidden nodes, producing the next output h₁ and so on. ● NOTE: Although shown for easy explanation in Diagram, but the words themselves i.e. “A”, “girl” etc. aren’t inputted directly into the neural network. Neither are their one-hot vector type representations — rather, an embedding word vector (Word2Vec) is used for each word. ● One last thing to note — the weights of the connections between time steps are shared i.e. there isn’t a different set of weights for each time step (it’s the same for all time steps BECAUSE we have the same single RNN cell looped to itself)
  • 22. RNN Limitations ● The problem with RNNs is that as time passes by and they get fed more and more new data, they start to “forget” about the previous data they have seen (vanishing gradient problem), as it gets diluted between the new data, the transformation from activation function, and the weight multiplication. This means they have a good short term memory, but a slight problem when trying to remember things that have happened a while ago (data they have seen many time steps in the past). ● The more time steps we have, the more chance we have of back-propagation gradients either accumulating and exploding or vanishing down to nothing. ● Consider the following representation of a recurrent neural network: ● Here, ht is the new state (current time stamp), ht₋₁is the previous state (previous time stamp) while xₜ is the current input. ● Where U and V are the weight matrices connecting the inputs and the recurrent outputs respectively. We then often will perform a softmax of all hₜ the outputs.
  • 23. Notice, however, that if we go back three time steps in our recurrent neural network, we have the following: From the above you can see, as we work our way back in time, we are essentially adding deeper and deeper layers to our network. This causes a problem — consider the gradient of the error with respect to the weight matrix U during back-propagation through time, it looks something like this: ● The equation above is only a rough approximation of what is going on during back-propagation through time. Each of these gradients will involve calculating the gradient of the sigmoid function. The problem with the sigmoid function occurs when the input values are such that the output is close to either 0 or 1 — at this point, the gradient is very small (saturating). ● For ex:- Lets say the value decreased like 0.863 →0.532 →0.356 →0.192 →0.117 →0.086 →0.023 →0.019.. ● you can see that there is no much change in last 3 iterations. ● It means that when you multiply many sigmoid gradients together you are multiplying many values which are potentially much less than zero — this leads to a vanishing gradient problem.
  • 24. The mathematics that computes this change is multiplicative, which means that the gradient calculated in a step that is deep in the neural network will be multiplied back through the weights earlier in the network. Said differently, the gradient calculated deep in the network is "diluted" as it moves back through the net, which can cause the gradient to vanish - giving the name to the vanishing gradient problem! The actual factor that is multiplied through a recurrent neural network in the backpropagation algorithm is referred to by the mathematical variable Wrec. It poses two problems: ● When Wrec is small, we experience a vanishing gradient problem ● When Wrec is large, we experience an exploding gradient problem Note that both of these problems are generally referred to by the simpler name of the "vanishing gradient problem".
  • 25. Solving Vanishing Grandient Problem Solving the Exploding Gradient Problem ● For exploding gradients, it is possible to use a modified version of the backpropagation algorithm called truncated backpropagation. The truncated backpropagation algorithm limits that number of timesteps that the backproporation will be performed on, stopping the algorithm before the exploding gradient problem occurs. ● You can also introduce penalties, which are hard-coded techniques for reduces a backpropagation's impact as it moves through shallower layers in a neural network. ● Lastly, you could introduce gradient clipping, which introduces an artificial ceiling that limits how large the gradient can become in a backpropagation algorithm.
  • 26. Solving the Vanishing Gradient Problem ● Weight initialization is one technique that can be used to solve the vanishing gradient problem. It involves artificially creating an initial value for weights in a neural network to prevent the backpropagation algorithm from assigning weights that are unrealistically small. ● You could also use echo state networks, which is a specific type of neural network designed to avoid the vanishing gradient problem ● The most important solution to the vanishing gradient problem is a specific type of neural network called Long Short-Term Memory Networks (LSTMs), which were pioneered by Sepp Hochreiter and Jürgen Schmidhuber. Recall that Mr. Hochreiter was the scientist who originally discovered the vanishing gradient problem. ● LSTMs are used in problems primarily related to speech recognition, with one of the most notable examples being Google using an LSTM for speech recognition in 2015 and experiencing a 49% decrease in transcription errors. ● LSTMs are considered to be the go-to neural net for scientists interested in implementing recurrent neural networks.
  • 28. Thank You ! Get in touch with us: Lorem Studio, Lord Building D4456, LA, USA