 Here is Ren talking about demystifying machine learning. So please give her a warm applause. Thank you. Hi, everybody. All right. So yeah, I wanted to talk about machine learning, since it's such a hot topic these days everywhere. Just a small thing about me. I've done a lot of undergrad research. I only graduated a couple of years ago, but I did a lot of undergrad research in machine learning, especially in image classification. So my background comes from that. And I use machine learning techniques. Definitely in my work right now, but I'm an infrastructure engineer. And you can pretty much apply machine learning to anything that you're doing. It's really a tool. So anyway, we're going to start. So I was inspired to make this talk because I was in this Lyft line in the Bay Area one day. And there was a machine learning engineer from, I guess they were working on like Android platform. And they kind of like went off on this really long rant about, oh, machine learning is really stupid. That's kind of like literally what this person said. And then kind of went off on a rant about how like it doesn't do what we want it to do, and yada yada. And then I guess I was just sitting there and I was like, for people that don't quite know a lot about machine learning yet, I feel like that could be not such a great summary for what machine learning can and can't do and what it should be used for. So I don't think anybody here is going to start screaming around machine learning stupid. But I figured it can't hurt to know a little bit more and get a little bit educated about what machine learning is. I'm not talking about AI. So like machine learning and AI, they're kind of like synonymously used in colloquial terms, but I'm only talking about machine learning and some of the techniques. And hopefully you guys can learn one thing or two from it. And yeah, cool. So yeah, like I said, this talk is for anybody else. I also think that machine learning is a little frustrating. It doesn't quite do what we want it to do yet. And I wanted to mystify that. Yeah, so let's get right to it. So when I heard that statement in the car from the Android engineer saying, machine learning is stupid, right? And I get that he was kind of like really, I think, frustrated about it. But the way I deconstructed that statement is basically why don't machines or machine learning have same kind of understanding, recognition, intuition, kind of automated learning? Like all these things that kind of, I guess we expect from machine learning because of all these sci-fi examples like Jarvis and Hall and all that stuff that kind of like do everything on their own and it's kind of magical, right? And so that's kind of how I understood it. And I was just also like thinking, I think the frustration is that like why don't machines also have like learning and execution skills like humans have right now, if not any better? And I guess kind of like expecting machine learning to be some sort of like an accelerated learning version than what humans can do. So let's kind of demystify that and kind of see where we're at in terms of reality with machine learning. So yeah, who here actually knows machine learning techniques, worked with it before a little bit, a lot, experts here? Okay, whatever, it doesn't matter. So this talk, I'm kind of assuming, I wrote this talk for more of a generalized audience. So I didn't really wanna get heavy into dragons, I didn't wanna like get into like statistical modeling and statistical algorithms and things that people are just gonna sleep on, right? But I do wanna go over like really, really simple examples of how you can build a simple neural network and use that example to kind of build on top of that and kind of go into comparisons of how machine learning would tackle some problems versus how a human would. Anyway, yeah, so I'm not gonna get into like super jargony stuff. Yeah, so machine learning is heavily rooted in statistical analysis, mathematical models, concepts, but they're also deeply rooted, especially in neural networks, they're deeply rooted in biological evidence for learning and how the brain, the biological, I guess, the structure of how the brain works. And in case you feel like this about math, I'm gonna just kind of leave that part out, yeah. And then so machine learning, it has a name like learning in it, but it really has to do with how do we build models that can answer questions? So let's say, yeah, not actually, yeah. So let's say you have a certain question you wanna answer, that could be like classifying an image or figure out what is the best next move to make in a game, right? Those are kind of questions that you wanna ask and you build the model supposed to give you the answer to that in a preferably really fast, faster than how humans can. And generally, when you're building models, you kind of go through this, this is a pipeline that you would go through normally in a very high level format. So you first start with some training data of what the question is and what the answers might look like. So for example, if I had a bunch of images of cats, that would be, the image itself is my question and then the answer might be it's a cat in the image, right? So you have a bunch of kind of like what we call the labeled data like that and that's usually used as training data so that you can start building the model that you're looking for, right? And the models are usually statistical algorithms and you test the model by basically seeing given this training data, does it actually give me the answer, does the algorithm give me the answer that I'm looking for? So if you give it a bunch of cat images, does it say, does it label each image as cat, right? For example, and if it doesn't, then you know, you correct it and you tune and you kind of go through this iterative process, a feedback loop of sorts and you kind of do that over and over and over and over again until you know, your accuracy, general accuracy kind of goes up, right? And so that's like the very high level of how any like researcher or anybody using machine learning would go about training a model. And I kind of wanted to go over what are like the two big types of models that are out there. These are not the only ones, but these are the main two types. So there's machine learning models can be split into either supervised learning or unsupervised learning. So what that would mean is supervised learning, you basically give it some data knowing what the answer already is. So the cat example that I keep talking about is a classic example of that where you know exactly the image that you just given is supposed to be a cat and you want the algorithm or the model to give you that same answer. And these are vastly I guess easier to test because you already know what the answer is supposed to be. Then the unsupervised learning model which you use these models or build these models to discover patterns that you yourself humans can't see, right? So there are algorithms called like K-means clustering which is supposed to basically find given the plop of data, give me what are the clusters of data that I can't see as a human by myself, right? But you don't really know when you just have that data what it might look like until you have run something like K-means clustering algorithm. So it's a little bit harder to test just because you don't really know exactly what the answers you're looking for but you're hoping the model or the algorithm to basically chuck through a lot of data fast and give you some sort of answer, right? So in terms of example purposes I wanted to kind of hone in on one example that uses supervised learning model just because it's a little bit easier to relate to. But yeah, and then there's reinforcement learning models there's bunch of other stuff that, you know if you're curious, you're welcome to go browse. So yeah, there's a lot of algorithms don't try to read that because my whole purpose of this is like I wanna just find an image online that has like a lot of these really famous known algorithms that are typically used in machine learning and kind of wanna say there's a lot of them, right? And there's no by no means am I gonna go into even like some of them but I want to just focus on you can't read that, it's fine. So this says here neural networks we're gonna go into kind of what perceptrons are and kind of how they are the building blocks of building a simple neural network. So there's simple neural network there's a deep learning neural network there's a bunch of types of neural network but the simpler one is easier to relate to and easier for to understand right now, cool. So perceptrons, there's the simplest building block in the simple neural network. It's a linear binary classifier that really gives zero or one at the end. So I promise this is literally the only equation I'm gonna put up on my slides today. So this is what we would call like an activation function dragon here, activation function. It really just means like you have certain inputs. So actually let me just go over this right quickly right now. So this is saying the activation function is saying I want the output to be one if some weighted value dot product of their variable X that you're looking for plus B is a bias. If that is greater than zero then I want the output to be one. So that really just is saying like given some variable looking for and given some sort of weight which weight just basically means how important this variable is and the weight will come, you guys will understand it a little bit more when I get to the next slide. So it gives you basically how important a variable is plus bias. And if you just ignore all this equation right here if you see this diagram right here this activation function literally is trying to split a problem space into two different quadrants, right? And this is a very simple one so it really only does zero one of given one feature, right? And I keep calling this variable in ML language we call it the features. Features basically means the things that we care about that help us determine an answer. So in this case this might be like the X might be hey, the question is basically like is the color blue or red on the dot, right? And then the model in this question would be a this line which is represented by, by the way this is not it, but an activation function that basically says oh okay is the color blue or red? I mean that's pretty simple. This is basically a linear line that cuts the problem space, right? And so given that, so this is a great example where we have only like one feature we're looking at which is in this case like for example a color. You can expand the perceptron to have more than one feature that it looks at and it has a lot more weights. This looks a little bit complicated but all it is is like there is an activation function you have a bunch of inputs. So it's a vector, right? It's a vector of features and where each feature is represented with a weight of how important it is. So to translate like a mathematical equation like this I would think of it as let's say if my question was would I buy some model of a car, right? And my inputs might be like price and color and size and yadda yadda, right? And then those would be literally my inputs, right? And then my weight would be for me I care a lot about price of the car so I would give a lot more weight to the price feature than any other things like color or whatever else I'm looking at, right? And then that would at the end give me zero one. That's the whole point of perceptron. It gives you zero or one. So I put this slide cause you know how I was saying a lot of machine learning is based on biological evidence for learning or like biological structures. Perceptrons are literally meant to represent how neurons will work. So you have a picture of a neuron right here there's dendrites which receive information from other neurons which is literally synonymous to a bunch of inputs in the perceptron. I mean the image even looks really, really similar to one another. And then you got some output that comes out and these axon terminals right here connect to other neurons, right? And then that's literally what also perceptron does. It takes a bunch of input, calculates it and then gives us zero one and that gets transmitted to other neurons or in this case, other perceptrons. So yeah, one perceptron can be really synonymous to well how a neuron will work. So if you put a lot of these neurons together that's actually if you just have a lot of these neurons together in many different layers that's the simplest version of a neural network you got. So here, by the way, all these circles are perceptrons. So you got a bunch of perceptrons at the first layer that's considered the input layer which usually that only means that these are the perceptrons that take the raw data you give it, that might be color, bunch of numbers like the car example I was using might be prices of things, it might be size of things. And then usually neural networks are defined by the fact that you have a lot of different abstract layers in between that might compute on the output of the first input layer and all the abstract layers in between. Until you get to the output layer that finally ultimately gives you a bunch of variables that you can use as an answer to your question. So, but the most important thing here is that neural network, the simple neural network you just put a lot of perceptrons together in many different abstract layers and that's how you get a neural network. And going back to the whole biological example of things does it look any kind of like similar because the way we have abstract layers of perceptrons to create a neural net, simple neural network is exactly almost like how brains work also. Brains have, they have neurons that process the raw input that a bunch of other neurons that keep on processing after that, after that, until we, I might see an apple and think it's tasty. But there's a bunch of neurons that are abstracting the information that I've seen in apple until I get to that point, right? So, right, right, so I was talking about apples right now. So, given that kind of like super fast overview of how like a neural network, simple neural network might work and what like perceptrons might be. So, I kind of wanted to apply that to our original problem was how are machine learning different than how like humans learn. Or what are like the challenges that I guess impacted in a way that it's not as, I guess, as robust of a learning as humans do yet, yet is the key word there, because we're getting there. So, I wanna take this simple example. Let's say you want to classify an image of an apple. How would a machine learning approach it versus how any one of you might approach it? So, if a machine were to look at this, so let's say if you were to try to classify this image, some of the features, oh, I guess it's, that's really hard to see, huh? I'll read it off. So, some of the features that might be used to identify this object, which is an apple, in the image is, for example, size of the object. The color gradients, so there's a lot of reds here, some greens there that's not really part of an apple position. So, where the apple is in context of everything else. And it might also look at stuff like, as it's looking at the color gradients on the image, like anomalies like white spots, where there's like a shine on the surface right here, that all shows up when you're calculating the color gradients across the object you're looking at. And I also put up here, like, so those might be the features you're looking at, and there might be some other anomalies that might throw off, the algorithm from thinking this is an apple, which is like the leaf. And so, these are kind of like the features that machine learning might use to create the model that it wants to use to identify this object as an apple. And a lot of the times when you're building models like this, you run into many different problems. So like, for example, if you have, so I only listed very few features here, but once you expand out your feature set, which you normally, usually, more like always have to do when you really want accurate results and classifications, you might end up with too many features, and you might end up with features that really don't really matter in the answer at the end. For example, if I was already looking at color gradients here, I might not really care about the fact, the feature that only one feature that looks at like, whether the pixel's red or something like that. Something very specific, right? So there are a lot of features that can bias or hinder or be completely redundant to the models that you're creating. And then, and if you keep on adding more features to your model, that's yet another permutation of the feature that you need to calculate, which just basically expands out your computation space. So unless you have a lot and lots and lots of computers to just chug out, chug out, chug out numbers, right? You might end up with a model that has like 100 different features. It takes like two hours to calculate for one image, just because there's just so many features, right? So there's like a fine balance between what are the right features to use? And you might end up with too many features to calculate. You might end up with features that you don't really need, and how to do this, how to calculate fast, right? Versus, so I don't want to compare that to like, if I was looking at this apple feature picture, these are some of the things I might think of. And one of the things I really want you guys to notice is in this previous image, it was, had to do a lot with like, you look at the apple, the machines look at the apple, these features are related to this physical properties, right? Like the color or the size of this position, et cetera. And then the real distinction I really want to make here was if a human were to look at the apple picture, they also look at the physical properties of it, right? Like the color, size, and everything that the machine, the machine learning model might look at. But you also have all these other contextual data, because for example, if I'm looking at an apple, I might think, oh, that last time I ate an apple was really juicy, or like, I might think, oh yeah, this is a red apple, I've seen green apples before, or like, I might think somebody else that I know really likes apples. So like, it's not just the physical qualities that you're looking at, right? But you also think of many other, like, you draw from memories, you draw from other examples of apples that you've seen. So if you kind of, if you can kind of think of this as like, you have all these physical features that you look at, but as a human, all this other contextual data that you can draw information from, right? Which machine learning doesn't have right now, like the machine learning right now, as I've shown you, it only really looked at the physical features, and then try to figure out what it was in that image, right? And then as a human, you have so much other contextual data that altogether comes together that you don't even notice. It's like all subconsciously processed, right? That altogether helps you to learn something as an apple. So to kind of hone in that a little bit, this comparison I want to make was basically the difference in machine learning and a human in the power of basically the feature dimensionality and contextual data that you have. So one other really big comparison I really want to make was if you remember in a couple of slides ago where I showed you guys how you would use a training data set to start building a model. A lot of the problems, and I've definitely noticed personally because I've worked on image classification, is it's difficult to get a very large as well as varied training set data. So for example, let's say in the context of an apple, you might be lucky if you get something like 10,000 or 100,000 labeled images and examples of apples that you can use to train your model, right? And like literally 10,000 is like a lot if you're looking at images or objects, or I can only really speak for image classification because that's the work that I've done. And if you're thinking about it, it's like 10,000 is not that many examples to look at something. Something as simple as apples, sure, that might work, but if you get into more complex problems, right? Like for example, how do you solve like, I'm gonna go into the AlphaGo example in a bit, but like if you're trying to compute for like a very complex game, right? There's probably, you're gonna need a lot of data and examples to make sure your model actually is accurate, right? So this is one of the biggest tasks in when building a model. Like you can't get enough of the training model, training set to actually make your model accurate. And then if you think about it, if you compare it to a human being, like how many apples do you think you've seen ever since you were born, right? Like probably a lot and you don't even have to eat an apple or see an apple yourself to count it as an example, right? People talk about apples, other people might eat apples and you have all this like even indirect examples of apples that you might be exposed to that it's not like just like looking at apples and oh, that's an apple, right? You might see a bunch of different colors of apples. So there's a lot of data that you're just always subconsciously kind of absorbing in that FARC surpasses the label data you can give to a model to train it. So there's actually a MIT paper on this about why, I linked it here, why humans right now are far ahead in learning in terms of, far ahead in learning than machines right now. Because we seriously just have so much contextual data that we get all the time, right? About everything. You don't even notice it, but you are always absorbing some sort of example about any of the objects or people or the language or whatever that you're interacting with that the machine learning just can't, right now at this moment, can't keep up with because you're artificially creating data sets to feed into a model to train it, right? So there's that kind of, sorry, am I running out of time? Oh shit, okay. Okay, yeah, anyway, so there's that. I'll go through it really fast. So I put some summary of comparison here. You guys can take a look. I was gonna go into detail, but that's fine. So yeah, I've given a couple of examples how machine learning is, in some ways have a lot more challenges than humans do. A lot of them is like, obviously access to a ton of data, subconscious data that we always process. Feature sets, what are the things, what are the features that you can reasonably calculate? For example, like Google has about one million servers. They're able to use all that computation power to power all the AI provided services versus how many of us here have one million servers and you can do stuff with that, right? And if you compare that to the human brain, you got one billion neurons. It's like all provided infrastructure to compute whatever you're looking at, right? Sorry, I'm severely running out of time, but let's see if I can speed this through. Yeah, so if you have one thing to take away from this talk, machine learning learns very differently. It has a lot of different challenges and especially it doesn't have access to all the data and then the learning capabilities that we already have. So until we get to that, you might not be able to compare it directly to a human learning. I'll put the slides up if you guys wanna take a look. Oh, this slide, please. You might wanna take a look at this paper really quick because you'll learn some really cool stuff about how neural networks see the world that might be different from what you think. All right, thank you.