Applications of AI and Machine Learning | ACES Seminar Series | PeraCOM | University of Peradeniya

Thank you so much everyone. I know it's a it's it's like 6 p.m over there in Sri Lanka so it's a it's the afternoon so hopefully you guys got some coffee got some tea and uh ready to get going and uh you know maybe learn a little bit about machine learning and I can probably instill some of the experiences that I have uh I have obtained in the past the decade of working in this field and hopefully I can you know it's a it'll be a resourceful session for all of us um so before I uh start off I want to thank you Dr. Mahanana Dr. Damayanti and the student coordinator Madhushan for putting this all together I know we've been in the talks for a couple of months myself and Dr. Mahanama and I'm happy that you know this came to a fruition uh today so I'm happy to be here and uh you know thank you so much uh for taking this time off your busy schedules to attend to this uh this session and um yeah all right so let's kick off oops so here we go all right so um in the beginning what I'm going to do I'm going to actually set this talk as more like a story and I'm gonna basically introduce myself um and then um I'll go over the agenda uh of the what the next 40 to 45 minutes is gonna look like um but before that uh again like I want to thank you again for being here it's a privilege for me to talk to you all you know University of peridentia is my alma mater I'm an alumni of the University of peridentia I uh congratulated from Pera in 2008 I did electrical engineering so it is really a privilege for me to come here and talk to you all um So currently I reside in Boston Massachusetts in the United States and my I am a nude ad I have a three month old and um so I'm actually on pretending to leave now so that allows me to work on talks like this in my free time but usually I um my my my my real work is I work as a I lead a team of data scientists machine learning engineers at American Express um my department is mainly mostly focused on managing fraud uh e-commerce fraud and financial Tech fraud mostly and also as I also work as an Adjunct professor at a university called Northeastern here in Boston um at a personal level I I really enjoy learning new technologies particularly returning to machine learning um and then of course I love spending time with my family working out whenever I can and I'm also lucky enough to live by the ocean so during summer time I really enjoy an ocean swim so that's a little bit about myself and what I really want to get out of this talk is for you to go home and really be excited about this field with Mission learning and build cool machine learning applications so hopefully I can install and still inculcate some some sort of encouragement where you can like pick up from here and then you know think about like building some some cool applications around prediction and like you know things that we will learn in this talk and um I want to preface by saying one thing this talk is not going to be a very technical thought it's going to be more like a rather than going into depth um my what I was thinking is maybe it'll be beneficial to have a a conversation around the breadth of opportunities and applications around the machine learning so that you can can choose like whichever area of focus that you want to learn in and um which which I thought would be beneficial rather than going into a much more Deep dive conversation in a technical subject so yeah um all right so let's let's uh let's take it off all right so the agenda for today um in the beginning I'm going to talk about a little bit of the motivation behind artificial intelligence slash machine learning what they are in a nutshell and then I'll talk about like some of the applications of AI and um maybe like you know how how machine learning differentiates like how are certain certain um how do I say it certain algorithms and Mission learning languages them from each other uh maybe like in a very generic way so that it's easier for you to learn and it's easier for you to remember um and then I'll jump into like fraud management side where which is like my bread and butter which I've been working in the past few years so I can um you know talk about that um and then I'm gonna do a little bit of context switching and then talking about like how to build this leadership muscle so like hopefully you can um this will uh allow you to uh get more excited about this this field and you know start working on these these projects so uh you know as undergraduate graduates um you're in a really good um I would say really good time in your life where you can like be excited about starting a new new company or an application so you know so uh uh yeah all right okay and then I leave uh 10 to 15 minutes if you have any questions feel free to um all right okay so motivation uh for AI and machine learning um so I'm sure most of you have heard about artificial intelligence by now what it means and at least in a generic level so I'm not going to really go deep into it what it really means is um we have a let's say a hardware element or a software element um trying to act as a human and then human level intelligence right so we assign this Hardware this soft element like certain a certain tasks a certain policy and a certain reward system so that the uh the the the the agent the AI agent so to say will will learn the optimum path to get to this goal right so an artificial agent is more like it's uh if you if you think about it so I'm going to actually give you an example um which will which will make it easier for you to comprehend like what what that means in a more General generic level and then there's another another term that I'm sure you've heard of which is machine learning and uh people say to the subset of AI I don't really know but what machine learning really is is like it's um for me it's really like encoding the past to predict the future and really like parameterizing like past phenomenons so that you can predict what the future is going to look like so it could be a subset of AI um because AI is more like a I would say more like an organic live learning kind of a way of thinking but machine learning is more like a I would say like I would say like a static way of learning all right so um let's jump into an example all right so um I was thinking about like what would be a good example to talk about Ai and um you know I I just came up with this idea I was like okay I love coffee so what if I want to build my own coffee shop Okay so let's say I I'm this entrepreneur and I'm like I love coffee I want to build my own coffee shop I'm not gonna stop so what I'm going to do is I have a friend in South America let's have a friend in Nicaragua or something and um coffee beans so I can send you coffee beans for your coffee shop I'm like oh awesome I'm excited so my friend agrees to send send me coffee beans but my job is to um let's say segregate good coffee beans and uh bad coffee beans and then start the process of roasting it and then you know building my coffee shop but the first task is to one take the coffee beans I want to segregate the good versus the bad okay so this is an arduous process if I'm a human being trying to do this right it's like really hard so I'm thinking all right I'm an engineer so to do this I'm going to be like thinking about like maybe I can have like an AI agent uh differentiates between the good coffees and the bad coffees so how can I build this system uh the easiest way to think about this is to put this into a framework called a peace framework uh P stands for performance metric environment actuator and a sense it so the performance metric uh it really comes down to sort of a um it's really like assessing the performance of your of your AI agent right so let's say um let's say I built this conveyor belt and there's a it is a conveyor belt where the coffee beans are being passed and the sensors are like a like a camera or a a weight scale and then um actuator which is the action is uh some sort of a like a robot Tom saying that this coffee bean is a good coffee bean this coffee bean is Bad Company so so we can build a system like this where the performance metric could be uh once we run this program one time we have a bucket of good coffee beans and a bucket of bad coffee beans and this was decided by the AI agent now the performance metric could be we look at the good coffee beans and we can say like okay off the good coffee beans that the robot predicted to be good how many were actually good so that's one performance metric and then we can say after bad bucket of the bad coffee beans the the robot said those are bad how many are actually better so we can set up some performance metrics around that right so we have the performance metric uh this system really doesn't engage in the environment meaning more like a feedback loop anyway so I wouldn't say it's a uh it's more like a static learning AI agent there are other AI agents that actually like interact with the environment um like like Roomba I don't know if you guys heard of it it's a bank vacuum cleaner thing goes around your house and pick up dirt and we can set up policies reward systems to build that AI robot but it actually actively interacts with the the environment learns the constructions around the room um but um much more static so I would say it's a static environment as opposed to a stochastic environment um and then the the robot arm is the actuator and then we have the sensors which is the camera the weight scale and all that so um so we kind of came up with this idea right we have a use case and we we put this framework into place so we came up with this air robot now all we have to do is we need to like kind of aim the model which I get into in a couple of slides uh train the model and then apply these performance metrics to see if our algorithm works good okay so so that's AI that's kind of like on AI agents but I want to kind of emphasize on a couple things here uh when we talk about AI agencies playing which is called the states and observability um what this means is um when we build a let's say an AI agent or an algorithm what you need to realize is there's something called the context right so um it's it's this interesting phenomenon like where when I'm like actually talking what you hear are words coming out of my mind but you're really interested in is the context that I'm trying to convey right so the same thing right when you look at my face you can see my facial expressions but you're really interested in is that hidden State the state of what what is this mode right um similarly like let's say the stock market you see the stock prices going up and down but you what you're really interested in is if it's a bear Market or it's a bull market right so the environment that you're interested in could be slightly different and from the from the actual um observations you make so this brings into algorithms such as like you know this you can you can think about like probabilities I can think about hidden Markle chains so um this uh you can expand on on this idea quite a lot so I don't know if you if you're doing courses on this uh but but yeah if you're interested in you know there's a bunch of like searching algorithms like a star uniform search and all that which pertains into into this topic if you want to have like a foundational understanding of how an AI agent works because I want to move on to uh this other machine learning so um I hope I ask some questions for the end uh do you have any uh burning topics okay so jumping into machine learning so um I really think about um my undergraduate time we learn a lot of equations right I don't know if you guys do still but I remember learning all these equations and I remember like learning this constant um there's after doing like back and forth a lot of trial and error experiments people have come up with these constants these parameters but over the course of the last I would say like the last 10 to 20 years what people have discovered is um why do we why do we actually try to do all those experiments and come up with these theories why can't we have like some sort of an algorithm um where we input the data and we we can look at the output of the data and let the algorithm figure out what these coefficient weights and parameters are so machine learning is really bad it's really parameterizing uh the the relationship between uh the inputs and the outputs of a function and the way we achieve this is by solving and optimization function um so let's go back to our coffee shop example so let's say now that I have my coffee beans all set up and I have really good coffee um and people start coming into my coffee shop okay um so in the morning hours I see a lot of people there's a lot of traffic coming in there's a lot of food traffic coming through my coffee shop door and people are like so excited to get my coffee in the morning I was like around like 7 A.M to like 10 a.m and then it kind of dwindles down from there and then it picks up again around like 3 P.M when people want like a refresher
or something but usually it has like a couple of Peaks throughout the day and as the owner of the coffee shop I'm thinking well do I really need to hire like a cashier and a barista and uh you know there's all these workers in my coffee shop throughout the entirety of the of the day or should I just hire these people in the morning hours and then in the evening hours so that's a business question that I went there I wanted to answer right so um how do we mathematically or statistically get to that point so how do we really understand what that time frame is um one of the easier way to understand this is to put this into a Time series problem and understand the nuances where you know what that traffic looks like throughout the day and then I can predict what the traffic is going to be in the future on a given week day let's say let's say on a Monday most people come to work therefore the traffic is like way high compared to let's say on a Thursday where people may be working maybe more uh more reluctant to come to work they probably prefer to stay home and work so therefore the traffic goes down so how can I how can I understand this like all these like complexities right so I can put this into a machine learning Model A Time series model where I have seen people coming coming and getting coffee um because people would come in and they would use their credit card we would swipe their credit card so I can get a data set and have the time stamp uh when they came in and I have the the the transaction amount that they've made so I can put these together and possibly build a data set so let's say like my data set is going to look like um I have a context window so I would say okay for the last last three years how many people came in last nine hours how many people came in likewise so I have like this context window that goes back like every three hours or so and I can create this data set which will be my ex which will be my input and my output data set is the number of people inside the coffee shop so now you you run this through some sort of a mission learning algorithm and you can try to understand the relationship between inputs and outputs and what you're really training and what you're really trying to understand is that the coefficients of the weights that actually connects those two together and creates that function at FX is equal to Y okay um but what we're really interested in is given a X how do we predict quality so the probability of Y given X that's that's really what you're interested in and to get to that point there's a bunch of algorithms out there um the easier way to comprehend this uh in my opinion is to understand the underlying cost function that's being solved so if you have a let's say a numerical problem that you're trying to solve just like the amount of people who are were actually in the coffee shop which is a numerical value you would opt for a I would say a cost function you're trying to solve a cost function like a sum of squared arrows uh some spread errors is essentially the deprated number of people the and like you can say the actual number of people inside the coffee shop minus the predicted number of people in the coffee shop predicted by the the model and then uh and then you square it and then you add them together so that'll be the sum and then that will be a convex convex curve that you can find the global minimum on which will give you the optimum uh Optimum parameters Optimum weights for that particular algorithm so that's like one way of approaching that problem and we call that regression so regression means you're solving a numerical problem um let's say let's say there's a different problem you want to solve uh which is like let's say my problem is more like um I want to understand um what are like the yeah but I like the good Patronus that comes into my coffee shop who are the who are the people who loves coming into my coffee shops they bring their kids so they always buy more than one coffee so I wanna I wanna create this loyalty program to them whereas some other people who just you know who are just passing by in my coffee shop and they will just come to the coffee shop so I want to create this binary variable uh distinguishing between really good customers versus like regular customers so that's more like a that's not a numerical problem that you're trying to predict that's more like a classification you have a binary variable that you're trying to predict between the two um so in that case maybe uh maybe root mean squared error past function might not be the best plus function because it might not give you a really nice convex curve to for you to optimize so in that case you would opt for a more like a cross entropy or a log loss kind of a function So based on those cost functions you can you can kind of typify what sort of permission learning algorithm you're going to be doing what is the use case that you're solving so it can be a classification problem or it can be a regression problem there's a bunch of like algorithms out there for you to perform so I would say uh you know if it's a more like a column now data set a historical data stage and your problem is a supervised learning problem supervised learning is you have the input data and then you have the output data it could be like a Target or label um I would say um I would say boosting machine models are the best uh best I would say the best models I mean the others have their benefits as well but in my experience boosting machines um you know perform really well or you can like stack them together and do all kinds of like cool stuff all right so that's unsupervised learning um so let's move on to this another concept called unsupervised learning which is like mostly what the use cases are going to be like because in your everyday life getting that label or the output variable is not going to be easy but you'll probably be able to get a bunch of data um so unsupervised learning is where you actually don't really have like a Target you don't really understand what this means but if you have a data set so excuse me um in that what you can do is now that since you have a data set what you can do is you can actually try to um cluster these samples so these these data points based on how similar they are with each other and um the similarity is based on some kind of a distance metric and these distances could be euclidean distance can be like Manhattan distance Hamming distance sorry for particular use cases you you can you can actually have particular or different um different distance metrics so for example like if you're if you have like a a location problem like a searching problem um going from what is the best way to go from point A to point B you might be using more like a uh I would say a Manhattan distance distance metric as opposed to a euclidean distance uh similarly like if you want to do like a string matching or like do a good figure out the distances between two strings you would probably try to go for like a cosine similarity or you would you would use um and then there's another um algorithm uh or I guess a conceptually another way of modeling emission a machine learning problem called reinforcement learning um uh so this is where like we we penalize or reward when when we get the when model gets the answer correct or wrong and um uh so reinforcement learning I think like one of the really great examples for this is uh GPT uh you know they did reinforcement learning with human feedback um but um yeah so so that's really it and um so that's really it and on Mission and learning uh so let's just uh talk about some kind of like I think we'd kind of discussed this uh but um but I want to go over some of the things that you can also start thinking about and then maybe we'll uh go into talking about some music after this slide um okay so we discussed supervisors learning is where like you don't really have a lot of uh labels that are labeled data but you want to use this as the gold standard and then you have a lot of unlabeled uh data um so um few short learning or zero short learning uh examples for this uh one of the good examples are facial recognition like you know so so it's it's probably hard to get a lot of Paces as a data so rather than really understanding the distribution of the phase maybe it's easier to understand the distribution of the similarity Matrix between your face and a different person's face so like you can create like a um more like an autocorrelation Matrix like you have your own face and then you have uh you can find the the similarity this similarity essentially between your face and another person's face and then between your face and your face again um and then that's called like few short learning where you're trying to understand you're trying to understand the difference Matrix as opposed to understand the really like the distribution of of that your pure base particularly um zero shot learning is similar I would say but it's that that that's more like around something called pre-trained models um so here I have mentioned transfer learning um again transfer learning is where you um so so let's take an example let's say um will be an example um let's say all right let's go into a coffee shop example all right so um we are doing great on our coffee shop and we are getting some Google reviews on a coffee shop so um and Google reviews go from zero I think one to five right rank between one to five so um we have some textual data some people writing reviews on our coffee shop and then we get the star uh how many stars we got like between one and five so um now I want to build a model so let's say to see like when I input a review I want to kind of get an output like what is the rank for this for this review so so that's like my use case so it's more like a natural language processing problem where again like going into understanding that hidden state where I input the text uh data but I'm what I'm really interested is the sentiment behind that the text data right so um in order for me to build this model it's going to be so difficult for me to learn the language itself right so it's written in English so before even understanding the sentiment you need to understand the language itself like how the grammar works it's a phonetic language like how does it work so um you know that's going to take so much more data so much more like compute power to train a model so rather than like going through that you can actually like get the use of a pre-trained model that uh that you know Google has created uh called let's say we use like a generic pre-trained model like bi-directional encoder representation of Transformers about 35 three main model that understands the the line thing then we can clear the data set the review data set a bit so that we can understand the sentiment behind the reviews and then we can train this in time uh so that now you have a new model now a fine tune the model so to say which understands the the English sentiment uh pertaining to your coffee shop reviews so now you have a model where you put in some some reviews and you can understand uh you can classify between one to five whether this review is a five star review or one star review and then you can understand even the sentiment behind it um so yeah so so that's transfer learning and um and then I want to talk about something called Edge machine learning um Edge machine learning is a uh an attempt by several companies I would say this is this was started by Google I would say I don't know maybe like five years ago or 10 years ago when all these privacy concerns started started to emerge what Google tried to do is they were like well the the biggest problem in terms of data privacy is the fact that the data leaves the device right so so if I if I want to if my data leaves my device and go to a server and the server computes the the server does the inferencing and produce a probability back the data actually leaves my device so that's why the Privacy concern starts to happen so why do we why do we let that happen why don't we put the model in the device itself so this concept kind of inspired them to think about having being able to put these machine learning models in the devices itself so um if you're interested in you can learn about core ml I think it's a it's an apple I've actually never worked on oml but I've done some TF live tensorflow Lite application in the past where you're what you're really trying to do is you want to deploy the model in the device itself so that the data is secured with a Sandbox inside the device and then what leaves outside of the device would be the probability or maybe like a quasi probability or quasi data they're not really pii personally identifiable information but it's more like a quasi more like an encrypted kind of a data payload that leaves the device goes to the server and then do the computation right so that's also a another approach of doing machine learning so uh so like we talked about supervised learning unsupervised learning few circles I mean sorry transfer learning there's a lot of like use cases out there and there's a lot of like plethora of algorithms that you can use to um complete to like really all like different use cases um and uh I'm gonna spend a couple more minutes on the other the other two types as well a b testing it's really not a machine learning model but it's uh it comes into play when you when you deploy machine learning model in production uh so again let's go back to our coffee shop example so let's say I'm doing really well and um I um you know I I started my coffee shop I'm doing like really well so I'm like all right usually I do I do like the traffic like when people just come in they buy the coffee but now I want to create a website where I'm creating a website and I want to make sure that people can buy the order of the coffee through the website and they can just come and pick up the coffee so that like kind of alleviates that that foot traffic that comes into comes in in through the door but I can just open up this other window where the people can just come up and just pick up their coffee and just leave so that is good business for me uh and I just have to put up a website but before I do all that I want to kind of understand like is this really like worthwhile for me to do right um so what I can do is I'm I can like sort of on the sort of do like some kind of an A B testing a b testing is where you have um a control and a test so basically um what you're trying to achieve here is um what you're trying to look for is um I mean I guess there's like two approaches of doing this doing this uh there's one approach called The Frequency approach yeah I don't approaches called the Bayesian approach the frequentest approach is I'm sure you heard about p-values um uh that approach is really is telling that you are differentiating between two hypotheses there's another hypothesis and you're trying to break the null hypothesis uh to say like your website is um is is doing studies statistically significantly doing better better than not having the website uh and then the Bayesian approach is like more like you're you're actually dealing with like beta distributions probably distribution of probabilities and then and taking samples of that and then using conditional probability to understand uh the same kind of idea um I would I personally like the Bayesian approach because it's easier for me to convey the message to my leadership when I do a b testing as opposed to saying thank you for someone like okay values so and so and therefore it's statistically significant which is like which goes over the head of like a lot of like like people right so it's easy to probably say that the X amount of probability better than not having a website rather than saying this is 0.005 p-value right so anyway so so that's that's around a b testing there's another way of doing it is called multi-on Bandit I'll let you like Google that and learn about that as well uh and then another another type of application of machine learning is building recommendation models so I'm sure you've uh you watch Netflix and Spotify and things like that they're all based on recording Nation model so you can learn about I think you can start with collaborative surgery and then you can expand your knowledge on that as well all right I feel like I spend a lot of time on this slide so it's like uh a little time on this slide an interesting let's do a time check all right okay so um yeah so applications of uh AI so like I said classification remember cross entropy um the use cases would be uh you know classic classic binary variables we are trying to distinguish between whether it's fraud or not fraud you can say uh different classes like weather prediction um or something uh interesting like passing a gene expression to differentiate between cancer cells versus normal cells so those are classific examples of classification models regression could be a continuous variable that you're trying to predict so stop sales price predictions could be good examples for that and then comes natural language processing this is like um this is getting a lot of heat these days which I think is is amazing um so like chat Bots I'm sure you've used GPT and all of the other cool language models out there machine translation translating one language to another and then CV computer vision problems like stable diffusion uh immense segmentation denoising object detection those are like certain use cases that you can also learn around these particular umbrella uh topics all right okay so I'm now going to switch to talking about like uh the feel of uh frog fraud management that I'm I'm actually in um so but I'll try to spend not a lot of time on here uh so uh applications for file management so fraud is an interesting problem to solve because it's a moving Target um unlike other like uh I would say other use cases where you're interacting with the environment doesn't experience that much uh like let's say You're Building like an autonomous like vehicle or something um the the roads or the the there's traffic once you really get an understanding about the distribution of different random variables it doesn't really change that much but in fraud the running variable is a human right they're always changing the way they're attacking the the website or uh or your device so it's a moving Target so which poses an interesting problem where the idea of the machine learning problem is generally or encode pass data in a more generalized sense so the Precision is what but uh the recall is high so um I'll explain what position recall is in a minute but what I'm trying to say is when uh let's say like a fraudster figures out a uh a backdoor into a website and they're like all right I'm gonna I'm gonna do a distributed uh denial of service attack using this uh this uh set of ips and they're starting to attack right they're starting to attack this website um and then the the company figures are all right we're getting hit by this this I this setups I can't have my mission learning model to quickly like learn about these IP addresses and like give a high probability it's going to take like it's going to take days it's gonna take like weeks for it to figure it out and go through that train the model and being deployed the model being deployed to go through all the unit tests and all that so it's it's too cumbersome and it's never going to work so um so what we have to circumvent that is we have this uh we have this deterministic rules in place and the rules you know you you know what rules rules are like if if the transaction comes from this IP address and it has this payload blah blah blah blah you can have this like rule written and if it passes that rule we can reject that transaction right so it's a it's this hybrid model where you have rules and then you also have a missionary model produces a probability output and um uh probability is an interesting thing because it's really it's not really telling us whether it's a project and transaction or not uh it really for us to kind of think about like okay how do we how do we set the threshold right um so so yeah so fraud is an interesting problem it's a hybrid model between uh deterministic rules and a generalized machine learning model uh put together and so so creating that platform is a little tricky because you're like always always like kind of fine-tuning the the model and uh to like go along the static rules and uh it can be it can be an interesting challenge um if it's right here to kind of like show you like how we assess a uh how we how we really set that threshold to say that okay Above This threshold we're gonna say it's a fraudulent transaction below that threshold is going to be uh we can just say it falls into a review buffer where the transaction is being reviewed by a human or actually we can allow or accept that transaction so as you can in this confusion Matrix um what we do is we build something called a very rudimentary way I would say we built a Precision recall curve uh so what is recall recall is true positive rate so which is of actual of all of your actual fraud how much fraud how much correct how much fraud did we correctly predict right that's that's recall true cross true positive rate Precision is the other way around um off all of the fraud that you predicted to be fraud how many did you get right okay so those are like two different ways of looking at the problem and you have to find that fine balance between the the two so we uh we can draw a Precision recall curve [Music] Computing that we can we can find the best threshold uh to get the best support walls no but that's like a very simplistic way of interesting that it's way more complicated than that um because we anyway I'm not gonna get into it uh but but it's a very simplistic way of explaining like how we uh how we do the performance assessment um on on this uh model all right so then moving on uh I'll give you a little bit of like a uh kind of like an overview of like um what I have done in the past I would say five to six years or so um my main contribution is uh at my work was to understand the uh understand the data really collect it from devices yeah when I talk about devices it's like it's your mobile phone or it's your browser that you you go into websites uh so like if it's a browser it could be Chrome browser it can be Safari so you use those browsers to go into a let's say an e-commerce website let's say you won't go into amazon.com you go into a financial bank or go into somebodybank.com whatever and whenever you go into those websites what we do is we drop a JavaScript and the objective is to really collect all of your information about your browser or your mobile application essentially we we capture like we drop elements like cookies down local tags and we collect IP address user agents and all kinds of information just so that we can profile you just so that we can understand and identify you and then we we actually drop soft elements in your browser and even if you like uh you know clear your cash it's it's they're like and then we build like other models to do something called browser what that means is we want to like uniquely identify your browser your mobile application so that we have like this this um this registry to know that okay this is you when you make a transaction using a credit card we tie those two two and multiple other elements together so that we know that for sure this is the person who is making this transaction and therefore we can pass or fail your transaction um and I don't know if you have encountered like two effect authentication alerts coming onto your phone like saying this is you who made this transaction um so that's like usually when that's like really it went above the threshold and it went above the review and then it actually went into the reject so that that's when you get that two-factor authentication on your phone so that's really the models that we built again we build models in the the application itself I mean the device itself excuse me and we build models um up in the like we send the data upstream and then the the server will give a probability feedback as well um other particular use cases that I can highlight here is account takeover account takeover is really um rather than understanding a a transaction at a more Atomic level I would say at a more a a snapshot level we track the entire behavior of an individual across an account and across multiple accounts so if you have a bank account and if you have like an account on Amazon if you have an account in a different bank so we're able to like track you all across these like different different uh I would say different organizations so we kind of have like this really good like profile about you um and and these are like very interesting problems and for us to scale into building these like different unique models from many people it becomes a very taunting task so you know we built like I mean recreneurial networks LST models to like you know capture that data but there's internal limitations in those models because you know it can't go longer okay it can't go too far back to understand uh you know what you have done in the past so we do have to make these I would say computations like computations for like very large computations to say um where uh the biggest problem really is um in in this field the biggest issue is real-time inferencing uh what do I mean by that real-time inferencing is where you get a transaction and we get like less than 50 milliseconds to give a probability feedback so that means like we can't have we can't do a lot of pre-processing of the data uh we get the data and any pre-processing we have to do we have to do in a separate offline process and then feed that data into um you know supplement that data or augment the the real real-time data that we get and then we can produce that to the machine learning model to get a probability feedback um yeah so so that's one of the biggest problems we have in this field um uh anyway I don't want to get too much into it uh let's do a time check uh all right so actually we are approaching the the bottom of the hour at the top of the hour in in Sri Lanka um okay so uh just to give you a a little overview sorry for context switching I'm just jumping into um uh you know what a data driven solution company looks like this is like really in my experience what I have encountered in the past so other people are in this field might have different different experiences but by and large for me um you know in the beginning what we do is we we have the engineering infrastructure The Architects go in and build the data like a data pipeline they figure out like the compute power the storage capacities and you know all that stuff they build the data data Lake and then then come then comes the data scientist who builds models on a lab environment so if you have played around with like Google collaborative collaboratory AWS Age Maker studio lab um those are like more like jupyter Hub environments where you can play around with and build like a prototype model and then when you want to scale it up maybe a machine learning engineer can help you maybe productionize your model uh you and then I mean you know you build your model on like a let's say on a staging I'm sorry on a development cluster and then machine learning engineer could potentially help you to move that you know to more like a production cluster um and a data engineer really is someone who kind of helps with the passing of the data so the data might come in like uh I don't know Json formats and data engineer might try to convert that into a RK format so that that's easier for you to read uh and you know they might build the pipelines also um and a data analysis I would say someone who understands who probably sit close to the product teams and then the the sea level the decision makers because they are really like um very they're they're really like taking the layers off of the data and exposing what the the context in the data to the leadership really through dashboards so they are more like building bi uh dashboards um and uh so they have a little bit of knowledge about machine learning I would say but mostly they there uh I would say damn the contribution is to build those platforms uh that the sea level uh people can go in and understand okay where the business is going and make those make those product decisions in the future um a couple of things that are also important is a model life cycle management uh which is like you know now now if it's a data driven or solution driven company you're going to be building a bunch of models and you're going to have a a track record of what the models are and what data went into the models because in the future I think we would have a lot more regulations that's going to come around AI which will be asking us questions like okay what were the the data that you use to build these models what assumptions did you make can you explain the models um decision making which opens up this this can of worms so model lifecycle management is also becoming an important concept to think about again like like I said like machine learning operations which is similar to devops I'm sure that you've heard of devops if you're a computer Engineers but ml Ops is similar because machine learning is slightly different from uh having like this this uh like for devops you really know what you're what you what you uh what your blueprint is when you start doing a project you really don't know except more like an iterative process so because you got to like do trial and error all the time ml Ops is slightly different from devops and then you still do like continuous integration and continuous deployment when you when you try to deploy model in production um all right let's move on to the next slide uh all right again context switching time uh so this is really a slide that I I always wanted to kind of put up for you guys something that I try to establish in my life and uh you know um so I don't know um this is like um I hope that this might be beneficial for you all um what I what I Really Wanna instill is becoming you and um and and a leader doesn't mean that you have to have direct reports under you to become a leader uh you can be your own leader where you can be better uh you can be a better self of you than yesterday so what you need is discipline um established discipline discipline is really like doing things that you don't want to do day in day out but you keep doing it and uh yeah you know you you you you build that muscle you build that muscle of discipline so you always progress in your life um and then there's going to be a lot of like information that yes you're probably gonna get bored like so for example back in the day when I was growing up uh I kept hearing this this notion where uh access to information will give you a competitive Advantage but now I feel like it's really not having the access to information it's more like how to pass the information you know how to like um curate the informations to your advantage or to solve your use case and uh that would give you the the competitive Advantage so that means like you might get bogged down with like a ton of information and then you probably get like exhausted by the amount of information on a particular subject So to avoid that I would say a plane box like whatever you want to do just set up a timer and say like okay I'm gonna learn about this but I'm gonna no matter what it entails I'm gonna only spend 40 minutes on this topic and I'm gonna only open five uh tabs on my my browser and I'm gonna learn that and once it's done that's it I'm gonna move on to the next thing because there's going to be way too much information for you to um for you due to just absorb at a given time utilize the tools out there um be inquisitive be a lifelong learner and always Empower your colleagues work try to learn uh to to to work with different stakeholders like this uh just try to understand like how to work other like peers from other universities peers from colleagues from other things everybody together and build systems and applications where you utilize everyone's um you know like everyone's uh not uh try fail fast learn and repeat um always have a good good foundation on your first always use first principles and get your foundation really good once you establish a really good uh you know where you're going to fall onto so you have really good first principles from there you can build up on anything and then hopefully you can be become an ambassador and you can help your generations and teach them how to better great leaders um all right so I'm gonna leave you with this slide uh this is a slide I put together the things that I'm kind of like interested in these days I'm looking up on um before we conclude I really want to kind of like challenge you uh where I want you guys to build an application it could be a machine learning application it could be a web application whatever you guys want to build but um really what I want to like really drive or push for is this perception of like moving away from like building this small complicated algorithm or the more to building something that generates income that brings in money or building acts there's something that's rewarding because you get like you can you can get lost in the theoretical components of these topics but you don't really like kind of think how can this apply to solving a real world application and if you can solve a real world application there's going to be demand and the demand will get you the funding so you always have the thing from top bottom to top down where you think about a a business uh or a real world application that you're going to solve and then you figure out okay what is that algorithm that's gonna that's going to take me there and it could be the simplest model I would say the simplest model is the best model um and um you know if you have an idea create a proof of concept uh there's a minimum viable product document that I've linked up here and you can read about that it's about like how to get customers how to keep customers um and then uh a tool set that you can use is Google collab environment uh I don't know maybe you guys are using this already uh AWS Age Maker has a free uh jupyter Hub environment and then Pi torch I would encourage you to learn about hugging face has a lot of like cool pre-trained models and there's a notebook section as well that you can learn from um the the hip uh uh I guess the machine learning models out there today is the large language models so learn about a lot of language models CPT Auto GPD you can learn about how to deploy model any doesn't matter the greatest model that you create if it's not going into production and and is being decisioned on or being inferenced on the your model doesn't mean anything so if you can have the greatest model but if it's actually not doing anything it's not in production making decisions I mean it's not useful um and then think about a business proposal and you know try always think about how can you monetize your problems um and then um you know uh yeah you can pretty much learn through but uh yeah in the interest of time I'm gonna stop right now and uh I do have another uh appendix right here for you to kind of if you're interested in read up these papers there's other a lot of other papers that came after this this is a screenshot that I took from that paper I'm sure there's a lot of alumni who knows about this uh this uh this area so feel free to um feel free to talk to your peers talk to you um you know seniors and uh finally uh you know people who are going to be building AI is going to be very small but people who are going to be using AI or building applications are going to be bigger than that subset so I would say I would encourage you to build applications on AI and machine learning and hopefully you can get the benefit from the links that I've shared and wish you all the best and uh yeah so I'll stick around if you guys have any questions and I apologize for taking the entire one hour to finish the session thank you!
2023-05-25 20:39