What Is Deep Learning and How Does It Relate to Machine Learning and Neural Networks?
Updated
Deep learning is a subset of machine learning that uses neural networks with many layers to learn patterns directly from data. It sits inside the broader field of machine learning, which itself sits inside artificial intelligence. You should reach for deep learning when your problem involves complex, high-dimensional data — images, video, audio, or text — and you have enough labeled examples and compute to train a large model. For small tabular datasets or problems with clear rules, simpler methods are usually faster and easier to maintain.
The hierarchy: AI, machine learning, deep learning
These three terms are nested, not interchangeable:
| Level | What it covers | Example |
|---|---|---|
| Artificial intelligence | Any technique that makes machines perform tasks associated with intelligence | A rule-based chess engine |
| Machine learning | Systems that improve at a task by learning from data instead of hand-coded rules | A spam classifier trained on labeled emails |
| Deep learning | Machine learning using neural networks with many layers | A CNN that detects lane markings in dashcam video |
Traditional machine learning often depends on human-engineered features — you decide that "word frequency" or "pixel edge count" matters, then feed those numbers to a model. Deep learning skips most of that step: the network learns its own internal representations layer by layer. Early layers tend to capture simple patterns (edges, tones), and deeper layers combine them into complex concepts (faces, words, objects).
How a deep neural network learns
A network is a stack of layers, each holding adjustable numbers called weights. Training runs in a loop:
- Forward pass — input data flows through the layers, producing a prediction.
- Loss calculation — the prediction is compared to the correct answer, producing an error score.
- Backpropagation — the error is traced backward through the layers to show how each weight contributed.
- Weight update — an optimizer nudges every weight slightly in the direction that reduces the error.
Repeat this over millions of examples and the weights settle into values that generalize to new data. "Deep" simply means many layers — the depth is what lets the model build hierarchical representations rather than relying on a single transformation.
Why GPUs, frameworks, and data all matter
The training loop above involves enormous numbers of matrix multiplications. A CPU executes them mostly in sequence; a GPU runs thousands in parallel, which is why GPUs became the default hardware for deep learning. Greg Surma's portfolio, which catalogs projects spanning machine learning, computer vision, CUDA, and self-driving cars, reflects this stack in practice: GPU-accelerated training paired with frameworks.
Two frameworks dominate:
- PyTorch — favored for research and rapid experimentation; its dynamic computation graphs make debugging straightforward. Surma's portfolio lists PyTorch for projects including a CNN explainer, GradCam feature visualization, a Jetson-based self-driving toy car, and a face-to-cartoon model.
- TensorFlow — strong for production deployment and mobile export. The portfolio uses it for a Deep Dream image generator and a generative photo inpainter.
Data is the third pillar. Deep models are data-hungry; a few hundred examples rarely suffice for image tasks, while tens of thousands or more are common. Frameworks and GPUs are useless without a dataset large and clean enough to learn from.
Concrete applications
Deep learning shows up across the portfolio's project categories:
- Computer vision — image tagging with multi-label CNNs, super-resolution photo enhancement, edge detection, and depth estimation for self-driving cars.
- Self-driving perception — lane detection and monocular depth prediction, both framed as perception sub-problems rather than full autonomy.
- Generative image work — Stable Diffusion and Dreambooth for custom avatars, Deep Dream for artistic filters, and GANs for synthetic imagery.
- On-device inference — CoreML models shipped inside iOS apps, showing that trained networks can run locally on phones rather than only in the cloud.
These examples share a trait: the input is raw and messy (pixels, sensor frames), and the mapping to output is too complex to hand-code. That is exactly where deep learning earns its cost.
When deep learning is the right choice — and when it isn't
Choose deep learning when:
- Your data is perceptual — images, audio, video, natural language.
- You have a large labeled dataset, or can use a pretrained model and fine-tune it.
- You have GPU access and can afford longer training cycles.
- The problem's rules are too subtle or variable to specify by hand.
Choose simpler machine learning when:
- Your data is small and tabular (dozens of features, hundreds of rows).
- You need interpretability — linear models and decision trees explain themselves; deep networks generally don't without extra tooling like GradCam.
- Latency or compute is tightly constrained and a lighter model meets accuracy needs.
- A clear rule-based solution already works; adding a neural network only adds maintenance burden.
A practical middle path is transfer learning: start from a pretrained network (many are available for vision and language), then fine-tune on your smaller dataset. This captures much of deep learning's power without requiring massive data or training from scratch — the approach behind several on-device models in the portfolio above.