AI, Machine Learning and Deep Learning: What’s the Difference?

They’re nested ideas, not rivals: deep learning is a kind of machine learning, which is one way of building AI.

Short answer

Think of three circles, one inside the other. Artificial intelligence (AI) is the broad idea of computers doing tasks that seem to need human intelligence. Machine learning is one way to get there: instead of writing every rule, you let a program learn patterns from examples. Deep learning is a type of machine learning that uses neural networks with many layers — the approach behind today’s chatbots, voice assistants and photo search.

In this article 6 sections
  1. Artificial intelligence: the big umbrella
  2. Machine learning: learning from examples
  3. Deep learning: many layers
  4. Where chatbots fit
  5. Common questions
  6. Related guides
A Google TPU 3.0 circuit board with four chips under copper cooling plates connected by liquid-cooling tubes.
Google's Tensor Processing Units are chips built specifically to train and run deep-learning models. Photo: Zinskauf / Wikimedia Commons, CC BY-SA 4.0

Artificial intelligence: the big umbrella

AI is the oldest and widest term. The computer scientist John McCarthy coined it in 1955 and described it as the science and engineering of making intelligent machines.1 Today it covers anything from a chess program that follows hand-written rules to a chatbot that writes essays: systems that handle language, recognise images, reason or make decisions.1

IBM splits AI into “narrow” AI, which is good at one kind of task, and the more general, human-level kinds people imagine in films. Every AI system in use today is the narrow kind.2

Nested circles: AI is the largest circle, machine learning sits inside it, and deep learning sits inside machine learning, each listing its main types.
Deep learning is a kind of machine learning, which in turn is one branch of AI — the same nesting this article describes. Diagram: Wang Tianming et al. / Wikimedia Commons, CC BY 4.0

Machine learning: learning from examples

In the 1950s the AI pioneer Arthur Samuel described machine learning as giving computers the ability to learn without being explicitly programmed.3 Instead of a person writing every rule, the program studies examples and works out the patterns itself, getting better with experience.4

A spam filter is the classic example. Rather than listing every spam phrase, engineers show the system thousands of emails labelled “spam” or “not spam”. It learns which patterns go with which label, then applies them to new emails. Film recommendations on Netflix and YouTube, and fraud alerts on your bank card, work in a similar way.3

Machine learning comes in three main styles:5

  • Supervised learning — the examples come with the right answers (labels), like the spam filter above. MIT Sloan calls it the most common type in use today.3
  • Unsupervised learning — the data has no labels, and the system looks for groups or patterns on its own, such as customers who buy similar things.
  • Reinforcement learning — the system learns by trial and error, collecting rewards for good moves and penalties for bad ones, a bit like training a pet.

Machine learning has become the main way AI is built: if a company says it uses AI, MIT Sloan notes, it is most likely using machine learning.3

Deep learning: many layers

Deep learning is a type of machine learning that uses large neural networks — layers of simple calculations loosely inspired by the brain.6 Data goes into an input layer, passes through one or more “hidden” layers, and comes out of an output layer as an answer.2 Each layer builds on the one before, so later layers can pick up complex patterns, like the shape of a face or the meaning of a sentence.6 IBM counts a network with more than three layers, including the input and output, as “deep”.2

The big practical difference is who decides what to look at. Classic machine learning usually needs people to pick the useful features in the data, such as the sender or certain words in an email. Deep learning works out those features by itself.5

That power comes at a price. Google Cloud explains that deep learning often needs millions of examples and specialised chips (GPUs or TPUs), and training can take hours, days or weeks. Classic machine learning can often run on an ordinary processor and train in seconds to hours.5

What it meansEveryday example
AIComputers doing “intelligent” tasksChess program, route planner
Machine learningLearning patterns from dataSpam filter, recommendations
Deep learningMachine learning with many-layered neural networksChatbots, face unlock, live captions

Where chatbots fit

Chatbots such as ChatGPT, Claude and Gemini are built on large language models, which Stanford HAI gives as an example of general-purpose AI.1 They are deep-learning models trained on huge amounts of text to predict the next piece of a sentence. That is why they write fluently, and also why they can sound sure about things that are wrong — see why AI sometimes makes things up.

Why the words get mixed up

Companies often say “AI” for anything automated, because it’s the term people recognise. When a product says it “uses AI”, it’s fair to ask what it actually does with your data.

Common questions

Is ChatGPT machine learning or deep learning?

Both. Chatbots are large language models: deep-learning systems, which makes them a kind of machine learning, which in turn is one way of building AI.1,6 The three terms are nested, so the most specific one is usually the most useful.

What is generative AI?

Generative AI is the name for systems that produce new text, images, audio or video rather than only sorting or predicting. IBM describes it as built on large “foundation models” trained on vast amounts of unlabelled data.2 If you want to tell its output apart from the real thing, read how to spot AI-generated images and videos.

Does all AI learn from data?

No. Older AI systems followed rules that people wrote by hand, such as a chess program searching through moves. Machine learning is the part of AI that finds its own rules from examples, and it has become the dominant approach.3

Is deep learning always better?

Not necessarily. For smaller, tidy datasets, classic machine learning is often quicker and cheaper, because it needs less data and no special hardware. Deep learning shines with huge amounts of messy data such as images, sound and text.5

Sources and further reading

  1. What is Artificial Intelligence (AI)? — Stanford HAI
  2. AI vs. machine learning vs. deep learning vs. neural networks — IBM2023-07-06
  3. Machine learning, explained — MIT Sloan School of Management2021-04-21
  4. What is Machine Learning (ML)? — Stanford HAI
  5. Deep learning vs. machine learning vs. AI — Google Cloud
  6. What is Deep Learning? — Stanford HAI

Was this article helpful?

Comments

No comments yet. Questions and tips from readers are welcome.