The future will not be supervised... | Machine Learning Monthly July 2020

Daniel Bourke covers July 2020's machine learning breakthroughs, focusing on OpenAI's GPT-3 with 175 billion parameters and Facebook's self-supervised vision work that outperforms supervised learning. He argues the future of AI relies less on hand-labeled data and more on models learning directly from raw data.
Chapters
Friends, I have an incredible idea. You know what? It's, it's, it's the first third of August. So how about we go through— hold on, give me a second. How about we go through the July edition of Machine Learning Monthly? That's it. Yeah. July 2020, which is last month. So I've been starting to make video versions of this article that I write every month. If you're not sure what Machine Learning Monthly is, it's the 7th issue now, July actually. I started writing at the start of the year. On the Zero to Mastery blog, and it's just a collection of all of the, the coolest things that I found over the last month or so in machine learning. Because let's face it, there is a lot going on. So without any further ado, how about we spend the rest of this video just going through and discussing some of the coolest things in this article? And if you do want any of the links that get talked about, or if you just want to read the article yourself, which is probably a quicker version than just watching this whole video, Check the description below. Everything you need will be there. Anyway, let's get into it. There's me. We go here. So what you missed in July as a machine learning engineer. And so I made a few things this month, namely the 2020 Machine Learning Roadmap, which is a feature film length video. You might have seen it on the channel already, but it's, yes, it's 2.5 hours long connecting some of the most important concepts in, in machine learning. Of course, not all of them, but just some of the most foundational ones to get you started. I mean, when I first started, one of the hardest things about machine learning was just the sheer amount of information that was out there. And since I'm a very visual person, I like things to be connected with pretty colors. And so that's what the Machine Learning Roadmap gives you. Not only is it an interactable little, um, how do you say, mind map? There's also a walkthrough video to go along with it. So be sure to check that out if you're interested in, um, in learning about machine learning. There's a whole bunch of different resources to go along with them, but there's a whole video dedicated to that. We don't have to talk about that. I also did an interview with Ken Jee, which is on the channel as well, but you're not here to hear about my work. You're here to hear about the best from the internet. And now you might have seen over the last month or so, there's been a lot about GPT-3, or whenever the paper first came out, it was, it's pretty big news. And so what GPT-3 stands for, if you're not sure, is I think it's General Purpose Transformer. Now, if you, if that's incorrect, please correct me in the comments. But it's General Purpose Transformer version 3. And if you're not sure what that is, well, a transformer is a natural language processing architecture. Well, it No, sorry. It's a machine learning architecture. Now I say natural language processing, but the reason why I pause there is because it can be also used for vision. Like a lot of machine learning models and deep learning models just aren't specifically for one topic, even though a convolutional neural network is very effective for images, it can also be used for text. Same with a transformer. Let's go to OpenAI. OpenAI. Here we go. Here's what kind of kicked off all the fun with GPT-3. OpenAI, if you're not— if you haven't heard of them, you probably have. Let's be face— let's face it, if you're watching this video, they're an AI research company and they've just recently launched their OpenAI API, which is powered by— if we go here, GPT-3, and let's just search here. GPT-3, which is a massive language model. So here's the paper. This is what we discussed in the, in this section, by the way. This is what I'm going through all about GPT-3. GPT-3 is the latest advancements in language modeling. Why are language models important? Why is GPT-3 especially important? So I don't want to in this video, I don't want to just regurgitate everything that I've kind of said here. Instead, I just want to go through the main resources here. So if we go here, this is the GPT-3 paper. It's 40 or so pages. And if you haven't seen some of the things that GPT-3 is outputting, we might as well discuss what a language model actually is. And so the reason why GPT-3 seems so incredibly amazing is because it's probably the biggest model that has ever been built. So if we go here, 175 billion parameters. 10 times more than any previous non-sparse language model. There we go. Can you see that there? 175 billion parameters. And now the most interesting thing about GPT-3 is that for all tasks, GPT-3 is applied without any gradient updates or fine-tuning, with tasks and few-shot demonstrations specified purely via text interaction with the model. And what, what that means is that's like a kind of fancy way of saying is, hey, We gathered, OpenAI gathered basically the entire text that lives on the internet. And when I say that, I'm kind of not even lying because they grabbed the Common Crawl dataset. So we build and maintain an open repository of web crawl data that can be accessed and analyzed by anyone. So if you go through the paper yourself, again, I'm not gonna reiterate everything that's in the paper. It's 40 pages long. You can read that. Essentially, to build GPT-3, they had this giant architecture, which is the same, the same as GPT-2, which we'll get into in a second, but scaled up. And then they just grabbed all of the text of the Common Crawl dataset plus a few others. So you can imagine everything that's on Wikipedia, everything that's, I think, maybe on Reddit, all that sort of stuff, all those comments, everything. You just, if it's on the internet, it was probably fed to GPT-3. And what the beautiful thing about GPT-3 is and why it's so amazing is it learned, like, this is what a language model does, right? It learns how different words should be in the context of other words or should or should not be in the context of other words. And a very simple example is, "I took my blank to the vet." Now, what could be in that blank? Is it likely to be the word dog? Or is it more likely to be the word car? So, a 3-letter word. And if the sentence is, I took my blank to the vet, it's more likely to be dog. And so, that's a very, very simple example, but if you imagine all the other different kinds of things you can— say, for example, you're writing an essay of some sort and you have an introductory paragraph. The introductory paragraph, the things in there are more likely to be in the introduction than they are to be in the body text. So that's the kind of crazy things that OpenAI's GPT-3 architecture can figure out. Like, I mean, where's a good example? If we go here, GPT-3 awesome, surely there's something here what they're doing. Oh, actually I'll just go to the blog post. Yeah, here. We're looking on this video. I'll leave this in the description, by the way, so you can check out this blog post. But if we go here, so, oh, this is probably a better one. So why is bread so fluffy? And this is searching on a Wikipedia article. There we go. You get an explanation. The rapid expansion of steam produced during baking leavens the bread, which is as simple as it is unpredictable. Whoa. And it's extracted that out of the article. I'm not sure if you can see that, but let's zoom in a little bit more. It's extracted that out of the article. And so that's what OpenAI's API is going to be, is that you can, in a paid manner, use a trained GPT-3 model to fulfill the language tasks that you need. And so we've kind of already explained a little bit too much about GPT-3, or actually not enough, like kind of this is just a summary video. But there are cool, a few cool resources here that you should check out. GPT-3 Awesome, which is a collection of really cool things that have been created with GPT-3. Now my face is getting in the way here. Oh, I don't want to do that. I just want to move me up here. So there we go. So you can use it for things like search and, search and data analysis. So question answering, generating. My favorite use case was generating language. So in the paper One of my favorite use cases in here was that they, they got GPT-3 to generate a 500-word article. And actually, let's see if we can open the paper. And let's just go to that exact part so I can demonstrate what I'm talking about. But the big thing about GPT-3 as well is that does it actually understand? I don't think it actually Put it this way, it doesn't understand— as much as it appears that it understands language, it's still just figuring out, like, in a kind of brute force approach, the relationship between different words. Now, this paper is taking a little while to load because it's 40 or 70+ pages long. Here we go. We go to the results. Maybe we go— if I can search this— 500 word, 500 words long. Here we go. This was the most interesting thing for me out of this whole, whole paper. People's ability to identify whether 500-word articles are model-generated. So that means you say to GPT-3, say, write me an article on basketball, and it would be 500 words long. So people's ability to identify whether 500-word articles are model-generated, so created by GPT-3, was 88% on the control model. So the smallest version of GPT-3 and 52%. So that means it's basically a coin flip on GPT-3, 175 billion parameters. So that's the biggest version of GPT-3. So if we look at that, the control model, so that was asking human. So whether the— if I go to GPT-3, write me an article on basketball, article here by GPT-3 and humans to go write me an article on basketball. If you were to ask a separate person, so a third party, which of these articles, GPT-3 or human, which one was written by the model, for the largest version of GPT-3, the, the person who was guessing only had a 52% accuracy. And now, for a binary classification problem, I think you know that if you're just guessing, you would get about 50% accuracy. So that means that the legitimacy of GPT-3-generated articles is pretty darn good. And I still haven't had access to the API, so if I did, I would show you hands-on use cases, but, uh, I'm still on the waitlist. But that's enough about GPT-3. I want you to also check out, if you do want to understand more about what GPT-3 is, there's a great video here. It's about an hour long by Janek Kiltscher, and basically just goes through the entire paper. Or you could read the paper yourself. And yeah, because GPT-3 is just a— I don't want to say just a— let me close this window actually. That sun was getting in my eyes. Because GPT-3, the architecture is very similar to GPT-2. If you want to understand what GPT-3 is doing behind the scenes, because at the end of the day, I'm not sure if anyone fully understands what's going on behind the scenes. But if you want to get a little bit of a, of a deeper insight, make sure you check out GPT-2 Illustrated by Jay Alammar. So this is one of my favorite resources. He is also working on a similar post for GPT-3. So as of, as of this video, it's a work in progress. But yeah, there's also the Illustrated GPT-2, which is a great post. And then if you want the code behind the scenes, Check out the GPT-2— this is a mouthful saying all these acronyms— uh, annotated by, I believe this is, um, I don't see your name, Aman Arora. There we go. So yeah, this is another great blog post, and this one has code to go along with it. There you go. So it's all in PyTorch and explains what each section of the model does. So that's it. That's actually a really amazing blog post. So if you want to learn more, check that out. And now, this is from the research side of things. That was GPT-3. This is— we're on to the next side of the article. Two trends that I'm noticing of late is a move towards more and more automated machine learning, so AutoML, and a move towards more self-supervised, also referred to as unsupervised, models. So yeah, this is what I'm noticing more and more these days, right, is like the, the reason being is for AutoML, it kind of takes a lot of, like, if we're just designing model architectures, it takes a lot of like finicking around with, like, subbing in different layers, trying different shapes of doing things. But AutoML seeks to, to replace those, those parts of a machine learning pipeline, which are automatable. Put it that way, right? If you can imagine, think about it like this: how's the world looked for the last 20 or so years? If something can be automated with software, the chances are it probably will. So you can, if you're thinking about what you're doing on a day-to-day basis as a machine learning engineer or data scientist or something like that, think about those steps that, that you could, uh, just repeating over and over again, trying to figure out what's the best way of doing them. Well, it kind of makes sense to eventually replace those with some sort of automated system. And of course, a move towards self-supervised learning is— GPT-3 is just a, just a great example of that. If we go back to— where is it? The paper. Where we got here? No gradient updates. There we go. No gradient updates are performed. So that means the model is not learning in reference to something else. That's what a gradient update is talking about. It's totally self-supervised. So when I said it just feeds, feed it the entire text of the internet and then it goes through and figures out which words should be, should appear in the context of other words based on topic, subject, you name it. And it's, it's further proved in here that, that it's self-supervised is sort of powerful because GPT-3 outperforms a lot of previously state-of-the-art models on a whole wide range of different natural language processing benchmarks, even though it wasn't explicitly trained for those benchmarks. So that's a really important thing. We go back to, um, the self-supervised learning resources. So a few other things in terms of AutoML and self-supervised learning. So these are the things that I'm like learning about right now, right? I'm my, my, the current day-to-day thing that I'm like really getting obsessed with is self-supervised learning. It's kind of already been used in terms of, so in natural language, it's been used in these large-scale language models that we're seeing. What, what it's getting more and more used as well is, and I may be messing these things up, right? Because I'm still just learning about how it actually works is if you notice in any vision task, a model usually performs better if it's been pre-trained on some sort of images. This is where you get the value in transfer learning. When something has been, uh, pre-trained on, say, ImageNet, it has an underlying understanding of what a general image should look like. So then when you fine-tune it to your own task, it works better. But I believe self-supervised learning goes a step further and doesn't even have that fine-tuning step. So that fine-tuning step is optional. Anyway, I'll let you read these resources which can explain it better than I can. AutoML Zero was an amazing, amazing blog post/paper from Google. And so if we're talking about AutoML evolving, um, different model architectures, I think there was— so it was MNAS, MNAS, uh, Neural Architecture Search. We go here, Neural Architecture Search. So this is using AutoML, a technique for automating the design of artificial neural networks. And so with neural architecture search, a large computer is given, say, the fundamental building blocks of a neural network architecture. So say like a convolutional layer, a dropout layer, a dense layer, something like that. And it's going, okay, find the best combination of these layers to figure out the best neural architecture for our specific problem. Whereas with AutoML 0, it's going a step below that and just going, here's addition, here's subtraction, here's multiplication. Now figure out an entire machine learning algorithm from scratch for this specific task. And the cool thing is, is what did it do? It evolved. I'm pretty sure— there we go. Boom. Oops, zoomed in too far. It evolved to— it used genetic algorithms to evolve to learn. It learned stochastic gradient descent. Now, if you're familiar with machine learning, you'll know about stochastic gradient descent, which is absolutely phenomenal. Though flawed at first, SDG— SGD gets fixed relatively quickly, starting a series of improvements to the prediction and learning algorithm. Now, how cool is that? I'll let you read the blog post for a little bit more. This final algorithm includes techniques such as noise injection as data augmentation, bilinear model gradient normalization, weight averaging. To me, that's pretty crazy, right? Like, it's starting with just the fundamental operations. And what does it start with? In our case, a population is initialized with empty programs. It then evolves in repeating cycles to produce better and better learning algorithms. That's wild. Check out that. I really like that one. And then another one from Facebook. I'm going to actually skip these two, but this one was actually really cool. This is on the topic of self-supervised learning as well. High performance self-supervised image classification with contrastive clustering. See, this blog post only came out like a week, two weeks ago. But this is where the future is going, right? I don't think, I don't think the future of deep learning and machine learning is going to be supervised. It's going to be unsupervised, or at least with a whole lot less labels than what we currently use for different problems. So where we go. So our method now surpasses supervised approaches on most transfer tasks. That's insane when compared with previous self-supervised methods. So Facebook's new method of self-supervised learning outperforms, in some cases, supervised tasks. I think that's unreal. Now there's a cool little GIF here that goes, what's going on? So you start with this image, it then crops the image, which is actually still the same image, just a different angle at it. It then learns the latent representations of these two cropped versions. and then it goes, hey, you know what, these two vectors, we're going to swap them around and now try and predict them because they're still the same image. So again, I still haven't fully comprehended that. But what, what this is doing to me is it's, it's getting your model to understand that just because something is cropped from an image doesn't necessarily mean that it's, uh, that it's a different image. So, it's gaining— the model is, in my intuition, is gaining a better understanding of how an image is constructed rather than just being shown a whole bunch of different examples of the same sort of image. So, whether that's right or wrong, again, I'll leave you to read more in the paper. I read through the paper a little bit of this one, and I'll be honest, I need to go back and revisit. I need to brush up on my math, and I need to Look, long story short, I'm excited enough to keep going. That's, that's the important thing is when you're learning new things, you'll probably first jump into them and not quite fully understand them, but then if they're exciting enough, you can always go back and learn more. So I might finish this video off with a little bit of a rapid-fire round. That was self-supervised learning and AutoML. So then I finished the article off with a learn learn section. So don't let your machine learning models die inside a Jupyter Notebook. The Full Stack Deep Learning course is open source. If you want to learn how to incorporate deep learning into your full stack applications, check out this course. It is amazing. Look at this. So you can go through the theory, the math, and training deep learning models, but it's very— there's a little bit of a gap. There's not much shipping of deep learning projects going around. So make sure you check out that if you want to really merge your, your capabilities with deep learning and machine learning, with being able to deliver a project or a product to someone and get it into their hands. And deploy machine learning models with Django. Speaking of deploying machine learning, this is a massive end-to-end guide on not only creating a machine learning model but setting it up in a Django web application, which is all built in Python. Very, very extensive, but I checked through it and it looks fairly high quality. So if you want to see what it's like to deploy your own machine learning application in pure Python, make sure you check out— maybe this could be a weekend project for you— is going through this deploymachinelearning.com. Really easy website to remember, by the way. And then DeepMind have also created a series on deep learning, which is— I believe it's all out now, so 12 out of 12. Check that out. DeepMind, You probably know about DeepMind. And then watch/read again, "The Future Will Not Be Supervised." I believe that's probably a good title for this video. Yann LeCun, who was the head of AI at Facebook Research, had a TED Talk, but it's kind of a different TED Talk. It's like an hour long. If you want to hear a bit more about Yann's vision of the future of AI, a lot more talked about self-supervised learning in there. That's, again, no one can ever really predict the future of these things, but kind of you can see where the trends are going, where a lot of companies are dedicating a lot of time and research. Not necessarily that that will be the future of things, but you can kind of see where their efforts and where their thoughts are going to go, because at the end of the day, most drastic or life-changing discoveries are kind of accidental. But it kind of, it makes intuitive sense. That if we were to build a learning system, feeding it incredible amounts of data all the time is kind of resource intensive. And if it can learn on its own, like self-supervised manner, that is a more ideal situation. A great article by Jeremy Howard is if you want to get more into self-supervised learning, actually, I'm going to, I sound like a dead horse just repeating. I'm beating a dead horse here. Just saying how many resources there are in self-supervised learning. But this is where I'm interested in, so expect more in the future on self-supervised learning. But read through this blog post. I read through it. I still need to probably read through it again and go over it. But check that out for self-supervised learning in computer vision. And then there was also another one here by Amit. Amit's blog is actually turning into easily one of my favorites on machine learning on the internet. So make sure you go check it out. Give him some love. Semi-supervised learning in computer vision. So great overview there. But that is it for the July edition of Machine Learning Monthly. Once again, if you want any of the links of the resources, they'll all be in the description below. The article's here if you want to receive it in your inbox next month. Make sure you sign up there and you'll get it. It comes out within the first few days of the month, and it's certainly a lot quicker to read that than to just listen to me waffle on about all these things. But as you can see, I'm quite clearly excited by the future of self-supervised learning. That's probably where I'm going to spend my next few weeks, few months researching, just because I think that's kind of the trend at the moment as well. But yeah, if you'd like to see anything in a future episode, or if you have something that you would like to submit yourself, maybe you've done some awesome work and you want to put it out there, leave a comment below or send me an email. You're smart enough to find out what that is. But thank you so much for watching. As always, keep learning and keep creating. I'll see you next month. Did someone say future?
More from Daniel

Small Language Models (SLMs) Are the Future: Fine-Tuning AI That Runs on Your iPhone

Introducing Sunny - A MedGemma-Powered Skin Health Tracking App (Kaggle Competition Entry)

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 4 - Comparing the results

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 3 - Running LLMs on the RTX 4090

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 2 - Formalizing the tests

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 1 - Creating a series of tests

Local Multimodal RAG on the NVIDIA DGX Spark | Part 4 - Publishing our demo to Hugging Face

Local Multimodal RAG on the NVIDIA DGX Spark | Part 3 - Putting it all together


