Lesson 11.1 · 7 min read · about 50 min to master at a very slow pace

Depth versus Width

More layers or more units per layer? How depth and width differ in expressive power, parameter count and trainability, and why most successful networks are deep rather than very wide.

Not startedJump to quiz

Two ways to add capacity

More depth (layers)More width (units per layer)
Expressive powerBuilds hierarchical, compositional features; some functions need far fewer units when built deepMore features at the same level of abstraction; a shallow net may need exponentially many units for the same function
ParametersGrow roughly linearly with the number of layersGrow with the product of adjacent widths: doubling two adjacent layers quadruples their weights
TrainingHarder: vanishing or exploding gradients, more sequential computationEasier to optimise, highly parallel
Main riskOptimisation difficultyOverfitting from sheer parameter count

Why depth usually wins

The universal approximation theorem says one wide hidden layer can represent any continuous function, but possibly with an enormous number of units. Composing layers lets a network reuse intermediate features (lesson 3.3), so it represents structured functions such as images, speech and language much more efficiently. In practice, depth often contributes more to useful expressive power than width.

Making depth trainable

  • ReLU activations, to avoid vanishing gradients (Section 4).
  • Careful initialisation and normalised inputs.
  • Batch normalisation and residual (skip) connections, which let very deep networks train well (beyond this course).

A balanced answer

"Depth gives hierarchical features and can be exponentially more efficient than width, but is harder to optimise. Width is easier to train but adds parameters fast and risks overfitting. Modern networks are deep, with ReLU, normalisation and residual connections to keep them trainable."

Stuck? Common doubts

Questions real learners asked while studying this lesson. They stay closed so they don't spoil your own thinking: open only the ones you need.

First passSo should I always make my network as deep as possible?

No. Extra depth only helps if the problem has structure to exploit and you can train it. For small tabular datasets, two or three hidden layers are usually plenty; deeper networks mostly add training trouble and overfitting risk. Let validation performance decide.

First passHow do I answer a "trade-offs between depth and width" question?

Use the layout two options × two criteria (power, cost) + a verdict.

Deeper (more layers)Wider (more neurons per layer)
PowerFeatures of features: edges → shapes → objectsMore features at the same level
EfficiencyThe same function with far fewer neuronsMay need exponentially more neurons
TrainingHarder: vanishing gradients (eased by ReLU, batch norm, residual connections)Easier and more stable
SpeedSlower: layers run one after anotherFaster on GPUs: a layer's neurons run in parallel
RiskBoth add parameters, so both can overfit

Link it to the universal approximation theorem: one wide layer is enough in theory, but the theorem says nothing about how many neurons that takes. Verdict: depth gives more power per parameter, so modern networks go deep and use ReLU, batch norm and residual connections to keep them trainable.

Memory line: "Deep is efficient but hard to train. Wide is easy to train but wasteful."

Cheatsheet

Depth vs width

Depth: hierarchical features, efficient, harder to train (vanishing gradients). Width: easy to train, parallel, but may need far more neurons. Both add capacity, so both can overfit.

See every cheatsheet by category →

Check your understanding

Score 75% or more to master this lesson and earn XP. Answer first, then check.

Q1conceptWhat is the main expressive advantage of adding depth rather than width?
Q2calculateTwo adjacent hidden layers each have 100 units. You double both to 200. Roughly how many times more weights connect them?
Q3conceptWhat is the main practical difficulty of very deep networks?
Q4applyFor a small tabular dataset of a few thousand rows, what depth is a sensible starting point?
Q5interpretWhich statement balances the depth–width trade-off correctly?