What is Under AI’s Hood?
A beginner’s guide to help you navigate the sea of misinformation and hype
Artificial Intelligence, commonly referred to as AI, is a field of computer science that focuses on creating machines that can perform tasks that typically require human intelligence, such as speech recognition, decision-making, and visual perception. At its core, AI is all about algorithms, which are sets of instructions that tell a computer what to do.
Machine Learning is a specific subfield of AI that focuses on using algorithms to learn from data and improve performance on tasks over time.
If you’re wondering how machine learning works in simple terms, read on to understand this crucial component of AI, see through its seeming sentience, and learn how to judge the tech for yourself without needing a computer science degree.
What happens under the hood?
Machine learning is an algorithm that allows a computer to learn from data without being explicitly programmed.
Step 1: Input & output
This algorithm takes inputs, performs calculations on them, and produces an output. When creating a model, we first need to have a question in mind that we are trying to answer.
For example, let’s say we have images of hand-written numbers (“0”, “1”, “2”, etc.) and we want to identify the digit shown. The input to the model would be one of these images, and the output would be its guess of which number is written.
How does a machine learning model calculate without a formula?
It would be easy to write a formula which describes the relationship between speed, distance, and time. Speed x time = distance travelled.
It would be extremely difficult to write a similar formula for the relationship between the values of all the pixels in an image and the number being represented in that image. Think of how many ways each number can be written.
Instead of creating an explicit formula, calculations are created which convert the input format to the output format e.g. processing a picture into a single digit, or converting weather data into a percentage representing the likelihood of rain the next day. These calculations can then be tweaked to create a different output (of the same format).
Step 2: Training for the behaviour we want
When a model is initially built to accept inputs, it will not have the correct logic to produce labels. If we give it inputs, the output will be a random figure from the values we allow as an output (in this case, the digits 0–9).
To get the right behaviour, the model is trained; it is shown examples of the behaviour we want so that it can spot the trends.
A model is trained using training data; sets of inputs where each input is attached to its correct output. The model then looks at the input and produces a guess. Based on how far its output is from the correct output, it will tweak* the way it does its calculations. A new input from the training set is passed in, and the process is repeated.
* The model’s tweaking is behaviour that is programmed by the developer. Training is a tricky process with lots of parameters which need to be set correctly. If done incorrectly, it may never achieve the desired behaviour.
Step 3: Testing performance
Once the system has been trained, it can then be tested on a new, unlabeled image of a handwritten digit, and the system will use its learned relationship between the images and the labels to predict the label for the new image. We can find the accuracy of the model by comparing the labels of the testing data to the labels the model produces.
Step 4: Using the model
That’s it?
Yep. Even cutting-edge ML models follow this structure, although they are far more advanced in how they process inputs and outputs, and in how they run their calculations.
The pitfalls of AI
While AI has many potential benefits, it also has several drawbacks and weaknesses that must be addressed.
Garbage in, garbage out
AI systems can only be as good as the data they are trained on. If the training data is biased or incomplete, the AI system may make unfair or inaccurate decisions. Imagine there’s an AI to detect facial expressions, but it was only trained on the faces of one race. This model will likely perform poorly when being used by people of any other race.
This problem highlights the importance of ensuring that the training data used to develop AI systems is diverse, comprehensive, and unbiased.
No explicit programming means no transparency
It can be difficult to understand how an AI system is making its decisions. Unlike a human, who can explain their thought process, AI systems can be opaque and it can be challenging to determine why they reached a particular conclusion.
AI has no situational awareness
AI systems can be vulnerable to hacking and other types of malicious attacks, as they may not be able to detect or respond to threats in the same way a human would. This raises important security and privacy concerns that must be addressed to ensure that AI systems are safe and secure.
AI could lead to job loss
While AI has the potential to automate many tasks and make our lives easier, it also has the potential to displace human workers and contribute to job loss.
I have a confession
This article was mostly written by AI. I told it what to write, made some edits, and then put the pieces together.
I will caveat this by saying I have experience with AI and was able to fact-check everything it said. I didn’t use ChatGPT as a research tool but rather as a tool to speed up my job.
These models are not 100% accurate and you should always sense-check what they output.
It helps to understand how AI works because you can see through its seeming sentience to understand that it can only do what it was trained to. If you’re ever unsure of what an AI system can and can’t do, look into how it was trained.
I hope this gives you an idea of what AI can be capable of when made and used correctly, and I hope this encourages you to give it a shot.
Here are some of the most popular AI tools you can try at the time of writing:
ChatGPT — conversational bot, capable of performing many tasks based on written prompts.
Jasper — content generator for social media.
Midjourney — produces images from text prompts.
If you found this article helpful, feel free to follow me so you don’t miss out on future articles!