AI Explained Simply...and Visually! 🤖
Want to learn what AI is in simple terms without all the jargon? You are in luck!
Guess what all of these following activities have in common?
💳 Detecting credit card fraud
👾 Stopping misbehaving popups on our web pages
🧹 Making a robotic vacuum cleaner navigate and clean our homes
🏎️ Helping a vehicle drive without human intervention
❤️ Getting recommendations on what to read, listen to, engage with, or buy
💬 Chatting with a chatbot
✉️ Classifying an e-mail as spam or not spam
🎤 Conversing with a voice assistant like Alexa, Google Assistant, or Siri
🤖 Having robots in a factory build complicated things
🌐 Searching the web
♟️ Playing chess against a computer
🖼️ Specifying a few descriptive words and automatically generating complex, high-quality images or videos
💻 Writing some code and getting real-time feedback or assistance
....and doing many more things!
These are all activities where Artificial Intelligence (AI) plays a huge role. In this newsletter, let's take a very beginner-friendly look at what AI is and how it works!
What is Artificial Intelligence (AI)?
At its most basic level, AI is about training computers to do human tasks. Because of how computers are wired, they can perform a lot of human tasks faster. Often, they can even perform human tasks with greater accuracy.
One big gotcha is that computers are neither born with intelligence, nor do they have any skills in gaining intelligence. They can't just observe and learn from their environment and change their behavior as humans or animals can. They depend entirely on us to help them accomplish very particular tasks in a sorta kinda intelligent way. This is partly why computers are considered artificially intelligent.
So, how do we make a computer intelligent? How can computers rely on AI to pull off the laundry list of activities we called out earlier? To answer these questions, we will build a hypothetical AI system and walk through the steps involved.
Meet Cat Detectron 2000
Our hypothetical AI system, the Cat Detectron 2000, works by analyzing an image and letting us know if the image contains a cat or not:
When thinking about how to build an AI system capable of solving this problem for us, the thing to keep in mind is this: our computers have no idea what a cat is. They have no idea what anything is. They are completely clueless. It is entirely up to us to train our AI system from a fundamental level and feed it the data and guidance it needs to make an informed decision.
Step 0: General Approach. Meet Bob!
Before we dive into training our AI system, let's first think through the steps it would take for a human being to learn to accomplish that same task. In our case, what would it take to help a human (let's call him Bob) identify cats?
The first step would be to show Bob a bunch of cat pictures:
As part of the showing, we would explain to Bob a bit about what notable features to look out for. We would also show Bob examples of non-cat animals to help him better understand what features are unique to cats and what features are more general:
Once we think Bob has it all figured out, we'll quiz him by showing him new images and seeing if he can correctly identify something as a cat or not:
If he passes our examination, we can safely conclude that Bob is ready to go out into the world and use his newfound skills to identify cats like a professional:
Where am I going with this? The steps we would use to teach a human, just like Bob, about what a cat looks like are very similar to the steps we would take in teaching an AI system the same thing. The difference is that the AI system will need a lot more handholding, as we will find out shortly.
Step 1: Collecting and Analyzing Data
Our AI system right now is a blank slate. It is loitering around and waiting for input from us:
Just like with training a human, the first step involves us collecting a lot of images (both which contain cats and ones which don't contain cats) and feeding them to our AI system as part of helping it learn what is or isn't a cat:
At this point, these images are nothing more than raw data to our computers. They need to be trained on what to look for, and identifying the "what to look for" part falls on us:
We will help define the critical characteristics to look for and feed those back to the AI system in a form it can understand. We also need to train our AI system on data that indicates very clearly what isn't a cat:
If we didn't have enough to do already, we also need to provide some guidance on what to do when the results of the image analysis are a bit mixed where a visual is consistent with some characteristics of cats but is inconsistent in other traits:
As you can see, training our AI system to be intelligent requires a lot of human intervention.
Step 2: Testing our AI System
After we successfully train our AI system by having it collect and analyze the data, the real test is around measuring how well our AI system detects a cat when we present it with new visuals. This new data is not used to directly train our AI system as we did earlier. Instead, these new visuals are used to test how accurately our AI system can detect cats:
We are good to go during this testing phase if the results are satisfactory. Suppose the results have some errors, such as a skunk getting detected as a cat in the above example. In that case, we can go back and perform additional training rounds to ensure that a skunk's characteristics are understood and flagged as not belonging to a cat.
Step 3: Going Live
Once we have sufficiently trained our AI system and are happy with its performance during testing, it is time to deploy it live. When live, our AI system will be inundated with new data that it will need to understand and return a decision on. In many ways, going live is just an extended form of our training and testing stages. Suppose we detect a particular class of visuals (for example, pictures taken in low-light conditions) are problematic. In that case, we can go back and use the new data to re-train and refine our AI system's decision-making capabilities.
Going Further
I just shared a very high-level overview of what it takes to train an AI system. I deliberately stayed away from the nitty-gritty details. If you want to explore AI further (and you totally should), this overview will set you up nicely for some really great content others have created, such as the following: Tensorflow and Learning ML, Google AI Education, Artificial Intelligence Courses.
If you found this newsletter helpful and fun, please forward it to your friends and ask them to sign-up. Also, follow me on Twitter and LinkedIn where I share regular, bite-sized pieces of web development, design, and business content.
Cheers,
Kirupa 🤖