TL;DR
Deep learning orthodoxy often celebrates depth over width, largely because deep networks can theoretically carve up an input space into exponentially more linear pieces than shallow ones. This paper shows that for typical, randomly initialized ReLU and leaky ReLU networks, the exact opposite happens in expectation: wider, shallower architectures actually generate more linear regions than narrower, deeper ones with the same number of neurons. Alongside new geometric proofs, the author provides a fast, theoretically grounded Monte Carlo method to compare the expressive complexity of massive networks where exact counting is impossible.
What Problem Does This Paper Address?
If you strip away the mystique of a neural network built with ReLU or leaky ReLU activations, it is fundamentally a piecewise linear function. Think of it like origami: the network folds and slices the input space into flat, polygonal facets called linear regions, within which the network behaves as a simple affine (linear plus bias) transformation. The total number of these regions is a classic yardstick for a network's expressive power—more facets mean the network can sculpt a more intricate decision boundary or function.
While we know the worst-case maximum number of regions favors deep networks, what happens in reality when we initialize a network using standard random weights (like PyTorch’s default Kaiming initialization)? Answering this is brutally hard: counting the exact number of linear regions in a ReLU network is NP-hard. Consequently, direct, apples-to-apples comparisons of expected region counts across different layer arrangements have remained largely out of reach.
Methods
The author tackles this from two angles—exact mathematical theory and scalable empirical sampling:
- Geometric Inductive Counting (New Theory): Assuming independent, symmetrically distributed random weights and biases, the author maps each layer's neurons to hyperplanes slicing up Euclidean space. By starting with an identity network and inductively "turning on" activations from the output layer back toward the input, the author derives exact expectations for 2-layer networks and explicit upper bounds for deeper networks with non-increasing layer widths.
- Uniqueness of Linear Patterns & Monte Carlo Sampling (New Validation of a Practical Tool): A linear pattern at an input point is the local linear function (slope and intercept) the network computes in a tiny neighborhood around that point. While checking local gradients isn't new, the author proves that for generic parameters, every non-constant linear region has a strictly unique linear pattern. Because no two distinct non-constant regions accidentally share the exact same equation, you can pass $M$ random inputs through a network, count the unique non-constant linear functions produced, and obtain a mathematically sound probabilistic comparison of region complexity—all in minimal linear time per sample.
Datasets
- Synthetic Gaussian Inputs: The primary experiments evaluate randomly initialized Multi-Layer Perceptrons (MLPs) by feeding them $10,000$ synthetic data points drawn from normal distributions $N(0, \sigma^2)$ across varying scales ($\sigma \in \{0.01, 0.1, 0.5, 1\}$).
- MNIST: Used in an exploratory appendix experiment to track how detected linear regions evolve and compare across architectures during actual model training. No new benchmarks are introduced.
Key Insights and Ideas
- Front-loading neurons matters most: Adding neurons to hidden layers closer to the input yields a much bigger jump in linear regions than putting them in deeper layers. Even when a bottom-heavy network has fewer total parameters than a top-heavy one, it can still carve out dramatically more regions.
- Width beats depth in expectation: Redistributing a fixed budget of $2pq$ neurons from a deeper $p \times 2q$ layout ($2q$ layers of width $p$) into a wider $pq \times 2$ layout (2 layers of width $pq$) strictly increases the expected number of linear regions.
- The 2-layer Leaky ReLU quirk: Surprisingly, for a 2-hidden-layer leaky ReLU network (where input dimension $\ge$ first layer width), the number of linear regions isn't just predictable in expectation—with probability 1, it is an exact, deterministic constant! However, push the depth to 3, and parameter tweaks immediately change the region count again.
- Flatlands can fracture: While non-constant linear regions are always neat, convex shapes with unique linear equations, constant (e.g., zero-valued) regions in ReLU networks of depth $\ge 3$ can split into completely disconnected islands sharing the exact same constant value (as seen in the blue $c=0$ bands in the first figure above).
Key Results
- Theoretical Gap ($pq \times 2$ vs. $p \times 2q$): Theorem 1.1 proves $E(\mathcal{N}_{pq \times 2}) > E(\mathcal{N}_{p \times 2q})$ for all $p \ge 1, q \ge 2$ (given input dimension $M \ge pq$).
- Fewer Parameters, More Regions: Comparing two 2-layer networks (input dim 10), a $(10, 10)$ architecture has 231 parameters and an expected 176,694.49 ReLU regions (616,666 for leaky ReLU). A top-heavy $(5, 30)$ network packs 266 parameters, yet drops to just 37,480.00 expected ReLU regions (384,168 for leaky ReLU).
- Wider vs. Deeper MLPs: Testing $1,000$ networks on $10,000$ Gaussian samples ($\sigma=0.01$), a slightly wider network ($w=100, l=99$) averaged 4,378.6 detected ReLU patterns, consistently beating its deeper twin ($w=99, l=100$) at 4,175.4.
- Tapering 3-Layer MLPs: Shifting neuron mass toward the input across 3 hidden layers steadily boosts complexity: going from hidden sizes $(80, 100, 120)$ up to $(120, 100, 80)$ increased average detected ReLU patterns from 2,515.47 to 4,849.78.
Limitations and Future Work
- Architectural Restrictions in Theory: The exact expectations and upper bounds rely on geometric symmetry, requiring layer widths to be non-increasing ($M \ge n_1 \ge n_2 \dots$) and weights to be independent with even density functions—assumptions that hold at initialization, but break down once gradient descent starts correlating weights during training. Comparing arbitrary network shapes theoretically remains an open challenge.
- Sampling Resolution & Saturation: The Monte Carlo method only detects non-constant regions hit by data, making it a lower bound weighted by the input distribution. If the sample spread ($\sigma$) is too wide or the network too fine-grained, every single sample lands in its own region (saturating at $10,000$ out of $10,000$), rendering comparisons inconclusive without scaling up the sample budget.
Summary updated