What Is Deep Learning?
Deep learning is a machine learning technique that uses multi-layer neural networks to automatically learn advanced features from data. The book Deep Learning treats deep learning as a field within machine learning and explains representation learning and multi-layer neural networks systematically.[1]
What you’ll learn
- Explain how AI, machine learning, and deep learning are nested
- Describe how input, hidden, and output layers pass information through a network
- Decide whether deep learning fits the data, compute, and explainability requirements
The Nested Relationship: AI, ML, and Deep Learning
graph TD
AI["AI (Artificial Intelligence)\nAll techniques that replicate human intelligence"]
ML["Machine Learning\nAutomatic pattern learning from data"]
DL["Deep Learning\nMulti-layer neural networks for automatic feature extraction"]
AI --> ML
ML --> DLDeep learning is a powerful technique within machine learning, but it is not the best fit for every problem. When data is scarce or interpretability is important, traditional machine learning methods can be easier to use.[1]
The Basics of Neural Networks
A neural network is a mathematical model inspired by the connected structure of neurons (nerve cells) in the human brain. A large number of “nodes (units)” are arranged in layers, and adjacent layers are connected to process information.[1]
Basic Structure
graph LR
subgraph IL["Input Layer"]
I1["x₁"]
I2["x₂"]
I3["x₃"]
end
subgraph HL["Hidden Layers (multiple)"]
H1["h₁"]
H2["h₂"]
H3["h₃"]
end
subgraph OL["Output Layer"]
O1["y"]
end
I1 --> H1
I1 --> H2
I1 --> H3
I2 --> H1
I2 --> H2
I2 --> H3
I3 --> H1
I3 --> H2
I3 --> H3
H1 --> O1
H2 --> O1
H3 --> O1| Layer Type | Role |
|---|---|
| Input Layer | Receives the data — pixel values, numbers, and other features are fed in here |
| Hidden Layers | Progressively extracts features from the input — this is the “deep” part |
| Output Layer | Produces the final prediction or classification result |
Why Is It Called “Deep”?
“Deep” refers to having multiple hidden layers. More layers allow the network to learn increasingly abstract features.[1]
In image recognition, for example, shallow layers learn edges and color patterns, while deeper layers learn higher-level features such as “eyes,” “nose,” and “face.”[2]
Differences Between Traditional ML and Deep Learning
A useful distinction is who or what shapes the features used for prediction. In conventional machine learning, people often select and transform the features. In deep learning, the network also adjusts feature representations during training. Deep learning still requires data preparation and input design.
| Traditional Machine Learning | Deep Learning | |
|---|---|---|
| How features are formed | People usually select meaningful inputs | Training also adjusts learned representations |
| Data volume | Some methods remain useful with smaller datasets | Often needs many examples |
| Compute resources | Easier to keep modest | Training commonly uses accelerators such as GPUs |
| Ease of explanation | Can use methods such as decision trees | Internal decisions are harder to explain directly |
| Common data types | Tabular data | High-dimensional images, audio, and text |
Understanding Through Analogy
Think of a cooking recipe.
- Traditional machine learning: A food researcher (a human) pre-selects the important features of a recipe (ingredients used, cooking time, calories, and so on) before training.
- Deep learning: Use many food photos with task-relevant targets so that the model also learns visual representations useful for the judgment.
In the analogy, ingredients and cooking time are hand-designed features, while representations built from the pixels correspond to learned features. The model does not learn “deliciousness” correctly from photos alone; it still needs a defined objective and suitable training examples.
Tasks Where Deep Learning Excels
Image Recognition (CNN: Convolutional Neural Network)
A CNN (Convolutional Neural Network) is a network architecture designed to process image data. It efficiently learns spatial patterns within images.[1]
- Object detection and classification (a field that advanced through image benchmarks such as ImageNet)
- Medical image diagnosis (detecting diseases from X-ray and MRI images)
- Autonomous driving (recognizing roads, pedestrians, and signs)
Natural Language Processing (Transformer / LLM)
A Transformer is a neural network architecture published in 2017. It uses attention mechanisms to process sequence data.[3] Many modern large language models are based on Transformer-style designs.
An LLM (Large Language Model) is a language model pre-trained on large amounts of text data. Google’s MLCC explains LLMs through tokens, Transformers, and text prediction.[4]
- GPT series (OpenAI): Text generation and code completion
- Claude (Anthropic): Dialogue, document analysis, and coding assistance
- Gemini (Google): Multimodal processing (text, images, and video combined)
Speech Recognition
Speech recognition converts audio waveforms into text. It is used in voice assistants on smartphones and automatic caption generation.
How LLMs Work (Overview)
LLMs learn and run inference through the following process.
graph LR
PT["Massive text data\n(Pre-training)"] --> LLM["LLM\n(Transformer-based)"]
LLM --> FT["Fine-tuning\nfor specific tasks"]
FT --> APP["Applications\n(dialogue, translation, summarization, etc.)"]- Pre-training: Train on large amounts of text by learning to “predict the next token (word fragment)”
- Fine-tuning: Additional training for a specific use case, such as conversation
- Inference: Generate text in response to user input
Limits to check before choosing deep learning
Q: Is deep learning always better than traditional machine learning?
A: No. Deep learning often requires large amounts of data and high compute resources. When data is scarce, or when working with structured (tabular) data, traditional methods can be easier to use.[1]
Q: Can I do deep learning without a GPU?
A: Small experiments can run on a CPU, although training can be slow. Larger models often require accelerators such as GPUs.
Q: Are LLMs and chatbots the same thing?
A: No. An LLM is a model (engine) for understanding and generating language. A chatbot is an application that uses an LLM to provide a conversational interface. The same LLM can power many applications beyond chatbots: translation, summarization, code generation, and more.
References
- Ian Goodfellow, Yoshua Bengio, Aaron Courville, Deep Learning, 2016
- Matthew D. Zeiler, Rob Fergus, Visualizing and Understanding Convolutional Networks, November 12, 2013
- Ashish Vaswani et al., Attention Is All You Need, June 12, 2017
- Google, Machine Learning Crash Course