How Does an AI Program Learn to Be So Smart?

If an AI program can write an email, compose a poem, recognize faces, and read medical scans, it definitely needs to learn to do these things. But how can a software program learn to do all this stuff just like us?

Well, AI learns by taking a page out of our own learning playbook. But before we get there, let’s look at our relationship with learning.

A child is born with only one faculty: crying to express discomfort. But soon, he/she learns to roll over, smile, walk, run, speak, play, and read, and eventually, the same child grows up to cook food, write books, compose poems, learn math, and even write software that creates the so-called Artificial Intelligence (AI).

Humans are born with an innate ability to learn, and we learn in multiple ways. Sometimes, we learn things without any effort or formal process, but sometimes, we do so with proper training. Let’s first recap how we train ourselves to learn a new skill with the help of a simple example: learning to drive a car.

How do we learn to drive?

We all know what it takes to learn to drive. It’s simple: we start with a goal, which is to acquire the ability to drive a car safely.  The learning process starts with meeting an instructor who brings along the required knowledge, skills, and experience to share with us. Next, based on his instructions, we try to drive. Initially, it is all jerky, but he supervises us, evaluates how we are doing, and gives feedback. Based on the feedback, we make the necessary adjustments and try again.

Each time we try, we gain more experience, and the process continues over a couple of weeks until we learn it. Then, of course, there is a formal test. If we meet the criteria, the driving skill is acquired forever, and we are ready to drive anywhere, anytime.  

Learning to Drive: Human Approach

This simple methodology of learning that includes a specific goal, inputs, training, and testing is also how an AI program learns. Let’s see…

AI takes a page out of human learning

We all know what kind of intensive training radiologists go through to learn to read medical images (X-rays, CT-Scan, MRI) to diagnose diseases. But how does an AI program learn to do the same?

It all starts with a specific goal, such as detecting cancer from chest CT scans. Next comes the “instructor or supervisor” in the form of a set of images from past cases to learn from. For example, 50,000 CT-Scan images from past patients including both images with disease and without disease. In the AI world, the word used for the input is “data.”

Once the goal is set and data is provided, training starts. That’s where also comes the—jargon alert—algorithm that drives the AI program’s training. What does it do with the CT scans of past patients?

It scans all the images and tries to make a rough guess about which image indicates a disease and which one doesn’t.  Like our initial driving, the first attempt is often crude. AI may misclassify almost 90% of images…treating disease as non-disease and vice-versa. But then, based on the gap between its initial prediction and actual results, it makes adjustments to its parameters and tries again. It continues tinkering and iterating until it closes the gap between its predictions and the actual results.

This is quite like giving someone 50,000 questions and answers and asking them to figure out how to get the answers. They may start with no idea—and initially get mostly wrong. But slowly, they learn by comparing their answers with the actual ones–and keep trying. And eventually, after a number of attempts, get it right with decent accuracy.

In AI’s case, let’s say it achieves 90% accuracy in detecting disease from the CT scans provided as examples. What’s next?

Just like the driving test, the program also goes through testing after the training is over. This time, it is given a new set of images (but without the diagnosis) and asked to evaluate them. And if it shows good accuracy on these new images as well, the program (technical term: model) is ready for deployment in the real world.

Learning to Diagnose Disease from CT Scans: AI Approach

Do you realize AI uses the same learning strategy that we use for learning to drive? Set a goal,  get inputs (data), make an attempt, assess the gap between the actual and expected performances, and try again and again until you get there. And finally, don’t miss a test to prove your learning.

What I have described above is—jargon and buzzword alert—supervised machine learning, one of the pillars of AI. AI is a huge field, but supervised machine learning is one of its core fields among many.

One more thing, unlike us, AI doesn’t have eyes. We live in an analog world of touch, sounds, images, text, and videos, but for AI to make sense of anything, it all needs to be digitized. A CT scan is not a black-and-white image but simply numbers…pixels…for AI.

In the end, AI is intelligent because we provide all the examples to learn from—and let it learn by following the same technique that we use to learn driving or any new skill.

Scroll to Top