top of page

How AI Works

Unless you’ve actually been living under a rock, you’ve probably heard about artificial intelligence (AI). How it can answer questions you ask it, create photos, or even make videos out of a prompt. There’s a lot that AI can already do and even more that individuals claim AI will be able to do. Most people, however, lack an understanding of how AI works, and thus, can’t verify if these claims are feasible. Consider this article your key to understanding. Here’s how AI works.

But what is AI?

IBM defines AI as “technology that enables computers and machines to simulate human intelligence and problem-solving capabilities.” This is a pretty accurate definition for AI. At the end of the day, AI’s purpose is to solve problems, and the way it does that is by simulating human intelligence—more specifically, our pattern recognition.

There are two main types of AI: those that seek to solve some specific problem (called weak or narrow AI) and those that seek to be able to solve just about any problem you throw at it and truly emulate human intelligence (called strong or general AI). The AI that you see now are narrow AI. They have some specific problem or problems that they are trying to solve. ChatGPT reads text and outputs appropriate text (or code), DALL-E reads text and outputs images, and AI for driverless cars take in a variety of visual and GPS data to output instructions that hopefully keep a car on the road. General AI is currently only theory. If you want to imagine what general AI would look like, think of AUTO from WALL-E or the robots in I, Robot.

The mass majority of AI is not directly programmed, but instead, learns. Imagine trying to give step by step instructions on how to recognize if a picture contains a tiger, and you can’t simplify. Computers need pretty exact instructions so if you tell it to look for the color orange in the top left corner it’s going to need a specific pixel or pixels to look at and a specific shade to look for. The ability for us to set up an AI with some basic parameters and to let it learn on its own allows us to avoid having to go through all of that headache to try and explain pattern recognition.

How AI learns

Machine learning, or how programs learn, is a vast field, so instead we’ll focus on the most crucial concepts you’ll see in popular AI models today: machine learning itself and neural networks.

Neural networks emulate the way the neurons in our brains work.

Machine learning involves an AI attempting to imitate the way that humans learn. Programs receive input data, perform some process, then output different data, and then receive feedback on how acceptable its outputs were. As time progresses, the program will slowly “learn” and have better and better outputs. AI usually undergoes this process, called training, for quite some time before its outputs are actually used, but this isn’t always the case. There are four main ways that machine learning is done. There is reinforcement learning where an AI isn’t given sample data to train with and instead just makes guesses based upon input as it goes. There is supervised learning which involves feeding labeled sample data to an AI, data that has a correct output associated with it, and tweaking the AI until its outputs match the expected output. Unsupervised learning feeds an AI data that is unlabelled and seeks to have the AI find some hidden pattern in the data. Finally, there is semi-supervised learning which feeds an AI some labeled and some unlabelled data mostly due to the cost and limitations of labeled data.

Neural networks are a subset of machine learning that emulate the way neurons in our brains work. Neurons are arranged in a certain number of layers and each can hold a value somewhere between 1 and 0. In all neural networks there is at least an input layer and an output layer. The number of nodes in the input layer is determined by the amount of inputs our AI requires; if our AI takes in four numbers and gives an output, then our neural network will have four input nodes, or if our AI takes in an image with 200 pixels, then our neural network will have 200 input nodes (can you see how AI’s can start to get really large and cost a lot of computing power?). The number of nodes in the output layer is just determined by how many different outputs we want. If we have an AI that wants to guess a handwritten number from an image, we’ll have ten output nodes (0-9), or if we want an AI to predict what playing card one has drawn from a pile, we'll likely need 52 output nodes.

Neural networks get from our inputs to our outputs through a series of hidden layers full of nodes. Similar to our brains, each node in one layer is connected to the nodes in the layer before it. The nodes in the current layer fire at different strengths based upon how the layer before it fired. This process then continues until we eventually reach our output layer fires. After our output layer fires, we pick the node with the strongest output and consider that the output of our AI. We can change how a neural network behaves by tweaking the amount of hidden layers our network has, the amount of nodes within given layers, and how connected certain nodes are between layers/what thresholds other nodes have to reach before a given node will fire. When training starts for a neural network, the connections between nodes are generally randomized and refined over time in response to its outputs.

All of this is a pretty crude oversimplification of how neural networks function, so If you’d like to learn more about this complex subject, check out 3Blue1Brown’s video “But What Is a Neural Network?”

31 views0 comments

Recent Posts

See All


bottom of page