Original article was published by Serokell on Artificial Intelligence on Medium
What Kinds of Neural Networks Exist?
There are so many different neural networks out there that it is simply impossible to mention them all. If you want to learn more about this variety, visit the neural network zoo, where you can see them all represented graphically.
Feed-forward neural networks
This is the simplest neural network algorithm. A feed-forward network doesn’t have any memory. That is, there is no going back in a feed-forward network. In many tasks, this approach is not very applicable. For example, when we work with text, the words form a certain sequence, and we want the machine to understand it.
Feed-forward neural networks can be applied in supervised learning when the data that you work with is not sequential or time-dependent. You can also use it if you don’t know how the output should be structured but want to build a relatively fast and easy NN.
Recurrent neural networks
A recurrent neural network can process texts, videos, or sets of images and become more precise every time because it remembers the results of the previous iteration and can use that information to make better decisions.
Recurrent neural networks are widely used in natural language processing and speech recognition.
Convolutional neural networks
Convolutional neural networks are the standard of today’s deep machine learning and are used to solve the majority of problems. Convolutional neural networks can be either feed-forward or recurrent.
Let’s see how they work. Imagine we have an image of Albert Einstein. We can assign a neuron to all pixels in the input image.
But there is a big problem here: If you connect each neuron to all pixels, then first you will get a lot of weights. Hence, it will be a very computationally intensive operation and take a very long time. Then there will be so many weights that this method will be very unstable to overfitting. It will predict everything well on the training example but work badly on other images.
Therefore, programmers came up with a different architecture, where each of the neurons is connected only to a small square in the image. All these neurons will have the same weights, and this design is called image convolution. We can say that we have transformed the picture, walked through it with a filter simplifying the process. Fewer weights, faster to count, less prone to overfitting.
For an awesome explanation of how convolutional neural networks work, watch this video by Luis Serrano.
Generative adversarial neural networks
A generative adversarial network is an unsupervised machine learning algorithm that is a combination of two neural networks, one (network G) that generates patterns and the other (network A) that tries to distinguish genuine samples from the fake ones. Since networks have opposite goals — to create samples and reject samples — they start an antagonistic game that turns out to be quite effective.
GANs are used, for example, to generate photographs that are perceived by the human eye as natural images or deepfakes (videos where real people say and do things they have never done in real life).