Splitting Hairs: Exploring the Interrelationship of Machine Learning and AI

Written by edemgold | Published 2023/05/11
Tech Story Tags: machine-learning | ai | computer-vision | nlp | data-analytic | artificial-intelligence | ml | ai-top-story

TLDRArtificial Intelligence and Machine Learning are two terms that are commonly used interchangeably, unfortunately, they are not the same thing. I aim to describe, comprehensively, how Machine Learning, as a cornerstone concept, fits into AI as a field. Below I will outline, in detail, how this will happen.via the TL;DR App

"Artificial Intelligence is the future, not only for Russia but for all humankind" -Vladimir Putin

Artificial Intelligence and Machine Learning are two terms that are commonly used interchangeably, unfortunately, they are not the same thing. Artificial Intelligence is a field that contains a lot of sub-fields including Machine Learning.

In this article I hope to comprehensively differentiate between AI and Machine Learning by explaining how Machine Learning is not the same thing as Artificial Intelligence, but rather a part of it, a cog, amongst many cogs, that makes up the machine which is Artificial Intelligence.

How I hope to approach this

To begin, I plan to discuss the two concepts separately, describe their subsets, and then state the relationship binding the two of them. I aim to describe, comprehensively, how Machine Learning, as a cornerstone concept, fits into AI as a field. Below I will outline, in detail, how this will happen.

  • What is Artificial Intelligence: Here I will define what Artificial Intelligence is and describe its sub-concepts including Machine Learning and others like; Natural Language Processing, Expert Systems, Computer Vision, and Robotics.

  • What is Machine Learning: In this section, I will define Machine Learning, as a concept, and then describe its sub-concepts, namely; supervised learning, unsupervised learning, semi-supervised learning, reinforcement learning, deep learning, transfer learning, online learning, and batch learning.

  • The Relationship between AI and Machine Learning: Here I plan to describe, vividly, how Machine works as a subset of Artificial intelligence.

Let us Begin!

What is Artificial Intelligence

Artificial intelligence is a sub-field of Computer Science that involves building synthetically Intelligent programs which are capable of human-level activities, and above all, cognition. In simple words, Artificial Intelligence is the ability of computers to perform tasks that are commonly performed by Human Beings such as; Writing, driving, etc.

Artificial intelligence as a field is concerned with building systems that are capable of human-level thinking, it contains various sub-concepts which are each responsible for simulating one aspect of human intelligence or behavior.

Let us expatiate on them.

Sub-Concepts of Artificial Intelligence

Machine Learning

Machine Learning is the sub-concept of AI that involves the creation of algorithms and statistical models which are capable of learning from past experience. In other words, it is the part of AI which is responsible for teaching AI systems how to act in stated situations by using complex statistical algorithms trained by data on certain situations.

Natural Language Processing

Natural Language Processing is the subset of AI that is responsible for enabling AI systems to interact using Natural Human Language(for example English). In other words, it is the branch of AI responsible for enabling AI to understand and use spoken words and text. It involves using statistical models to understand, interpret, and generate human language in a way that is meaningful to human beings, human language here includes all languages spoken by human beings. It is the technology behind chatbots like ChatGPT, Siri, Alexa, etc

Expert Systems

Expert Systems are perhaps the most unseemly subset of AI due to their use of rules, it involves the use of explicitly stated rules, and knowledge bases in an attempt to imitate the decision-making of an expert in a certain field. In other words, it is the use of explicitly stated rules and inference techniques to make informed decisions in specific fields, such as medicine.

Computer Vision

Computer Vision is the sub-set of AI that makes use of statistical models to aid computer systems in understanding and interpreting visual information in the environment. Computer Vision is essentially how computers see and understand what they are seeing, they are responsible for the recognition of objects. Computer Vision is responsible, or rather going to be, for efficient self-driving cars, drones, etc

Robotics

Robotics is essentially the integration of all the above-discussed concepts, it is the sub-concept responsible for making AI systems perceive, process, and act in the physical world. It involves using algorithms that can recognize objects in their immediate environment and interpret how interactions with said objects can alter their current state and that of the environment plus the people in it. Robots are used in fields such as; Medicine, Manufacturing, E-Commerce(warehouses), etc

What is Machine Learning

As we discussed earlier, Machine Learning is the part of AI that is responsible for training AI systems on how to act in certain activities by using complex statistical algorithms trained by data gotten on the performance of the activities in question, like driving.

In other words, Machine Learning involves feeding a computer raw data and through the use of algorithms, it creates a model from that data which it then uses to make predictions or decisions.

Machine Learning is commonly mistaken to be the same thing as AI but as we have covered, it is just a part of Artificial Intelligence as a whole. Although Machine Learning is just a subset of Artificial Intelligence, it is arguably the most important part of AI, this is mostly due to the simple fact that it is required for the functioning of the other sections(like Natural Language Processing, Computer Vision).

All the other concepts of AI require two things before they function; data and learning algorithms. Before Natural Language processing systems can interact using Natural Human Language, they need data on human language, and algorithms to use in learning how to efficiently and correctly apply the language data. The art of making AI systems understand how to accurately employ the data provided, and in the right context, is all part of Machine Learning.

Machine Learning, like AI, has sub-concepts of its own that enable it to function efficiently, let us expand on them.

Supervised Learning

Supervised Learning is the subset of Machine Learning which involves training Models to predict an output based on input data and target variables. It is a machine learning technique which involves teaching a machine learning model to predict output by giving it data which contains examples of inputs and the resulting outputs, supervised learning algorithms are then able to find the relationship between the input and output and then use that knowledge pattern to build a model.

To fully understand this, let us make use of an analogy. Imagine you want to build a Supervised Machine Learning model which is capable of predicting if a person has cancer or not, you first provide a dataset - for the uninitiated, this is a collection of data points, which are in turn just a collection of data instances - containing the data of thousands of different patients, the data will contain information like; their age, number of children born, Body Mass Index(BMI), and this will serve as the input, then for each patient, you provide their results(ie, if they have cancer or not) and this will serve as their output.

The algorithm will then find the relationship between the input and output data, in other words, it will find out what type of people are usually diagnosed with cancer, it will proceed to provide a statistical representation of its findings in something called a model. It should be noted that Supervised Learning is further broken down into 2 sub-concepts, namely; Classification and Regression.

Unsupervised Learning

Unsupervised Learning is the antithesis of Supervised Learning, in the sense that, rather than providing both input and output data to guide the model, it only provides the input data and lets the algorithm make correlations. It is the Machine Learning Technique that involves the algorithm figuring out patterns, structures, and relationships without explicit guidance in the form of labeled output.

Going back to our original cancer analogy, rather than providing the input data of different patients (i.e, their age, number of children born, Body Mass Index(BMI), etc) and also providing the output data(ie, if they have cancer or not), you only provide the input data and let the model find the correlations in the data on its own.

It should be noted that the two techniques, supervised and unsupervised learning, each have their suited use cases; supervised learning is most optimal when there is a stated result(preferably linear), while unsupervised learning is best used when there is no clearly stated result and there is no clear structure in the data.

Semi-Supervised Learning

As we clarified, supervised learning and unsupervised learning both have their prime use cases. supervised learning is most optimal when there is a stated result(preferably linear), while unsupervised learning is best used when there is no clearly stated result and there is no clear structure in the data.

But there are instances where the two of them will need to be employed. Semi-supervised learning lies in the schism between supervised and unsupervised learning. As can be extrapolated, it entails a situation where a model is built using both structured and unstructured data.

Semi-supervised learning exists due to the complicated nature of data collection and data cleaning. While Supervised learning is best in getting accurate results, getting data that contains both input and output requires significant effort in the form of data labeling, in order to counteract the stated challenge, engineers decided to structure only part of the data and leave the rest unstructured in an effort to save financial and labor effort cost and thus semi-supervised learning was born. It should however be noted that semi-supervised learning is more unupervised than supervised.

Reinforcement Learning

Reinforcement Learning is a technique used to train models, it was inspired by how human beings learn skills through trial and error. It involves an AI agent receiving rewards or punishments based on its actions, this enables the agent to learn from its mistakes and be more efficient in its future actions (this technique is usually used in the creation of games).

In simple words, Reinforcement learning involves getting AI agents to make decisions based on their environment. It makes this happen by placing said agents in an environment with no prior experience and rewarding them when they make the right decisions and penalizing them when they make the wrong decision, after continuous feedback, the AI agent is able to discern the right actions from the wrong one and as a result, get a working model on how to act in a certain environment.

Reinforcement Learning is usually used to train game agents.

Deep Learning

Deep Learning powers most, if not all, of the innovative AI systems popular today from ChatGPT to Tesla's Self-Driving. In order to fully understand how Deep Learning works, you need to understand neural networks.

As discussed in my article on the brain-inspired approach to AI, in essence, Neural Networks are computational models that mimic the function and structure of biological neurons in the human brain, the networks are made up of various layers of interconnected nodes, called artificial neurons, which aid in the processing and transmitting of information, similar to what is done by dendrites, somas, and axons in biological neural networks. Neural Networks are architected to learn from past experiences the same way the brain does.

Now Deep Learning, simply, makes use of neural networks to solve difficult problems by making use of more neural network layers. As data is inputted into a deep learning model and it passes through each layer of neural networks the network is better able to understand the data inputted and make more abstract (creative) interpretations of it.

So in basic words, Deep Learning is simply the collection of neural networks, i.e., the more complex a problem, the more neural networks are involved.

Transfer Learning

Training Machine Learning Models from scratch is really intensive both financially and in terms of labour and due to that the transfer learning technique was developed. In order to circumvent the challenge of building new models from scratch pre-trained models are used. Before continuing, it is essential to know that pre-trained models are models which have already been trained for large tasks such as facial recognition.

Here is how transfer learning works, for instance, you want to build a facial recognition Machine Learning model which helps in recognizing little children when they want to cross a busy road so a traffic light stops, but you do not have the data or financial resources to train a model of that scale. So you decide to import an already pre-trained model that has been trained to recognize a human face and then you make use of Transfer Learning to tune the model so it can recognize the faces of little children, that way you can make use of the efficiency and accuracy of a well and heavily trained model with less effort than would have originally been required.

Transfer Learning is usually implemented in two ways; Fine-Tuning and Feature Extraction.

Online Learning

Imagine this scenario, you have built a machine learning model that fraudulent transactions with and it's being used by banks to ascertain the validity of transactions, after a while, the model needs to be re-trained with new data in order to keep it up to date and accurate with the new techniques for fraud. Rather than taking down the model and risk fraudulent transactions you decide to update it frequently as you get new data points, that way the model is frequently updated and you don't need to pay for storage for accumulating or taking down the model.

In simple words, online learning is a machine learning technique that involves updating a model continuously as new data becomes available. It is useful in scenarios where data is dynamic and constantly changing.

Batch Learning

Batch Learning is the antithesis of online learning, going back to our original fraud scenario, rather than re-training the model continuously with new datasets, you train the model in large batches. This means you accumulate the data and then use it to train the model all at once. Batch Learning is best used when the data is all available and the goal is to optimize the model's performance.

The relationship between AI and Machine Learning

In the past sections, we covered the differences between AI and Machine learning, but due to the fact that one concept is a subset of the other, I feel it is just as important to cover the relationship between the two concepts.

AI is, essentially, the study, design, and development of systems that are cognitively capable of performing actions, activities, and tasks which can be performed by humans, and it does this by being trained on datasets that contain data on how these said actions, activities, and tasks are performed and Machine Learning is the part of AI which is involved in taking these datasets and, through the use of advanced statistical algorithms such as Linear Regression, training a model which will then serve as the foundation of how the AI System understands the data and as a consequence how it performs the actions which it was meant for.

I believe an analogy that provides a grasp on how a real-life AI project is carried out will go a long way in further explaining the role Machine Learning plays in the development of Artificial Intelligence.

Building an AI system is similar to building a car, and Machine Learning is like the engine that powers it. Just as a car needs an engine to generate power and drive it forward, an AI system needs Machine Learning to process data and make accurate predictions.

For instance, to build an AI system that helps predict Cancer, Machine Learning algorithms are used to analyze large amounts of medical data, identify patterns, and make predictions about whether a patient has Cancer or not. This process is like the engine of the car (Machine Learning Model), which converts fuel(data) into motion and powers the vehicle forward(AI system).

As more data is fed into the system and the Machine Learning algorithms become more refined, the AI Cancer classification system becomes more accurate and reliable. This is similar to how a car becomes more efficient and powerful as the engine is optimized and fine-tuned over time.

Summary

As we have inferred, when treated separately, AI and Machine Learning are two not-so-different concepts and this could lead to some confusion and the resultant use of the two terms interchangeably but AI and Machine Learning are not synonyms of each other, rather, Machine Learning is a subset of AI. This means that AI has many other sub-fields such as Natural Language Processing


Also published here.


Written by edemgold | Breaking down complex concepts for those with more than a passing interest in AI. Contact Me: [email protected]
Published by HackerNoon on 2023/05/11