NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Bounding and Counting Linear Regions of Deep Neural Networks

Thiago Serra, Christian Tjandraatmadja, Srikumar Ramalingam

Introduction

This paper provides a precise mathematical toolkit for measuring the "expressiveness" of deep neural networks (DNNs). By bounding and exactly counting the number of linear regions these networks can create, the authors challenge conventional wisdom. They prove that while depth generally increases complexity, shallow networks can actually be more expressive than deep ones when the input dimensionality is very high. Furthermore, they introduce a novel method to count these regions in trained models using mixed-integer linear programming (MILP).

The Expressive Power of Linear Regions

Deep Neural Networks that use piecewise linear (PWL) activation functions—like the ubiquitous ReLU—essentially partition the input space into a collection of convex polyhedra, known as "linear regions." Within each of these regions, the network behaves like a simple linear function.

A common proxy for a network's expressive power is the total number of these regions it can create. While a well-known "folk theorem" suggests that deeper networks are exponentially more expressive than shallow ones, previous theoretical bounds have historically been loose or have ignored the constraints of input dimensionality. This paper closes the gap between theory and practice by providing tighter bounds and a concrete way to measure the actual complexity of real-world trained models.

Key Insights and Methods

Geometric Bounding and the Bottleneck Effect

The authors derive a new upper bound (Theorem 1) for the number of linear regions by tracking how the dimension of the image of each region changes as it passes through the network's layers. This approach accounts for the "bottleneck effect," where narrow layers permanently limit the complexity of all subsequent layers. Once the dimensionality of the space is compressed by a skinny layer early in the network, subsequent layers cannot recover that lost complexity.

When Shallow Beats Deep

In a surprising twist on the "deep is always better" narrative, the authors demonstrate that the input dimension ($n_0$) plays a critical role in a network's potential complexity. If the input dimension is large (e.g., high-resolution images), a shallow network with one wide layer can actually produce more linear regions than a deep network with the same total number of neurons.

Upper bounds on linear regions across different architectures as input dimension increases.

They established a dimensionality threshold: a deep rectifier network is only guaranteed to have more regions than a shallow counterpart if the number of neurons per layer exceeds the dimension of the input.

Exact Counting via MILP

To move beyond theoretical bounds, the authors formulated the problem of counting regions as a search for valid "activation patterns." By representing ReLU units as binary choices (on or off) within a linear optimization framework, they used off-the-shelf solvers to exactly count the number of regions in a trained network.

Comparison of theoretical upper bounds and the exact average count of linear regions in trained networks.

Before this paper, researchers mostly relied on asymptotic bounds. The MILP formulation proves that for small-to-medium networks, we can calculate the exact number of regions, providing a concrete metric for model capacity. As shown above, the new upper bound is strictly tighter than previous results and closely tracks the actual complexity of trained networks.

Empirical Results and Extensions

  • Complexity vs. Accuracy: Using the MNIST dataset, the authors trained small rectifier networks with varying architectures. They demonstrated that networks with more linear regions typically achieve lower cross-entropy error. However, they caution that "over-partitioning" the space doesn't always lead to better test-time generalization; the shape and dimensionality of those regions might be just as important as the raw count.
  • Maxout Networks: Extending their combinatorial analysis beyond simple ReLUs, the authors provided the first upper bound for multi-layer Maxout networks, showing their maximal complexity is $O((k^2n)^{Ln_0})$, where $k$ is the rank of the maxout unit.

Limitations and Future Work

The primary limitation of this work is the computational scale of the exact counting method. Because MILP is NP-hard, counting regions in state-of-the-art architectures (like ResNet or VGG) remains computationally prohibitive.

The authors suggest that future work should move beyond just counting regions to investigating their geometry. Understanding the volume, shape, and distribution of these regions could provide deeper insights into why certain architectures generalize better than others, paving the way for more principled neural network design.

Summary updated

BibTeX
@inproceedings{serra2018bounding,
  author = {Thiago Serra and Christian Tjandraatmadja and Srikumar Ramalingam},
  title = {{Bounding and Counting Linear Regions of Deep Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
  url = {https://openreview.net/forum?id=rJEYd2buZS},
}
Figure