Community session, for freshers · Epoch, IIT Hyderabad · Nov 15, 2022
An introduction to the different domains of AI, for freshers.
1 / 99
Hello World: The AI Chapter
Community session, for freshers · Epoch, IIT Hyderabad · Nov 15, 2022
An introduction to the different domains of AI, for freshers.
Hello World! - The AI Chapter By Epoch Team, IIT Hyderabad
For those who missed the opportunity orientation 1. Link to the Slides: SciTech Orientation 2022 - Epoch 1. If there are any questions or concerns, we encourage you to contact us after the session. 2. The contact details can be found in the orientation slides
Today’s Digest! 1. Check out this Article where AI is used to control crowd and climate in the Football World Cup 2022 @ Qatar this year a. In October, more than 130 people were killed in a crowd crush at a football stadium in Indonesia after police fired tear gas at fans who streamed onto the pitch, followed by people running into locked exits while trying to exit the stadium. b. The Qatar centre’s technical team says that data aggregation allows them to forecast crowd patterns. Since they know the exact number of people expected based on ticket sales, they can predict crowd surge. That could be based on time of arrival, points of entry or even the movement of people at any given time.
We don’t do definitions, we do memes :)
AI? You know ‘bout this?? 1. Artificial intelligence is the simulation of human intelligence processes by machines, especially computer systems. 2. Some standard applications of AI are: a. Natural Language Processing (NLP) b. Computer Vision (CV) c. Reinforcement Learning (RL) d. Recommender Systems (RS)
Stages The (only) Stage of AI 1. Artificial Narrow Intelligence (ANI) [Weak AI] It is the stage of AI involving machines that can perform only a narrowly defined set of specific tasks. At this stage, the machine does not possess any thinking ability, it just performs a set of pre- defined functions. Eg: Siri, Alexa, Self-driving cars, Alpha-Go, Sophia the humanoid and so on. Almost all the AI-based systems built till this date fall under the category of Weak AI. Alexa Sofia
Stages of AI 2. Artificial General Intelligence (AGI) [Strong AI] It is the stage in the evolution of AI wherein machines will possess the ability to think and make decisions just like us humans. There are currently no existing examples of Strong AI, however, it is believed that we will soon be able to create machines that are as smart as humans. 3. Artificial Super Intelligence (ASI) It is the stage of AI when the capability of computers will surpass human beings. ASI is currently a hypothetical situation as depicted in movies and science fiction books, where machines have taken over the world. Chitti
Fastest Fingers First - Kaun Banega Crorepati? 1. Scan the QR code 2. Submit your answers in the Google Form 3. The fastest one gets….
LMNoooooo….It is ML! 1. Grand Goal of ML: Mimicking human Learning is ML To develop computer programs that can mimic high-level cognitive abilities in humans for solving complex problems (e.g., those in Astrophysics, Biology, Environment etc.) 1. Machine learning is a branch of artificial intelligence (AI) and computer science which focuses on the use of data and algorithms to imitate the way that humans learn, gradually improving its accuracy. 2. “Machine Learning is the study of computer algorithms that improve automatically through experience.” - Tom Mitchell
Data Science = Statistics? Definitely n0t! 1. Data science is the field of applying advanced analytics techniques and scientific principles to extract valuable information from data for business, decision-making, strategic planning and other uses.
(image slide)
Tools (or) Libraries at hand - Next Session Topic…shhhhh 1. Numpy - to work with arrays and vectors 1. Pandas - to work with the dataset (.csv files) 1. Matplotlib & Seaborn - for visualization 1. Tensorflow - to create deep learning models
(image slide)
Real-world Applications 1. Image Recognition - Google lens 2. Medical Diagnostics - Medical image processing 3. Stock Market - Stock price prediction 4. Content Personalization - Netflix, Spotify, Youtube 5. Traffic Prediction - Google Maps 6. Speech Recognition - Virtual assistant like Alexa
Types of ML [ Lectur-ish slide :( ]
Are we doing Supervised Learning now?
Model learns, but IITians don’t? Nah, we learn ML Models 1. Setting aside the mathematical jargon, a supervised model basically learns a function that maps the inputs X to the outputs Y. 2. In supervised learning, we give the model a certain set of parameters, that it continuously tune, so that it can learn an appropriate function that does well on the input dataset.
Loss function (or) Cost Function 1) Loss function predicts the deviation of the predicted outcome from the actual result. It measures how well the machine learning algorithm models the training dataset. 2) We convert the machine learning problem into an optimization problem, by defining the loss function and then gradually optimizing the algorithm so that the loss function is minimized. 3) One of the common loss functions is MSE (Mean Squared Error).
Clarification Needed? Yes! 1. We usually consider both terms - cost function and loss function as synonyms and think we can use them interchangeably. 2. But, the Loss function is associated with every training example, and the cost function is the average of the loss function values over all the data samples. 3. In Machine learning, we usually try to optimize our cost function rather than our loss function.
Now, what is gradient descent… 1. Gradient descent is an optimization algorithm/technique commonly used to train machine learning models. 1. The key idea behind this algorithm is to take the fastest route towards the minimum of the function from current point to converge fast. 1. So, we take repeated steps in the opposite direction of the gradient of the function as that is the steepest descent possible.
Gradient Descent Visualization
(image slide)
Computer Vision - 101 No, it’s not about the webcam. Computer vision is a field of artificial intelligence (AI) that enables computers and systems to derive meaningful information from digital images, videos and other visual inputs — and take actions or make recommendations based on that information.
(image slide)
Classification - The Holy Grail One of the first tasks that was tackled “Computer Vision” involved simple Classification of Hand-written digits. Later on (after a lot of effort) the ImageNet dataset was created and it was being used for benchmarking models. There were many models working on it , each achieving only 40 -50 % accuracies at best. During 2012, Alex Krizhevsky invented the AlexNet (You may call this the advent of the real “Deep learning”, it smashed the competition by nearly 10.8 % difference in the top-5 error rate.)
There are many visual recognition problems that are related to image classification, such as object detection, image captioning, semantic segmentation, visual question answering, visual instruction navigation, scene graph generation What Do We Actually Do?
(image slide)
(image slide)
Semantic Segmentation The goal of Semantic Segmentation is to label every single pixel of an image with a particular class. This is used in Autonomous driving!
Image Captioning Image captioning involves finding a “caption” that suits or describes a particular image, Microsoft COCO is the dataset that’s widely used. Okay? But how do we go about this ?
Neural Networks You know the story, These Machine Learning Models were “inspired” from how the brain actually works. However we aren’t even close to actually achieving human performance yet.
(image slide)
(image slide)
Structure of a Neural network
Convolutional Neural Networks Sharing of parameters and the ability to learn deeper aspects of a particular image, like edges and even later, faces.
The ImageNet dataset
A few Different Model Names that fly around
ImageNet Performance charts over a few years
The RELU non-linearity really became popular after the AlexNet paper. GPU’s have the ability to perform computations in parallel with several cores, Think about Matrix multiplication, things could speed if each row and column vector dot products happen simultaneously. This difference starts to become apparent. When the number of parameters become huge (Deep Neural Networks). AlexNet had ~ 61M parameters ! : () It was nearly 4 times as fast compared to the CPU version. Why was AlexNet so damn good!
Well, What’s stopping us to improve more?
Recommender Systems
What are recommendation systems? ● Recommendation system is an information filter which suggests/recommends products or features to users. ● It helps users discover new products/content out of a huge corpus. Examples ● Youtube ● Spotify ● Goodreads ● Amazon
Use Cases ● Personalized Content ● E-Commerce/Retail ● Banking/Finance
Flow of a Recommendation System
Terminology Item - the entities/products/features a system recommends Query - the info a system uses to make recommendations. This can include personal user behaviour such as browsing/consumption pattern and also some external factors such as the popularity of an item or seasonal trends. Candidate Generation ● Content Based Filtering ● Collaborative Based FIltering
Content Based Filtering ● It uses the features/characteristics of an item to recommend new products based upon the current user's preferences and items it has previously interacted with . ● Similarity between user features and item features is found out. Suppose a song has features such as instrumentalness, acousticness etc., which has significant value and so does a user(calculated from methods which we won’t get into now), we would recommend the song to the user based on a similarity score. ● Users and items need to have features in the same feature space for this method to work. ● This method is not using any other user, it is just using the content of the items.
Content Based Filtering
Advantages: - Data for other users is not needed. - Helps recommend users items which are specific to their interest, whereas in collaborative filtering, other user's preferences do play a role in recommendation. - May recommend obscure items as well. Disadvantages: - Model will be as good as the hand engineered features. This requires input from experienced and skilled domain experts. - Works better for items that can be encoded with useful features. - The model will have to represent the user based on their interest in the feature space, ie, they would have to extract the detailed feature for the user.
Collaborative Filtering ● It recommends(filter) items from a huge corpus of items based upon the preference info from many users(collaboration). Putting forth a basic example, if two users have made similar decisions and purchases in the past, like a movie choice, then there is a high probability they will agree on additional future selections. ● It uses similarities between items and users simultaneously. ● It recommends/filters on behaviour and consumption pattern of users and its interaction with the items/products. ● Personal tastes are correlated in this method.
User Based Collaborative Filtering
Advantages - ● Domain experts are not needed as features are not hand engineered. Disadvantages - ● Does not work on new items as they do not have user interactions.
(image slide)
Natural Language Processing NLP is an interdisciplinary field concerned with the interactions between computers and humans using natural human languages.
What is NLP? Fundamental goal: deep understand of broad language Not just string processing or keyword matching!
NLP = Computer Science + AI + Computer Linguistics
Communication With Machines
Conversational Agents
(image slide)
Speech to Text
(image slide)
Question Answering ●What does “divergent” mean? ●What year was Abraham Lincoln born? ●How many states were in the United States that year? ●How much Chinese silk was exported to England in the end of the 18th century? ●What do scientists think about the ethics of human cloning?
Spell Correction
Machine Translation
Some more applications ●Recommendation systems I.e. Netflix, YouTube ●Search engines: google, bing, edge…. ●Social media monitoring ●Image captioning ●Text summarisation ●Plagiarism check ●AND LOT MORE………….
Demo Videos 1. Facebook Cyber Watchdog 2. Twitter Cyber Watchdog 3. References: a. Overview of the hasoc subtrack at fire 2021: Conversational hate speech detection in code-mixed language Authors: Shrey Satapara, Sandip Modha, Thomas Mandl, Hiren Madhu, Prasenjit Majumder at FIRE 2021 b. Detecting and visualizing hate speech in social media: A cyber watchdog for surveillance Authors: Sandip Modha, Prasenjit Majumder, Thomas Mandl, Chintak Mandalia at ESWA c. https://hasocfire.GitHub.io
Reinforcement Learning
How did you learn to cycle
How did you learn to cycle ● Not supervised learning
How did you learn to cycle ● Not supervised learning ● Not unsupervised learning
How did you learn to cycle ● Not supervised learning ● Not unsupervised learning ● Learning by Trial & Error
(image slide)
What is it?
What is it? ● A policy defines the learning agent’s way of behaving at a given time
What is it? ● A policy defines the learning agent’s way of behaving at a given time ● A reward signal defines the goal of a reinforcement learning problem
What is it? ● A policy defines the learning agent’s way of behaving at a given time ● A reward signal defines the goal of a reinforcement learning problem ● A value function specifies what is good in the long run
Reinforcement learning: An Example
Courtesy: MIT 6.S091: Introduction to Deep Reinforcement Learning (Deep RL)
(image slide)
(image slide)
(image slide)
(image slide)
(image slide)
Conclusion Important parameters
Conclusion Important parameters 1) Environment
Conclusion Important parameters 1) Environment 2) Reward
Applications
Applications
doi:10.1038/nature14236
Alpha Zero & Alpha Go
Why is this important?
Why is this important? ● IBM Deep Blue vs Gary Kasparov
Why is this important? ● IBM Deep Blue vs Gary Kasparov ● AlphaGo vs Lee Sedol. Is it any different?
Why is this important? ● IBM Deep Blue vs Gary Kasparov ● AlphaGo vs Lee Sedol. Is it any different? ● Ability to replicate intuitive pattern recognition is a big deal
Recent Progress in ML Computer Vision / Image Recognition ImageNet, CNNs, Autonomous driving Speech Recognition Voice assistants Language Models GPT-3, PaLM Game Playing / Deep Reinforcement Learning AlphaGo, AlphaZero Text-to-Image Models Dall-E, ImaGen
How to approach Machine Learning? 1. Python/R and libraries like NumPy, SciPy, Matplotlib, Seaborn, Scikit-Learn, Pandas, TensorFlow, PyTorch 2. Mathematics for ML Probability & Statistics - Random variables, Expectations, Distributions Linear Algebra & Matrix Calculus - Gradients/Hessians, Eigenvalue/vector 1. Understand the internals of ML algorithms 2. Build ML applications to know which algorithms to use when 3. Can read some ML research papers Some good resources are mentioned in the next slide.
Resources! 1. 3b1b Series on Neural Network 2. CS229 3. CS244D 4. CS231N 5. CS224N 6. Pattern Recognition and Machine Learning: Bishop
Social Media Follow our social media handles for regular updates Instagra m Twitter YouTube WhatsAp p