What is AI?
This question can have various answers regarding the context. From our view of this topic, we can define AI by revealing its difference from non-AI algorithms. The core concept of AI is learning. The rest of the computational systems/algorithms all depend on rule-based mechanisms.
Rule-based mechanisms solve problems using a sequence of if, else, for… statements.
You set your alarm clock to 7 a.m. and it rings at 7 a.m. 🙂
If you are curious, a simple algorithm of this alarm clock could be like this:
alarmTime : 7 a.m.while currentTime < alarmTime: currentTime : currentTime + 1 wait for 1 secondring alarm
There is no learning on this algorithm. You define the problem, implement the solution and then the code runs…
If you would like to see an AI touch on your alarm clock, supervised learning could make AI suggest you the time for the next day’s alarm.
monday -> set your alarm clock to 7 a.m.
tuesday -> set your alarm clock to 7.15 a.m.
wednesday -> set your alarm clock to 8 a.m.
thursday -> set your alarm clock to 6.30 a.m.
friday -> set your alarm clock to 7.15 a.m.
saturday -> set your alarm clock to 10 a.m.
sunday -> alarm not set
Set your alarm time every night for the next morning during a month or so.
Run the AI to suggest you alarm times.
friday -> AI suggests you to set an alarm on 7 a.m.
saturday -> AI suggests you to set an alarm on 10 a.m.
The example above does not mean that your AI will absolutely suggest 7 a.m. for the next Friday. It can also suggest 6.45 a.m. or 7.30 a.m., the point is that you can expect AI to understand your pattern of waking up earlier on weekdays.
Types of AI
1 – General AI
This type of AI is generally what comes into mind when AI is the topic. A machine that is capable of understanding & doing all the tasks a human is capable of understanding & doing.
2 – Narrow AI
Narrow AI is a concept that is used to indicate the system is using AI algorithms in one way or another and completes a sub-task of General AI. There are lots of examples of narrow AI in our daily lives. These AI systems include but are not limited to:
- Autonomous cars
- Social media bots
- Decision support systems
- Traffic prediction
Most of the AI products use features from more than one of these fields:
- Computer Vision
- Natural Language Processing
- Time Series Analysis
Types of Learning
As we have mentioned earlier, the must of an AI system is learning. The system must have an understanding (ideally as powerful as the understanding of a human) of a concept in order to make inferences on the topic.
There are different types of learning in AI that changes with the structure/availability of the data and requirements of the task. For simplicity, we will explain just two of these learning types here:
1 – Unsupervised Learning
In unsupervised learning, the information is fed into the system as a bulk. Inferences are made by using the natural distribution of items in the data.
The main logic of unsupervised learning is that the data you have can be defined, grouped, or discriminated by their features; even if you do not know what these features are.
Unsupervised learning methods can resolve some of the AI tasks completely while their outputs can be used as helpers for almost all of the supervised learning tasks.
We can not dive into all the details of unsupervised learning in this story but here are some concepts explained to give you a better understanding of how can information be collected and stored in unsupervised learning:
- Encoder: An encoder converts text inputs into numeric representations for the system to be able to operate on the texts. Basic encoding techniques just give a unique number to each token while more complex encoding techniques encode tokens using their patterns in the text. For example; TF-IDF encoding gives information about a term’s existence frequency with respect to different groups. As another example; the BERT language model encodes each token with respect to its relations with other tokens around itself and this encoding model embeds hundreds of features for each token.
- Word Vector: A word vector is a type of encoding for textual data. It is trained in an unsupervised manner in order to capture the context of a token. It generates features for each token considering other words around the token. After the context is learned and represented as a multi-dimensional vector word vectors allow vector operations between tokens to switch contexts. You can see the visualization of the relationship between countries and their capitals in vector space here:
2 – Supervised Learning
Supervised Learning methods use explicitly annotated information in order to make inferences. Annotated train set contains input-output pairs that should be learned. Usually, the focus is to minimize a loss function that represents the gap between expected and predicted outputs.
The simplest supervised learning task is single-label classification, where each input has one output label and the aim is to assign expected outputs to given inputs. For example; classifying images with respect to the objects they include, or classifying documents with respect to the countries they are written about are classification examples.
However, assigning only a single label is not enough in all cases. For example; an image can contain both a cat and a dog at the same time, or a document can be about Turkey and France at the same time. So there will be a need for multi-label classification in such cases.
On the other hand, a user may not like to know only which countries the document is about but also each entity in the document mentioning a location. In such a case, there will be a need for annotating each token of a document marking if the token is a location entity or not. Named entity recognition is a task for these kinds of problems, where not only the inputs but any token in the inputs are labeled with different tags.
That is how different tasks and learning techniques emerge for different needs…
So, what is AI?
AI is any system or algorithm that includes a learning procedure in order to make inferences about inputs taken from the outside world.