How Do Neural Networks Learn? 🤖

Dr. Zsolnai explains how convolutional neural networks learn by visualizing what neurons detect across layers. Neurons build up simple features like wheels and car handles, then combine them into complex detectors like pose-invariant dog-head recognizers. An interactive demo shows how this works.
Chapters
Dear fellow scholars, this is two minute papers with Dr. Zsolnai. We have recently explored a few neural network based learning algorithms that could perform material editing, physics simulations and more. As some of these networks have hundreds of layers and often thousands of neurons within these layers, they are almost unfathomably complex. At this point, it makes sense to ask, can we understand what is going on inside these networks? Do we even have a fighting chance? Luckily, today, visualizing the inner workings of neural networks is a research subfield of its own. And the answer is yes. We learn more and more every year. But there is also plenty more to learn. Earlier we talked about a technique that we called activation maximization, which was about trying to find an input that makes a given neuron as excited as possible. This gives us some cues as to what the neural network is looking for in an image. A later work that proposes visualizing spatial activations gives us more information about these interactions between two or even more neurons. You see here with the dots that it provides us a dense sampling of the most likely activations. And this leads to a more complete, bigger picture view of the inner workings of the neural network. This is what it looks like if we run it on one image. It also provides us with way more extra value because so far we have only seen how the neural network reacts to one image. But this method can be extended to see its reaction to not one, but 1 million images. You can see an example of that here. Later it was also revealed that some of these image detector networks can assemble something that we call a pose invariant dog head detector. What this means is that it can detect a dog head in many different orientations. And look, you see that it gets very excited by all of these good boys plus this squirrel. Today's technique offers us an excellent tool to look into the inner workings of a convolutional neural network that is very capable of image related operations, for instance, image classification. The task here is that we have an input image of a mug or a red panda and the output should be a decision from the network that yes, what we are seeing is indeed a mug or a panda or not. They apply something that we call a convolutional filter over an image, which tries to find interesting patterns that differentiate objects from each other. You can see how the outputs are related to the input image here. As you see, the neurons in the next layer will be assembled as a combination of the neurons from the previous layer. When we use the term deep learning, we typically refer to neural networks that have two or more of these inner layers. Each subsequent layer is built by taking all the neurons in the previous layer, which select for the features relevant to what the next neuron represents, for instance the handle of the mug and inhibits everything else. To make this a little clearer, this previous work tried to detect whether we have a car in an image by using these neurons here. The upper part looks like a car window, the next one resembles a car body, and the bottom of the third neuron clearly contains a wheel detector. This is the information that the neurons in the next layer are looking for. In the end, we make a final decision as to whether this is a panda or a mug by adding up all the intermediate results. The bluer this part is, the more relevant this neuron is in the final decision here, the neural network concludes that this doesn't look like a lifeboat or a ladybug at all, but it looks like pizza. If we look at the other sums we see that the school bus and orange are not hopeless candidates. But still the neural network does not have much doubt whether this is a pizza or not. And the best part is that you can even try it yourself in your browser if you click the link in the video description, run these simulations and even upload your own image. Make sure that you upload or link something that belongs to one of these classes on the right to make this visualization work. So clearly there is plenty more work for us to do to properly understand what is going on under the hood of neural networks, but I hope this quick rundown showcased how many facets there are to this neural network visualization subfield and how exciting it is. Make sure to post your experience in the comment section whether the classification worked well for you or not. And if you wish to see more videos like this, make sure to subscribe and hit the bell icon to not miss future videos. What you see here is an instrumentation for a previous paper that we covered in this series of which was made by Weights and Biases. I think organizing these experiments really showcases the usability of their system. Weights and Biases provides tools to track your experiments in your deep learning projects. Their system is designed to save you a ton of time and money and it is actively used in projects at prestigious labs such as OpenAI, Toyota Research, GitHub and more. And the best part is that if you have an open source and academic or personal project, you can use their tools for free. It really is as good as it gets. Make sure to Visit them through wnb.com papers or just click the link in the video description to start tracking your experiments in five minutes. Our thanks to Weights and Biases for their long standing support and for helping us make better videos for you. Thanks for watching and for your generous support. And I'll see you next time.










