Demystifying Home Assistants

Demystifying Home Assistants

ยท

2 min read

How do home assistants like siri or alexa understand what you speak? It's because they use a special type of neural network to function. The Recurrent Neural Network.

Recurrent Neural network or RNNs for short are a special kind of neural networks because of their structure.

Let's compare them to the regular neural nets.

Regular Neural Nets

basic-neural-network.png This is how a regular neural net looks like. It consists of an input layer, some hidden layer(s) and one output layer.

Recurrent Neural Networks

recurrent-neural-network.png And this is how an RNN looks like. This also has one input layer and one output layer. But along with this it has a special kind of hidden layer, which along with passing it's output to the next layer, also feeds the output to itself.


Why RNNs?

Let's first understand the need of RNNs in the first place.

Regular Neural nets work with single units of data, for e.g In image recognition, you input an image and output a probability distribution.

But in tasks like text-autocompletion, you need to know the previous words in the sentence to predict new words according to the context of the previous words.

Regular Neural networks fail here, and that is why recurrent neural networks were invented.

Recurrent neural networks are favourable here because they use an algorithm called Back-Propagation through time, which essentially means that they can also take data from previous epochs as an input and then generate output.

time-series-recurrent-neural-network.png

RNNs are mostly used for tasks which include time-series. This includes, Text-autocompletion, speech recognition and generally tasks related to Natural Language.

RNNs are now also used in many other fields like sentiment analysis and video recognition. Infact an RNN generated by Google's Deepmind was able to recognise house-numbers from videos.

house_read.gif

This is it for now, new stuff coming soon. Follow @hrdkcodes as it does help out.

Thank you ๐Ÿ˜ƒ

ย