artificial intelligence vs machine learning

Artificial Intelligence (AI) and Machine Learning (ML) are popular terms everyone hears in the tech space. So, is there a difference? Machine Learning can be considered Artificial Intelligence, but Artificial Intelligence is not necessarily Machine Learning. But this distinction is perhaps not the most useful or intuitive way to think of the differences between the fields. This post attempts to draw a distinction between the terms using examples, and to elaborate a bit on why the confusion exists in the first place and why it isn’t likely going anywhere.

AI/ML Terms

Artificial Intelligence (AI) is a branch of computer science focused on creating systems capable of performing tasks that typically require human intelligence, such as understanding natural language, recognizing patterns, and making decisions. Machine Learning (ML) is a subset of AI that involves the development of algorithms that can learn and make predictions or decisions based on data, without being explicitly programmed for specific tasks.

If we approach this challenge using the comparisons of accepted definitions (there are many, but we will use Wikipedia entries) we can see how there might be some room for confusion between the two terms.

Let’s take a look at high-level definitions from Wikipedia:

Artificial Intelligence:

“In computer science, artificial intelligence (AI), sometimes called machine intelligence, is intelligence demonstrated by machines, in contrast to the natural intelligence displayed by humans and animals. Computer science defines AI research as the study of “intelligent agents”: any device that perceives its environment and takes actions that maximize its chance of successfully achieving its goals. Colloquially, the term “artificial intelligence” is used to describe machines that mimic “cognitive” functions that humans associate with other human minds, such as “learning” and “problem solving”…”

Machine Learning:

Machine learning (ML) is the scientific study of algorithms and statistical models that computer systems use to effectively perform a specific task without using explicit instructions, relying on patterns and inference instead. It is seen as a subset of artificial intelligence. Machine learning algorithms build a mathematical model of sample data, known as “training data”, in order to make predictions or decisions without being explicitly programmed to perform the task…”

Embedded in these definitions we see a statement that provides a clear starting point for distinguishing the two. The Machine Learning definition states plainly for us “It is seen as a subset of artificial intelligence.”

So now we know that Machine Learning can be considered a subset of AI and can say that Machine Learning can be considered Artificial Intelligence, but Artificial Intelligence is not necessarily Machine Learning. Let’s dive deeper into these terms with examples of each in practice.

Machine Learning AI

Machine learning finds patterns in a stream of input data (image, text or numeric for example). Machine learning algorithms rely on statistical techniques to reveal patterns that may otherwise require a human expert to discover. The machine is mimicking human/animal intelligence when it predicts a label for a particular input, and thus fits our definition of AI from the previous section. This process enables the machine to improve its accuracy and efficiency over time as it processes more data, embodying the principle of learning from experience, akin to cognitive growth in humans and animals.

Iris Classification:

A classic first implementation for many data science enthusiasts or practitioners is a grouping exercise on the Iris dataset that comes packaged in many machine learning libraries and tools (sklearn for example). The problem is to classify the particular species of iris given four attributes/measurements of an individual plant.

resized_iris1           resized_iris2             resized_iris3

Iris setosa                                                              Iris versicolor                                                       Iris virginica

The images above show why there might be a challenge classifying the species…these look pretty much identical!

The data is delivered to the algorithm with labels (see table below). The data set has 50 samples of each species. The algorithm uses statistics to learn which attribute/combination of attributes are the most predictive of a species type.

Sepal length Sepal width Petal length Petal width Species
5.1 3.5 1.4 0.2 I. setosa
4.9 3.0 1.4 0.2 I. setosa
6.9 3.1 4.9 1.5 I. versicolor
5.5 2.3 4.0 1.3 I. versicolor
6.5 2.8 4.6 1.5 I. versicolor
7.2 3.6 6.1 2.5 I. virginica
6.5 3.2 5.1 2.0 I. virginica

After the algorithm has learned on the dataset, we can show it a new sample of an Iris that we have not identified, and the algorithm can predict which species a specimen belongs.

Sepal length Sepal width Petal length Petal width Species
6.2 3.4 5.4 2.3 ???????

This type of classification is used in all sorts of business problems, from identifying which customers are most likely to churn, to classifying documents as part of a workflow, to producing likelihood of equipment to fail in predictive maintenance scenarios.

Artificial intelligence with a broader goal may or may not involve some machine learning.  Our example below considers one of the many individual machine learning techniques that together achieve a more complex kind of AI – one that comes close to mimicking the operation of a vehicle by an intelligent human driver.

Autonomous Vehicles

An example of AI that uses ML could be the computer vision part of autonomous vehicle. The computer vision software could use a Machine Learning model that learned to classify objects using labeled images. If you have used Google’s CAPTCHA, you have participated in the training process!

Image result for select all images with cars screen grab

While autonomous vehicles are not Machine Learning, they can use Machine Learning to achieve smaller goals serving the broader goal of making a self-driving car.

In a business setting, individual machine learning exercises can be aggregated together to produce more elegant solutions. For example, one machine learning solution may predict the likelihood of a stockout for a certain product, while another predicts the expected lead time for the product given the season, weather, and current demand on a supplier. A third machine learning algorithm may use the findings of the other two algorithms to determine the optimal time to make a replacement order.

Non-Machine Learning AI

An example of AI that might not involve Machine Learning is Symbolic AI, sometimes called “Good Old-Fashioned AI” or GOFAI which involves constructing representations of the world using facts and rules to try and mimic human deductive reasoning. Symbolic AI operates through explicit programming of knowledge and logic to solve problems, contrasting with the data-driven approaches of Machine Learning that infer patterns and make predictions from large datasets.

Semantic networks:

The image below shows an example of a semantic network that can be used to define relationships. Such a network might be used in Symbolic AI to represent a subset of the animal kingdom. The facts and rules can be used to deduce information about its members mimicking reasoning.

semantic networks

This type of Artificial Intelligence has been used in business contexts dating back to the beginning of enterprise computing. The “expert systems” of the 80s and 90s took the rules found by experts (“intelligence”) and formalized them into automated computing settings (“artificial”). Today, we simply refer to these as business rules, and they’re commonly used in everything from simple financial models to data quality programs.

Why the confusion is here to stay

The distinction between ML-based and rule-based AI illustrates the “AI Effect,” which is one reason confusion in these terms isn’t likely to clear up any time soon. A good way to think about this is to consider CAPTCHAs, as presumably the vast majority of us have interacted with many over time and have witnessed their evolution. For those who have not, a CAPTCHA is a type of test for telling humans and computers apart (examples below). Because of their intended design, CAPTCHAs are also used as a benchmark for artificial intelligence technologies.

captcha example             captcha

Early CAPTCHAs contained a limited set of words and relied on background confusion in the image and were completely solved by algorithms requiring modern approaches which use variations of text characters which are distorted and collapsed together. As of 2014 ML-based algorithms efficiently solve the modern text distortion-based CAPTCHAs. Where building a system that could beat CAPTCHA was once at the cutting edge, it’s now a fairly simple exercise for an average data scientist. Does that mean it’s not AI? Well no – it is AI in the sense that it mimics human sensory input and cognition, but it’s certainly of limited intelligence when you compare it to something like operating a car. The CAPTCHA example illustrates the “moving target” of intelligence that feeds the confusion around Machine Learning and Artificial Intelligence.

Next Steps

The intention of this blog post was to clear up some of the confusion on Machine Learning and Artificial Intelligence by considering definitions and examples of each. To summarize:

  • Machine Learning is a subset of Artificial Intelligence and can be used to do things like classification.
  • Artificial Intelligence may or may not involve machine learning, but often uses ML implementations to solve smaller-scope problems of a broader AI solution.
  • The bar of what can be considered AI continues to rise, making the discussion necessarily dynamic and perhaps prone to confusion.

Even if you aren’t using machine learning in your business today, you likely have some form of artificial intelligence you already rely on. That said, the rate of change is great, and the opportunity for unlocking value is even greater.

If you’re considering diving into a machine learning exercise like this one, 3Cloud can help. Contact us for a free consultation  to review your use case and design a predictive roadmap for making machine learning a reality.