# A Beginner's Guide To How AI Works (And its dangers)

## Метаданные

- **Канал:** Varun Mayya
- **YouTube:** https://www.youtube.com/watch?v=xlF9dfGI4aE
- **Дата:** 28.12.2022
- **Длительность:** 33:08
- **Просмотры:** 32,593

## Описание

Are you curious about artificial intelligence and how it works? In this video, we'll give you a beginner's guide to understanding AI and its potential dangers. We'll start by discussing what AI is and how it's used in various industries, such as healthcare and finance. Next, we'll delve into the inner workings of AI and how it's able to learn and adapt. Finally, we'll discuss some of the potential dangers of AI, including issues of bias and the potential for AI to be used for malicious purposes. By the end of this video, you'll have a solid understanding of AI and its place in the world.

## Содержание

### [0:00](https://www.youtube.com/watch?v=xlF9dfGI4aE) Segment 1 (00:00 - 05:00)

ladies and gentlemen welcome back and today I am going to do something very special I'm going to put on my teacher's hat and I'm going to do something that I haven't done in a very long time first I'll tell you why I'm doing it I was on Twitter the other day and I saw this thread about an artist who started complaining that AI is stealing their work that their work was expressly used uh into the training set of some algorithm and you know that's unfair and how you know that should be banned why that is a legal problem right and I feel like a lot of people don't really understand what's going on a lot of people think they understand AI from whatever the media says and even the media doesn't get it right they're not computer scientists so what I thought I'd do in this video is I'm going to make a very Baseline um teaching session of how AI Works what is going on right why are people scared of it why are people like Elon Musk scared of it and how do we learn and improve from this what are the few jobs that I believe have some time available right and why I am a little bit worried about it right so um that's what I want to do with this video and this is going to be like a beginner level thing right so if you are an expert ml engineer this video is probably not for you it is I'm gonna dump it down to a level where everyone understands it at least the basics so if you're somebody who doesn't have any experience in computer science it doesn't matter you are still going to learn from this video um and you are going to enjoy it and you're going to understand what I've been worried about hopefully by the end of this video awesome so let's get straight to it so here's what I want to do okay I'm going to write a very simple Computing program okay and I'm going to write it in a way that all of you can understand I'm just writing it on notepad let me zoom in a little bit right what are advice in the simple program input X so I'm going to input an X some variable called X from the user input y okay I'm going to input some variable y from the user I'm going to write an if statement if x greater than y okay I'm just asking if x is greater than y I'm asking the computer for this then if that's true print X else print y now I haven't really formatted this code this is in any particular coding language it's what we call pseudo code but I'm putting out a very simple program for you to understand how traditional programs work there is some logic that is going on in the back end of your computer of that program and that logic is taking inputs and mangling those inputs and giving you some output so what is this program doing this program is just checking whether X is greater than y if it's greater than y is printing X otherwise it's printing Y what is it doing it's printing the larger of two numbers that you give it okay now this is how we did programming for many years okay now I'll tell you what a i and ml do right so let's and I'm giving you a very Baseline understanding of it I'm not even diving deep into neural networks or any of that I'm just telling you at the Grand keyboard has happened let's assume we don't know what the algorithm is doing okay let's assume we have no understanding of it we've never seen this code but we know there's a box there's a machine with let's say a screen and it's asking you for two numbers X and Y right and is it just spitting out an output okay you don't know what the algorithm is so let's say you put it in an input in 3 for x and 4 for y what is it going to put out it's 4 right the machine is just going to print four now let's say your first time in your life you're coming across to this machine right you've never seen a machine like this before and it's printing out four then you try a few more examples you try 5 and 10 is printing out uh 10 you try 1 billion and 3 million it's printing out three million so you as a human being who's sort of smart have started realizing it's taking two numbers and spreading out the larger of the two numbers now here's the thing right and this is what machine learning does this is the difference between machine learning and um this is traditional programming I put out a tweet about this let me just quickly show you that tweet right so I put out tweet about this Right In traditional programming you had the rules the code right this is the code okay you had these rules and then you input the data so you put the value of x and y and then the answer came up it spat out an answer for you in machine learning you already have the answers so you have given it lots and lots of data you've tried many different combinations of X and Y and you're getting the output you know that if you put three and four you're getting four you know if you're putting five and ten you're getting 10 you have all the answers and use machine learning to find

### [5:00](https://www.youtube.com/watch?v=xlF9dfGI4aE&t=300s) Segment 2 (05:00 - 10:00)

out the rules the implicit rules what is going on behind the scenes without you having any knowledge of the code behind it right so what happens is if I just fared an algorithm all of these inputs and all of the expected outputs are real outputs let's say if I fed it x value of 3 y value of 4 answer is 4 right so I basically run it through hundreds and thousands of scenarios what will eventually happen is that this machine will understand the algorithm or this this is the core Crux of the algorithm right if x is greater than Viper index otherwise print y this is what the machine will understand so the machine is figuring out the rules right algorithm from loads and loads of data it is what you would be able to do if you tried a machine like this is how humans solve puzzles right we try a person we try a few things and then we're like okay I get that this is like this right you understand some pattern behind the puzzle so an ml algorithm artificial intelligence is simply a pattern recognition machine right but all algorithms in life aren't this simple right not all algorithms are just simply X greater than y let's take a slightly more complex scenario have you guys seen the lungs of people who get covered so when somebody gets covered they get something called ground glass opacities on an X-ray okay let me just show you what these look like okay so this is a lung X-ray so cities um I think it's a CT scan of a lung right and you see that there are these ground glass opacities okay I'm not even like I don't know what ground I don't know how to diagnose an x-ray I'm not a doctor right but let's say this x-ray has some information for ground glass opacity we don't need to know what it is now let's say a real doctor would look at this and be like well every part here that's black means that it's transparent Right light is going through every part that is white means that there is a blockage of that light right it's for example this area might be bone or some opaque um part right so what a ground glass opacity is if there was an area that was supposed to be transparent now you have these tiny slightly opaque circular elements there right and a doctor learns this over many diagnosis that oh I need to be looking for these right for example let me show you one more right now the more I show you the more you will understand it better right you can see this like it's like a fuzzy round um uh you know um what do you call it uh like a blockage right now there are also some normal parts of the lung right like for example this white stuff that you can see here these are all normal parts of the lung so there are specific areas and there's a specific pattern to how these ground glass opacities look sorry I'm just moving the screen around as you can see this is a ground glass opacities you can see the blockage uh blockages here and the more of these that I show you can see this here right the more it is I can I show you the more you realize what a normal lung looks like what are the areas that are normally opaque in the lung and many areas in a regular lung are also opaque what areas are not supposed to be opaque what edges have this fuzzy you know whitish stuff and where what is a bad lung and what is a good luck and you'll also be able to figure out when a new like something like a mild case right I think the severe cases are easy to diagnose the mild cases are hard now how does a doctor tackle this a doctor looks at this and then says well I think that this has um you know this person has covet I think this is a ground glass press this person's lungs are affected so a lot a doctor through many diagnosis through training from feedback from a senior doctor saying no that's not a problem this is a problem right this lung is fine this lung is not fine by training from other doctors from the medical textbooks they eventually realize and learn what is a problem now and what is a healthy love right but what a doctor doesn't realize is that his brain is now applying an algorithm to this now his brain knows which areas is supposed to be transparent and which areas are not supposed to be transparent right the doctor's brain has an algorithm and he knows that well if these areas have these blockages then it's a problem so what you do if you were using machine learning or artificial intelligence is you don't know what the algorithm is you're a Layman so you take some doctors you take expert Doctors show them hundreds and thousands of scans and tell them you tell me which has covid and which doesn't have code just mark it saying yes no or maybe you know if you want to go a little more granular mild and severe or non-existent right just mark it in these three segments and you ask the doctors to feed it to feed hundreds of thousands of samples eventually what happens is an AI algorithm machine learning algorithm recognizes or comes up with the rules of governing what has covered and what

### [10:00](https://www.youtube.com/watch?v=xlF9dfGI4aE&t=600s) Segment 3 (10:00 - 15:00)

doesn't have code and eventually gets so good that you don't need the doctors ourselves to make this diagnosis don't believe me you look at cancer the person who treats cancer is called an oncologist and AI right already helps diagnose cancer better than a doctor can because it is understand understood the implicit rules of what constitutes cancer what the doctor's brain is unconsciously doing or consciously doing some doctors are aware and AI can figure it out an AI is Simply Better In fact an AI today is better than an oncologist so it is a weird situation where this same program that I showed you let's say this is a very complex program and I'll also tell you how the computer does this then I'll go one level deeper in this program you have just two variables right but in this image let's say this ground glass opacity image this is actually a sheet of pixels let's say the resolution of these images Is 1920 into 1080 right full HD so your 1920 like this and 1080 pixels like this every pixel is mapped in the algorithm the AI has an understanding of every pixel and understands what should be there in a particular pixel what should be near it etc so what's happening under the hood is instead of the AI just figuring out if x greater than y what it's doing is it's figuring out the exact algorithm for example if pixel one I'm just coming up to the random algorithm that's probably not true if pixel 1 equals uh let's say white and pixel 2 which is the one next to pixel one equal to Black which is transparent and uh so on and so forth right maybe there's a very complicated algorithm for each pixel to find out whether you know it's cancerous or not and together the whole picture has to make sense let's say the code that the doctors unconsciously running in his brain is very complicated and spans many lines the advantage with AI is we don't need to learn or understand that code know what goes on behind the scenes we just need to tag label and we just need to feed the computer enough inputs and enough outputs to determine the rules right this is what we are doing right now how does this complicate art a lot of people think that if you have fed a system hundreds of thousands of pieces of art well and you ask it to you know produce a new piece of art it is just spitting out one of those pieces that is not true what is happening is the AI system has figured out the algorithm the rule set behind how a person creates art that is what has happened the GPT AI has figured out the rule set behind language whether we know it or not doesn't matter AI has figured out right that's why even if you go to the gpd3 uh API playground there's a playground on the back end of their website you'll see that uh it is about Auto completion right the main task there is completion you give it three lines of or three words of text it will come up with the fourth word it'll complete your sentence by default it completes your sentence so it has figured out language and it knows what comes after each word right so what is happening is if you have headed so many pieces of content what the system is doing is just understanding the rules behind art right it is not taking your piece of content and producing something very similar it is just figuring out the rules of art which paradoxically is also what human beings do let's say you're a professional artist and you've been learning how to draw from the very young age right and I've learned to draw when I was very young right I used to sit in class and draw uh you know pictures of Goku right and I just use my pencil teachers to always throw me out of class when I used to draw every time I do I got slightly better the place and I'll tell you this right this is from my own awareness of how I do things right I always draw Goku's cheekbones first that's my pattern right it's an unconscious pattern but I start with the cheekbones right I don't ask me why I don't know the algorithm in my own head right I know exactly the distance between the eyes and the cheekbones to make it seem real because if you can if you get the eyes very far away from the cheekbones you get a really distorted image right in fact there's one uh meme image of Elon Musk drawing meme that keeps going on the internet which is this right and if you look at this image you just stare at this image for a few seconds you'll realize all the parts are correct but it's just the distance from each other is wrong off right the artist has understood how to draw things but has not understood how

### [15:00](https://www.youtube.com/watch?v=xlF9dfGI4aE&t=900s) Segment 4 (15:00 - 20:00)

to distance these things right like for example this is even worse right has not understood how to distance these things correctly from each other so his rule set is wrong the unconscious rules he's applying are wrong right so what I'm trying to say is that um AI is filling out the unconscious rule set of how humans do things and it's the same way humans do things right when I first started drawing Goku I started looking at pictures of Goku right I used to uh go on the internet look for pictures of Goku or you know I had a old Nokia phone when I started entering 11th and 12th grade where I click a picture of what was going on TV and of Dragon Ball and I should draw that right so I learned by emulating other people's work in the beginning I learned by understanding or drawing enough time so that unconsciously I understood the rules and that is the theory behind practice and repetition the reason people ask you to repeat things hundreds of times the reasons geminas asked reason if you want to perfect something you have to do it for 10 000 hours is that you are training up your algorithm unconsciously to become good at it and that is exactly what AI is doing right now tell me legally you're looking at a picture of Goku and drawing it learning it for the first time is that illegal is that illegal right and this is the legal problem with AI right you cannot tell the courts that hey it has seen my training it my uh photo has been put in its training set um that is illegal if that is illegal then every human that has ever taken inspiration in life will go to jail we cannot set that precedent unfortunately or fortunately right so we are stuck in a situation where you can feed anyone anything's training data just like you could feed a human anyone's training data and saying learn from this and then once you have unconsciously remembered and understood the rules you are now a good artist the best artists in the world are all artists who have gotten very good at that craft because of hours and hours of repetition and practice right some are born with natural talent but that natural Talent is usually to learn better paradoxically it's to be better at learning right or their initial setup will be slightly better because they're exposed to more art as kids right so what has started happening is we are now creating a war on AI art legally without understanding that it also puts humans in danger when you say things like that right because you now prevent any human from ever taking any inspiration in life now this algorithm that we spoke about this unconscious algorithm that the AI is figuring out can also be applied to things outside of art right I'll give you two examples one is the game Breakout have you heard of the game Breakout you you've probably seen this right you have a paddle you move the paddle around there's a ball and then you keep breaking the bricks right that's it you can break bricks it's a very fun old game the funny thing is if you optimize the AI to play this and tell it the only condition is don't let the ball drop and get the highest score in the fastest amount of time which you can do you can set these as parameters eventually the AI will learn how to cheat I wouldn't really call it cheating it will learn how to play in the boundaries of the game but it's still kind of cheating what it will do and this is funny this ball it will make the ball go to the side first so we'll make the ball hit this that will then we'll make it hit this then and it'll break the left side first it'll focus on the left side or the right side and then what we'll do is it will hit the ball at such an angle that it goes above in every of these Atari games there's always some space on the top where the ball can wedge right and what happens is you go on top and start bouncing like this and start breaking things from the top without ever having to hit the panel again and you can hit it in a specific way that it is it gives you a perfect score this is the problem with AI this is not really cheating but it is finding a shortcut to success AI will always find the best path this is the reason I feel that once an AI starts competing with human beings which is already started it will win because it will find the shortest path to success that's literally its program it is asked to find the shortest path to success so you become you put humans in a situation where it is a losing game right and I would argue that the entire concept of being a human is an algorithm a lot of people disagree with me especially religious people right that there's something special about human beings that we have Consciousness I don't think that's true I think if you simulate a mind if there's a machine and the Machine was pretended to be about a reminder give all the answers that I gave it was able to speak on TV like this to you

### [20:00](https://www.youtube.com/watch?v=xlF9dfGI4aE&t=1200s) Segment 5 (20:00 - 25:00)

this it was able to speak to you directly eventually I believe that system would become conscious anything that mimics the Mind becomes the mind that is a piece of opinion I need to clearly you mentioned what is opinion and what is fact but that part is opinion that's what I believe right uh but what is fact is the fact that humans are an algorithm we are very much an algorithm and AI is just going to out classes because it will copy our algorithm it will become as good as this and then better right it will find the cheat code to being the best human the problem is humans already compete against other humans in the workplace there's the part where I'm worried about AI right we already compete with other human beings right I probably make more money than somebody who's let's say 30 years old and like my age and you know hasn't done as much as me right so I in some way or the other I'm competing with that person right you all are familiar with competition now imagine there's this AI that was able to trash me at everything that I did from writing into video content to everything then what how do I even hold a candle to it this is why my own life has changed right like I'm now optimizing to get realistic I'm optimizing to retire because I can't compete I know I can't compete right and I'm not going to fool myself that I can't compete right and I'm going to try to compete as far as I can right I'm not going to go gentle into that night right I'm gonna fight as hard as I possibly can uh I think another five or six years and I have an idea of or my own assumptions of what I think will last till then right and I tell you what I think those things are I think one of the first things to go away paradoxically is text this you guys already know it turns out that the rules in the algorithm behind producing taxes it's very simple and AI is able to do it not just in English but in every language right it's able to do it in a lot of different languages right second is actually code because with when you write code like this to um create some sort of interaction in your app or in your game or whatever it is you are writing mostly simple lines of code your logic behind can't be as hard as let's say figuring out human consciousness it's probably Simple Touch this button in the game and then you know give reduce 10 points of life if you've done my unreligion course you already know this right like uh and I have a free one on what are My Level 2 Channel you can see you go over a trigger box you can trigger some health reduction or some particle effects or whatever right so code is simple it is very easy for an AI to figure this out and we are already there let me show you an example there's a guy called Stephen Balaban on I hope I'm pronouncing his name right on Twitter who actually just asked openai to create a python game where you take care of a pet cat the pet cat has two actions pet the cat and feed the cat responds accordingly right and he just fed the comment above into the into code double c002 which is um a code generation AI which is available on the open AI playground um most of the code was written by the AI itself and he just used daily to make the patent feed buttons right um the only thing he had to take from outside was Sprite sheet because AI can't do movement very well yet and I'll tell you the one drawback was very react with AI which is paradoxly something we can exploit right um but as you can see he made an entire game by just asking it give me again right and because these are simple algorithms to make a game fight feed the cat increase its Health right like so simple that I feel like anybody in the next three or four years is going to be able to talk to a computer and just say well give me an app that does XYZ right and the hard part then will be to get users on the app because if you're able to do it so will everybody else this is why I've been crazy about distribution over the last two years I've already known this has been coming for a while right and GP like GPD 3. 5 chat GPT has been the icing on the cake but that's already existed for quite a long time right so um I've been very bullish on distribution because once you have distribution then I can use AI to generate anything let's say you come up with a great idea and I hate to sound like this right but this is the truth let's say you come up with a great idea I can tell you yo you have a great idea I'm going to copy it I'll just ask open Ai and I'll tell it hey Rahul has come up with something awesome can you just give me the code for it and we'll give you it's not cheating or illegal because it's literally it's going to be free software right or maybe five dollars a month or ten whatever software and it'll give me what you've taken a year to do because coming up with the logic in the first place is hard reverse engineering the logic from outputs is easy right so now that you've given me the output now that you've proven what's possible I just feed that into AI it gives me the inputs right and I take

### [25:00](https://www.youtube.com/watch?v=xlF9dfGI4aE&t=1500s) Segment 6 (25:00 - 30:00)

that input put it on my whatever some website or some app and because I have the distribution I'm gonna make the commercial outcome from it right now you might think oh what a bad guy but it's not bad if that's the only option available that the world is going to leave me with what the hell am I supposed what do you expect me to do be unemployed I'm not going to do that like I told you I'm going to fight right and I feel like this is the best opportunity right um to do it and code is going to go away very soon especially because most people who are writing code are writing simple code the harder part would be things like system engineering things like coordinating with the team things like getting it on the App Store because today if you want to build an app get it on the App Store there's a process you're a fill in a form you have to contact the Apple guys you would be very sweet to them a lot of process right that would be the harder part systems engineering will be the hard about writing code will get easier it's getting it's been getting easier for a very long time right the next thing which I feel will encounter to this right Survive for many years and there's something that we've been very bullish about is video there's a reason we started a channel called avtv I don't know if you guys are familiar with avtv it's another Channel I run it's one of the fastest growing channels in India right now and the reason we started is because video is very hard to get the rules off right getting the rules of a game is simple because you've got it that somebody has scored at the game it's probably simple rules at best right but a video has so many moving Parts at best you'll be able to create video filters very easily with AI new kinds of video filters that you haven't seen right let me show you an example this is when we die Keanu Reeves I know that the ones who love us will miss us this is an anime filter right this is real life footage and somebody's put an anime filter on top of it and it looks it doesn't look great right as you can see this AI is still struggling with motion but imagine if you wanted to fine-tune this imagine if you want to say well now I want this guy but without the glasses or now I want this person but with slightly longer nose you don't have fine control of the parameters now I want a chart to appear here and show you know number of people who died in the last 10 years manipulation at that micro level so what AI gives you is macro level flexibility to generate the base of something but the micro level Fidelity which is tweaking the small things is going to be harder than expected it's not going to be easy and I feel like video is 99 that with text it's not that because of training data weird video is exactly this right my name is probably be in the MPS or probably GBS right so it's hard for us to feed all the data to uh an AI we don't have that much computing power available yet five ten years down the line you know maybe we're gonna hit that number but what I'm saying is eventually even video editing will be automated right fully automated but it is the last mode to fall right in fact we shouldn't even be calling it video editing we should manipulation or video mastering because it's going to be everything to do with video I think just putting up a chart next to somebody speaking is not going to cut it right you need to understand the analytics interfaces you need to have the network a lot of things uh moving parts right which is why we are betting on it right if you look at we have this thing called avtv. com course right A lot of people ask me like why don't you can do so much you can teach people coding why are you moving into video editing why of all things video editing video editors get paid 30 40K I'm like today it's called video editing because people understand it tomorrow people who understand this is the last mode is the last thing that is possible for people to keep their jobs and also be much better paid because everything else all the capital from there that companies have will move into this right so uh I'm betting big on video I don't think it's going to be called video editing in the long run but I'm if I'm going uh all the way into something it's because I've thought a lot about it right and also distribution like I keep saying and people get confused with this right I say that content creation and distribution is the future no I say distribution to the Future being a content creator is the future creating content is the past what does that mean it means that now that I have a successful channel on AV or Twitter account I can create content easily I can go to gpd3 and just generate tweets like for the next one year and just automate it but getting 200k followers in the first place is hard owning that distribution that supply chain is the hard part putting stuff in the supply chain putting products is going to be easier which is why we're betting deeper on video right which is why I double click on video and if somebody like me is worried and I think there's like a 10 years down the line I don't know if even this is going to survive but this

### [30:00](https://www.youtube.com/watch?v=xlF9dfGI4aE&t=1800s) Segment 7 (30:00 - 33:00)

will be the last thing to go that's my pet right and you can see the tech for images have already come out the tech for text is very good right we use more gpd3 than we use content creators or content writers let me be very clear about that we use more gpt3 then we use content writers I use this stack on a daily basis right so it's not some Hocus Pocus that may happen or may not happen it is something that we use today but video very difficult they would not also sit and it's going to take a very long time till it gets to the point of Outsource ability so what is happening I'm just going to summarize this entire video right it we've created a monster that is able to figure out the rules behind everything one day it's going human beings how to be a human and then we're in serious trouble until that point along the way to doing it is able to figure out the rules of each individual thing right for example when it comes to picking up things now there's now an AI hand that can pick up things very accurately because it's been fed in 3D space examples of the hand picking up things correctly in the beginning somebody held a Xbox controller picked up the thing hundreds of times right and now it's able to do it by itself because it knows best to go what to crash class etc it's understood the rules so we've created a machine that can figure out the rules from any scenario and that thing is really good and apparently it's also what human beings do and what we are paid for in the workforce we are going to be most of us out of the jobs in the next 10 years mark my words right this is going to happen and a lot of people say new jobs are going to be created the last steam engine Revolution created new jobs true but we are also increasing the number of humans here not through population outbursts but because AGI artificial general intelligence is the concept of producing a human they're producing a human being and we're telling the human being okay now you are six dollars a month go compete with the person who's taking a one lap a month salary as a business who do you think I will hire it sounds bad but hey what choice do I have right you're giving me two options one is one lack of one the other one six dollars a month and software already exists we already use software except now the software is going to get much better and do all our tasks so I don't know how humans will take to be replaced by a five or six dollar a month software but it's going to happen right and uh you better be prepared for it and I'm gonna try as best as possible to make sure you make money over the next five six years my recommendations are keep your personal burn rate low um learn relevant skills that will last for the next five six years this is an evolving domain right so if I find out the information I'm going to communicate it to you as fast as I can that's why subscribe to this channel um yeah I know it's Grim times I don't have a solution I'm not an influencer I'm this is probably something that we are creating a solution to us unfortunately so uh probably no way out of it but hopefully one day uh you know we figure something out or at least get rid of the idea of jobs forever so we can just have fun as human beings awesome bye

---
*Источник: https://ekstraktznaniy.ru/video/12572*