How AI Works, Part 2: How Machines Learn

In the first post in this series, we talked about how to define intelligence. This week, we’re going to look at how machines learn: the five main types of learning that have been applied to them.
Don’t worry, though. There will still be a need for the kind of common-sense knowledge humans have for a long time to come, so we’re not going to be made obsolete anytime soon.
There are five main categories of machine learning, and what makes them interesting is that each one comes from a different field of science.
Two Lessons From Biology
The greatest learning algorithm in the world is the one that resides in your head. It has learned everything you already know and can remember. So the first approach looks to neuroscience, understanding how neurons work and how they connect and learn, then tries to build those same processes into a software algorithm.
The second approach goes back further. Evolution made the brain in the first place, so the idea here is to simulate that same evolutionary process inside a computer. A population of individuals, in this case computer programs, attempts a task, and the successful ones get to reproduce and mutate to produce the next generation. That next generation is given a new, more challenging task, and the process repeats over and over. This method has already been very successful at producing new technologies, and this type of machine learning has led to a lot of patents being filed.
These first two methods are both inspired by biology in one way or another, and not everyone agrees this is the best approach. Even though it’s appealing on a logical level, we don’t actually know whether these biological models represent the best way to learn, only that they’re the way life happened to do it.
Learning by Probability
The idea behind Bayesian learning is that you start out with a large number of hypotheses, then test each one to work out how much you should believe it. You begin with a rough probability based on expectation or a best guess, then test for evidence that supports or undermines it. By testing every hypothesis this way, you eventually arrive at one, or a handful, that seem most likely to be correct.
Learning Like a Scientist
A similar “first principles” approach is called symbolic learning, and it works the same way scientists and mathematicians do: by induction. You look at some data, form a hypothesis to explain it, test that hypothesis against the data, and either discard it or refine it. You keep going this way, much like the scientific method taught in high school, except here it’s being done by a machine, far faster, and with the potential to uncover a lot more knowledge.
In the UK, researchers built a robot scientist named Eve that uses exactly this method, carrying out its own experiments starting from a basic knowledge of molecular biology and DNA, then developing and refining its own models of the cells it’s studying. Eve’s work led to a promising new malaria drug candidate. Now imagine how fast new drugs could be developed with a million robot scientists like Eve working on the same problem.
Learning by Analogy
The last type of machine learning is rooted in several scientific fields, but probably the main one is psychology: learning by analogy. There’s a lot of evidence that people learn this way too. Faced with a new situation, we often retrieve similar situations from memory and extrapolate, applying what we know about something close to make an educated guess about what we’re facing now. A good example is diagnosing a new patient. You look through medical records, in a computer’s case, potentially millions of them, to find the previous case with the most similar symptoms, and assume the diagnosis will be the same.
That might sound like nothing more than a best guess, but it’s actually a very powerful method, and not unlike how trained doctors work today. Give a computer program enough data using this approach, and it can learn almost anything.
A lot of work has gone into each of these types of machine learning, and into combining them to build even more powerful learning machines. Plenty of people think these systems could eventually replace engineers and computer scientists themselves, something that’s already being hinted at today.
How I Have Used These Ideas in My Writing
In The Apex Code, I introduced a single AI and developed it throughout the story using a combination of these machine learning ideas. In fact, the working title for the earliest drafts, which I started writing many years ago, was simply “Machine Learning.”
Next week, we’ll look at how large language models work.
