Deep learning

On this page 7

Deep learning is the branch of machine learning that trains neural networks with many stacked layers to learn useful representations directly from raw data, instead of relying on features designed by hand. Within the fundamentals of artificial intelligence, it is the approach behind modern speech recognition, image classification, machine translation and large language models.

The word deep refers to the number of successive transformations between input and output, not to any deeper form of understanding. Each layer turns the output of the previous one into a slightly more abstract description, and the whole stack is tuned jointly by gradient-based optimization on large datasets.

How deep learning learns layered representations

A deep network learns by composing simple functions into a complex one. Each layer computes a weighted sum of its inputs, adds a bias and passes the result through a nonlinear activation function. Without the nonlinearity, any stack of layers would collapse into a single linear map, so depth would add nothing.

Training follows a fixed loop. A forward pass produces a prediction, a loss function measures the error, backpropagation computes the gradient of that loss with respect to every parameter, and an optimizer such as stochastic gradient descent or Adam adjusts the weights by a small step. The loop repeats over millions of mini-batches until the loss stops improving on held-out data.

The central idea is representation learning. In an image model, early layers respond to edges and color contrasts, middle layers to textures and parts, and late layers to whole objects. Nobody programs these detectors; they emerge because they help reduce the loss.

The table below lists the parameters that most strongly shape a deep learning model and the ranges commonly seen in practice.

ParameterTypical rangeWhat it controls
DepthA few layers to over 100Level of abstraction the model can build
Parameter countThousands to hundreds of billionsCapacity to fit complex patterns
Learning rateAbout 1e-5 to 1e-2Size of each weight update
Batch size8 to several thousand examplesGradient noise and hardware use
EpochsOne pass to several hundredHow long the model sees the data
RegularizationDropout 0.1 to 0.5, weight decayResistance to overfitting
Core training parameters and typical ranges

Main deep learning architectures

Deep learning is not one model but a family of architectures, each built around an assumption about the structure of its data. Choosing the architecture is usually the first and most consequential design decision.

ArchitectureBuilt-in assumptionTypical use
Multilayer perceptronNo structure among inputsTabular data, small classifiers
Convolutional networkLocal patterns repeat across spaceImages, video frames, spectrograms
Recurrent networkOrder matters, processed step by stepOlder speech and sequence models
TransformerAny element may relate to any otherLanguage, code, vision, multimodal
AutoencoderData lies near a compact codeCompression, anomaly detection
Diffusion modelData can be recovered from noiseImage, audio and video generation
Common architectures and their typical data

Since the late 2010s the transformer has become the dominant general-purpose architecture, because its attention mechanism scales well on parallel hardware and handles long-range dependencies. Convolutional networks remain competitive for many vision tasks, especially on edge devices with tight compute budgets.

Deep learning compared with classical machine learning

Deep learning is a subset of machine learning, which is in turn a subset of artificial intelligence. The practical difference lies in who builds the features: in classical machine learning a person engineers them, while in deep learning the network learns features from raw input.

AspectClassical machine learningDeep learning
Feature designManual, domain-drivenLearned automatically
Data neededHundreds to thousands of rowsOften millions of examples
ComputeA laptop CPU is often enoughGPUs or other accelerators
InterpretabilityOften readable coefficients or treesLargely opaque internals
Best fitStructured, tabular dataImages, audio, text, video
Deep learning versus classical machine learning

The comparison is not a ranking. On structured tabular data, gradient-boosted trees still frequently match or beat deep networks at a fraction of the cost. Deep learning wins clearly on unstructured, high-dimensional data, where handcrafted features cannot capture the relevant patterns. Both can be trained with supervised learning, self-supervised objectives or reinforcement learning.

Why deep learning works at scale

Deep learning existed in theory for decades, but it became practical when three conditions met: large labeled or unlabeled datasets, parallel hardware such as GPUs, and training techniques that keep gradients stable through many layers. Key techniques include the ReLU activation, careful weight initialization, batch and layer normalization, and residual connections that let signals skip layers.

A consistent empirical finding is that performance improves predictably as data, parameters and compute grow together, a pattern described by scaling laws. These relationships are approximate and depend on the task, data quality and architecture, so they guide budgets rather than guarantee results.

Much of current practice relies on transfer learning: a large model is pretrained once on broad data and then adapted to a narrow task with far less data. This is why a team with a few thousand labeled examples can still build an accurate deep learning system.

Limitations and common pitfalls

Deep learning delivers strong accuracy but carries specific failure modes that practitioners must plan for. The table below pairs frequent symptoms with their usual causes and remedies.

SymptomLikely causeTypical fix
High training accuracy, poor test accuracyOverfittingMore data, augmentation, regularization
Loss becomes NaN or explodesLearning rate too highLower rate, gradient clipping
Strong lab results, weak in productionDistribution shiftRepresentative data, monitoring
Unfair outcomes for some groupsBiased training dataData audits, subgroup evaluation
Confident but wrong predictionsPoor calibrationCalibration methods, abstention
Frequent problems in deep learning projects
  • Opacity: internal weights rarely explain a decision, which matters in regulated settings.
  • Data hunger: training from scratch needs large, clean, representative datasets.
  • Cost and energy: large models require substantial compute for training and inference.
  • Brittleness: small, targeted input changes known as adversarial examples can flip predictions.

The idea in brief

Deep learning is a way of teaching computers by example rather than by rules. You show a system many thousands of pictures, sentences or recordings together with the right answers, and it slowly adjusts itself until its answers match. It learns the rules on its own instead of being told them.

The system is built from many layers stacked on top of each other. The first layers notice simple things, such as lines in a photo, and later layers combine them into bigger ideas, such as a face or a car. More layers let it recognize more complicated patterns, which is why it is called deep. The price is that it needs very many examples and substantial computing power.

A practical scenario

A regional hospital network wants to flag chest X-rays that may show pneumonia so that radiologists can review urgent cases first. Instead of training from scratch, the data team takes a convolutional network pretrained on general images and fine-tunes it on about 20,000 anonymized X-rays labeled by specialists, holding back 15 percent for testing.

Training runs on a single GPU server for several hours, using data augmentation such as small rotations and contrast changes to reduce overfitting. The team then checks results separately for each hospital site and age group, finding weaker sensitivity on one older scanner and adding more of its images to the training set.

The final model sorts the reading queue rather than making diagnoses: every image is still read by a radiologist, but likely positive cases rise to the top. The outcome is faster review of urgent studies while human experts keep full responsibility for every report.