Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Folding paper
Fold a strip of paper in half, then in half again, and again. After 10 folds it has over a thousand layers, from just 10 simple actions. A deep network can do the same: each layer “folds” its input, and folds compound. A shallow network can only add pieces side by side, so matching 10 folds would take over a thousand of its pieces. Depth multiplies complexity, while width only adds it.
Depth explains why compact deep networks fit onboard hardware yet represent complex perception and control functions. The flip side matters too: a network’s theoretical capacity is far from what training actually uses, which affects verification. Counting linear regions bounds the cost of exactly verifying a ReLU controller.
- 1. Each extra layer can…
- 2. A shallow network adds pieces…
- 3. Do random deep networks usually use their full exponential capacity?
Level 1: Beginner
★★☆☆☆ Basic⏱ 25 minSecondary-school mathematics: arithmetic and elementary algebra.The tent map is one ReLU layer
Composing k copies, , gives a sawtooth with teeth and linear pieces, using only 2 neurons per layer (2k in total).
Shallow networks count pieces additively
A one-hidden-layer ReLU net on a 1-D input with N units has at most N + 1 linear pieces. So representing exactly needs at least units: exponentially more than the deep net’s 2k.
- 1. Linear pieces of T∘T∘T:
- 2. Max pieces of a 1-D shallow net with 48 units:
- 3. Neurons used by the depth-10 sawtooth:
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.Telgarsky’s depth separation
For every k there is a function computed by a ReLU net with O(k³) layers and O(1) width per layer, such that any net with O(k) layers needs units even to approximate it in to constant accuracy. The proof shows that a net with few pieces crosses ½ few times, so it must be far from a function that oscillates times.
Counting regions in higher dimensions
- One hidden layer, n units on : at most regions (a hyperplane arrangement), which is polynomial in n.
- L layers of width n: up to roughly (Montúfar et al., 2014), exponential in depth.
Other separations and limits
- Eldan–Shamir: a radial function in is easy for 3 layers but needs exp(d) width with 2 layers.
- Width lower bound: ReLU nets of width at most d (the input dimension) are not universal, while width d + 1 suffices with unlimited depth (Hanin–Sellke; Lu et al.).
- Multiplication and high-degree polynomials are much cheaper with depth.
- 1. Regions of 3 lines in general position in the plane:
- 2. ReLU nets of width ≤ d on d-dimensional input are…
- 3. Eldan–Shamir separates…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Proof that shallow nets can’t follow the sawtooth
Let g be piecewise linear with p pieces. On each piece, g − ½ changes sign at most once, so g crosses ½ at most p times. crosses ½ exactly times, alternating above and below. If , then on most of the intervals between crossings, g sits on one side of ½ while spends a triangle of area on the other side. Summing gives an error bounded below by a constant. ∎
Why typical networks are simpler
Hanin and Rolnick (2019): for networks at (and after) standard initialization, the expected number of regions along a line, per unit length, is about the total number of neurons, independent of depth. Exponential region counts need finely tuned weights like the tent map’s. Expressivity is an upper bound, not what gradient descent delivers by default.
- 1. A function with p linear pieces crosses ½ at most…
- 2. Hanin–Rolnick: typical regions per unit length scale with…
- 3. The sawtooth needs carefully chosen weights because…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Depth, measured
Exercise 1. The tent compositions have exactly 2, 4, 8, …, 256 pieces for depth 1–8. Fitting the depth-6 sawtooth (12 neurons) with N equal pieces gives RMSE 0.2888 for N = 8, 16 and 32, no better than the constant ½ (0.2888). At N = 63 it is 0.213, and at N = 64 it is exact (7 × 10⁻¹⁶). A shallow net needs 64 units where the deep one used 12.
Exercise 2: what random networks do. With 48 He-initialized neurons split over depth 1–12, the mean number of regions on [−3, 3] is 48.2, 47.6, 49.4, 39.6, 50.2, 41.0 and 31.2. That is about the neuron count, and it doesn’t grow with depth (very deep, narrow nets even lose some to dead units). The hand-built sawtooth nets reach 16, 256 and 1024 regions at depth 4, 8 and 10 with only 2 neurons per layer: 20 times more than any random net here, with fewer neurons.
Depth in AI, robotics and aerospace
- Architecture choices: deep, moderately wide networks are the norm for perception and control.
- Verification cost: exact ReLU verification (MILP and reachability) scales with the number of regions, which is usually far below the worst case.
- Hierarchical features: depth composes features (edges → parts → objects), a structural prior beyond raw expressivity.
- Embedded inference: compact deep networks beat wide shallow ones for the same latency budget.
References
- M. Telgarsky (2016). “Benefits of depth in neural networks.” COLT.
- G. Montúfar, R. Pascanu, K. Cho, Y. Bengio (2014). “On the number of linear regions of deep neural networks.” NeurIPS.
- R. Eldan, O. Shamir (2016). “The power of depth for feedforward neural networks.” COLT.
- B. Hanin, D. Rolnick (2019). “Complexity of linear regions in deep networks.” ICML.
- Z. Lu, H. Pu, F. Wang, Z. Hu, L. Wang (2017). “The expressive power of neural networks: a view from the width.” NeurIPS.