Simple Explanation of Recurrent Neural Network (RNN)

Omar Boufeloussen
The Startup
Published in
4 min readSep 3, 2020

--

Recurrent neural network is a type of neural network used to deal specifically with sequential data. Actually what makes RNN so powerful is the fact that it doesn't take into consideration just the actual input but also the previous input which allows it to memorize what happens previously. To get a better intuition on RNN let’s take the example of text classification, for this task we can use the classic machine learning algorithms like naive bayes but the problem with this algorithm, it takes a sentence as a set of independent words and precisely the frequency of each word without worrying about the composition of words or the order of words in a sentence which makes a huge difference to form the meaning of a sentence. RNN unlike those classic algorithms, works well on sequence data because it takes the word i as input and combine with the output of word i-1, the same thing would be applied for word i+1 and this is the reason it’s called recurrent neural network because clearly the neural network apply the same operations on each word i of the sentence.

Recurrent neural network

As you might be thinking enough bla bla show us how they work, and that's exactly what I’d do in the next part :

How RNN works :

In order to understand how RNN works under the hood, let’s take an example of NLP application Named entity…

--

--