How Neural Networks Process Data
The step that changes between the two paths is the feature step. Traditional machine learning relies on features obtained through manual extraction, while deep learning moves that work into the model, which learns features from the raw data.
Why the Three Terms Get Mixed Up
Artificial intelligence, machine learning, deep learning, and large language models appear together so often in news stories and product descriptions that they can seem like four names for the same thing. They are not interchangeable. These terms name fields that sit inside one another, like a set of nested boxes in which the outermost box is the broadest. Once you can see which box holds which, those headlines and product descriptions become much easier to read.
What do you think happens?
Is a large language model a separate field that competes with deep learning, or is it something that sits inside deep learning?
Reveal answer
A specific application of deep learning
Large language models are not a separate field that competes with deep learning. They take the deep learning toolkit and apply it to language, so they sit beneath deep learning in the hierarchy.
Three Nested Boxes
Read the hierarchy from the outside in. Artificial intelligence is the outermost layer and the broadest of the three. It is an umbrella goal, and everything else in this article is a method or subfield used to pursue it. A system can be considered part of AI without using any learning from data at all, which is why the inner boxes are needed to explain how modern systems actually acquire their abilities.
Machine learning sits inside artificial intelligence. It is the subfield concerned with the algorithms used to implement AI. Its central idea is that an algorithm can learn from data and then make predictions or decisions based on what it has seen, without a programmer spelling out every rule in advance. Performance can improve as the algorithm is exposed to more data.
Deep learning sits inside machine learning. It is a specialized branch of machine learning built on neural networks, which are machine learning models loosely inspired by the structure and function of the human brain. What makes deep learning distinctive is its use of multilayer neural networks, meaning networks with many stacked layers of processing. These layers let the model capture complex patterns and abstractions in data.
Tracing a Spam Filter Through Training
A spam filter is the classic practical example of machine learning. Follow the state of the system as it moves from raw examples to a decision about a new email. The worked example below uses only the steps described in the source.
A learned spam filter
A developer wants a system that decides whether an incoming email is spam, and has a large collection of past emails that people have already labeled as spam or legitimate.
- 1Start with labeled examples
The algorithm is given many emails labeled as spam and many labeled as legitimate. The labels are what tell the system the correct answer for each example.
- 2Adjust during training
During training, the model adjusts itself to reduce its errors on this labeled collection. Nobody writes down the rule for spam; the model is tuned toward fewer mistakes.
- 3Pick up patterns
Over the course of training, the model gradually picks up the patterns and characteristics that tend to mark spam.
- 4Classify an unseen email
Once trained, the model looks at an email it has never seen before and classifies it as spam or not spam.
The decision rule came from examples rather than from a list of hand-written phrases, and the trained model can be applied to emails that were not in its training collection.
Hand-Written Rules Versus Learned Rules
The difference between the two columns in the comparison is the heart of machine learning. In the hand-written approach, the developer decides in advance what counts as spam and encodes that decision directly. In the machine learning approach, the developer supplies labeled examples and the algorithm works out a decision rule of its own from them. The first approach is only as good as the rules someone thought to write. The second approach can pick up patterns that a person might not have listed.
| Question | Hand-written rules | Machine learning |
|---|---|---|
| Where does the decision rule come from? | A person writes it in advance | The algorithm learns it from labeled data |
| What does the developer supply? | The explicit rules | Labeled examples of correct answers |
| What happens on a new email? | The fixed rules are applied | The trained model classifies it |
| Can performance improve with more data? | Not by itself; rules must be rewritten | Yes, performance can improve as more data is processed |
The spam filter contrast, using the distinctions the source emphasizes
Where the Features Come From
A feature is a measurable property of the input that a model uses to make its decision. The source highlights how features are obtained as one of the key differences between the fields. Deep learning reduces the need for manual feature extraction. In other words, a deep learning model is not depending on a person to decide in advance which characteristics of the raw data matter. Instead, the stacked layers of a neural network learn the features themselves as the data passes through them.
The step that changes between the two paths is the feature step. Traditional machine learning relies on features obtained through manual extraction, while deep learning moves that work into the model, which learns features from the raw data.
Inside a Multilayer Network
A neural network is built from layers of processing stacked one after another. The source defines deep learning by the use of networks with three or more layers, and explains that these layers let the model capture complex patterns and abstractions in data. Think of the data as entering at one end, being transformed at each layer, and leaving as a prediction at the other end. The source does not describe the internal arithmetic of each layer, so the important idea to hold onto here is the flow: the same input is progressively reshaped as it passes through the stack.
Using the spam example, describe in your own words what the input is, what the stacked processing does to it, and what the output is. Then say at which step a person would have needed to choose features in a traditional approach.
Hints
- The input is an email, and the output is a decision about whether it is spam.
- A traditional approach has a person choose the features before the model sees them.
Where Large Language Models Fit
Large language models, usually abbreviated LLMs, are a specific application of deep learning techniques. Their defining ability is to process and generate human-like text. Because they apply the deep learning toolkit to language, the most accurate placement is as a specialized application near the bottom of the chain, below deep learning. Trace the path upward in the hierarchy diagram: a large language model is a deep learning application, a deep learning method is a machine learning method, and a machine learning method is an AI method.
Mistakes When Reading AI Terminology
Common mistake Treating the four terms as interchangeable
What it looks likeUsing artificial intelligence and deep learning as if they named the same thing
Why it failsThe terms name fields that sit inside one another, with artificial intelligence as the broadest box.
Do this insteadLocate each term in the nested hierarchy before comparing them.
Common mistake Assuming every AI system learns from data
What it looks likeConcluding that any AI system must be trained on labeled examples
Why it failsA system can be considered part of AI without using any learning from data at all.
Do this insteadReserve machine learning for systems whose decision rules are learned from data.
Common mistake Equating deep learning with all of machine learning
What it looks likeCalling a hand-written rule system or a simple learned model deep learning
Why it failsDeep learning is a specialized branch of machine learning built on multilayer neural networks.
Do this insteadCheck whether the model uses a neural network with many stacked layers before calling it deep learning.
Common mistake Placing large language models as a rival field to deep learning
What it looks likeDescribing LLMs as an alternative to deep learning
Why it failsLLMs are a specific application of deep learning techniques applied to language.
Do this insteadDescribe LLMs as sitting below deep learning in the hierarchy.
Placing New Terms in the Hierarchy
A news article describes a chatbot that generates fluent text, and says it was built with deep neural networks trained on very large amounts of text. Using only the hierarchy from this article, state which box or boxes the chatbot belongs to, and explain how you know. Then say whether the spam filter from earlier would belong in the same deep learning box.
Hints
- Start from the outermost box and ask which fields the chatbot falls inside.
- Consider whether the system uses a multilayer neural network and whether it is applied to language.
- For the spam filter, ask whether its model is described as a multilayer neural network in the source.
Recap of the Nested Fields
- 1Artificial intelligence is the broadest field, containing machine learning, which contains deep learning.
- 2Machine learning learns decision rules from labeled data, as a spam filter does, instead of relying only on rules written by hand.
- 3Deep learning uses multilayer neural networks with three or more layers and reduces the need for manual feature extraction.
- 4Large language models are a specific application of deep learning, so they sit beneath it in the hierarchy.
Key Takeaways
- Artificial intelligence contains machine learning, which contains deep learning; these are nested fields, not interchangeable terms.
- A spam filter trained on labeled emails learns its decision rule from examples rather than from hand-written phrase rules.
- Deep learning differs from traditional machine learning mainly in how features are obtained: deep learning reduces the need for manual feature extraction.
- Large language models are a specific application of deep learning applied to language, placed beneath deep learning in the hierarchy.